This guide describes the steps to make a mod compatible with patch 2.7.X from patch 2.6.3.
Note that this does not replace the usual step of merging files, in case the mod modifies some vanilla files.
In case of issues, run the latest version of The Validator, and try activating debug launch options, which will now report failed asserts in log files.
Folders and files
\common\custom_localisation\is moved to\localisation\customizable_localisation, so that custom localization commands don't impact the checksum.\interface\portrait_properties.txtis now folderized into\interface\portrait_properties\- Duplicated portrait.gfx files at the root of
\interface, are now only in\interface\portraits
Scripting
- 主条目:Scripting
New operators ==, >, >=, <, and <= have been introduced:
AND = {
society_rank > 1
ROOT = { society_rank == 1 }
}
However as of patch 2.7 they only work for new triggers (ex: society_rank) and the old triggers don't support this new syntax.[1]
Secret religions
- 主条目:Society modding
- A new secret trait should be created for each religion:
secretly_catholic = {
opposites = {
#Other religions
}
is_visible = {
OR = {
character = FROM
society_member_of = secret_religious_society_catholic
AND = {
is_close_relative = FROM
trait = secretly_catholic
}
}
}
same_opinion = 15
random = no
customizer = no
ai_zeal = -50
}
- Some triggers that exclude some religions may also need to be adapted to the new secret religion traits:
NOT = { religion_group = jewish_group }
NOT = { trait = secretly_jewish }
Artifacts
- 主条目:Artifact modding
Items previously managed as character modifiers, dynasty flags or traits should be migrated to artifacts.
For instance:
add_character_modifier = {
name = the_necronomicon
duration = -1
}
has_character_modifier = the_necronomicon
may become:
add_artifact = necronomicon
new_artifact = {
set_creation_date = 1.1.1
}
has_artifact = necronomicon
destroy_artifact = necronomicon
Targeted decisions
- ai_target_filter is now mandatory for targeted decisions (
ai_target_filter = selffor decisions taken on the character itself).
- Some normal decisions have been converted to targeted decisions with filters:
filter = self ai_target_filter = self
Misc
- Missing age variations of portraits (male1, male2, ...) will no longer default. Make sure you have portraitTypes with male, male1, male2, female, female1 and female2 for all your custom ethnicities.
- Game rules can be associated to one or multiple groups via
group = "TEXT_KEY_FOR_GROUP"
- In minor titles:
OR = {
primary_title = { temporary = no }
NOT = {
primary_title = {
always = yes
}
}
}
is replaced by:
NOT = {
primary_title = { temporary = yes }
}
- Religion and religion group opinion modifiers are now dynamic and may be defined in
common\modifier_definitions\:
<religion_group>_opinion = {
show_as_percent = no
is_good = yes
is_monthly = no
is_hidden = no
max_decimals = 0
}
They also need to be localized.
OR = {
trait = monk
trait = nun
}
is replaced by:
is_ascetic_trigger = yes
- Some obedience / non_interference checks are added in some events:
ROOT = {
NOR = {
obedient = PREV
non_interference = PREV
}
}
- French localization: a set of localization commands dedicated for French translations is included in
\localisation\customizable_localisation\00_customizable_localisation_FR.txt. For more info: Traduction remaniée - Crusader Kings II 2.7.x (in French)
- Region definitions included in
map/geographical_region.txtare now interpreted differently. Duchy references now equate to their de jure countries at thestart_datedefined incommon/defines.txt, not their de jure counties incommon/landed_titlesbefore history is executed. This change has no effect if no counties changede_jure_liegebefore thestart_date.
- Define
NDefines.NGraphics.NUMBER_OF_PROPERTIESis now determined automatically from portrait_properties file, and can be removed.
Outstanding bugs
- In character history, dynasty=0 is ignored for lowborns, and they get assigned a random dynasty[2]. Workaround is to reset the dynasty to none via effect:
1000.1.1 = {
birth = yes
effect = { dynasty = none }
}