Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: how to modify hullmods  (Read 6529 times)

Ankore

  • Ensign
  • *
  • Posts: 2
    • View Profile
how to modify hullmods
« on: December 12, 2019, 09:54:28 AM »

I would like to know how to modify some hullmods, since the exel file itself opens broken there, it is simply impossible to change normally those parameters in the ship modules that I want to change. For example, efficiency overhaul.

 I want to change the percentage of reduction in ship supply. But because of the broken table in Excel, I can’t even read it normally. Maybe I'm doing something wrong? It’s just that I didn’t find something similar to my question on the forum. Also, I would like to remove the “unremovable” hullmods of the case in some mods. (Sky mod with its low burning level is incredibly enraging. You can’t put modifications on them to accelerate outside the battle)

If there is already a similar topic where there is an answer to my question, I will be very grateful if they send me there.
Logged

Kenshkrix

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: how to modify hullmods
« Reply #1 on: December 13, 2019, 01:49:20 AM »

These values are embedded into the java code, so they're a bit trickier to edit than those which are exposed in the config files.
Fortunately starsector can compile these on startup if you set the mod files up correctly, so it can be done with a simple text editor and some .java files.
Note that this can increase the initial loading time of the game, but in my experience doesn't have much impact after the game has finished loading, YMMV.

Anyways, I've attached a quick example I made for you that edits the efficiency overhaul mod and makes it super OP at 90% cost reductions.
This made it faster to test and you can edit it by just opening the EfficiencyOverhaul.java file with notepad and editing the variable called "MAINTENANCE_MULT".

Note that there are a few relevant points to editing hullmods this way, but primarily you want to ensure that the hull_mods.csv file's script entry for the hullmod in question points to your modified script.

I can answer questions related to editing hullmods, but making brand new ones is a bit more involved so no guarantees on that front.
Also I don't always respond very quickly, so don't hold your breath.

Edit: Also for editing csv files I recommend something like Ron's Editor: https://www.ronsplace.eu/products/ronseditor
The free version has worked perfectly with Starsector's csv files for me thus far, and it's a lot easier than trying to edit them in plaintext or Excel or something.

[attachment deleted by admin]
« Last Edit: December 13, 2019, 01:54:42 AM by Kenshkrix »
Logged

Ankore

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: how to modify hullmods
« Reply #2 on: December 13, 2019, 06:26:54 AM »

Thank you very much, you gave me great help, although I just wanted to see how to change the parameters of the modifications, I am not particularly interested in playing with cheats. I just want to figure out how to change some parameters. (There is a great mod for the console for cheats)
« Last Edit: December 13, 2019, 06:37:30 AM by Ankore »
Logged

Kenshkrix

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: how to modify hullmods
« Reply #3 on: December 13, 2019, 03:35:17 PM »

Thank you very much, you gave me great help, although I just wanted to see how to change the parameters of the modifications, I am not particularly interested in playing with cheats. I just want to figure out how to change some parameters. (There is a great mod for the console for cheats)
Glad to hear it helped.

And I always use ridiculous numbers when I'm testing stuff, since it's just an example I didn't bother changing it to something reasonable after I made sure it worked.
Logged

Jabroni Pepperoni

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: how to modify hullmods
« Reply #4 on: March 19, 2020, 08:49:57 AM »

These values are embedded into the java code, so they're a bit trickier to edit than those which are exposed in the config files.
Fortunately starsector can compile these on startup if you set the mod files up correctly, so it can be done with a simple text editor and some .java files.
Note that this can increase the initial loading time of the game, but in my experience doesn't have much impact after the game has finished loading, YMMV.

Anyways, I've attached a quick example I made for you that edits the efficiency overhaul mod and makes it super OP at 90% cost reductions.
This made it faster to test and you can edit it by just opening the EfficiencyOverhaul.java file with notepad and editing the variable called "MAINTENANCE_MULT".

Note that there are a few relevant points to editing hullmods this way, but primarily you want to ensure that the hull_mods.csv file's script entry for the hullmod in question points to your modified script.

I can answer questions related to editing hullmods, but making brand new ones is a bit more involved so no guarantees on that front.
Also I don't always respond very quickly, so don't hold your breath.

Edit: Also for editing csv files I recommend something like Ron's Editor: https://www.ronsplace.eu/products/ronseditor
The free version has worked perfectly with Starsector's csv files for me thus far, and it's a lot easier than trying to edit them in plaintext or Excel or something.

