Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 582 583 [584] 585 586 ... 706

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1700358 times)

AccuracyThruVolume

  • Commander
  • ***
  • Posts: 133
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8745 on: May 12, 2022, 12:32:36 PM »

In the sector gen file you could do something like:


Code

public void generate(SectorAPI sector)
{
SharedData.getData().getPersonBountyEventData().addParticipatingFaction("Your_Snazzy_Faction");                     

FactionAPI Your_Snazzy_Faction = sector.getFaction("Your_Snazzy_Faction");
FactionAPI player = sector.getFaction(Factions.PLAYER);
FactionAPI hegemony = sector.getFaction(Factions.HEGEMONY);
FactionAPI tritachyon = sector.getFaction(Factions.TRITACHYON);
FactionAPI pirates = sector.getFaction(Factions.PIRATES);
FactionAPI independent = sector.getFaction(Factions.INDEPENDENT);
FactionAPI church = sector.getFaction(Factions.LUDDIC_CHURCH);
FactionAPI path = sector.getFaction(Factions.LUDDIC_PATH);   
FactionAPI diktat = sector.getFaction(Factions.DIKTAT);
FactionAPI kol = sector.getFaction(Factions.KOL);
FactionAPI persean = sector.getFaction(Factions.PERSEAN);
FactionAPI guard = sector.getFaction(Factions.LIONS_GUARD);
FactionAPI remnant = sector.getFaction(Factions.REMNANTS);
FactionAPI derelict = sector.getFaction(Factions.DERELICT);

//vanilla factions
Your_Snazzy_Faction.setRelationship(player.getId(), RepLevel.NEUTRAL);   
Your_Snazzy_Faction.setRelationship(independent.getId(), RepLevel.NEUTRAL);

Your_Snazzy_Faction.setRelationship(guard.getId(), RepLevel.SUSPICIOUS);   
Your_Snazzy_Faction.setRelationship(diktat.getId(), RepLevel.SUSPICIOUS);
Your_Snazzy_Faction.setRelationship(tritachyon.getId(), RepLevel.SUSPICIOUS);     

Your_Snazzy_Faction.setRelationship(persean.getId(), RepLevel.INHOSPITABLE);
Your_Snazzy_Faction.setRelationship(kol.getId(), RepLevel.INHOSPITABLE);

Your_Snazzy_Faction.setRelationship(pirates.getId(), RepLevel.HOSTILE);
Your_Snazzy_Faction.setRelationship(hegemony.getId(), RepLevel.HOSTILE);
Your_Snazzy_Faction.setRelationship(path.getId(), RepLevel.HOSTILE);   

Your_Snazzy_Faction.setRelationship(church.getId(), RepLevel.VENGEFUL);   

//environment
Your_Snazzy_Faction.setRelationship(remnant.getId(), RepLevel.HOSTILE);
Your_Snazzy_Faction.setRelationship(derelict.getId(), RepLevel.FRIENDLY);     
}

Logged

theDragn

  • Captain
  • ****
  • Posts: 305
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8746 on: May 13, 2022, 11:01:50 AM »

What causes the Ziggurat to make the player fleet always ID'able? I could have sworn it was a tag in ship_data.csv but it's only got HIDE_IN_CODEX.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8747 on: May 13, 2022, 11:28:43 AM »

The variant is given the "ship_unique_signature" when it's recovered.
Logged

Great Wound

  • Captain
  • ****
  • Posts: 268
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8748 on: May 13, 2022, 11:38:16 AM »

So out of curiosity, what are all the files that define how faction relations are at the start?

I'm trying to adjust a mod's starting relations to be a bit more "interesting", but it's proving to be a bit of a struggle.

