Removing vanilla factionsThe most direct way is to have your mod be a total conversion and override the faction list, but this kills compatibility with other mods, so it's not desirable. That said, you can make a faction basically not be there if it has no colonies and is hidden from the intel screen. We'll cover not spawning a faction in the next point.
(I'm not sure how best to make vanilla blueprints not appear in salvage, figure that out later)
Don't spawn vanilla sectorNexerelin's settings.json contains this table:
"plugins":{
"coreLifecyclePlugin":"exerelin.plugins.NexCoreLifecyclePlugin",
"newGameCreationEntryPoint":"exerelin.world.ExerelinNewGameSetup",
"nex_restoreCommanderPlugin":"exerelin.combat.RestoreCommanderPlugin",
},
The relevant plugin is the
newGameCreationEntryPoint one.
The important code of that plugin starts
here, but the key point is you generate your own stars instead of the vanilla ones (how to generate stars is a separate exercise).
Discoverable stuffLook in the game's API* (you can find the source in starsector-core/starfarer.api.zip) for com.fs.starfarer.api.impl.campaign.procgen.themes.SectorThemeGenerator.
public static List<ThemeGenerator> generators = new ArrayList<ThemeGenerator>();
static {
generators.add(new DerelictThemeGenerator());
generators.add(new RemnantThemeGenerator());
generators.add(new RuinsThemeGenerator());
generators.add(new MiscellaneousThemeGenerator());
}
You can add/remove generators to the list from an external mod script. Look at each of the generators to see how they work.
Changing vanilla stuffYour mod can modify non-code vanilla files, e.g. you could replace the Kite sprite, or change its stats in the .ship file or ship_data.csv row.
JSON-type definition files (like .ship and .weapon) have merging between vanilla and all running mods, so your mod file only needs to include the values that have changed.
For CSVs, you'll need to replace the whole row.