彻底转换指南

本页面所适用的版本可能已经过时,最后更新于2.8

A total conversion is a mod that adapts CK2 game mechanics to another setting.

This can be a medieval setting based on a different fantasy lore (A Game of Thrones, Elder Kings, ...), or a completely different setting (After the End, Crisis of the Confederation,...).

Creating a total conversion mod is extremely time consuming, given that most or all vanilla content must be re-written to fit the new lore, meaning thousands lines of scripting.

Minimum vanilla elements

Some vanilla elements are referenced by the game executable, and are expected to be present (sometimes only if a specific DLC is active), otherwise the game will crash:

  • Defines in defines.lua
    • The section NLearningScenario references some events and characeter IDs used by the tutorial.
  • Modifiers listed in common/static_modifiers.txt
  • The minor titles at the begining of file common/minor_titles/00_minor_titles.txt (from title_regent to title_commander)
  • Some CBs [{{{1}}}]
  • Some landed_titles like e_rebels or e_pirates [{{{1}}}]
  • The following script should be present in events folder:
# ID 1 and 2 are empty dummy events that are used by the message system to spawn messages
# that should be displayed as events, their descriptions are filled in by the message system
letter_event = {
	id = 1
	is_triggered_only = yes
	desc = "A"
}
character_event = {
	id = 2
	is_triggered_only = yes
	desc = "B"
}
  • "default" tributary type [The doc says one is automatically created ?]

Mod file

In the .mod file, replace_path is there to prevent loading from vanilla. The exact list will depend on each mod setting and how the mod overrides vanilla files, but a typical list is:

Different history and titles:

replace_path = "history/characters"
replace_path = "history/offmap_powers"
replace_path = "history/provinces"
replace_path = "history/titles"
replace_path = "history/technology"
replace_path = "history/wars"
replace_path = "common/dynasties"
replace_path = "common/landed_titles"
replace_path = "common/offmap_powers"
replace_path = "common/offmap_powers/policies"
replace_path = "common/offmap_powers/statuses"
replace_path = "dlc_metadata/dlc_characters"
replace_path = "gfx/flags"

Note that replace_path of history folders does not seem to prevent the engine to read vanilla files during loading, which actually takes most of the loading time apart from graphics. A workaround during development is to rename vanilla folders to another name (ex: history/characters -> history/characters_old) to be sure they are ignored.

Different map:

replace_path = "common/trade_routes"
replace_path = "map/statics"

Different lore (depends how different):

replace_path = "common/buildings"
replace_path = "common/cultures"
replace_path = "common/mercenaries"
replace_path = "common/minor_titles"
replace_path = "common/objectives"
replace_path = "common/religions"
replace_path = "common/religious_titles"
replace_path = "events"
replace_path = "decisions"
replace_path = "gfx/loadingscreens"

Map modding

主条目:Map modding

See Guide to Total Conversion Map Modding / Clans of Ireland

Adapting events

When a vanilla event is unsuitable to the mod setting, try to find a lore-equivalent and override only the event localization keys (without changing the event script), rather than disabling the event entirely. Some events are more or less universal (ex: someone arrives with stories from a far away land), so adapting them:

  • Is cheap and reduces the modding work, since event modding can be very time consuming.
  • May force you to consider a narrative line that you would not have otherwise, or would be low priority to implement.

Music DLCs

Most vanilla music DLCs have religion or culture conditions, so will not be used by default. See music modding, to override the .txt file of each DLC, and activate the applicable songs.

Featured Rulers

The newly added Featured Rulers mechanic highlights historical rulers and invites you to play as them, but it will likely be inapplicable in the case of total conversion mods. It is not known whether you can edit the featured rulers and feats to reflect your own modded characters, but it is known how to disable the feature entirely and prevent it from referencing your new characters as if they were vanilla characters. One simply has to replace the file game\interface\highlighted_ruler.gui with a blank file in one's mod folder, and the entire window and associated mechanics are disabled.