Mod that modifies some existing modules and hulls

I would like to make a mod, that modifies some module and hull stats from the existing modules and hulls.

I started with the modules by copying the shipmodules.csv file into my mod folder C:\Program Files (x86)\Gratuitous Space Battles 2\danous_test\data\shipmodules.csv. I deleted all modules but leaved the ‘cruiser_heavy_beam_laser’, and modified the cost to 500. I deliberately let the same ‘name’, so that the weapon get replaced.

Unfortunately this didn’t work like intended. Ingame the beam module was duplicated (with the new cost of 500), and not replaced like expected. If I wanted to make a new weapon, I had choosen another ‘name’!

I did also test to replace an existing hull (using the same filename and the same ‘name’ in the textfile), but it didn’t work. Again, I got a duplicate hull with my new stats.

Request: Let us replace existing modules and hulls when using the same 'name’.

you can do what you want your just doing it wrong, you have to actually modify the base weapons files for the game or you will get two copies

Modifying the original files has the disadvantage that it’s not handled by the in-game mod browser, or at least I didn’t manage to do so.
@dafrandle: Can you confirm this?

This is not a problem as long only I am involved. But if one day I decide to publish the mod, it would be convenient for the players if it would be handled by the in-game mod browser.

(this is assuming that the basic code of ship files and modules and also the basic way challenges are handled hasn’t changed massively since gsb1)

there is no way to outright replace a vanila weapon with a different weapon (even if it has the same name, stats, etc.)

you either have to change it’s stats or make a duplicate.

if you change it’s stats then you will have to follow the stats you set up when you make a ship, but any ship you get from challange lists won’t because they were constructed with the vanilla settings.

if you make a duplicate that won’t happen but you will need to distribute the mod.

i’m not entirely sure what you mean by this.

I assume ships from online challenges will also follow ‘my local stats’, at least I think it’s how it worked in GSB1.

When I make a new weapon (or a duplicate from an existing one) I have the possibility to make this a mod that is listed in the in-game mod-browser like this:

But, AFAIK this is only possible for new weapons. I cannot do this if I want to replace an existing weapon with other stats.

If I could list such a mod (changing stats from existing weapons) in the in-game mod-browser it would have the following advantages:

  1. It looks nice for the players if they can enable/disable the mod in-game
  2. Any sort of ‘side-effects’ would be handled by the game automatically (cliffski would need to code it obviously :slight_smile: )
    Example of ‘side-effects’: When a official patch it about to install (suppose it overwrites the file shipmodules.csv), the game could automatically disable all mods before applying the patch.

If this is not handled by the game, the patch will overwrite the modded file shipmodules.csv. The player has then to manually handle it like this:

  1. restore the original shipmodules.csv (and other files that where modified by the mod)
  2. manually trigger the patch again
  3. re-install the mod

there are two things i can think of doing, you can have everyone overwrite the game files (and hope they make backups) or you can turn off the base game and supply all the files again.

cliffski is best equipped to answer this question.