What about ascension perks? Can you alter a perk without complete overwrite?
I think the Micromanaged Bureaucracy mod does this. Works for me, at least.
What about ascension perks? Can you alter a perk without complete overwrite?
@dskod1, any chance you'll pin this thread as well? its very useful for us modders.
I creted a list on the Wiki. Does that not help?@dskod1, any chance you'll pin this thread as well? its very useful for us modders.
This is really helpful! I’ve been wanting to get into modding myself. Thank you!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:
- 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.
Object types that definitely get duplicated include:
- 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.
Given what you've said, do you think it would be possible to do a complete rewrite of how planets build buildings? Replace the tile system and adjacency with "the first 2-4 slots of each type grant bonus resources based on type/climate", and just have buildings consume slots.1. You can replace anything under /interface AFAIK, but its last loaded. No duplication messages.
Everyone with a Paradox Forum account can do work on the wiki. So:Vwell, some other stuff that should be added to the wiki @The Founder :
Try something that comes before vanilla file name, like _leaderrtrainer.txt (Underscore, I think, is pretty early)Sorry, just to be clear, if i'm overwriting an event (leader.20) in "events\leader_events_1", i need to include my leader.20 event in a file named....?
I ask because its currently in a file named "leaderretrainer_events" and i'm getting the error log telling me its loaded the vanilla and disregarded mine.
Try something that comes before vanilla file name, like _leaderrtrainer.txt (Underscore, I think, is pretty early)
The localization override doesn't seem to work for me.
Path is common/localisation/replace, file name is "vacuum_1_english.yml", and the contents are just l_english: pc_barren_cold:0 "Vacuum World" .