I am encountering a strange crash, and was wondering if you could help me track it down. This is the stack trace:
java.lang.NullPointerException
at com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry.startUpgrading(BaseIndustry.java:572)
at data.scripts.world.exerelin.industry.ocua_orbital_matrix.apply(ocua_orbital_matrix.java:95)
at exerelin.campaign.ai.action.industry.BuildHeavyIndustryAction.buildOrUpgrade(BuildHeavyIndustryAction.java:38)
at exerelin.campaign.ai.action.industry.BuildHeavyIndustryAction.generate(BuildHeavyIndustryAction.java:29)
at exerelin.campaign.ai.concern.BaseStrategicConcern.initAction(BaseStrategicConcern.java:262)
at exerelin.campaign.ai.concern.BaseStrategicConcern.fireBestAction(BaseStrategicConcern.java:196)
at exerelin.campaign.ai.ExecutiveAIModule.actOnConcerns(ExecutiveAIModule.java:100)
at exerelin.campaign.ai.StrategicAI.update(StrategicAI.java:151)
at exerelin.campaign.ai.StrategicAI.advanceImpl(StrategicAI.java:133)
at com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:78)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
I think the other relevant mods are Nexerelin, and possibly AoTD/Vaults .
I am a complete novice to Starsector modding, but here is my best guess as to what is happening...
It looks like ocua is trying to upgrade an industry, but when the starfarer code fetches the industry spec for an upgrade:
upgradeId = getSpec().getUpgrade();
IndustrySpecAPI upgrade = Global.getSettings().getIndustrySpec(upgradeId); // Starsector's BaseIndustry.java line 571
The industry Spec is null, which causes the game to crash when it tries to fetch the Industry Spec's build time in the startUpgrading() method.
As to WHY it's null, I am wondering if perhaps AoTD or some other mod is changing the upgrade path for heavy industry in some fashion that the custom code for ocua is unaware of. I am *hoping* that maybe there is just an id in a csv file somewhere that needs to be updated, but can't wrap my head around how the base code and the mod code all wraps together.
If you have any thoughts, I would love to hear them. I tried just commenting out the offending lines from ocua_orbital_matrix, but I need a plugin file that doesn't appear to be present (plate shield plugin) in order to recompile. I am sure I am just running too many mods, but if there is a quick fix, it would be great to have all my mods be one happy family.
thank you for your time/thoughts.