Results 1 to 7 of 7

Thread: Ancillary triggers

  1. #1
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Ancillary triggers

    does anyone know for sure if
    WhenToTest PostBattle
    Condition WonBattle
    and PercentageEnemyKilled >= 40
    type triggers work when battles are autoresolved? I'm running game on yearjump script to see what AI generals are ending up with and they don't seem to be getting anything with that sort of trigger (unless i just messed something else up )



    EDIT: nvm, I think its just that I've got battle odds and success level conditions associated with them that the AI won't tend to get a result on. Testing as human player with anc. conditions reduced does get them on autoresolve. I've got a human player trait set for the campaigns so I'll probably make an easier trigger if "Trait human_player = 0", that should fix it.
    Last edited by Makanyane; 09-03-2007 at 18:03.
    Not used mods before? Looking for something small and fun?!
    Download the:

  2. #2
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Ancillary triggers

    might as well use this thread - answered above question by testing^, triggers do fire its just AI on autoresolve doesn't get the necessary sort of against the odds battle results.....

    So.... what I want to do is get AI to acquire certain ancillaries according roughly to who's better general in faction, by command star of something similar, have found you can have multiple triggers for same ancillary (which original game doesn't normally) but it doesn't seem to do anything logical with them in terms of order eg trying descending run of triggers
    Trigger trigger_fstestcccc
    WhenToTest CharacterTurnEnd

    Condition FactionType alemanni
    and not FactionwideAncillaryExists first_sword
    and Attribute Command = 5
    and not IsFactionLeader
    and not IsFactionHeir

    AcquireAncillary first_sword chance 100
    ;--
    Trigger trigger_fstestbbbb
    WhenToTest CharacterTurnEnd

    Condition FactionType alemanni
    and not FactionwideAncillaryExists first_sword
    and Attribute Command = 4
    and not IsFactionLeader
    and not IsFactionHeir

    AcquireAncillary first_sword chance 100
    down to 3, 2, 1 command, normally seems to just give it to first general in the army display list, have fiddled with missing out some attribute levels and it then seems to give it to lowest one, have fiddled with order and that doesn't work either.... any ideas anyone? How I can get a comparitive 'best leader' trigger? (btw I really actually need the four best just to complicate things a bit)

    EDIT: to answer the obvious question I do have way of making trigger AI only as its for provincial campaign where one faction only is playable, so that faction will have disabling "Human_Player" trait.
    Last edited by Makanyane; 09-05-2007 at 08:36.
    Not used mods before? Looking for something small and fun?!
    Download the:

  3. #3

    Default Re: Ancillary triggers

    Maybe it is too late, but I have an idea: you can use different turn conditions for each command value.
    Trigger trigger_1
    WhenToTest CharacterTurnStart

    Condition FactionType alemanni
    and I_TurnNumber = 1
    and not FactionwideAncillaryExists first_sword
    and Attribute Command = 5

    AcquireAncillary first_sword chance 100
    ;--
    Trigger trigger_2
    WhenToTest CharacterTurnEnd

    Condition FactionType alemanni
    and I_TurnNumber = 1
    and not FactionwideAncillaryExists first_sword
    and Attribute Command = 4

    AcquireAncillary first_sword chance 100
    ;--
    Trigger trigger_3
    WhenToTest CharacterTurnStart

    Condition FactionType alemanni
    and I_TurnNumber = 2
    and not FactionwideAncillaryExists first_sword
    and Attribute Command = 3

    AcquireAncillary first_sword chance 100
    ;--
    Trigger trigger_4
    WhenToTest CharacterTurnEnd

    Condition FactionType alemanni
    and I_TurnNumber = 2
    and not FactionwideAncillaryExists first_sword
    and Attribute Command = 2

    AcquireAncillary first_sword chance 100
    This way you can check all possible 4 command values along 2 turns.
    I didn't test it but I think it could work. Tell me if it helps.

  4. #4
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Ancillary triggers

    ah that's an excellent idea (I just need to convince myself to go off and re-write all the triggers again!) - I'd about given up on that and just made it go to any 2* plus AI general on turn after loss, but I'm sure your solution must work and sounds a lot better
    Not used mods before? Looking for something small and fun?!
    Download the:

  5. #5
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Ancillary triggers

    Your better bet, might be to add this into the prologue script itself, because then the tests can be done each turn, and completely in one turn.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  6. #6
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: Ancillary triggers

    Your better bet, might be to add this into the prologue script itself, because then the tests can be done each turn, and completely in one turn.
    I think I'm about to look very dumb - but the mod isn't 'scripted' as in having a background script running after re-load.

    What did you mean by prologue script? Is there something you can set that effects the way triggers are handled... or are you just assuming mods scipted???
    Not used mods before? Looking for something small and fun?!
    Download the:

  7. #7
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Ancillary triggers

    My bad, I misread, provincial campaign as prologue campaign which I thought has to have a script of some sort.

    Either way if you add a script or add it to a script, the advantage is that the script runs top to bottom, so any checks before using the give_ancillary command will be done in order unlike in the ancillary triggers as you've described above. This might make it easier and certainly you wouldn't need triggers for every turn, as one set of monitors that trigger each turn should do the trick, I'd think.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO