effect · add_max_trait
Definition
- Supported scope:
CHARACTER - Supported target:
none
Description
Adds a max assignable trait slot for a general
Example: add_max_trait = 1
add_max_traitCHARACTERnoneAdds a max assignable trait slot for a general
Example: add_max_trait = 1
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.
add_max_trait is commonly used to unlock additional trait slots for specific characters, such as rewarding an elite general with expanded capacity after completing special missions, national focuses, or events. Typical use cases include "ace pilot progression" style mods, where characters gradually expand their trait slot limits by accumulating combat achievements.
# In an event option, reward a specific character with an additional trait slot
character_event = {
id = my_mod.10
option = {
name = my_mod.10.a
# scope is already locked to the target CHARACTER in FROM or characters
add_max_trait = 1
add_skill_level = 1
}
}
[add_trait](/wiki/effect/add_trait): After expanding the trait slot limit, immediately assign a new trait to the character. Using both effects together ensures the new slot is meaningfully filled.[add_skill_level](/wiki/effect/add_skill_level): Typically awarded alongside ability improvements as a high-tier reward, creating a "comprehensive growth" design feel and avoiding the awkwardness of raising slots in isolation.[can_select_trait](/wiki/trigger/can_select_trait): Used for condition checking before granting slots, confirming whether the character currently has available trait slots and preventing logical duplication or overflow.[has_trait](/wiki/trigger/has_trait): Often serves as a prerequisite check, triggering further slot expansion only when the character already possesses a specific trait, enabling "trait promotion chain" mechanics.add_max_trait only executes in CHARACTER scope. Beginners often call it directly in COUNTRY scope (such as capital_scope or any_country_with_original_tag), resulting in script errors or silent failures. Always switch scope to a specific character first using characters = { ... } or = { }.add_trait must be called separately to specify which trait fills the slot. Otherwise, the slot increases but remains empty, creating "wasted allocation" confusion.