1) Stop it from crashingYour 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 || SectorManager.getManager().isCorvusMode())
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 if Corvus (or some other vanilla system/planet) exists.
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.
2) Add your faction to the listOpen
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
this page 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).
3) Non-random sector supportCopy
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.