Results 1 to 18 of 18

Thread: One Ring battle trigger

Hybrid View

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

    Default One Ring battle trigger

    Hi,

    I've encountered a problem in hotseat concerning the battle trigger for the One Ring... it is supposed to be given to a general who kills the ringbearer, and there are two codes that can be used :

    not I_WorldwideAncillaryExists
    Code:
    Trigger one_ring_battletrigger
        WhenToTest PostBattle
        Condition WonBattle
          and IsGeneral
          and not IsFactionAIControlled
          and not I_WorldwideAncillaryExists one_ring
    
        AcquireAncillary one_ring chance  100


    or

    GeneralWithAncKilled
    Code:
    Trigger one_ring_battletrigger
        WhenToTest PostBattle
        Condition WonBattle
          and IsGeneral
          and not IsFactionAIControlled
          and GeneralWithAncKilled relic_ring
    
        AcquireAncillary one_ring chance  100


    The second one shows an error in the log, but this error does not seem to be of any effect ingame. Whatever. I thaught the second trigger might eliminate the problem that occurs when the ringbearer gets killed by an army led by a captain (who cannot carry ancillaries) - in that case the One Ring was given to your next victorious general, wherever he faught. But, apparently, the "GeneralWithAncKilled" is not really linked with the concrete battle... it actually says the very same thing : the ringbearer is killed = the ancillary does not exist. Both work fine for singleplayer thanks to the "not IsFactionAIControlled" condition. (The ai initial ringbearer should be locked in a settlement to avoid his death in a battle against bandits.)

    The problem appears in hotseat. Let's say the player FPE attacks an Isengard army with his Frodo, and Frodo gets killed. There are other players who follow FPE turn, and anyone who wins a battle, gets the One Ring from it. Mordor may get it for defeating an army of 100 militia in Ithilien. But even the Elves may get it earlier...

    I am afraid this will force us to use only city triggers for the One Ring, meaning you have to kill the Ringbearer and then go to a specific settlement, capture it and recover the One Ring.

    Or does anybody see any solution ?

    Edit:

    How about making an Event_counter that would prevent the loss of the One Ring in offensive battle...

    Solution ?
    Code:
    declare_counter we_have_the_ring
    declare_counter we_lost_the_ring
    monitor_event FactionTurnStart FactionIsLocal
           and I_FactionwideAncillaryExists one_ring
       set_counter we_have_the_ring 1
    end_monitor
    
    monitor_event FactionTurnStart FactionIsLocal
           and not I_FactionwideAncillaryExists one_ring
       set_counter we_have_the_ring 0
      set_counter we_lost_the_ring 0
    end_monitor
    
    monitor_event FactionTurnEnd FactionIsLocal
        and not I_FactionwideAncillaryExists one_ring
      and I_EventCounter we_have_the_ring 1
      set_counter we_lost_the_ring 1
      set_counter we_have_the_ring 0
    end_monitor
    And then we might have this :

    Code:
    Trigger one_ring_battletrigger
        WhenToTest PostBattle
        Condition WonBattle
          and IsGeneral
          and not IsFactionAIControlled
          and not I_EventCounter we_lost_the_ring = 1
          and not I_WorldwideAncillaryExists one_ring
    
        AcquireAncillary one_ring chance  100
    I will test it, it's just a quick idea. It should allow the player to kill the ennemy ringbearer and recover the one ring in his own turn, and it should prevent the loss of the one ring to a random victor when the ringbearer gets killed in a battle initiated by those "who_have_the_ring". In that case the Ring would get back to a city and could be recovered there.

    And it still does not prevent the situation when the ringbearer gets killed by a captain...
    Last edited by Adjudant-Major; October 31, 2011 at 05:58 PM.


  2. #2

    Default Re: One Ring battle trigger

    I think I remember reading that "GeneralWithAncKilled" does not work.

    Your Suggestion is not likely to work as the we_lost_the_ring must be 0. Only after a turn in which the ring was lost and before the start of the next turn, at which both values will be set to 0 (which must be true in this case as there is no ring after it got lost) there can be a value of 1 for we_lost_the_ring. But as the battletrigger fires afer the battle, the value must be 0.
    Therefore there is no practical difference to the original form at the moment.

    Apart from that it will prevent any AI faction from ever gaining the ring, but I guess that was your intention for hotseat...

  3. #3
    Baron Samedi's Avatar Citizen
    Join Date
    Apr 2009
    Location
    The Netherlands
    Posts
    1,414

    Default Re: One Ring battle trigger

    The first code still remains the best solution. It makes sure the ring is always in hands of a general no matter what (it will go to the general who plays the first next battle in the campaign after the ringbearer has died). Also it gives you the ability to directly take the ring from the killed general who originally had it (in the same turn). You probably can't create anything better than this, but I am always ready to be amazed by a better alternative.
    Under the patronage of MasterBigAb

  4. #4

    Default Re: One Ring battle trigger

    Edit... 1) factionwideancillaryexists does not exist, 2) I don't know why, today the battletrigger works fine ...except for the captain problem of course.

    forget about this :))
    Your Suggestion is not likely to work as the we_lost_the_ring must be 0.
    Sorry, I don't get it

    The aim was the following :

    1) the actual ringbearer of the local faction holds the One Ring at the start of a turn : we_have_the_ring = 1
    2) he attacks an ennemy and gets killed, at the end of the turn of his faction there is no ring within the faction : we_lost_the_ring = 1
    3) with that counter no one may acquire the One Ring for a victory
    4) you only may acquire the One Ring when the attacker defeats and kills the ringbearer (the purpose of it is that the trigger actually gives the One Ring to the next victor, it would not wait for your turn and your general who actually really killed the ringbearer, which ruins the concept for hotseat; but you may acquire the One ring in your turn without that risk)

    I did it late night yesterday, there may be a gap I think "we_lost_the_ring" should only get back to 0 when the Ring is recovered in a city, this should do it I think :

    Code:
    monitor_event FactionTurnStart FactionIsLocal
       and not I_FactionwideAncillaryExists one_ring
       set_counter we_have_the_ring 0
    end_monitor
    
    monitor_event FactionTurnStart FactionIsLocal
       and I_WorldwideAncillaryExists one_ring
      set_counter we_lost_the_ring 0
    end_monitor
    Either we have the ringbearer killed in his offensive battle, than the Ring cannot be recovered with that trigger, as "we_lost_the_ring = 1", or he is killed in our offensive battle, "we_lost_the_ring = 0", and there is no other problem but the situation when the ringbearer gets killed by a captain, which will give the ring to the next random victor, wherever and whoever he defeats.

    Quote Originally Posted by Baron
    it will go to the general who plays the first next battle in the campaign after the ringbearer has died
    True, but do we really want this ? Do we want to see a haradrim general recover the One Ring in Khand for defeating a rebel army when Frodo got killed in the Misty Mountains by an OMM captain ? Nothing would be easier than to continue north, give the ring to Sauron and win the war

    I would rather sacrifice the battle trigger here... it may ruin the entire concept.
    Last edited by Adjudant-Major; November 01, 2011 at 04:18 AM.


  5. #5
    2-D Ron's Avatar Campidoctor
    Join Date
    Jun 2008
    Location
    North-East, England
    Posts
    1,589

    Default Re: One Ring battle trigger

    I found this on Totalwar.org and looking at the 5 Part List the Bold part I saw made me think, what if each Ancillary has a Specific Hardcode to it.. Example, not all Ancillaries can be transferred via General(s), some only specific Agents can aquire, some that can only be aquired through a Crusade/Jihad etc.

    Probably 100% wrong about the above, but thought i's offer a fresh brain on this, hope it helps.. If not i'll just sit in corner.


    Spoiler Alert, click show to read: 
    Join DateDec 2006Posts72




    Re: List of Ancillaries - Effects and how to acquire

    COMPLETE LIST OF ANCILLARIES FOR MEDIEVAL 2: TOTAL WAR (1.1)
    by the.seneschal@hotmail.com


    PART 5







    ======
    RELICS
    ======


    All relics can be transfered to other characters. Relics are unique.

    A general having one relic will not be eligble for another.

    Note that the requirements for certain triggers are to be ON a crusade, not that the city itself is the target for the crusade.

    When a father possessing a relic dies a natural death and a son has Piety > 2, the son has a 60% chance of acquiring the relic.

    When a general wins a battle where the opposing general carrying a relic dies, regardless of how, the winning general has 10% chance of acquiring the relic.

    The exact conditions for the "major reward" from the pope will be added later.


    ;------------------------------------------
    SHARD OF THE TRUE CROSS (N/A for middle eastern)

    +2 Piety
    +1 Command

    10% chance when capturing Tripoli and Piety > 3.
    30% chance when capturing Triploi and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY LANCE (N/A for middle eastern)

    +1 Piety
    +2 Command

    10% chance when capturing Antioch and Piety > 3.
    10% chance when capturing Constantinople and Piety > 3.
    30% chance when capturing and on crusade Antioch and Piety > 3.
    30% chance when capturing and on crusade Constantinople and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY GRAIL (N/A for middle eastern)

    +2 Piety
    +5 to your general's hitpoints (how many hits your general can take before dying)
    Improves the chances of casualties recovering from their wounds

    10% chance when capturing Aleppo and Piety > 5.
    30% chance when capturing Aleppo and on crusade and Piety > 5.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    IRON CROWN OF LOMBARDY (N/A for middle eastern)

    +1 Piety
    +1 to personal security (improves the chances of detecting and foiling assassination attempts)
    +1 to your general's hitpoints (how many hits your general can take before dying)

    10% chance when capturing Milan and Piety > 3.
    30% chance when capturing Milan and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    BRIDLE OF CONSTANTINE (N/A for middle eastern)

    +1 Piety
    +1 to personal security (improves the chances of detecting and foiling assassination attempts)
    +1 to your general's hitpoints (how many hits your general can take before dying)

    10% chance when capturing Constantinople and Piety > 3.
    30% chance when capturing Constantinople and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY CHALICE (N/A for middle eastern)

    +1 Piety

    10% chance when capturing Jerusalem and Piety > 3.
    30% chance when capturing Jerusalem and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    VEIL OF VERONICA (N/A for middle eastern)

    +1 Piety

    10% chance when capturing Jerusalem and Piety > 3.
    30% chance when capturing Jerusalem and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    ICON NOT MADE BY HANDS (N/A for middle eastern)

    +1 Piety
    +1 to public health

    10% chance when capturing Edessa and Piety > 3.
    30% chance when capturing Edessa and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY PREPUCE (N/A for middle eastern)

    +1 Piety, Increases the chance of having children

    10% chance when capturing Bordeaux and Piety > 3.
    10% chance when capturing Hamburg and Piety > 3.
    30% chance when capturing Bordeaux and on crusade and Piety > 3.
    30% chance when capturing Hamburg and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    CROWN OF THORNS (N/A for middle eastern)

    +2 Piety, +1 Command

    10% chance when capturing Jerusalem and Piety > 3.
    10% chance when capturing Paris and Piety > 3.
    30% chance when capturing Jerusalem and on crusade and Piety > 3.
    30% chance when capturing Paris and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY SHROUD (N/A for middle eastern)

    +1 Piety
    +1 Command when defending walls
    +1 to personal security (improves the chances of detecting and foiling assassination attempts)

    10% chance when capturing Constantinople and Piety > 3.
    30% chance when capturing Constantinople and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    ARK OF THE COVENANT

    +2 Dread
    +1 Command

    10% chance when capturing Cairo and Piety > 3.
    30% chance when capturing Cairo and on crusade and Piety > 3.
    30% chance when capturing Cairo and on jihad and Piety > 3.

    ;------------------------------------------
    SEAL OF SOLOMON
    +1 Dread
    -1 Piety
    +2 Command when commanding cavalry

    10% chance when capturing Jerusalem and Piety > 3.
    30% chance when capturing Jerusalem and on crusade and Piety > 3.
    30% chance when capturing Jerusalem and on jihad and Piety > 3.

    ;------------------------------------------
    HAIR FROM MOHAMMED'S BEARD (Middle-eastern only)

    +1 Piety

    10% chance when capturing Acre and Piety > 3.
    30% chance when capturing Acre and on jihad and Piety > 3.

    ;------------------------------------------
    MOHAMMED'S FOOTPRINT (Middle-eastern only)

    +1 Piety

    10% chance when capturing Damascus and Piety > 3.
    30% chance when capturing Damascus and on jihad and Piety > 3.

    ;------------------------------------------
    HOLY MANTLE (Middle-eastern only)

    +2 Piety

    10% chance when capturing Antioch and Piety > 3.
    30% chance when capturing Antioch and on jihad and Piety > 3.

    ;------------------------------------------
    TOOTH OF MOHAMMED (Middle-eastern only)

    +1 Piety

    10% chance when capturing Aleppo and Piety > 3.
    30% chance when capturing Aleppo and on jihad and Piety > 3.

    ;------------------------------------------
    KEY TO HOLY KAABA (Middle-eastern only)

    +1 Piety

    10% chance when capturing Edessa and Piety > 3.
    30% chance when capturing Edessa and on jihad and Piety > 3.

    ;------------------------------------------
    LOCK OF KAABA (Middle-eastern only)

    +1 Piety

    10% chance when capturing Adana and Piety > 3.
    30% chance when capturing Adana and on jihad and Piety > 3.

    ;------------------------------------------
    SWORD OF MOHAMMED (Middle-eastern only)

    +1 Piety
    +2 Command

    10% chance when capturing Baghdad and Piety > 3.
    30% chance when capturing Baghdad and on jihad and Piety > 3.

    ;------------------------------------------
    FRAGMENT OF THE BLACK STONE (Middle-eastern only)
    +3 Piety

    10% chance when capturing Iconium and Piety > 3.
    30% chance when capturing Iconium and on jihad and Piety > 3.

    ;------------------------------------------
    HOLY QUR'AN (Middle-eastern only)

    +2 Piety

    10% chance when capturing Mosul and Piety > 3.
    30% chance when capturing Mosul and on jihad and Piety > 3.

    ;------------------------------------------
    SOIL FROM MOHAMMED'S GRAVE (Middle-eastern only)

    +1 Piety

    10% chance when capturing Gaza and Piety > 3.
    30% chance when capturing Gaza and on jihad and Piety > 3.

    ;------------------------------------------
    STANDARD OF MOHAMMED (Middle-eastern only)

    +1 Piety
    +1 Command

    10% chance when capturing Nicaea and Piety > 3.
    30% chance when capturing Nicaea and on jihad and Piety > 3.

    ;------------------------------------------


  6. #6
    Baron Samedi's Avatar Citizen
    Join Date
    Apr 2009
    Location
    The Netherlands
    Posts
    1,414

    Default Re: One Ring battle trigger

    Quote Originally Posted by 2-D Ron View Post
    I found this on Totalwar.org and looking at the 5 Part List the Bold part I saw made me think, what if each Ancillary has a Specific Hardcode to it.. Example, not all Ancillaries can be transferred via General(s), some only specific Agents can aquire, some that can only be aquired through a Crusade/Jihad etc.

    Probably 100% wrong about the above, but thought i's offer a fresh brain on this, hope it helps.. If not i'll just sit in corner.


    Spoiler Alert, click show to read: 
    Join DateDec 2006Posts72




    Re: List of Ancillaries - Effects and how to acquire
    COMPLETE LIST OF ANCILLARIES FOR MEDIEVAL 2: TOTAL WAR (1.1)
    by the.seneschal@hotmail.com


    PART 5







    ======
    RELICS
    ======


    All relics can be transfered to other characters. Relics are unique.

    A general having one relic will not be eligble for another.

    Note that the requirements for certain triggers are to be ON a crusade, not that the city itself is the target for the crusade.

    When a father possessing a relic dies a natural death and a son has Piety > 2, the son has a 60% chance of acquiring the relic.

    When a general wins a battle where the opposing general carrying a relic dies, regardless of how, the winning general has 10% chance of acquiring the relic.

    The exact conditions for the "major reward" from the pope will be added later.


    ;------------------------------------------
    SHARD OF THE TRUE CROSS (N/A for middle eastern)

    +2 Piety
    +1 Command

    10% chance when capturing Tripoli and Piety > 3.
    30% chance when capturing Triploi and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY LANCE (N/A for middle eastern)

    +1 Piety
    +2 Command

    10% chance when capturing Antioch and Piety > 3.
    10% chance when capturing Constantinople and Piety > 3.
    30% chance when capturing and on crusade Antioch and Piety > 3.
    30% chance when capturing and on crusade Constantinople and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY GRAIL (N/A for middle eastern)

    +2 Piety
    +5 to your general's hitpoints (how many hits your general can take before dying)
    Improves the chances of casualties recovering from their wounds

    10% chance when capturing Aleppo and Piety > 5.
    30% chance when capturing Aleppo and on crusade and Piety > 5.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    IRON CROWN OF LOMBARDY (N/A for middle eastern)

    +1 Piety
    +1 to personal security (improves the chances of detecting and foiling assassination attempts)
    +1 to your general's hitpoints (how many hits your general can take before dying)

    10% chance when capturing Milan and Piety > 3.
    30% chance when capturing Milan and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    BRIDLE OF CONSTANTINE (N/A for middle eastern)

    +1 Piety
    +1 to personal security (improves the chances of detecting and foiling assassination attempts)
    +1 to your general's hitpoints (how many hits your general can take before dying)

    10% chance when capturing Constantinople and Piety > 3.
    30% chance when capturing Constantinople and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY CHALICE (N/A for middle eastern)

    +1 Piety

    10% chance when capturing Jerusalem and Piety > 3.
    30% chance when capturing Jerusalem and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    VEIL OF VERONICA (N/A for middle eastern)

    +1 Piety

    10% chance when capturing Jerusalem and Piety > 3.
    30% chance when capturing Jerusalem and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    ICON NOT MADE BY HANDS (N/A for middle eastern)

    +1 Piety
    +1 to public health

    10% chance when capturing Edessa and Piety > 3.
    30% chance when capturing Edessa and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY PREPUCE (N/A for middle eastern)

    +1 Piety, Increases the chance of having children

    10% chance when capturing Bordeaux and Piety > 3.
    10% chance when capturing Hamburg and Piety > 3.
    30% chance when capturing Bordeaux and on crusade and Piety > 3.
    30% chance when capturing Hamburg and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    CROWN OF THORNS (N/A for middle eastern)

    +2 Piety, +1 Command

    10% chance when capturing Jerusalem and Piety > 3.
    10% chance when capturing Paris and Piety > 3.
    30% chance when capturing Jerusalem and on crusade and Piety > 3.
    30% chance when capturing Paris and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    HOLY SHROUD (N/A for middle eastern)

    +1 Piety
    +1 Command when defending walls
    +1 to personal security (improves the chances of detecting and foiling assassination attempts)

    10% chance when capturing Constantinople and Piety > 3.
    30% chance when capturing Constantinople and on crusade and Piety > 3.
    5% chance for faction leader as major reward from the pope.

    ;------------------------------------------
    ARK OF THE COVENANT

    +2 Dread
    +1 Command

    10% chance when capturing Cairo and Piety > 3.
    30% chance when capturing Cairo and on crusade and Piety > 3.
    30% chance when capturing Cairo and on jihad and Piety > 3.

    ;------------------------------------------
    SEAL OF SOLOMON
    +1 Dread
    -1 Piety
    +2 Command when commanding cavalry

    10% chance when capturing Jerusalem and Piety > 3.
    30% chance when capturing Jerusalem and on crusade and Piety > 3.
    30% chance when capturing Jerusalem and on jihad and Piety > 3.

    ;------------------------------------------
    HAIR FROM MOHAMMED'S BEARD (Middle-eastern only)

    +1 Piety

    10% chance when capturing Acre and Piety > 3.
    30% chance when capturing Acre and on jihad and Piety > 3.

    ;------------------------------------------
    MOHAMMED'S FOOTPRINT (Middle-eastern only)

    +1 Piety

    10% chance when capturing Damascus and Piety > 3.
    30% chance when capturing Damascus and on jihad and Piety > 3.

    ;------------------------------------------
    HOLY MANTLE (Middle-eastern only)

    +2 Piety

    10% chance when capturing Antioch and Piety > 3.
    30% chance when capturing Antioch and on jihad and Piety > 3.

    ;------------------------------------------
    TOOTH OF MOHAMMED (Middle-eastern only)

    +1 Piety

    10% chance when capturing Aleppo and Piety > 3.
    30% chance when capturing Aleppo and on jihad and Piety > 3.

    ;------------------------------------------
    KEY TO HOLY KAABA (Middle-eastern only)

    +1 Piety

    10% chance when capturing Edessa and Piety > 3.
    30% chance when capturing Edessa and on jihad and Piety > 3.

    ;------------------------------------------
    LOCK OF KAABA (Middle-eastern only)

    +1 Piety

    10% chance when capturing Adana and Piety > 3.
    30% chance when capturing Adana and on jihad and Piety > 3.

    ;------------------------------------------
    SWORD OF MOHAMMED (Middle-eastern only)

    +1 Piety
    +2 Command

    10% chance when capturing Baghdad and Piety > 3.
    30% chance when capturing Baghdad and on jihad and Piety > 3.

    ;------------------------------------------
    FRAGMENT OF THE BLACK STONE (Middle-eastern only)
    +3 Piety

    10% chance when capturing Iconium and Piety > 3.
    30% chance when capturing Iconium and on jihad and Piety > 3.

    ;------------------------------------------
    HOLY QUR'AN (Middle-eastern only)

    +2 Piety

    10% chance when capturing Mosul and Piety > 3.
    30% chance when capturing Mosul and on jihad and Piety > 3.

    ;------------------------------------------
    SOIL FROM MOHAMMED'S GRAVE (Middle-eastern only)

    +1 Piety

    10% chance when capturing Gaza and Piety > 3.
    30% chance when capturing Gaza and on jihad and Piety > 3.

    ;------------------------------------------
    STANDARD OF MOHAMMED (Middle-eastern only)

    +1 Piety
    +1 Command

    10% chance when capturing Nicaea and Piety > 3.
    30% chance when capturing Nicaea and on jihad and Piety > 3.

    ;------------------------------------------
    Thanks 2-D Ron for posting the link (+rep). I found the the ancillaries in vanilla and the battle triggers for them. I will port the codes to TATW and I will test them accordingly. It's funny I never checked the original vanilla M2TW code. I already noticed a difference in the condition when I compare the vanilla M2TW code (for relic) with TATW vanilla code (one_ring), so I am very interested in the results. Will post them later here.
    Under the patronage of MasterBigAb

  7. #7
    2-D Ron's Avatar Campidoctor
    Join Date
    Jun 2008
    Location
    North-East, England
    Posts
    1,589

    Default Re: One Ring battle trigger

    Quote Originally Posted by Baron Samedi View Post
    Thanks 2-D Ron for posting the link (+rep). I found the the ancillaries in vanilla and the battle triggers for them. I will port the codes to TATW and I will test them accordingly. It's funny I never checked the original vanilla M2TW code. I already noticed a difference in the condition when I compare the vanilla M2TW code (for relic) with TATW vanilla code (one_ring), so I am very interested in the results. Will post them later here.
    Maybe that's why you weren't getting an error message yet the Trigger never worked? Because that Ancillary was Hardcoded specifically to work under Crusade (Invasion)/Jihad conditions only? So, in a way it was right, just in the wrong section and the Moniter couldn't differentiate?

    Can't believe it helped, just wait while I pinch myself/Check it's not April 1st .

  8. #8
    NSFW's Avatar Semisalis
    Join Date
    Aug 2009
    Location
    UK
    Posts
    476

    Default Re: One Ring battle trigger

    Has anyone tested whether the ''and GeneralWithAncKilled" trigger is even working for relics in vanilla M2TW? (maybe by modding the trigger to 100% chance, for ease of testing) From the sounds of things so far I'm guessing it doesn't even work there.

    Is it possible to come up with some work around, maybe by triggering a trait when the general with the Ring is killed, which in turn grants the ring via script? (are there any examples in the vanilla code where the ''and GeneralWithAncKilled" trigger is used successfully to trigger a trait, rather than an ancillary? Failing that would it be possible to award such a trait post-battle based on whether the one ring exists in the world as an ancillary?)

    Just some random thoughts, am very sleep deprived at the moment so apologies if any of these ideas have been discussed & disgarded already. Is the sort of thing I'd be interested in tinkering around with, if I had more game/modding time at the mo. *sigh*
    "Never argue with an idiot; They drag you down to their level, then beat you with experience." -Obake Date

  9. #9

    Default Re: One Ring battle trigger

    The trigger "and GeneralWithAncKilled" definetly works, but, for some strange reason, not with "one_ring", it works (with some issues) with "relic_ring"... black magic.

    The major problem still are the armies led by captains. No solution with traits may solve that I am afraid. The best solution would be to send the One Ring to the faction leader of the killed ringbearer in such a case, or something similar. If the "and GeneralWithAncKilled" worked as we would like it, we might use "and not WorldwideAncillaryExists" for the second case.
    Last edited by Adjudant-Major; November 03, 2011 at 01:05 PM.


  10. #10
    NSFW's Avatar Semisalis
    Join Date
    Aug 2009
    Location
    UK
    Posts
    476

    Default Re: One Ring battle trigger

    Quote Originally Posted by Adjudant-Major View Post
    The trigger "and GeneralWithAncKilled" definetly works, but, for some strange reason, not with "one_ring", it works (with some issues) with "relic_ring"... black magic.
    That's truly bizarre!
    But it sounds like using "GeneralWithAncKilled" to award a trait (e.g. "Slayer of the Ring-Bearer", or maybe some hidden trait) which in turn awards the Ring via a script is a possible work-around, right?

    Or maybe try giving the Ring an in-file name which doesn't mention rings at all, and only calling it "The One Ring" in the in-game description, etc.

    The major problem still are the armies led by captains. No solution with traits may solve that I am afraid. The best solution would be to send the One Ring to the faction leader of the killed ringbearer in such a case, or something similar. If the "and GeneralWithAncKilled" worked as we would like it, we might use "and not WorldwideAncillaryExists" for the second case.
    In terms of sending the ring to the ex-ringbearers faction leader, isn't there a faction equivalent to "WorldwideAncillaryExists", something like "FactionAncillaryExists"? it rings vague bells but it's a while since I've looked at the docudemon.
    If there is such a trigger it might be possible to use it to bestow a seperate trait on the faction leader (e.g. Guardian of the ring-bearer, or again just hidden) which is then used in combination with "and not WorldwideAncillaryExists" to give him the ring via script, if the ringbearer's killed & his killer doesn't acquire the ring.
    You'd need to remove this Leader's trait if the ring passed to another faction, but I guess you might be able to do that with a combination of "and WorldwideAncillaryExists" and "and not FactionAncillaryExists".

    Just some random, if convoluted, ideas, hope they're some help.
    Last edited by NSFW; November 03, 2011 at 03:23 PM.
    "Never argue with an idiot; They drag you down to their level, then beat you with experience." -Obake Date

  11. #11
    2-D Ron's Avatar Campidoctor
    Join Date
    Jun 2008
    Location
    North-East, England
    Posts
    1,589

    Default Re: One Ring battle trigger

    Quote Originally Posted by Adjudant-Major View Post
    The trigger "and GeneralWithAncKilled" definetly works, but, for some strange reason, not with "one_ring", it works (with some issues) with "relic_ring"... black magic.

    The major problem still are the armies led by captains. No solution with traits may solve that I am afraid. The best solution would be to send the One Ring to the faction leader of the killed ringbearer in such a case, or something similar. If the "and GeneralWithAncKilled" worked as we would like it, we might use "and not WorldwideAncillaryExists" for the second case.

    Then the Vanilla Ancillary that does work with the "and GeneralWithAncKilled" trigger, can't you use that instead? Like Grafting it's function for your one Ring while tinkering with the image % codes on aquiring?

    Maybe they work in the way of Hardcode 'slots', like you can only have 30 Factions Limit, maybe each Ancillary has it's own slot with it's own unique scripts? You simply finf an Ancillary that matches your ambitions for the One Ring?

  12. #12

    Default Re: One Ring battle trigger

    I know nothing about the vanilla M2TW script or game system. I doubt concrete ancillaries would be hardcoded. It needs more testing, but I have no time in these days...


  13. #13
    2-D Ron's Avatar Campidoctor
    Join Date
    Jun 2008
    Location
    North-East, England
    Posts
    1,589

    Default Re: One Ring battle trigger

    So how goes the search for a working Trigger? Have you cracked it yet?

Posting Permissions

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