• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

omnicide

Second Lieutenant
11 Badges
May 3, 2016
132
140
  • Magicka
  • Cities: Skylines
  • Cities: Skylines - After Dark
  • Stellaris
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Age of Wonders III
  • Shadowrun: Dragonfall
  • Prison Architect
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
Minimize overwrites of vanilla files by adding separate files and loading from folders whenever possible, to improve mod compatibility and maintenance.
How do I accomplish this?
I am using mod1 by someone else and I wrote mod2. I don't want to merge them into one, but keep them separat. So mod1 overwrites 00_ship_sizes and adds a bunch of stuff. I want to add to that file too and create 01_ship_sizes. Afaik the changes should stack up. So I keep 01 empty except for my changes, right? But how do I not overwrite his changes? I mean what are the rules for overwriting or adding?

He is adding required components to the Corvette, I want to add a modifier.

I tried it and used just my changes in 01, thinking they get added on top of his. Unfortunately, it doesn't work that way.
 
- lack of ability to sequence mods
oh man this can't be true

- you can force it
how?


Also I still don't know what will happen once the game actually loads several instances of the same file one after the other. If Rangefinder adds a bunch of stuff to corvettes and all I want to add is a evasion nerf, would it suffice to put this in 01_ship_sizes:

Code:
corvette = {
modifier = {
ship_evasion_mult = -0.25
}
}
so this gets added, but it doesn't replace anything or screws with changes made by Rangefinder?
 
Ok, so this is how it works. The game loads files from folders in the alphabetical order. 00_file.txt in mod/a_mod is loaded first, then 00_file.txt in mod/b_mod.

A file with the same name will overwrite any other previously loaded file with the same name in its entirety.

So, you load one mod with 00_ship_sizes and it replaces all the information of vanilla 00_ship_sizes. You load yet another it replaces both of them.


A file with another name will only ADD information to the game.

So you have 00_ship_sizes that has corvette={CORVETTE_INFO} and 01_ship_sizes that has corvette={OTHER_CORVETTE_INFO} the game will now have two things declared as corvette, one with CORVETTE_INFO and one with OTHER_CORVETTE_INFO.

The exception to this is defines.lua
 
A file with another name will only ADD information to the game.

So you have 00_ship_sizes that has corvette={CORVETTE_INFO} and 01_ship_sizes that has corvette={OTHER_CORVETTE_INFO} the game will now have two things declared as corvette, one with CORVETTE_INFO and one with OTHER_CORVETTE_INFO.

This is what I'm trying to do. It sounds like you always replace what is inside a bracket. And the game can't handle 2 different corvette infos. So it doesn't work.
So I need to copy all of his corvette info into my file? Like this:

00_ship_sizes is his file with the entire stuff of vanilla + his changes (corvette_info1)
01_ship_sizes is my file and includes this:
corvette={CORVETTE_INFO1 (his stuff)
MY_Corvette info}

that then means that my mod requires his mod to function and no one can use my mod without his. Right?
 
This is what I'm trying to do. It sounds like you always replace what is inside a bracket. And the game can't handle 2 different corvette infos. So it doesn't work.
So I need to copy all of his corvette info into my file? Like this:

00_ship_sizes is his file with the entire stuff of vanilla + his changes (corvette_info1)
01_ship_sizes is my file and includes this:
corvette={CORVETTE_INFO1 (his stuff)
MY_Corvette info}

that then means that my mod requires his mod to function and no one can use my mod without his. Right?

No, in this case there will be one kind of type of corvette with his changes and one type of corvette with your changes.

Your mod needs to be 00_ship_sizes (vanilla+his changes+ your changes). If any of his changes references something outside 00_ship_sizes that is in his mod, his mod is required. If not, then your mod works just fine alone.

Respectfully, you are not correct on your first point.
Take at look at my post I linked. I traced every single file access by the game with procmon.
Ah, sorry, I got the order wrong, the conflicts I've dealt with so far have primarily been in terms of loading of files within the same folder. That said, the general point still stands.
 
  • 1
Reactions: