Results 1 to 14 of 14

Thread: Ancillaries and Traits Question

Hybrid View

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

    Default Ancillaries and Traits Question

    With ancillaries, you can specify the receipt of an ancillary based on whether it already exists faction or worldwide. Can you do anything similar with traits?
    Son of PW

  2. #2
    Pnutmaster's Avatar Dominus Qualitatium
    Join Date
    Jan 2006
    Location
    Brooklyn, NY
    Posts
    1,572

    Default Re: Ancillaries and Traits Question

    You have the condition I_FactionLeaderTrait, self explanatory.

    If you need more versatility, you can check the existence of a trait through the condition I_IsTriggerTrue.

    First, you write a trigger that always fires if a character has your trait in question.

    Trigger RivalCheck
    WhenToTest CharacterTurnEnd

    Condition Trait RivalConquer_Constantinople = 1

    Affects FakeTrait 1 Chance 100 ; a hidden, artificial trait that will have no effect on your character
    Because the trigger "RivalCheck" fires, you know a character has the Trait RivalConquer_Constantinople. Now you can make use of the condition I_IsTriggerTrue.

    Trigger RivalCheck2
    WhenToTest CharacterTurnEnd

    Condition I_IsTriggerTrue RivalCheck

    Affects Whatever 1 Chance 100
    Two limitations: 1) The trigger "RivalCheck" must fire before "RivalCheck2" and 2) the two triggers must fire in the same turn (AFAIK. If you're checking for an AI character that has the trait RivalConquer_Constantinople, make "RivalCheck2" test at CharacterTurnStart).
    Last edited by Pnutmaster; August 10, 2009 at 04:57 PM.
    Under the patronage and bound to the service of the
    artist formerly known as Squeakus Maximus
    Stoic Pantheist of S.I.N

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

    Default Re: Ancillaries and Traits Question

    The usual way would be to have the script checking if there is a character with the trait X and set a counter accordingly. Something like monitor_event CharacterTurnStart Trait X => set event_counter Trait_X 1. In EDCT you would tie the acquisition of this trait to the counter not having fired, like Condition I_event_counter Trait_X 0. You would also need to reset the counter once in a turn (eg. at the end of the slave turn) in case the character has died or lost the trait meanwhile.

    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

  4. #4

    Default Re: Ancillaries and Traits Question

    Thanks to both of you. Basically I'm trying to work with my Gondorian Victor submod for TA:TW. The first man to achieve a stunning victory over Harad becomes Hyeramendacil II(through the use of epithets--and because there was already a Hyeramendacil I in lore). I therefore want the next man to achieve those trigger conditions to become Hyeramendacil III. Looks like it might work.
    Son of PW

  5. #5

    Default Re: Ancillaries and Traits Question

    one question needs help



    Trigger ONERINGHUMAN
    WhenToTest CharacterTurnEnd
    Condition Trait Race_Human = 1
    and Ancillary one_ring
    Affects ABC 1 Chance 100


    I think Ancillary one_ring was wrong.
    With this trigger, when a character have trait Race_Human = 1 , and he has one_ring , he will have trait ABC 1.

    but I think Ancillary one_ring here was wrong and I cant find any condition to fix it

  6. #6
    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: Ancillaries and Traits Question

    and has_anc one_ring might work, although I only know about "has_anc type anc_type relic" for sure










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

    Default Re: Ancillaries and Traits Question

    No, only Anc-Type (too lazy to look up the accurate spelling) works.

    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

  8. #8

    Default Re: Ancillaries and Traits Question

    so it means look like this?

    WhenToTest CharacterTurnEnd
    Condition has_anc one_ring
    and anc_type relic

  9. #9
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Ancillaries and Traits Question

    No events or conditions use _ in them, only commands. And they all capitalize each new word. There doesn't appear to be a condition to check for any old general having a specific named ancillary, unless it just isn't showing up in the docudemons.
    Code:
    Identifier:              FatherAnc
    Trigger requirements:    character_record
    Parameters:              ancillary name
    Sample use:              FatherAnc holy_grail
    Description:             Test to see if character's father posses this ancillary
    Battle or Strat:         Strat
    Class:                   FATHER_ANC
    Implemented:             Yes
    Author:                  Grig
    ---------------------------------------------------
    Identifier:              GeneralWithAncKilled
    Trigger requirements:    character_record
    Parameters:              ancillary name
    Sample use:              GeneralWithAncKilled holy_grail
    Description:             Test to see if a general with specified ancillary was killed in the battle
    Battle or Strat:         Both
    Class:                   GENERAL_ANC_KILLED
    Implemented:             Yes
    Author:                  Grig
    ---------------------------------------------------
    Identifier:              HasAncType
    Trigger requirements:    character_record
    Parameters:              ancillary type
    Sample use:              HasAncType relic
    Description:             Test to see if character currently has ancillary with specified type
    Battle or Strat:         Strat
    Class:                   HAS_ANC_TYPE
    Implemented:             Yes
    Author:                  Grig

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

    Default Re: Ancillaries and Traits Question

    Quote Originally Posted by Mirandia View Post
    so it means look like this?

    WhenToTest CharacterTurnEnd
    Condition has_anc one_ring
    and anc_type relic
    No.

    Code:
    WhenToTest CharacterTurnEnd
    Condition HasAncType one_ring
    You need to give the anc one_ring the anc type one_ring to get this working.

    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

  11. #11
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Ancillaries and Traits Question

    Quote Originally Posted by konny View Post
    You need to give the anc one_ring the anc type one_ring to get this working.
    Is that possible? Aren't Anc Types those broad pre-defined classifications like entertain, military, religion, etc?

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

    Default Re: Ancillaries and Traits Question

    Quote Originally Posted by Augustus Lucifer View Post
    Is that possible? Aren't Anc Types those broad pre-defined classifications like entertain, military, religion, etc?
    No, you can use whatever you want in that line. You can, for example, call each ancillary the "type" of its own name and make that command working as if it would be "HasAnc".

    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
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Ancillaries and Traits Question

    Quote Originally Posted by konny View Post
    No, you can use whatever you want in that line. You can, for example, call each ancillary the "type" of its own name and make that command working as if it would be "HasAnc".
    Talk about useless documentation.

  14. #14

    Default Re: Ancillaries and Traits Question

    thank you konny.

    to Lucifer:I cant make them clear , Type dosen't mean red words?not a ancillary ,just a type....


    Ancillary crown_england
    Type office
    Transferable 0
    Image crown_england.tga
    Description crown_england_desc
    EffectsDescription crown_england_effects_desc
    Effect Authority 3
    Effect Command 1
    Effect Law 1
    Effect LocalPopularity 1

Posting Permissions

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