Results 1 to 8 of 8

Thread: WhenToTest "CharacterJoinsArmy"

  1. #1

    Default WhenToTest "CharacterJoinsArmy"

    Is there any event identifyer that can be used with the WhenToTest command for character traits in the EDCT triggering when a general joins (and leaves) an army?

    What I want to do:

    I want an army to get a movement penalty in Winter. A General with only it's entourage (i.e. not leading an army) however shall get no penalty.


    Example:
    Code:
    Trigger GeneralsOnlyOn
    WhenTotest "CharacterJoinsArmy" (<= identifyer in question)
    
    Condition PercentageUnitAttribute general_unit = 100
    and not Trait GeneralsOnly = 1
    
    Affects GeneralsOnly 1 Chance 100

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: WhenToTest "CharacterJoinsArmy"

    Your 'condition' line makes sure there can only be bodyguard units in the stack. Which means a simple 'CharacterTurnStart' event will do the job - there simply is no reliable way to test if the general has just left (or joined) a mixed army stack. Testing for reduced movement points (indicating a short move) and the unit attribute might work, but when to test it?

    Maybe approach it from the other side? Test for less then 100% general_unit, have a season script that sets counters and test for those counters, then apply movement penalty.










  3. #3

    Default Re: WhenToTest "CharacterJoinsArmy"

    Problem with 'characterturnstart' is that then movement penalty in winter can be circumvented by just dropping the generel out of his army in autumn and letting him join in winter season again. Would be nice to prevent this Any ideas?

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: WhenToTest "CharacterJoinsArmy"

    A second trigger that removes the trait benefits if the unit attribute drops below 100%










  5. #5

    Default Re: WhenToTest "CharacterJoinsArmy"

    Thx gigantus, I know how to do the conditions for the general to be leading or not leading the army and trigger it at turn start.
    The problem is though, that I'm looking for a way to trigger it instantly when leaving or joining the army

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: WhenToTest "CharacterJoinsArmy"

    Withwnar might have an idea....










  7. #7
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: WhenToTest "CharacterJoinsArmy"

    Yeah no. CharacterSelected is the only one I can think of that comes close, and even then you'd need to move him out of the army, deselect him, then select him again to fire that event. It would fail to work more often than it would work. And wouldn't work for AI.

    Plus, do movement bonuses/penalties even kick in as soon as they get a trait that has such things? I think they're only applied at the start of the character's turn, or if you do character_reset on him with script. Could be wrong.

  8. #8

    Default Re: WhenToTest "CharacterJoinsArmy"

    Ok, thanks Withwnar for your explanation! Guess I'd rather wanna let this go then, seems not really feasable within M2TW's engine that way

Posting Permissions

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