Casus belli modding
Description[edit | edit source]
Every casus belli is made of:
- Prerequisites
- War goal
- Duration
- The way how CB is gained
- Is it possible to be given to subject
- Name
cb_restore_personal_union = { valid_for_subject = no is_triggered_only = yes months = 240 prerequisites = { OR = { government = monarchy government = dutch_republic } is_revolution_target = no FROM = { government = monarchy is_subject = no } } war_goal = take_capital_personal_union }
It is how the standard CB looks like.
Prerequisites[edit | edit source]
Prerequisites are special requirements, needed to obtain specific CB.
- No prerequsities
If CB does not require anything to be fired, then do not add "prerequisites = {" line. However, if no prerequisites are implemented, CB has to have is_triggered_only = yes, otherwise CB will never be launched.
cb_change_government = { valid_for_subject = no is_triggered_only = yes months = 120 war_goal = war_goal_change_government }
- Types of prerequsities
Possible requirements for CB are listed in Triggers. The way of scripting these is similar in scripting requirements in events. Also DLC can be added as prerequisite.
Example:
prerequisites = { culture_group = east_asian is_subject = no }
It means CB will only be possible if country is not subject, and has East Asian culture.
War goal[edit | edit source]
War goals are the goals of war, as the name says. They are listed in /common/wargoal_types. The player can choose one of them, or create a new one, but wargoal has to be written in wargoal_types files, otherwise your CB will not work.
In CB:
war_goal = war_goal_change_government
In wargoal_types:
war_goal_change_government = { type = take_capital badboy_factor = 0.75 prestige_factor = 1 peace_cost_factor = 1.0 allowed_provinces = { OR = { is_core = ROOT is_claim = ROOT any_neighbor_province = { owned_by = ROOT } } } po_change_government = yes po_demand_provinces = yes war_name = CHANGE_GOVERNMENT_WAR_NAME }
The structure of war goal[edit | edit source]
- Type - what is a main target in a war.
- Factors - 1 is standard value of each factor. 0.5 means half as much, 2 twice as much.
- Allowed provinces
- allowed_provinces_are_eligible = yes (optional): whether or not you can take provinces outside of the allowed ones
- Allowed peace offers
- Name of war
Localisation[edit | edit source]
The values you need to localise are the following:
- cb_restore_personal_union
- cb_restore_personal_union_desc
If you have chosen to create a new war goal, then the following lines need to be localised:
- take_capital_personal_union
- take_capital_personal_union_desc
- UNION_WAR_NAME
What do these values change?
- The first two will show up when declaring the war.
- The next two will show up when hovering over the war goal in the war screen.
- The last one will be the war name. For example, "English-French Colonial War"
Of course these values will change to fit your needs.
Documentation | Effects • Triggers • Modifiers • Scopes • Variables • Localisation • Customizable localization • Run files |
Scripting | Scripted function • Advisors • Ages • Bookmarks • Buildings • Casus belli • Colonial regions • Countries • Culture • Decisions • Defines • Diplomatic actions • Disasters • Empire of China • Estates • Events • Factions • Government • Great projects • History • Holy Roman Empire • Idea groups • Institutions • Mercenaries • Missions • Modifiers • Nation designer • On Actions • Parliament • Peace treaties • Policies • Rebel types • Religion • Subject types • Technology • Trade companies • Trade goods • Units |
Map | Map • Nation designer • Random New World • Trade nodes |
Graphics | 3D Models • Interface • Graphical Assets • Fonts • Particles • Shaders • Unit models |
Audio | Music • Sound |
Other | Console commands • Checksum • JoroDox mod making tool • Mod structure • Troubleshooting • The Validator • Run files |
Guides | Adding a province • Save-game editing • Scripting Tutorial |