1
Mods / Re: [0.9.1a] 'Junk Pirates' 3.4.0 (including ASP & P.A.C.K.)
« on: February 07, 2020, 03:45:17 PM »
I was curious why I'd never seen any of these so-called anarchist systems despite all the sectors I've generated recently, so I glanced at your source code and learned they don't get created in Nexerelin's random sector mode. I'm sure you probably already knew that though, and I wouldn't have even posted anything except that my research led to the discovery of a related potential issue. Basically, I believe you may be running into a similar problem with generating problematic custom constellations that I recently reported in another mod here: https://fractalsoftworks.com/forum/index.php?topic=17362.msg279935#msg279935.
Fortunately, the same fix that worked there (removing the constellation generation entirely and using the vanilla theme generator collection instead) should also work here. You would just need to simplify your existing generate() method in JunkGen.java like this:
public void generate(SectorAPI sector) {
SharedData.getData().getPersonBountyEventData().addParticipatingFaction("pack");
SharedData.getData().getPersonBountyEventData().addParticipatingFaction("syndicate_asp");
SectorThemeGenerator.generators.add(1, new JunkPiratesAnarchistThemeGenerator());
new Brehinni().generate(sector);
new Canis().generate(sector);
//new York().generate(sector);
new Ursulo().generate(sector);
initFactionRelationships(sector);
}
And as with the other mod, you'll probably also need to add the following import statement:
import com.fs.starfarer.api.impl.campaign.procgen.themes.SectorThemeGenerator;
Anyway, that change should guarantee that the vanilla sector theme generator logic gets access to as many constellations as possible while also allowing your anarchist theme to do its thing...
Fortunately, the same fix that worked there (removing the constellation generation entirely and using the vanilla theme generator collection instead) should also work here. You would just need to simplify your existing generate() method in JunkGen.java like this:
Spoiler
public void generate(SectorAPI sector) {
SharedData.getData().getPersonBountyEventData().addParticipatingFaction("pack");
SharedData.getData().getPersonBountyEventData().addParticipatingFaction("syndicate_asp");
SectorThemeGenerator.generators.add(1, new JunkPiratesAnarchistThemeGenerator());
new Brehinni().generate(sector);
new Canis().generate(sector);
//new York().generate(sector);
new Ursulo().generate(sector);
initFactionRelationships(sector);
}
And as with the other mod, you'll probably also need to add the following import statement:
import com.fs.starfarer.api.impl.campaign.procgen.themes.SectorThemeGenerator;
[close]
Anyway, that change should guarantee that the vanilla sector theme generator logic gets access to as many constellations as possible while also allowing your anarchist theme to do its thing...