Patch 2.4 mod compatibility guide

From Crusader Kings II Wiki
Jump to navigation Jump to search

This guide describes the steps to make a mod compatible with patch 2.4.X from patch 2.3.6.[1]

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.

The steps are:

New folders[edit]

  • Move bookmarks, combat_tactics, disease, job_actions, job_titles, triggered_modifiers files to their new folders
  • Move laws from /decisions/ to their new folder in /common/laws/

In addition, it's possible to make use of these new folders by splitting into multiple files, see loading from folders.

Religion[edit]

  • Remove can_hold_temples in religion definitions
  • Add religion flags to Muslim religions:
attacking_same_religion_piety_loss = yes
uses_decadence = yes
uses_jizya_tax = yes
  • Add to defensive religions:
camel_cavalry_defensive = 0.8
war_elephants_defensive = 0.8
  • Religion descriptions now get their characteristics automatically appended in the tooltip, so existing descriptions may need to be revised. Use <religion>_FEATURES localization key to describe additional features that are detected automatically.

Culture[edit]

  • Merge graphical_culture and second_graphical_culture into a list:
graphical_cultures = { indiangfx muslimgfx }

Minor titles[edit]

  • Split allow block minor_titles into 2 blocks:
    • allowed_to_hold: keep what was in default scope
    • allowed_to_grant: put what used to be in FROM scope, without the FROM
  • If applicable, port the conditions for commanders from job_marshal to minor_titles (feminist religions, etc.)
  • Ensure minor titles have a grant_limit, otherwise they cannot be assigned in any way (interface or event)
  • Use is_high_prio = yes for minor titles that impact gameplay and should not stay unoccupied.

Decisions and events[edit]

  • Remove vassal_decisions, replaced by targetted_decisions. Add appropriate filter / ai_target_filter (usually court or vassal). Note: targetted_decisions were already present since several patches, but vassal_decisions was still used by vanilla until now.
  • Use icon_religion flag for conversion decisions
  • If using grant_title for an inactive landed titles, activating the title beforehand is now required (like for landless titles) via:

activate_title = { title = THIS status = yes } or giving de jure lands.

  • has_character_flag = do_not_disturb was re-factored into
custom_tooltip = {
	text = is_not_busy_trigger_tooltip
	hidden_tooltip = { NOT = { has_character_flag = do_not_disturb } }
}
  • Replace convert_to_castle command by convert_to = CASTLE and similar for other convert_to_<holding> commands

History[edit]

  • Add title history to disable landless religious heads if needed, as they will now trigger great holy wars.
  • Tweak province history to ensure proper government types. As feudal_governments.txt gets loaded first, it gets priority: if any province in character demesne is feudal, it will be used as capital - even if the historical de jure capital is in a tribal province.
  • In province history, ensure that remove_settlement command is called after the switch of capital, if that settlement was the capital.
1250.1.1   = {
	b_orthez = castle
	capital = b_orthez
	
	# VERY IMPORTANT: remove_settlement must always be scripted AFTER a 'capital' switch away from the same settlement
	remove_settlement = b_morlaas
}

Governments[edit]

  • If having playable religious heads other than Reformed Germanic and Muslim Caliphs, replace in governments potentials:
NAND = {
	controls_religion = yes
	NOT = { religion_group = muslim }
	NOT = { religion = norse_pagan_reformed }
}

by the more generic condition:

NAND = {
	controls_religion = yes
	NOT = {
		primary_title = {
			is_landless_type_title = no
		}
	}
}

Map[edit]

  • Rename region.txt to island_region.txt
  • Add geographical_region.txt, and adapt if provinces or dejure are different from vanilla.
  • Modify default.map with region and geographical_region file paths:
region = "island_region.txt"
geographical_region = "geographical_region.txt"
  • Verify that the index of terrain.bmp uses valid colors, as this will now cause CTD on loading.

Other[edit]

  • Move holy_site definition in landed_titles from barony to county
  • Add is_nomadic = no to standard retinues potential conditions
  • Add extra layer GFX_player_overlay:p11 to all custom ethnicity portraits, at the end:
layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
       "GFX_character_background:p0"
       (...)
       "GFX_character_imprisoned:p6"
       "GFX_player_overlay:p11"
}
  • If using custom era selection screen, replace BM_RISE_OF_THE_HANSA by BM_THE_MONGOLS for "middle" bookmark name.
  • For total conversions mod, replace_path common/trade_routes folder, or create an empty file 00_silk_route.txt in it.


References[edit]

Modding guides