Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Is there a way to easily change Missile Autoloader stats?  (Read 369 times)

Killer of Fate

  • Admiral
  • *****
  • Posts: 603
    • View Profile
Is there a way to easily change Missile Autoloader stats?
« on: October 29, 2023, 09:28:10 AM »

I was changing the way how ECCM and Expanded Missile Racks worked. I swapped their OP costs and gave the s-mod penalty to ECCM instead, however now that I did that, I felt like I've left Missile Autoloader in the dirt. I was hoping I would be able to change it. But I can't change it without making it feel arbitrary on what these changes are or without editing the original java script file. Normally I would just take the script from inside the starfarer.api and then put into a mod and replace some lines of code.

I was hoping I'd be able to just remove the s-mod penalty, and then just lower the cost to 5, 10, 15, 25. But then I felt like maybe I could just double the amount of missile reload points and keep the original cost and s-mod penalty. However it turns out that triggering the file from outside the starfarer.api causes some sort of compilation error.

I interpret this issue as it being the result of the game not reading the file in a proper api way, thus some java script features do not act properly.

So, what solution is there? Do I just unpack the file, find the singular missile autoloader file, change a few numbers and then repackage it and shove it in there? Or is there a simpler way?



PS.
I understand the missiles in vanilla are already quite overpowered, and buffing them doesn't really have much sense, but this is for a mod... So, in that mod the health and shield of ships kinda counters their strike nature, and allows actually them to survive more than one barrage. And also I've buffed fighters in the same mod, Talons can now kinda shoot missiles rather than ram into them... Ehhh... But that is besides the point. I'm just putting this here to prevent a misunderstanding in case one happens.
« Last Edit: October 29, 2023, 10:00:04 AM by Killer of Fate »
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: Is there a way to easily change Missile Autoloader stats?
« Reply #1 on: October 29, 2023, 04:56:06 PM »

I expect that unlike the other two hullmods, Missile Autoloader script uses features that are incompatible with Janino, the runtime compiler used by the game. Meaning you'll need an IDE to compile the script and create a .jar file that your mod can use.
The Starsector wiki has an article that covers IDE setup.

(If you know how, you can do the compilation using command line and put it in a .jar yourself, but ugh)
Logged

Killer of Fate

  • Admiral
  • *****
  • Posts: 603
    • View Profile
Re: Is there a way to easily change Missile Autoloader stats?
« Reply #2 on: October 30, 2023, 06:16:49 AM »

I expect that unlike the other two hullmods, Missile Autoloader script uses features that are incompatible with Janino, the runtime compiler used by the game. Meaning you'll need an IDE to compile the script and create a .jar file that your mod can use.
The Starsector wiki has an article that covers IDE setup.

(If you know how, you can do the compilation using command line and put it in a .jar yourself, but ugh)
wait, are u the guy that made Nexerelin? Kinda cool... Uhhhhh...
Thanks, I'll look into it.
Logged