Regiments modding - CK3RealmsinExile/RealmsInExile GitHub Wiki
Regiments are defined in /Crusader Kings III/game/common/men_at_arms_types
Here you'll find several txt files, some MaA need to be in 00_regional_maa_types.txt
if you wanna have your MaA as a regional type, while 00_cultural_maa_types.txt
is for cultural ones, open these with Notepad++ .
For best compatibility, use unique file names.
Example:
example_maa = { # maa = Men at arms
type = # Men at arms type of my_maa
damage = # damage value of unit
toughness = # toughness value of unit
pursuit = # pursuit value of unit
screen = # screen value of unit
terrain_bonus = { # Terrain bonus
forest = { # bonus values, i.e, damage = 10 }
}
counters = {
# what type of men at arms this counters for example archers
}
buy_cost = { # cost of a unit }
low_maintenance_cost = { # unraised maintenance cost of a unit }
high_maintenance_cost = { # raised maintenance cost of a unit }
stack = # Men in one unit
ai_quality = { # ai weight value }
icon = # name of icon without .dds
}
Example from lotr_cultural_regiment_types.txt
:
Here are some Variables that can be used when creating your MaA (WIP: taken from an old wiki, there are more varibles now).
Variable | Type | Description | Example |
---|---|---|---|
type | string | Unit type | type = skirmishers |
can_recruit | bool | If player can recruit MaA unit. If answer is yes then you don't need to include it. If you want you can write '''can_recruit = yes''' but you can also not include it and the result will be the same | can_recruit = no |
damage | int | Unit's damage value | damage = 10 |
toughness | int | Unit's toughness value | toughness = 10 |
pursuit | int | Unit's pursuit value | pursuit = 10 |
screen | int | Unit's screen value | screen = 10 |
terrain_bonus | block | Terain bonus | terrain_bonus = { forest = { damage = 3 screen = 3 } } |
counters | block | What unit types counters this unit. Can counter multiple units. | counters = { heavy_infantry = 1 } |
buy_cost | block | Cost of one unit | buy_cost = { gold = 150 } |
low_maintenance_cost | block | Low maintenance costs | low_maintenance_cost = { gold = 1 } |
high_maintenance_cost | block | High maintenance costs | high_maintenance_cost = { gold = 5 } |
mercenary_fallback | bool | --- | mercenary_fallback = yes |
holy_order_fallback | bool | --- | holy_order_fallback = yes |
stack | int | Amount of units per one stack | stack = 100 |
max_sub_regiments | int | --- | max_sub_regiments = 5 |
fallback_in_hired_troops_if_unlocked | bool | Mercs/holy orders won't have a preference towards this MaA if it is unlocked | fallback_in_hired_troops_if_unlocked = yes |
allowed_in_hired_troops | bool | --- | allowed_in_hired_troops = no |
fights_in_main_phase | bool | If set, only affects the pursuit phase. Handy for siege weapons | fights_in_main_phase = no |
siege_tier | int | How good it is at countering forts | siege_tier = 1 |
ai_quality | Variable | AI weight which is determined in ''\common\script_values\00_men_at_arms_values'' | value = culture_ai_weight_pikemen |
icon | string | Name of the .dds icon file to represent this MaA type. If you use custom icon then it should be placed in ''\gfx\interface\icons\regimenttypes'' | icon = skirmishers |
hired_stack_size | int | Size of sub-regiment for the purpose of hired troops. If not set, this will be the same as the "stack" value | hired_stack_size = 25 |
winter_bonus | block | Starting from game version 1.3.0, MaA can include Winter Bonus. Can include one or both bonuses (harsh or normal winter) |
If you want your custom Innovation to unlock your custom MaA unit, you'll need to go to \LotRRealmsInExileDev\common\culture\innovations
and open the file 00_cultural_maa_innovations
or lotr_maa_innovations
and put this code into the correct innovation.
unlock_maa = my_maa # Use the key of maa unit
Or you can also provide bonuses to the regiment.
'''Example''' (given by CK3 devs):
maa_upgrade = { type = cavalry damage = 0.1 toughness = 0.1 pursue = 0.1 screen = 0.1 siege_value = 0.1 max_size = 1 }
Example using lotr_maa_innovations.txt
:
WIP
You might want to unlock your regiments in a Tradition! And to do that you'll probably need to create an new custom Tradition! But adding new MAA into already existing traditions might be something you wanna do. The easiest step to do this is finding an already fitting tradition that unlocks MAA and repurpose it to what you want, the code that give a tradition a MAA is;
parameters = {
unlock_maa_name_of_maa = yes
}
Click to expand
Example of the creation of the Legions of Gundabad tradition, that unlock new MAA for them.
There are of course other variables that you can tie this into, like certain heritages or the tradition only be available to certain regions, But doing this should unlock the MAA into the Tradition if all the other steps of creating an MAA have been done.
WIP
Go to \LotRRealmsInExileDev\localization\english\culture
and open the file lotr_cultural_innovations_l_english.yml
and open it with Notepad++ . Then wrote your MaA name and description under the MaA section, and copy the code that's already existing there and switch in your name instead from the already copied one.
Example:
my_maa_name:0 "My Men at Arms" my_maa_name_flavor:0 "#F My Men at Arms are better than yours.#!"Note that 'my_maa_flavor' is the regiment's description.
Example from the file lotr_maa_innovations.txt
: