Results 1 to 18 of 18

Thread: Problem with trait/trigger

Hybrid View

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

    Default Problem with trait/trigger

    Hi everyone, I'm a fan of both SS and DHRR, and I was rather excited when I saw Konny apparently come up with a way to allow people to choose faction heirs (http://www.twcenter.net/forums/showt...=257175&page=2)

    As this hasn't seem to have been implemented in any mods yet, I tried to do it myself by using what I thought was similar trait/triggers and tested it on SS. Alas, as I am a complete newb when it comes to this stuff, I was unable to get it to work for some reason, even when I resorted to just copying a trait/trigger that is meant to be passed on from father to son, editing it, and pasting it back.

    I read most of the tutorials that are in the tutorial sections, and spent quite a while trying to get the thing working, but i'm sorta at the end of my ropes here, so I decided to ask the more knowledgeable people here to help me out.

    Is it possible for someone to create the necessary trait/trigger for this for me, or at least walk me through the steps?

    Thank you very much for your help =D

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

    Default Re: Problem with trait/trigger

    It would be helpfull to know what you tried to change and where it failed.

    A genera,l and easy to do, way would be to delete all "Effect Authority" from all traits. That way no one would have any authority. Then you would add new traits that would be assigend according to the desired line of succession.

    Example, say you want to make a normal dynasty you would create two traits:

    a) A trait Royal_Blood that gives +3 Authority. In descr_start, give this to the faction leader, his sons, and any other person of the family you know he is closely related to the king. As a trigger you have this trait always passing from father to son.

    b) A trait Royal_Prince that gives +5 Authority. In descr_start give this to the sons of the king and his brothers if the common father was king too. In the trigger this trait would be acquired by anyone who's father is faction leader (FatherTrait FactionLeader > 0).


    Check out the Trait-Generator from my sig. It can make things a bit easyer.

    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

  3. #3

    Default Re: Problem with trait/trigger

    Ya, sorry for not showing what I tried and why it didn't work.

    I first created a trait like so-
    Trait RoyalFamily
    Characters family
    Level RoyalFamily
    Description RoyalFamily_desc
    EffectsDescription RoyalFamily_effects_desc
    Threshold 1
    Effect Authority 2


    and the trigger as(copying the Royal_Founder_FactionLeader trigger in SS after several failed attempts on my part)
    ;------------------------------------------
    Trigger Royal_Family_FactionLeader
    WhenToTest CharacterTurnStart

    Condition IsFactionLeader
    and not FactionType papal_states
    and not FactionType knights_templar
    and not FactionType teutonic_order
    and I_TurnNumber = 0

    Affects RoyalFamily 1 Chance 100

    ;------------------------------------------
    Trigger BiologicalSonRoyalFamily
    WhenToTest CharacterTurnStart

    Condition FatherTrait RoyalFamily > 0
    and I_TurnNumber = 0


    Affects RoyalFamily 1 Chance 100
    ;------------------------------------------
    Now, while the trait does show up on my FL, it doesn't seem to show up on the sons of the FL.

    So, basically, I think i'm suffering from a fundamental problem with the way i'm writing the trigger.

    Anyways, thanks for the traitgenerator thing. I tried using that as well, but couldn't get something about it working properly, the text part I believe, and so I decided to just try to make the trait/trigger from scratch. I'll try using the traitgenerator again though, as I think it's probably the easiest way for me to deal with this.

  4. #4
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Problem with trait/trigger

    Perhaps the son gets his turn before the king in which case his trigger would never know that the king had that trait. Try it on turn number 1 for the heir.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

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

    Default Re: Problem with trait/trigger

    Yes, I would be suspecting the turn=0 be the problem too.

    try:

    Code:
    Trigger Royal_Family_FactionLeader
          WhenToTest CharacterTurnStart
       
          Condition IsFactionLeader
              and not CharFactionType papal_states
              and not CharFactionType knights_templar
              and not CharFactionType teutonic_order
              and Trait RoyalFamily < 1
       
          Affects RoyalFamily  1  Chance  100
       
      ;------------------------------------------
      Trigger BiologicalSonRoyalFamily
          WhenToTest CharacterTurnStart
       
          Condition FatherTrait RoyalFamily > 0
                and Trait RoyalFamily < 1
             
    
          Affects RoyalFamily  1  Chance  100
    ;------------------------------------------
    This should work: the faction leader, all his sons and all their sons now should get the trait RoyalFamily.

    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

  6. #6

    Default Re: Problem with trait/trigger

    Ty very much for the help guys, i'll check to see if this works.

    I have one question for Konny though, is this trait/trigger all I need to make the thing work properly, or do I also need to set up a trait/trigger for the 2nd step that you put in your tutorial?

    I don't think I do, as the way I worded it is such that one must be the FL to pass the trait down, but I just want to hear confirmation from you or someone else before I either ignore it or start working on it.

    Again, thanks everyone for the help =D

  7. #7
    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: Problem with trait/trigger

    By the way if this is only supposed to do stuff for the starting characters why not just mod descr_strat and add the trait that way?
    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

  8. #8
    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: Problem with trait/trigger

    I guess you can skip the first part if you add the trait in the descr_strat already. The "Trigger BiologicalSonRoyalFamily" has to be there otherwise the third generation males will not get the trait.










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

    Default Re: Problem with trait/trigger

    Quote Originally Posted by mrx View Post
    I have one question for Konny though, is this trait/trigger all I need to make the thing work properly, or do I also need to set up a trait/trigger for the 2nd step that you put in your tutorial?
    The second trait is needed for "fine tuning". With the first trait only after two or three generations the heir could also be picked from uncles, cousins and the like of the last king. These would be direct descendants of the starting king, but not the guys who would be the first in line in a real dynastic succession.

    Quote Originally Posted by gigantus View Post
    I guess you can skip the first part if you add the trait in the descr_strat already.
    The first trigger is needed for "new dynasties", in case the starting dynasty died out.

    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

  10. #10
    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: Problem with trait/trigger

    The first trigger is needed for "new dynasties", in case the starting dynasty died out.
    Silly me, should have thought of that too.










  11. #11

    Default Re: Problem with trait/trigger

    Thank again Konny,

    would something like this work fine?
    Trigger RoyalPrince WhenToTest CharacterTurnStart Condition FatherTrait FactionLeader > 0 Affects RoyalPrince 1 Chance 100;------------------------------------------

    As for descr_strat, I decided to just add all the starting traits for the FL in there first and see if the triggers work properly, as they don't seem to be working atm.

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

    Default Re: Problem with trait/trigger

    Code:
    Trigger RoyalPrince      
    WhenToTest CharacterTurnStart         
    Condition FatherTrait FactionLeader > 0                            
    and Trait RoyalPrince < 1
    
    Affects RoyalPrince  1  Chance  100
    Don't forget to add the trait; otherwise, fine.

    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

  13. #13

    Default Re: Problem with trait/trigger

    Ok, I tried testing the trait/trigger out today, using the fixed triggers that Konny gave me, and nothing came out.

    So I tried adding the trait into the default trait that a FL will come out with in descr_strat, and that didn't do anything either...

    Now I have absolutely no idea what i'm getting wrong, as i'm pretty sure i'm doing everything as they're supposed to be done, anyone have any ideas?

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

    Default Re: Problem with trait/trigger

    Could you please upload your code or your EDCT?

    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

  15. #15

    Default Re: Problem with trait/trigger

    here is the edct.

  16. #16

    Default Re: Problem with trait/trigger

    Oh Christ, I just looked at my export_vnvs.txt and noticed that I accidentally made the changes to my normal SS version instead of my modified SS.

    Lemme change that little mistake and come back to you.

  17. #17

    Default Re: Problem with trait/trigger

    Ok, it works now. Silly me for not realizing that I was editing the wrong text file the whole time...

    Ty again Konny =D

Posting Permissions

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