Project Hospital
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
MoominLittlesocks
resident
Posts : 24
Reputation : 6
Join date : 2019-09-25
Age : 29
Location : Cardiff, Wales

Allowing multiple mods to work simultaneously Empty Allowing multiple mods to work simultaneously

Tue Oct 01, 2019 7:28 pm
Hello

So, myself and fellow modder, Butch, have already run into a problem in that our mods share the same 'StringTable' files and therefore create a conflict issue. By default the game will just take the most recent one and use that. How can we ensure the game takes all modified data required from all duplicate files?
jan.oxymoron
jan.oxymoron
developer
Posts : 2237
Reputation : 325
Join date : 2018-03-23

Allowing multiple mods to work simultaneously Empty Re: Allowing multiple mods to work simultaneously

Wed Oct 02, 2019 5:39 pm
Hi, not sure about the exact details, but it's definitely recommended to use as unique IDs as possible for anything new in the database - for example include the mod name in the ID for every file. The same applies to LocIDs in the string tables. Btw these should be safe to update, so these conflicts can be resolved relatively easily.
avatar
Butch
attending
Posts : 46
Reputation : 7
Join date : 2019-06-06

Allowing multiple mods to work simultaneously Empty Re: Allowing multiple mods to work simultaneously

Wed Oct 02, 2019 7:21 pm
So here are some details to give you a better understanding of what is going on here. Moomin created a mod called "Sexual Health" that added some new treatments to the game. I created a mod called "Realistic Collapses and Disease Incidence" which adds one new treatment. Both of us edited the StringTableEnTreatments.xml file.

Both of our mods named this new edited file:

ModStringTableEnTreatments.xml

In both of our mods, the LocIDs for the new treatments are unique. However, the mods remained incompatible. To resolve the conflict, we contacted each other and added the newly added LocIDs from both mods to each others string tables.

What were we doing wrong?
jan.oxymoron
jan.oxymoron
developer
Posts : 2237
Reputation : 325
Join date : 2018-03-23

Allowing multiple mods to work simultaneously Empty Re: Allowing multiple mods to work simultaneously

Thu Oct 03, 2019 9:38 am
Hi, first let me just mention it's great to see you guys working together! Smile

And actually there should be a simple solution - from what you're describing, you probably have similar IDs of the string table itself, this is at the very beginning of the files. Just/for example add the name of the mod there:

Code:

<Database>
    <GameDBStringTable ID="LOC_EN_MOD_REALISTIC_COLLAPSES_TREATMENTS">

The game doesn't really care about the filenames, it's these IDs that matter (and they could cause the whole file to get overridden). This is important in the database in general, because this way it's possible for mods not only to add but also change existing items in the game.

Btw somebody might join you guys and translate the string tables to their languages, in that case we just change the language code in the ID in the translated files, for example LOC_DE_MOD_REALISTIC_COLLAPSES_TREATMENTS etc.

Anyway, I hope this was it!
avatar
MoominLittlesocks
resident
Posts : 24
Reputation : 6
Join date : 2019-09-25
Age : 29
Location : Cardiff, Wales

Allowing multiple mods to work simultaneously Empty Re: Allowing multiple mods to work simultaneously

Thu Oct 03, 2019 11:53 am
That's great, thank you Jan.
avatar
Butch
attending
Posts : 46
Reputation : 7
Join date : 2019-06-06

Allowing multiple mods to work simultaneously Empty Re: Allowing multiple mods to work simultaneously

Fri Oct 04, 2019 1:12 am
Thank you very much Jan. May I humbly suggest that you update the modding guides (if you haven't already) to make these things extra clear? The average gamer won't find this stuff very intuitive and easy to figure out on their own.
Sponsored content

Allowing multiple mods to work simultaneously Empty Re: Allowing multiple mods to work simultaneously

Back to top
Permissions in this forum:
You cannot reply to topics in this forum