Results 1 to 9 of 9

Thread: What is the maximum 'affects' for a trait trigger?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default What is the maximum 'affects' for a trait trigger?

    Title says it all. Thanks for any help
    Last edited by Taiji; June 23, 2010 at 09:25 AM.

  2. #2

    Default Re: What is the maximum 'affects' for a trait trigger?

    Quote Originally Posted by Taiji View Post
    Title says it all. Thanks for any help
    ooooo that's a pickle. A tough one bro but as far as i have seen it in the game 5 affects is the limit.
    Like
    Trigger random_AI_birth1
    WhenToTest CharacterComesOfAge

    Condition IsGeneral
    and IsFactionAIControlled

    Affects GoodCommander 1 Chance 50
    Affects GoodCommander 1 Chance 25
    Affects StrategicSkill 1 Chance 33
    Affects StrategicSkill 1 Chance 5
    Affects GoodCommander 1 Chance 10

    But I'm sure konny would be the one who might know about this.

  3. #3
    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: What is the maximum 'affects' for a trait trigger?

    Assuming m2tw follows rtw its 11 in edct per trigger and unlimited in eda. Don't ask why there's a limit in edct in rome I have no idea. If you need more just duplicate the trigger with a new name but use different affects lines.
    Last edited by Squid; June 24, 2010 at 11:22 AM.
    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

  4. #4
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: What is the maximum 'affects' for a trait trigger?

    It is 9 or 10. I remember coming across this limit, but cannot recall whether it CTDed when adding the tenth line or after the tenth line.

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

  5. #5
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: What is the maximum 'affects' for a trait trigger?

    Thanks very much for the responses guys

    Are you sure it's really OK to duplicate triggers in EDCT, Squid?

    The reason I ask is that this apparently causes CTDs and broken scripts when done with the campaign script. But that may be specific to certain events, like FactionTurnStart, I didn't check them all when I confirmed the issue. However I don't think it matters what else is in the script, the scripts I have seen conflicting, before fixing, have had widely varying effects/functions.

    I am kind of inclined to believe you since I see plenty in DLVs EDCT that would be causing problems if this coincidence was a conflict that could causes CTDs. Apparently this isn't the case. But my experience with the campaign script shows me that conflicts often amounted to broken scripts. When fixing the conflicts the game seemed to 'come alive', sure less CTDs but it was very pleasant to note cool features working for the first time. These features lay dormant because the conflict mostly prevented them from firing.

    But in campaign script that is simply solvable, if statements can be made once the elements are tracked by events. In EDCT, I don't see a way around it because there may be a limit to affects and there are no if statements.
    Last edited by Taiji; June 24, 2010 at 12:26 PM.

  6. #6

    Default Re: What is the maximum 'affects' for a trait trigger?

    @Taiji
    Also stumbled upon this post here.
    I think that might help a bit more.

    And thanks bro.

  7. #7
    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: What is the maximum 'affects' for a trait trigger?

    I think the problem comes if the trigger and the 'command' are the same. Simply having the same trigger (with a different name) and a different 'command' shouldn't cause an error. Not sure what would happen if for instance the first added a trait and the second would remove it: one executed after the other or an error?










  8. #8
    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: What is the maximum 'affects' for a trait trigger?

    Quote Originally Posted by Taiji View Post
    Thanks very much for the responses guys

    Are you sure it's really OK to duplicate triggers in EDCT, Squid?

    The reason I ask is that this apparently causes CTDs and broken scripts when done with the campaign script. But that may be specific to certain events, like FactionTurnStart, I didn't check them all when I confirmed the issue. However I don't think it matters what else is in the script, the scripts I have seen conflicting, before fixing, have had widely varying effects/functions.

    I am kind of inclined to believe you since I see plenty in DLVs EDCT that would be causing problems if this coincidence was a conflict that could causes CTDs. Apparently this isn't the case. But my experience with the campaign script shows me that conflicts often amounted to broken scripts. When fixing the conflicts the game seemed to 'come alive', sure less CTDs but it was very pleasant to note cool features working for the first time. These features lay dormant because the conflict mostly prevented them from firing.

    But in campaign script that is simply solvable, if statements can be made once the elements are tracked by events. In EDCT, I don't see a way around it because there may be a limit to affects and there are no if statements.
    Quote Originally Posted by gigantus View Post
    I think the problem comes if the trigger and the 'command' are the same. Simply having the same trigger (with a different name) and a different 'command' shouldn't cause an error. Not sure what would happen if for instance the first added a trait and the second would remove it: one executed after the other or an error?
    As gigantus said the problem with "duplicate" triggers occurs if the name of the two triggers is the same. As long as the names are different the rest can be identical. Even then I'm not 100% sure even having the same name would cause a crash because the name of the trigger may not be the key (as the name of the trait is the not the key) that the game uses to differentiate between triggers.
    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

  9. #9
    konny's Avatar Artifex
    Join Date
    Jul 2007
    Location
    Germania Inferior
    Posts
    3,631

    Default Re: What is the maximum 'affects' for a trait trigger?

    Quote Originally Posted by Sqυιd View Post
    As gigantus said the problem with "duplicate" triggers occurs if the name of the two triggers is the same. As long as the names are different the rest can be identical. Even then I'm not 100% sure even having the same name would cause a crash because the name of the trigger may not be the key (as the name of the trait is the not the key) that the game uses to differentiate between triggers.
    No it doesn't. I accidently had several triggers with the same name. The game run fine. I haven't tested if all triggers with the same name would be executed, or none, or only the first one.

    It can indeed be that the trigger's name doesn't do a thing at all and is only there for orientation of the coder (it is anyways nowhere refered to, different to the trait's name).

    Team member of: Das Heilige Römische Reich, Europa Barbarorum, Europa Barbarorum II, East of Rome
    Modding help by Konny: Excel Traitgenerator, Setting Heirs to your preference
    dHRR 0.8 beta released! get it here
    New: Native America! A mini-mod for Kingdoms America

Posting Permissions

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