Functions without document

From Total War Modding
Revision as of 02:29, 5 June 2024 by Rhox (talk | contribs) (functions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page will include information about functions without a document, or the document has the wrong information.

cm:add_unit_to_faction_mercenary_pool

cm:add_unit_to_faction_mercenary_pool(faction_script_interface faction, string unit_key, string recruitment_source, number unit_count, number replen_chance, number max_units, number max_replen_per_turn, string faction_requirement, string subculture_requirement, string culture_requirement, boolean use_partial_replen, string merc_unit_group)


This one is used to add province mercenaries, in the case of Wh3, they're used for undead's raise dead and Warrior of Chaos' Warband recruitment. The document has the wrong parameters for this function, and the vanilla does not use it, so make sure to check the correct parameters

cm:pending_battle_cache_get_attacker_embedded_character_subtypes & cm:pending_battle_cache_get_defender_embedded_character_subtypes

cm:pending_battle_cache_get_defender_embedded_character_subtypes(number index_of_defender)


Similar to cm:pending_battle_cache_get_defender_subtype(), but you can get embedding heroes subtypes also.

cm:is_agent_transformation_available

cm:is_agent_transformation_available(string agent_subtype_key)


Returns true if your agent_subtype is in the DB campaign_to_agent_subtypes_tables with the given campaign. Especially useful if you want to check certain agent_subtype is unique. (Given that modders have added it to that table)

cm:military_force_add_temporary_stance

cm:military_force_add_temporary_stance(number mf_cqi,string stance, number turn)


Can be used to give a certain stance to a military force for a time even if that faction does not have access to the stance via campaign_stances_factions_junctions_tables. If 0 is given to turn, it will be infinite.

cm:set_plague_component_state

cm:set_plague_component_state(faction_script_interface faction, string component, string state, boolean ?)


Used to handle ToD's new plague system. While they're not in the document, vanilla uses it, so check there.