Results 1 to 3 of 3

Thread: Need help with triggers

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Need help with triggers

    Hi guys Im in a bind with the triggers for the trait here.

    I want the new emperor trait to happen when the faction leader becomes a faction leader and has served for under 5 years (see Emperor Service Time.) I want the trait lost though when the expierience emperor trait comes in.

    I want the experienced emperor trait to come in only to the faction leader has been the leader for over 5 years, then lost when old emperor comes in.

    I finally want the old emperor trait to come in after the faction leader has been the leader over 35 years. This will stay.

    Next I want the the Chance for power trait to be for anyone besides the faction leader, in effect only as long as the faction leader has the trait "new emperor." Then I want it to vanish as soon as the faction leader has the trait expierienced emperor trait.

    Lastly I want to know how to implement a trait that has the number of years that the faction leader has served as faction leader.

    Thank you for helping me out!

    Spoiler Alert, click show to read: 
    Code:
    ;------------------------------------------
    Trait NewEmperor
        Characters family
        ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian
        AntiTraits ExperiencedEmperor, OldEmperor
        Level New_at_Job
            Description NewEmperor_desc
            EffectsDescription NewEmperor_effects_desc
            Threshold  1 
     
            Effect Law  1
            Effect Influence 2
    ;------------------------------------------
    Trait ExperiencedEmperor
        Characters family
        ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian
        AntiTraits NewEmperor, OldEmperor
        Level Good_at_Job
            Description MediumEmperor_desc
            EffectsDescription MediumEmperor_effects_desc
            Threshold  1 
     
            Effect Law  3
            Effect Influence 4
    ;------------------------------------------
    Trait OldEmperor
        Characters family
        ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian
        AntiTraits ExperiencedEmperor, OldEmperor
        Level End_of_Job
            Description OldEmperor_desc
            EffectsDescription OldEmperor_effects_desc
            Threshold  1 
     
            Effect Law  5
            Effect Influence 6
    ;------------------------------------------
    Trait ChanceForPower
        Characters family
        ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian
        Level Rebellious
            Description NewRebel_desc
            EffectsDescription NewRebel_effects_desc
            Threshold  1 
     
            Effect Loyalty -3
    ;------------------------------------------
    Trait LoyalToEmperor
        Characters family
        ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian
        Level Loyal
            Description Loyal_desc
            EffectsDescription Loyal_effects_desc
            Threshold  1 
     
            Effect Influence 2
            Effect Loyalty 3
    ;------------------------------------------

  2. #2

    Default Re: Need help with triggers

    Try this: As for counting the years a character has been the leader, just follow the way Emperor is coded, and you can have 9 levels, each one with threshold increased by 20 (ten years), so you can count decades. Otherwise you can use a second trait, that will fire up when the first trait reaches level 9, and will ahve another 9 levels, etc etc.

    Code:
    ;------------------------------------------
    
    Trait Emperor
        Characters family
        ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian
    
        Level NewEmperor
            Description NewEmperor_desc
            EffectsDescription NewEmperor_effects_desc
            Threshold  1 
     
            Effect Law  1
            Effect Influence 2
    
        Level ExperiencedEmperor
            Description ExperiencedEmperor_desc
            EffectsDescription ExperiencedEmperor_effects_desc
            Threshold  11 
     
            Effect Law  3
            Effect Influence 4
    
        Level OldEmperor
            Description OldEmperor_desc
            EffectsDescription OldEmperor_effects_desc
            Threshold  71 
     
            Effect Law  5
            Effect Influence 6
    
    ;------------------------------------------
    
    Trait ChanceForPower
        Characters family
        ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian
        AntiTraits AntiChanceForPower
    
        Level NewRebel
            Description NewRebel_desc
            EffectsDescription NewRebel_effects_desc
            Threshold  1 
     
            Effect Loyalty -3
    
    ;------------------------------------------
    
    Trait AntiChanceForPower
        Characters family
        Hidden
        ExcludeCultures barbarian, greek, eastern, egyptian, carthaginian
        AntiTraits ChanceForPower
    
        Level AntiNewRebel
            Description AntiNewRebel_desc
            EffectsDescription AntiNewRebel_effects_desc
            Threshold  1 
     
    ;------------------------------------------
    
    ;------------------------------------------
    
    Trigger emperor_ages_trigger
        WhenToTest CharacterTurnEnd
    
        Condition Trait Emperor > 0
        
        Affects Emperor  1  Chance  100
    
    ;------------------------------------------
    
    Trigger becomes_emperor_trigger
        WhenToTest BecomesFactionLeader
    
        Condition CultureType roman
        
        Affects Emperor  1  Chance  100
    
    ;------------------------------------------
    
    Trigger becomes_new_rebel_trigger
        WhenToTest CharacterTurnEnd
    
        Condition FactionLeaderTrait Emperor = 1
              and Trait ChanceForPower < 1
        
        Affects ChanceForPower  1  Chance  100
    
    ;------------------------------------------
    
    Trigger stops_being_new_rebel_trigger
        WhenToTest CharacterTurnEnd
    
        Condition FactionLeaderTrait Emperor > 1
              and Trait ChanceForPower = 1
        
        Affects AntiChanceForPower  1  Chance  100
    
    ;------------------------------------------

  3. #3

    Default Re: Need help with triggers

    Thank you I will try this out. This will help alot.
    Last edited by The10thLegion von Döbeln; July 28, 2009 at 08:02 AM.

Posting Permissions

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