Results 1 to 4 of 4

Thread: Building/Trait Issue(Solved)

Hybrid View

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

    Default Building/Trait Issue(Solved)

    Okay, thanks for all the help the other day with buildings and ancillaries. Everything worked perfectly. But then I got the crazy idea that my ancillaries weren’t really of sufficient importance to take up one of the eight ancillary slots, so I decided to transfer the whole concept to the EDCT. Unfortunately, that caused all sorts of lovely problems. The entire series of traits fires in rapid succession, regardless of conditions and prerequisites.

    Here’s the first trigger, which works perfectly. I have my logging set up to trace and this one is not only firing, but firing on schedule.

    Code:
     
    ;------------------------------------------
    Trigger spanish_government_regidor
        WhenToTest CharacterTurnEnd
        Condition IsGeneral
                             and EndedInSettlement
                              and CharacterNumTurnsIdle >= 2
                              and not Trait Negro >= 1
                              and not Trait Mestizo >= 1
              and SettlementBuildingExists = cabildo
     
                 Affects Spanish_Government 1 Chance 100
    The second trigger fires erratically and often not at all, but the character receives the second level of trait regardless. Typically the character receives this trait the following turn after Regidor, when it should arrive four turns later.

    Code:
     
    ;------------------------------------------
    Trigger spanish_government_alcalde
        WhenToTest CharacterTurnEnd
        Condition IsGeneral
                                        and EndedInSettlement
                                        and CharacterNumTurnsIdle >= 6
                                        and not Trait Negro >= 1
                                        and not Trait Mestizo >= 1
                                        and SettlementBuildingExists = cabildo
     
        Affects Spanish_Government 2 Chance 100
    And finally the third level, which is supposed to be dependent upon the next level of government building, but fires within two or three turns without the second level of building being constructed.

    Code:
     
    ;-------------------------------------------
    Trigger spanish_government_corregidore
                WhenToTest CharacterTurnEnd
                Condition IsGeneral
                                        and EndedInSettlement
                                        and CharacterNumTurnsIdle >= 8
                                        and not Trait Negro >= 1
                                        and not Trait Mestizo >= 1
                                        and SettlementBuildingExists = residence_corregidore
     
                Affects Spanish_Government 4 Chance 100
    And finally the trait itself so you can see how I set up the levels.

    Code:
     
    ;----------------------------------------------
    Trait Spanish_Government
                Characters family
     
                Level Regidor 
                            Description Regidor_desc
                            EffectsDescription Regidor_effects_desc
                            Threshold 1
     
                Level Alcalde
                            Description Alcalde_desc
                            EffectsDescription Alcalde_effects_desc
                            Threshold 2
     
                Level Corregidore
                            Description Corregidore_desc
                            EffectsDescription Corregidore_effects_desc
                            Threshold 4

    EDIT: I just found out that since the trait advances one level each EndTurn, that explains my problem. However, I can’t figure out how to rework this so it will work. I tried scripting is as AntiTraits, but that doesn’t work any better. Any ideas?
    Last edited by Theodotos I; September 08, 2009 at 01:40 PM.
    Son of PW

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

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

    Default Re: Building/Trait Issue(More Problems)

    If you want it to happen when they're idle for 2 turns, then change the condition to be and CharacterNumTurnsIdle = 2. If you don't this and leave the condition as and CharacterNumTurnsIdle >= 2 means that every turn, after the second, they're receiving one point towards the spanish_government trait. This means that the turn after they get the first level they'll get the second. Also note that the numbers in the triggers are points towards a level, and not the level number.
    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

  3. #3

    Default Re: Building/Trait Issue(More Problems)

    Quote Originally Posted by Sqυιd View Post
    If you want it to happen when they're idle for 2 turns, then change the condition to be and CharacterNumTurnsIdle = 2. If you don't this and leave the condition as and CharacterNumTurnsIdle >= 2 means that every turn, after the second, they're receiving one point towards the spanish_government trait. This means that the turn after they get the first level they'll get the second. Also note that the numbers in the triggers are points towards a level, and not the level number.
    Okay, so if I take away the ">" sign they won't gain additional points each turn and it should work as written? If so, thanks.
    Son of PW

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Building/Trait Issue(More Problems)

    Amazing the difference a little arrow makes. Have to keep that in mind.










Posting Permissions

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