Regiments modding

From CK3 Wiki
Jump to navigation Jump to search

Creating a Regiment[edit | edit source]

Regiments are defined in /Crusader Kings III/game/common/men_at_arms_types

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
}

Variables[edit | edit source]

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) winter_bonus = {

normal_winter = {
damage = -10
toughness = -5
}
harsh_winter = {
damage = -20
toughness = -10
}
}

Regiments in Innovations[edit | edit source]

If you want your custom Innovation to unlock your custom MaA unit.

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
}

Localization[edit | edit source]

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.