Often, creating an identically named object (technology, trait, etc.) in a separate file will duplicate that object instead of replacing it. Because of this, a modder who wants to change an object from the vanilla game normally has to overwrite an entire core file: This is the main source of conflicts between mods. But (!), there are a handful of object types that will be replaced instead of duplicated:
If you come across other replaceable object types or see an error above, post here and I'll update the list.
- Game rules: Place a modified game rule from common/game_rules/00_rules.txt in a new file that comes after asciibetically.
- Policies: Place a modified policy from common/policies/00_policies.txt in a new file that comes after asciibetically.
- Scripted triggers: Place a modified trigger from common/scripted_triggers/00_scripted_triggers.txt in a new file that comes after asciibetically.
- Species rights: Place a modified species right from common/species_rights/species_rights.txt in a new file that comes after asciibetically.
- Localisation strings: Create a new folder, common/localisation/replace, and put any modified core localized string in <new_file>_l_<language>.yml.
- Defines: Definitions in common/defines/00_defines.txt can be overwritten individually in a separate file by including only those entries you wish to change, along with the named block they reside in. E.g., NGameplay = { PRESCRIPTED_PLANETS_NUM = 0 }
- Buildings are overwritten and not duplicated ... kind of. If a building is redefined in a file that loads after the core file, the second definition will--in most contexts--be the only definition of that building. You will, however, see multiple instances of the same building show up in upgrade options. It is therefore best to avoid doing this except for buildings that are not part of an upgrade chain.
- Events: Strictly speaking, an event can't be overwritten. What can be done instead is putting a modified vanilla event (same id) in a new file that will be read before the core file. This will cause the game to accept the mod's event and reject the core one, with a warning sent to the error log.
- Static modifiers: Place a changed static modifier from any of the core files in common/static_modifiers in a new file that comes before asciibetically. This works similarly to events but with the added perk of no warnings getting sent to the error log.
- Component templates
- Edicts
- Ethics
- Ship sizes
- Technologies
- Traits
- War Demands: On first impression this one appears to be overwritable. Only one instance of a demand will appear when declaring war and while a war is in progress. However, once a war is concluded, a demand's effect is run once for every instance of the demand.
If you come across other replaceable object types or see an error above, post here and I'll update the list.
Last edited:
- 6