1
Modding / Re: Misc modding questions that are too minor to warrant their own thread
« on: June 29, 2022, 09:13:39 AM »Hi, I want to make a little personal mod. I have no Idea on what's the best way to do this (if there's a way) My goal is to make ships tougher/more durable and capital ships less relevant.
1- I want to add additional armor, hull, ordinance points and reduce the speed of all ships (including ships from mods), all of this fixed by a percentage of the ships values. The only way I can think of doing
this is by making a hullmod, but I don't know if there's a way to add that hullmod to every single ship that spawn in the game (including bounties etc).
Hi! You might achieve this by creating a "hidden" hullmod and then adding it to all ShipHullSpecAPIs (Global.getSettings().getAllShipHullSpecs) in your ModPlugin.onApplicationLoad() method.2- Make capital ships way scarcer and make it so only one capital ship can be deployed at the same time in a battle (1 for each "team" involved) I really don't know how could I do this.
Hmm, not sure how you'd do this - there's no code to limit deployment by ship type, just by deployment points.
Thank you!
I was able to do the first point, hullmod for the armor and hull but I can't find a way to modify the ordnance points as the only related thing I can find it's in "MutableCharacterStatsAPI".
For the second point a good solution could be multiplying the capital ships deployment points so you wouldn't be able to deploy many capitals but i'm unable to find a way to do it, i've tried to do getSuppliesPerMonth() and getSuppliesToRecover() with a.modifyPercent() in the hullmod but it doesn't change the ships deployment points. Any ideas?
EDIT: I've found a way with getSuppliesToRecover and setSuppliesToRecover in the hullmod plugin (ShipHullSpecAPI). But now I need a way to limit this to capital ships only, is this possible?
EDIT 2: Finally figure it out, it was way simpler than what I was thinking.