This is a great info! I am trying to do the same with both Expanded Cargo Holds & Auxiliary Fuel Tanks to slightly modify percentage increase in cargo/fuel to keep up with procurement missions. I tried finding the values in the jave but I am a newbie when it comes to modding this game and I fear I am doing something wrong
Logged

Kenshkrix

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: how to modify hullmods
« Reply #5 on: March 20, 2020, 05:57:14 PM »

This is a great info! I am trying to do the same with both Expanded Cargo Holds & Auxiliary Fuel Tanks to slightly modify percentage increase in cargo/fuel to keep up with procurement missions. I tried finding the values in the jave but I am a newbie when it comes to modding this game and I fear I am doing something wrong
If you go into the folder Starsector/starsector-core/, you should find a zip file named starfarer.api.zip, if you unpack this it'll have a bunch of stuff in it.

What you're looking for in this case is the folder at Starsector\starsector-core\starfarer.api\com\fs\starfarer\api\impl\hullmods\
This has a number of java files in it, including AuxiliaryFuelTanks.java, and ExpandedCargoHolds.java.

You'll need to copy these into a mod folder and edit them to make a mod.
It will also need a hull_mods.csv file so that the game actually loads these new java files, you can find an example of that in starsector-core\data\hullmods\
Don't copy the whole thing though, only fill your hull_mods.csv file with the hullmods you're actually changing or adding.
Logged

Jabroni Pepperoni

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: how to modify hullmods
« Reply #6 on: April 01, 2021, 06:03:18 PM »

These values are embedded into the java code, so they're a bit trickier to edit than those which are exposed in the config files.
Fortunately starsector can compile these on startup if you set the mod files up correctly, so it can be done with a simple text editor and some .java files.
Note that this can increase the initial loading time of the game, but in my experience doesn't have much impact after the game has finished loading, YMMV.

Anyways, I've attached a quick example I made for you that edits the efficiency overhaul mod and makes it super OP at 90% cost reductions.
This made it faster to test and you can edit it by just opening the EfficiencyOverhaul.java file with notepad and editing the variable called "MAINTENANCE_MULT".

Note that there are a few relevant points to editing hullmods this way, but primarily you want to ensure that the hull_mods.csv file's script entry for the hullmod in question points to your modified script.

I can answer questions related to editing hullmods, but making brand new ones is a bit more involved so no guarantees on that front.
Also I don't always respond very quickly, so don't hold your breath.

Edit: Also for editing csv files I recommend something like Ron's Editor: https://www.ronsplace.eu/products/ronseditor
The free version has worked perfectly with Starsector's csv files for me thus far, and it's a lot easier than trying to edit them in plaintext or Excel or something.

[attachment deleted by admin]

Hi @Kenshkrix ! Is there any way to recreate this efficiency overhaul mod that was attached to this thread awhile back? I love using it and toying around with it but it seems the attachment was deleted.
Logged

Kenshkrix

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: how to modify hullmods
« Reply #7 on: April 02, 2021, 08:16:47 PM »

Hi @Kenshkrix ! Is there any way to recreate this efficiency overhaul mod that was attached to this thread awhile back? I love using it and toying around with it but it seems the attachment was deleted.
It's really easy to recreate, in fact I made it again just now, see the attachment below.
Here's a quick step by step guide to finding the .java files for the other hullmods:
  • Go to \Fractal Softworks\Starsector\starsector-core
  • Find and Unpack the starfarer.api.zip file
  • There should be a \com\ folder wherever you unpacked it
  • Navigate to \com\fs\starfarer\api\impl\hullmods
  • A bunch of .java files should be there, including EfficiencyOverhaul.java

[attachment deleted by admin]
Logged

Jabroni Pepperoni

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: how to modify hullmods
« Reply #8 on: April 02, 2021, 10:30:10 PM »

Hi @Kenshkrix ! Is there any way to recreate this efficiency overhaul mod that was attached to this thread awhile back? I love using it and toying around with it but it seems the attachment was deleted.
It's really easy to recreate, in fact I made it again just now, see the attachment below.
Here's a quick step by step guide to finding the .java files for the other hullmods:
  • Go to \Fractal Softworks\Starsector\starsector-core
  • Find and Unpack the starfarer.api.zip file
  • There should be a \com\ folder wherever you unpacked it
  • Navigate to \com\fs\starfarer\api\impl\hullmods
  • A bunch of .java files should be there, including EfficiencyOverhaul.java

You are a HERO! Thanks a ton my guy. Really appreciate the help here :)
Logged