Mod that modifies some existing modules and hulls

Welcome to the galaxy of modding. Ask your questions, post your mods, explore the universe of galactic modding...
User avatar
Danou
Supreme Robot
Supreme Robot
Posts: 136
Joined: Fri Nov 13, 2009 1:52 pm

Mod that modifies some existing modules and hulls

Postby Danou » Wed Aug 19, 2015 12:59 pm

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'.
Creator of Danou's Rebalance Mod

User avatar
dafrandle
Supreme Robot
Supreme Robot
Posts: 439
Joined: Fri Jun 08, 2012 8:04 pm

Re: Mod that modifies some existing modules and hulls

Postby dafrandle » Thu Aug 20, 2015 5:12 pm

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
having a job has allowed me to understand why Archduke Astro has no time to work on his mods

User avatar
Danou
Supreme Robot
Supreme Robot
Posts: 136
Joined: Fri Nov 13, 2009 1:52 pm

Re: Mod that modifies some existing modules and hulls

Postby Danou » Thu Aug 20, 2015 7:28 pm

dafrandle wrote: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.
Creator of Danou's Rebalance Mod

User avatar
dafrandle
Supreme Robot
Supreme Robot
Posts: 439
Joined: Fri Jun 08, 2012 8:04 pm

Re: Mod that modifies some existing modules and hulls

Postby dafrandle » Fri Aug 21, 2015 5:28 am

(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.


Danou wrote:Modifying the original files has the disadvantage that it's not handled by the in-game mod browser


i'm not entirely sure what you mean by this.
having a job has allowed me to understand why Archduke Astro has no time to work on his mods

User avatar
Danou
Supreme Robot
Supreme Robot
Posts: 136
Joined: Fri Nov 13, 2009 1:52 pm

Re: Mod that modifies some existing modules and hulls

Postby Danou » Fri Aug 21, 2015 1:00 pm

dafrandle wrote: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.

I assume ships from online challenges will also follow 'my local stats', at least I think it's how it worked in GSB1.
dafrandle wrote:
Danou wrote:Modifying the original files has the disadvantage that it's not handled by the in-game mod browser


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

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:
Image

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 :) )
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
Creator of Danou's Rebalance Mod

User avatar
dafrandle
Supreme Robot
Supreme Robot
Posts: 439
Joined: Fri Jun 08, 2012 8:04 pm

Re: Mod that modifies some existing modules and hulls

Postby dafrandle » Sat Aug 22, 2015 4:31 am

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.
having a job has allowed me to understand why Archduke Astro has no time to work on his mods


Return to “GSB2 Modding Galaxy”

Who is online

Users browsing this forum: No registered users and 1 guest