diff --git a/MOD/Witcher/changelog.txt b/MOD/Witcher/changelog.txt index fc93a7297..2f0a164aa 100644 --- a/MOD/Witcher/changelog.txt +++ b/MOD/Witcher/changelog.txt @@ -31,6 +31,7 @@ Bugfix: - Fix an issue when playing an immortal race and giving away a title, causing own courtiers to leave - Fix a stackoverflow CTD due to guardian refusing magic ward in loop - Allow racist emperor to nominate a special forces commander +- Trigger some manual pruning for long-lived races in courts ---------------------------------------------------------------------------------------------------------------- v0.8.1 2017-08-20 diff --git a/MOD/Witcher/common/on_actions/W_on_actions.txt b/MOD/Witcher/common/on_actions/W_on_actions.txt index d352c40cc..9dd12489d 100644 --- a/MOD/Witcher/common/on_actions/W_on_actions.txt +++ b/MOD/Witcher/common/on_actions/W_on_actions.txt @@ -44,6 +44,8 @@ on_yearly_pulse = { # W_witchert_events witcher.300 # Check and spawn witchers + + old_age.97 # Prune court for unimportant immortals } random_events = { diff --git a/MOD/Witcher/events/W_old_age_events.txt b/MOD/Witcher/events/W_old_age_events.txt index 4b3f4a84e..5846911ad 100644 --- a/MOD/Witcher/events/W_old_age_events.txt +++ b/MOD/Witcher/events/W_old_age_events.txt @@ -953,6 +953,42 @@ character_event = { } } +# Manual court pruning of unimportant immortals [on_yearly_pulse] +character_event = { + id = old_age.97 + + is_triggered_only = yes + hide_window = yes + + only_rulers = yes + + trigger = { + any_courtier = { + immortal = yes + prisoner = no + is_landed = no + NOT = { trait = wilderness_race } + count = 10 # NDefines.NEngine.COURT_PRUNE_SIZE + } + } + + immediate = { + log="(Immortality) Pruning at court of [Root.GetBestName] in [Root.Location.GetName]." + any_courtier = { + limit = { + immortal = yes + prisoner = no + is_ruler = no + NOT = { trait = wilderness_race } + is_unimportant_trigger = yes + age = 40 # NDefines.NEngine.PRUNE_MINIMAL_AGE + } + log="(Immortality) Pruning [This.GetBestName] as unimportant" + death = { death_reason = death_missing } + } + } +} + # Move important immortal characters manually to new holder's court, so they do not die of 'natural death' during court pruning. # Manually prune 80% of the court, to avoid court bloating. # ROOT is the character