Results 1 to 3 of 3

Thread: How to be able to choose the Heir when the Leader dies

  1. #1
    Greno Zee's Avatar Foederatus
    Join Date
    Jun 2007
    Location
    Antwerpen, Belgium
    Posts
    42

    Default How to be able to choose the Heir when the Leader dies

    When the Leader dies, the game automatically chooses the new Heir. If you're not happy with the choice, you have to disinherit the Heir. While this certainly brings a level of realism and randomness to the game, in some mods you might want to get around this and allow the player to choose the new Heir themselves.
    Here's the idea.

    There are 2 new traits:

    • Potential Heir
    • Potentially Disinherited

    The first time you switch the Heir, instead of disinherited the current Heir gets the Potentially Disinherited trait and the new Heir gets the Potential Heir trait and no effects are imposed on either. Now you can keep switching the heir title as you like.
    Only when you end the turn, the situation is evaluated. If the Potentially Disinherited character is not the Heir at that moment, he becomes Disinherited and the Potential Heir gets the Heir title and benefits.

    These are the modifications to the vanilla files, easy to adapt for any mod:

    FILE: Data\export_descr_character_traits.txt
    Add the following traits to this file.
    Code:
    ;------------------------------------------
    Trait Potentialexheir
        Characters family
        AntiTraits Potentialheir
    
        Level Potential_Exheir
            Description Potential_Exheir_desc
            EffectsDescription Potential_Exheir_effects_desc
            Threshold  1 
    
    ;------------------------------------------
    Trait Potentialheir
        Characters family
        AntiTraits Potentialexheir
    
        Level Potential_Heir
            Description Potential_Heir_desc
            EffectsDescription Potential_Heir_effects_desc
            Threshold  1
    Delete the folowing triggers:

    • factionleader
    • reinherited
    • disinherited
    • inherited
    • becomesheir

    Add these triggers instead:
    Code:
    ;These triggers are fired during the turn as traits travel
    ;The 4 following trigers deal with the situation when the leader dies and Heir becomes the new Leader
    ;------------------------------------------
    Trigger factionleader
        WhenToTest BecomesFactionLeader
    
        Affects Factionleader  1  Chance  100 
    
    ;------------------------------------------
    ;Executes when a real Heir becomes Leader
    Trigger inherited
        WhenToTest CeasedFactionHeir
    
        Condition IsFactionLeader
              and not Trait Potentialheir = 1
    
    ;   this effectively sets the Heir trait to 0
        Affects Exheir  1  Chance  100 
    
    ;------------------------------------------
    ;Executes when the potential Heir was also disinherited.
    Trigger inherited_potentialheir
        WhenToTest CeasedFactionHeir
    
        Condition IsFactionLeader
              and Trait Potentialheir = 1
              and Trait Exheir = 1
    
        Affects Factionheir  1  Chance  100
        Affects Potentialexheir  1  Chance  100
    
    ;------------------------------------------
    ;Executes when the potential Heir becomes Leader
    Trigger inherited_potentialheir
        WhenToTest CeasedFactionHeir
    
        Condition IsFactionLeader
              and Trait Potentialheir = 1
    
    ;   this effectively sets the Potentialheir trait to 0
        Affects Potentialexheir  1  Chance  100 
    
    ;------------------------------------------
    Trigger potentially_disinherited
        WhenToTest CeasedFactionHeir
    
        Condition not IsFactionLeader
    
        Affects Potentialexheir  1  Chance  100 
    
    ;------------------------------------------
    Trigger potentially_becomesheir
        WhenToTest BecomesFactionHeir
    
        Affects Potentialheir  1  Chance  100 
    
    ;==========================================
    ;turn end trigers to set potential trait to real ones
    ;------------------------------------------
    Trigger reinherited_chte
        WhenToTest CharacterTurnEnd
    
        Condition Trait Exheir = 1
              and Trait Potentialheir = 1
    
        Affects Factionheir  1  Chance  100 
    
    ;------------------------------------------
    Trigger becomesheir_chte
        WhenToTest CharacterTurnEnd
    
        Condition Trait Potentialheir = 1
    
        Affects Factionheir  1  Chance  100 
        Affects Potentialexheir  1  Chance  100 
    
    ;------------------------------------------
    Trigger disinherited_chte
        WhenToTest CharacterTurnEnd
    
        Condition Trait Potentialexheir = 1
    
        Affects Exheir  2  Chance  100 
        Affects Potentialheir  1  Chance  100

    FILE:
    Data\export_descr_VnVs_enums.txt
    Add the following enums:
    Code:
    Potential_Heir
    Potential_Heir_desc
    Potential_Heir_effects_desc
    Potential_Exheir
    Potential_Exheir_desc
    Potential_Exheir_effects_desc

    FILE:
    Data\text\export_VnVs.txt
    Add the following descriptions:
    Code:
    ¬--------------------
    
    {Potential_Heir}    Potential Heir
    
    {Potential_Heir_desc}
    This man will become the Heir at the end of the season.
    
    {Potential_Heir_effects_desc}
    No effects yet
    
    ¬--------------------
    
    {Potential_Exheir}    Potentially Disinherited
    
    {Potential_Exheir_desc}
    This man is about to loose his heritage. If he doesn't regain the title Heir by the end of the season, he will become disinherited.
    
    {Potential_Exheir_effects_desc}
    No effects yet
    Happy disinheriting!

  2. #2
    Kylan271's Avatar Domesticus
    Join Date
    Jul 2007
    Location
    Vietnam
    Posts
    2,235

    Default Re: How to be able to choose the Heir when the Leader dies

    This would be useful in MTW2!!! Will see how to use here in RTW. Appreciated.


  3. #3
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

    Default Re: How to be able to choose the Heir when the Leader dies

    In M2TW authority determines the next heir.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •