Patch 2.5 mod compatibility guide

本页面讲述的内容长期有效


This guide describes the steps to make a mod compatible with patch 2.5.X from patch 2.4.5.[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.

Map

  • New folder common/province_setup does the association of provinceID with county title, maximum number of settlements and terrain. These information are also present in province history, but was probably duplicated as loading of saves no longer executes the history. Make sure that any wasteland provinces do not have a title line, otherwise the game will crash on startup.
  • New folder map/statics contains definition for the map frames. default.map file needs to be updated to reference static = "statics" instead of static = "static.txt"

Bookmarks

  • As history is no longer processed in the era selection screen, selectable characters need to be explicitly defined, by duplicating part of the character history. See bookmark modding. In particular:
    • replace bookmark = {} by a bookmark unique ID: bm_my_bookmark = {}
    • replace character = 1234 by selectable_character = { id = 1234 }
  • Bookmarks are now ordered chronologically, so you can make use of folder loading to improve mod compatibility.
  • In order to have a map load when clicking the Custom Game button on the era selection screen, custom_start = yes needs to be added to one bookmark.

Laws

  • law_groups has been added (and group to reference it inside the laws). Any modded demesne law should be added as a group with law_type = realm
  • ze_council_power_laws.txt must be tweaked to do the historical setup of council laws (this is not via title history like for other laws) in default_selection block, via:
additive_modifier = { 
  value = 10			
  title = e_byzantium	
}

Councillor and honorary titles

  • is_voter = yes need to be added to councillors or minor titles that can vote in the council.
  • The councillor eligibility conditions have been extracted to scripted triggers: can_be_marshal_trigger, can_be_chancellor_trigger, ... Custom conditions should be moved to file 00_scripted_triggers.txt as well.
  • If applicable, honorary titles should be made eligible to women, if status of women law is high enough. Typically:
OR = {
  is_female = no
  liege = {
    primary_title = {
      OR = {
        has_law = status_of_women_3
        has_law = status_of_women_4
      }
    }
  }
}
  • Monthly prestige of minor titles has been increased roughly 10 times.
  • Add in honorary titles allowed_to_hold block:
OR = {
	primary_title = { temporary = no }
	NOT = {
		primary_title = {
			always = yes
		}
	}
}

Opinion

Most opinions have been reduced (often halved), both for positive and negative:

  • Opinion modifiers
  • Minor titles opinion_effect (usually 5 if small title, 10 if normal, 15 if very prestigious)
  • Traits opinions (vassal_opinion, same_opinion, etc. - but excluding sex_opinion), with a minimum of +/-5
  • Succession laws
  • Religion short_reign_opinion_year_mult

Modded opinions should be adapted as well for balance.

Localization

Load order of localization files has been changed again: the last definition wins on vanilla + mod files combined and order alphabetically.[2]

So you need to put all the overridden vanilla keys in a separate file, with a name starting zz_ prefix, to ensure it is loaded last.

Before patch 2.4.X, the first loaded definition used to be winning, while before that mod keys were always overriding vanilla.

Other

  • A new southindiangfx ethnicity has been added, and should be added to any modded south Indian cultures: graphical_cultures = { southindiangfx indiangfx muslimgfx }
  • is_job_ambition=yes needs to be added for ambitions to get a position on the council (probably to help the A.I.)
  • For education traits, attribute = <attribute> has been added to specify the main attribute of each education
  • num_culture_realm_provs, num_title_realm_provs and num_religion_realm_provs have been changed to use value parameter instead of num. For instance num_culture_realm_provs = { num = 2 culture = swedish } has been changed to num_culture_realm_provs = { value = 2 culture = swedish }
  • Government flavors have been added in common/government_flavor folder, to customize government name and illustration. See government modding.
  • free_levies_in_offensive_war = yes should be added to custom Muslim governments.
  • allowed_to_target_tributaries = no and allowed_to_target_suzerains = no can be added to CBs to simplify previous condition:
can_use = {
  ROOT = {
    NOR = {
      pays_tribute_to = FROM
      any_liege = {
        OR = {
          pays_tribute_to = FROM
          FROM = {
            pays_tribute_to = PREV
          }
        }
      }
    }
  }
}
  • Custom holy orders that can be expelled should be added to can_use_title block of dejure_barony_claim, dejure_county_claim and other_dejure_county_claim CBs
  • Custom faction membership modifiers must be tweaked so that coerced characters bypass the factor 0 modifiers:
modifier = {
  factor = 0
  # Other conditions
  NOT = {	
    has_opinion_modifier = {
      who = FROM
      modifier = opinion_coerced_into_joining_faction
    }
  }
}
  • Non-agression pacts should be checked when an action (decision, plot, ...) would break it (i.e. action should not be available). For CBs, the check is already hardcoded.
FROM = {
  NOT = {
    has_non_aggression_pact_with = ROOT
  }
}
  • Faction and plot decisions should check that the realm peace is not enforced.

For vassal character scope:

liege = {
  OR = {
    independent = yes
    AND = {
      will_liege_enforce_peace = no
      has_liege_enforced_peace = no
    }
  }
}

For the liege character scope:

will_liege_enforce_peace = no
has_liege_enforced_peace = no
  • For events between two characters, an option should be added in case one owes a favor to the other, so that the AI would prefer that option.
  • When applicable, some rare event options could generate a favor:
if = {
  limit = {
    has_dlc = "Zeus"
  }
  reverse_add_favor = ROOT
}
  • To cope with new non-genetic traits Robust.png, Feeble.png, Shrewd.png and Dull.png:
    • Replace trait = strong by is_strong_trigger = yes
    • Replace trait = weak by is_weak_trigger = yes
    • Replace OR = { trait = genius trait = quick } by is_smart_trigger = yes
    • Replace OR = { trait = slow trait = imbecile} by is_dumb_trigger = yes
    • Check for events with remove_trait = xxx and add an extra remove_trait for the equivalent non-genetic trait.
  • Add a color = {} to religion groups

参考资料