effect · create_field_marshal
Definition
- Supported scope:
COUNTRY - Supported target:
none
Description
create field marshal for country
create_field_marshalCOUNTRYnonecreate field marshal for country
Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
create_field_marshal is commonly used in mods to dynamically generate historical generals for specific nations, or to assign a new field marshal role to a country after certain events are triggered. For example, in a country event, when a particular national focus is completed or specific conditions are met, you can generate a field marshal with initial traits for the player's nation:
country_event = {
id = my_mod.1
immediate = {
create_field_marshal = {
name = "Wolfgang Müller"
portrait_path = "gfx/leaders/GER/my_general.dds"
traits = { brilliant_strategist organizer }
skill = 3
attack_skill = 3
defense_skill = 2
planning_skill = 3
logistics_skill = 2
}
}
}
[add_field_marshal_role](/wiki/effect/add_field_marshal_role): If you already have a character created via generate_character, you can use this command to add a field marshal role, forming a complementary approach with create_field_marshal that follows the "create character first, then assign role" pattern.[add_trait](/wiki/effect/add_trait): After creating the field marshal, use this command to dynamically add additional traits, enabling more flexible trait composition logic.[has_country_leader](/wiki/trigger/has_country_leader): Before triggering, use this to check the current leader status of a nation, ensuring the timing of field marshal generation aligns with the country's political situation and avoiding duplicate triggers.[add_command_power](/wiki/effect/add_command_power): After field marshal creation, typically pair this with supplementing command power to ensure the player can immediately utilize the new field marshal's abilities.create_field_marshal requires name or corresponding character data to be complete. If portrait_path points to a non-existent file path, the game won't error but will display an empty portrait—beginners often forget to actually place the image file in the corresponding directory.create_field_marshal and add_field_marshal_role: create_field_marshal directly creates a brand new character and assigns them a field marshal role, while add_field_marshal_role adds a field marshal role to an existing character. Mixing these two up can result in duplicate character creation or scripts having no effect.