The method I use only requires two files (the example I'm using comes from KoC)

data/world/generators.csv this file points towards the file that sets the relationships:
Spoiler
Code
className
data.world.KoClove
[close]

data/world/KoClove.java this file contains the rules that set the starting relationships:

Spoiler
Code
package data.world;

import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorGeneratorPlugin;
import com.fs.starfarer.api.impl.campaign.ids.Factions;
import com.fs.starfarer.api.impl.campaign.shared.SharedData;
import com.fs.starfarer.api.campaign.RepLevel;
import com.fs.starfarer.api.Global;

public class KoClove implements SectorGeneratorPlugin {
@Override
    public void generate(SectorAPI sector) {
initFactionRelationships(sector);
    }

public static void initFactionRelationships(SectorAPI sector) {
        FactionAPI hegemony = sector.getFaction(Factions.HEGEMONY);
FactionAPI tritachyon = sector.getFaction(Factions.TRITACHYON);
FactionAPI pirates = sector.getFaction(Factions.PIRATES);
FactionAPI independent = sector.getFaction(Factions.INDEPENDENT);
FactionAPI church = sector.getFaction(Factions.LUDDIC_CHURCH);
FactionAPI path = sector.getFaction(Factions.LUDDIC_PATH);
FactionAPI player = sector.getFaction(Factions.PLAYER);
FactionAPI diktat = sector.getFaction(Factions.DIKTAT);
        FactionAPI league = sector.getFaction(Factions.PERSEAN);
        FactionAPI KoC = sector.getFaction("KoC");

/// REP LEVELS: VENGEFUL/HOSTILE/INHOSPITABLE/SUSPICIOUS/NEUTRAL/FAVORABLE/WELCOMING/FRIENDLY/COOPERATIVE

KoC.setRelationship(Factions.HEGEMONY, RepLevel.COOPERATIVE);
KoC.setRelationship(Factions.PERSEAN, RepLevel.FRIENDLY);
KoC.setRelationship(Factions.INDEPENDENT, RepLevel.FRIENDLY);
KoC.setRelationship(Factions.TRITACHYON, RepLevel.HOSTILE);
KoC.setRelationship(Factions.LUDDIC_PATH, RepLevel.HOSTILE);
KoC.setRelationship(Factions.PIRATES, RepLevel.HOSTILE);
KoC.setRelationship(Factions.PLAYER, RepLevel.FAVORABLE);
    }

}
[close]

There are other methods but the way I do I create a new .java for each faction and specify it in the .csv that way each faction is separate and easier to keep track of.

Great Wound

  • Captain
  • ****
  • Posts: 268
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8749 on: May 13, 2022, 11:45:17 AM »

Here's a quick one, is there a way to specify sovereignty in the mod_info.json?

I've got Plight and KoC and after moving assets between them I'm wondering if there's a way to ensure they're used exclusive of each other.

Timid

  • Admiral
  • *****
  • Posts: 640
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8750 on: May 13, 2022, 12:19:19 PM »

Here's a quick one, is there a way to specify sovereignty in the mod_info.json?

I've got Plight and KoC and after moving assets between them I'm wondering if there's a way to ensure they're used exclusive of each other.
First one that loads up is usually the first one that stays there.

Or it's the last one that loads last that stays there.

The game is ironically picky on this for some reason regarding specific files.

Üstad

  • Commander
  • ***
  • Posts: 131
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8751 on: May 13, 2022, 04:36:12 PM »

I don't like the capture the flag points introduced after .95 version. I'm okay with them providing small buffs as they used to be but I want to decrease their effects and prevent them providing deployment points. I just want the battles maps how they used to be, how can I do that?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8752 on: May 14, 2022, 09:12:04 AM »

I don't like the capture the flag points introduced after .95 version. I'm okay with them providing small buffs as they used to be but I want to decrease their effects and prevent them providing deployment points. I just want the battles maps how they used to be, how can I do that?

The easiest thing to do would be to basically turn objectives off by changing:
"maxNoObjectiveBattleSize":100
In settings.json to some high value (like 10000).

To change the actual effects, you would need to provide a custom implementations of the scripts pointed to from data/config/battle_objectives.json.
Logged

Üstad

  • Commander
  • ***
  • Posts: 131
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8753 on: May 14, 2022, 05:31:26 PM »

I don't like the capture the flag points introduced after .95 version. I'm okay with them providing small buffs as they used to be but I want to decrease their effects and prevent them providing deployment points. I just want the battles maps how they used to be, how can I do that?

The easiest thing to do would be to basically turn objectives off by changing:
"maxNoObjectiveBattleSize":100
In settings.json to some high value (like 10000).

To change the actual effects, you would need to provide a custom implementations of the scripts pointed to from data/config/battle_objectives.json.
Would deleting       "battleSizeFractionBonus":0.1, remove the deployment point bonus? That's the only one introduced after 0.95 right? Thanks for the answer :)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8754 on: May 14, 2022, 06:30:50 PM »

Oh yeah, forgot that was there! Not sure about deleting it, but setting it to 0 should do the trick.
Logged

Üstad

  • Commander
  • ***
  • Posts: 131
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8755 on: May 15, 2022, 03:46:06 PM »

Oh yeah, forgot that was there! Not sure about deleting it, but setting it to 0 should do the trick.
Would Best of the Best skill still affect it, AI can have that skill right?

 Also is there a way to increase ECM cap to %20 just like Nav rating?
Logged

Big Bee

  • Commander
  • ***
  • Posts: 153
  • bugs are cool
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8756 on: May 16, 2022, 08:31:24 AM »

Hey, how feasible is it to just make a texture pack? In a completely different artstyle, even?

I know I might be able to replace the ship image files, but how hard would it be to make it into a mod so that the player wouldn't have to manually replace the files?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8757 on: May 16, 2022, 11:53:31 AM »

Would Best of the Best skill still affect it, AI can have that skill right?

Yes and I'm not sure offhand.

Also is there a way to increase ECM cap to %20 just like Nav rating?

Yes but you'd, IIRC, have to edit the script and recompile it/provide your own version etc.

Hey, how feasible is it to just make a texture pack? In a completely different artstyle, even?

I know I might be able to replace the ship image files, but how hard would it be to make it into a mod so that the player wouldn't have to manually replace the files?

That should be doable - if you just provide a mod with images in the same folder and with the same names as the vanilla ones, the game should load those instead of the vanilla ones.
Logged

Big Bee

  • Commander
  • ***
  • Posts: 153
  • bugs are cool
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8758 on: May 16, 2022, 12:02:18 PM »

That should be doable - if you just provide a mod with images in the same folder and with the same names as the vanilla ones, the game should load those instead of the vanilla ones.

Whoah nice! That's extremely convenient!

I love how easily modifiable stuff is in this game.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #8759 on: May 16, 2022, 12:15:28 PM »

:D
Logged
Pages: 1 ... 582 583 [584] 585 586 ... 706