• 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.
Update:

- Added folder structure for defines

This one will work a little different than other folders though because of it being in lua. The game will still keep its define.lua file under common and it will always be read first. But there is now a folder called defines in which users can add any number of lua-files which overwrites only those values specified.

So for instance you can add a file called GarsDefines.lua that only changes the value of DEMESNE_BASE_MAX_SIZE. The syntax for overwriting a define will look like this:

Code:
NDefines.NDiplomacy.DEMESNE_BASE_MAX_SIZE = 2.0

So in short, every mod can have their own unique defines file containing only those defines it alters.
 
  • 4
  • 1
Reactions:
Update:

- Added folder structure for defines

This one will work a little different than other folders though because of it being in lua. The game will still keep its define.lua file under common and it will always be read first. But there is now a folder called defines in which users can add any number of lua-files which overwrites only those values specified.

So for instance you can add a file called GarsDefines.lua that only changes the value of DEMESNE_BASE_MAX_SIZE. The syntax for overwriting a define will look like this:

Code:
NDefines.NDiplomacy.DEMESNE_BASE_MAX_SIZE = 2.0

So in short, every mod can have their own unique defines file containing only those defines it alters.
This is a great! Any chance of this being ported to EUIV when you back working on that game?
 
This is a great! Any chance of this being ported to EUIV when you back working on that game?

I will port it to EU4 as soon as possible.
 
Update:

- Added folder structure for defines

This one will work a little different than other folders though because of it being in lua. The game will still keep its define.lua file under common and it will always be read first. But there is now a folder called defines in which users can add any number of lua-files which overwrites only those values specified.

So for instance you can add a file called GarsDefines.lua that only changes the value of DEMESNE_BASE_MAX_SIZE. The syntax for overwriting a define will look like this:

Code:
NDefines.NDiplomacy.DEMESNE_BASE_MAX_SIZE = 2.0

So in short, every mod can have their own unique defines file containing only those defines it alters.
I've restored the "implemented in upcoming patch" section on the wiki page, and moved the folder exports to there.
Is this description for the section fine?
"The following suggestions have been implemented by Captain Gars in an upcoming patch, and should thus eventually be in the game. Do note that this doesn't necessarily mean the next patch, just a future one, and that delays sometimes happen."
 
That's fine.
 
Update:

- Added folder structure for defines

This one will work a little different than other folders though because of it being in lua. The game will still keep its define.lua file under common and it will always be read first. But there is now a folder called defines in which users can add any number of lua-files which overwrites only those values specified.

So for instance you can add a file called GarsDefines.lua that only changes the value of DEMESNE_BASE_MAX_SIZE. The syntax for overwriting a define will look like this:

Code:
NDefines.NDiplomacy.DEMESNE_BASE_MAX_SIZE = 2.0

So in short, every mod can have their own unique defines file containing only those defines it alters.

Sweet. Thanks for that one!
 
Update:

- Added folder structure for defines

This one will work a little different than other folders though because of it being in lua. The game will still keep its define.lua file under common and it will always be read first. But there is now a folder called defines in which users can add any number of lua-files which overwrites only those values specified.

So for instance you can add a file called GarsDefines.lua that only changes the value of DEMESNE_BASE_MAX_SIZE. The syntax for overwriting a define will look like this:

Code:
NDefines.NDiplomacy.DEMESNE_BASE_MAX_SIZE = 2.0

So in short, every mod can have their own unique defines file containing only those defines it alters.
What happens if two different mods try to override the same value?
 
What happens if two different mods try to override the same value?

The later one will just overwrite the value again. So whatever file is loaded last will decide the value of the define.
 
The later one will just overwrite the value again. So whatever file is loaded last will decide the value of the define.
Makes sense.

Using dependencies will ensure the mod calling the dependency will always get loaded last, right? Or is that only for actual conflicting files?
 
Has the defines edit been implemented yet?
 
Another question, is there anyway we could get combat_tactics exported to a folder define? I know it is obscure, but I tend to like having custom tactics.

Ok, I backtracked in the thread, I bloody love you :D Finally, I can finish my custom special unit mod. One question, will there be a folder structure for scripted triggers to enable better mod compatability?
 
I wish it was now, these new features are things I have been waiting for for months, to namely complete my special_units mod, which as I am sure as everyone is aware requires the impletementation of unit specific combat_tactics, technology and modifier definitions to be viable alongside the generic units.
 
One question, will there be a folder structure for scripted triggers to enable better mod compatability?

Yes, both scripted triggers and effects will have their folders.
 
  • 1
Reactions:
Update:
- Added folder structure to modifier_definitions
- MAX_WARDS_PER_GUARDIAN
 
  • 3
Reactions:
Update:
- Added folder structure to modifier_definitions
- MAX_WARDS_PER_GUARDIAN
With max wards, will that screw with the interface as usually adding extra wards via events makes them hang off of the edge of the character sheet.