1
Mods / Re: [0.97a] Hazard Mining Incorporated (Xi Liu Fiddling Ed., 0.3.8f)
« on: April 12, 2025, 09:30:31 AM »
Heyho, in the current version (0.38f) the "Mining Hybridization Amplifier" hullmod still causes all weapons to deal hard flux even if there's just a single hybrid beam installed anywhere on the ship. Just posting this in case it hasn't been successfully fixed yet.
Reason seems to be that within the script (HMI_MiningHSA.java), in modifyDamageDealt, which the game already seems to call for every weapon, you iterate over all weapons on the ship manually in a for loop, and if any hybrid weapon is found, you set the damage type of the /current/ weapon the game is caling modifyDamageDealt for to hard flux.
Basically, you can save the for loop there and just check the param for the current weapon and the mount type, without any looping.
A good reference would be, for example, the "Laser Collimator" hullmod of the "Emergent Threats" mod, which does the same effect for a select few weapons and works fine (At least that's where I looked to see what's wrong out of curiosity, since I'm no starsector modder.
).
Hope it helps if it wasn't fixed yet.
Great mod!
Reason seems to be that within the script (HMI_MiningHSA.java), in modifyDamageDealt, which the game already seems to call for every weapon, you iterate over all weapons on the ship manually in a for loop, and if any hybrid weapon is found, you set the damage type of the /current/ weapon the game is caling modifyDamageDealt for to hard flux.
Basically, you can save the for loop there and just check the param for the current weapon and the mount type, without any looping.
A good reference would be, for example, the "Laser Collimator" hullmod of the "Emergent Threats" mod, which does the same effect for a select few weapons and works fine (At least that's where I looked to see what's wrong out of curiosity, since I'm no starsector modder.

Hope it helps if it wasn't fixed yet.
Great mod!