1
Suggestions / Re: A use for your extra ships (and captains)
« on: November 22, 2024, 09:48:27 AM »
Wait, you can assign a home fleet in Nexerelin? When was that feature added?
Starsector 0.98a is out! (03/27/25)
37963 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain - java.lang.RuntimeException: Error loading [data.hullmods.MediumBallisticsIntegration]
java.lang.RuntimeException: Error loading [data.hullmods.MediumBallisticsIntegration]
at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassFormatError: Inconsistent constant value type in class file data/hullmods/MediumBallisticsIntegration
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.codehaus.janino.JavaSourceClassLoader.defineBytecode(JavaSourceClassLoader.java:244)
at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:194)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
package data.hullmods;
import com.fs.starfarer.api.combat.BaseHullMod;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;
import com.fs.starfarer.api.impl.campaign.ids.Stats;
public class MediumBallisticsIntegration extends BaseHullMod {
public static final float COST_REDUCTION = 3;
public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
stats.getDynamic().getMod(Stats.MEDIUM_BALLISTIC_MOD).modifyFlat(id, -COST_REDUCTION);
}
public String getDescriptionParam(int index, HullSize hullSize) {
if (index == 0) return "" + (int) COST_REDUCTION + "";
return null;
}
@Override
public boolean affectsOPCosts() {
return true;
}
}
Question - there are some older mods that I still like to use so I modify them myself. One of the thing I did was alter the hullmods for the new S-mod thing.
I edited both the java files of hullmods to the add the if (sMod) branch and the hullmods.cvs to add the SModDesc descriptions, but in-game no S-mod description show up, nor even the S-mod ui category. Am I missing something?
Hmm, nothing else comes to mind. Make sure the hullmod class is extending BaseHullMod - though if it wasn't, I think you'd have noticed due to other problems, so that's probably not it.
... are you testing this in the main menu? S-mod stuff only shows up in the campaign.
What's the mod called and link?"Take No Prisoners" and it's discord exclusive.