FAQ - Histidine91/Nexerelin GitHub Wiki

What is this mod?

This is my personal fork of the old Exerelin mod for Starsector, given its own thread because I wanted to be able to maintain my own OP. It is essentially a reimplementation of Zaphide's project (and in fact uses it as a codebase), but updated for new Starsector versions. It is compatible with most faction mods.

I don't want all the features (like invasions and such). How do I turn them off?

You can disable most settings in the config files, of which the most notable is [tt]Nexerelin/exerelin_config.json[/tt]. If you have the LunaLib mod, you can edit that file's settings using the ingame menu.

Some settings of interest may include:

  • enableInvasions
  • legacyInvasions: Uses an older, simpler interaction for invasions.
  • enableDiplomacy
  • enableAlliances
  • followersDiplomacy: If enabled, random diplomacy events can affect your personal faction.
  • colonyExpeditionInterval: Approximate interval between colony expeditions by NPC factions.
  • colonyExpeditionsOnlyAfterPlayerColony

Other configuration settings can also be found in [tt]Nexerelin/data/config/settings.json[/tt], although the ones here are put here because you shouldn't usually want to modify them.

How do I win the game?

  • Conquest victory: Your faction controls a simple majority of the total market size in the sector and 1.5 times that of the runner-up, or two-thirds of the heavy industries (not weighted by size).
  • Diplomatic victory: You are friendly or better with every faction.
  • Story victory: Complete the Galatia Academy quest. Note that pirate-type factions (including Luddic Path) are not counted for victory conditions with default config settings.

How do I disable a vanilla faction from interacting with the invasions, diplomacy and such?

Open its faction config in data/config/exerelinFactionConfig] and set the playable tag to false.

How do I make my mod compatible with Nexerelin?

There are a few things you need to do.

1) Register your faction

Open data/config/exerelinFactionConfig and make a .json file with the name of your faction. Actually, copypaste one of the existing ones, like Templars, because it’s faster that way.

Now open your new file and edit it. See Faction config for details on the various tags and what they do.

Then make a copy of data/config/exerelinFactionConfig/mod_factions.csv in your mod. Edit this copy to contain your faction(s) (and only yours; the other factions should remain in Nexerelin's master copy).

2) Optional further setup

Copy corvus_spawnpoints.csv in the same way and have the file contain appropriate entries for your faction. This tells Nexerelin where to spawn the player at start.

3) Random sector support

Your sector generation code should have something like this:

import exerelin.campaign.SectorManager;
/*[...]*/

public class MyModPlugin {
    @Override
    public void onNewGame()
    {
		boolean haveNexerelin = Global.getSettings().getModManager().isModEnabled("nexerelin");
		if (!haveNexerelin || !Global.getSector().getMemoryWithoutUpdate().getBoolean("$nex_randomSector"))
		    new MySectorGen().generate(Global.getSector());
    }
/*[...]*/
}

If you don't want to import Nexerelin as a library, you can check for random sector at the new game stage by checking the global memory flag

Be careful with any code that targets a specific planet or star system by name! Make sure you disable it in non-Corvus mode, and don't assume a given planet will always belong to its original owner.