TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    Trigger Question

    Scheduled Pinned Locked Moved Map Making
    26 Posts 6 Posters 5.1k Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wc_sumptonW Offline
      wc_sumpton
      last edited by wc_sumpton

      @beelee did you try it with two cruisers in one territory, with map count at '1'. My bet is that it would work then.

      directPresenceTerritories (list territories to check) map (all the territories) 1 (the count of territories that have to match): so only 1 territory has to match for this to be true. unitPresence (check for units) cruiser (type of unit) 2 (the number of units per territory). So unless you have 2 units in a single territory, this will not return as true. If you try count as 2 for map and count as 1 for cruiser then you should get what you are asking for. But that will return false for 2 cruisers in 1 territory.

      Hope this helps some.

      Cheers...

      B 1 Reply Last reply Reply Quote 1
      • B Offline
        beelee @wc_sumpton
        last edited by

        @wc_sumpton

        right on man. Finally got it to work right. It turns out setting map to 2 for count doesn't work but it gave me the idea to do that if I list the sea zones separately and that did the trick. I tried map with no count and that doesn't work either so my guess is count must mean how many maps. Since there's only one, 1 is the only number that works.

        At any rate, map at 1 with 2 cruisers and then list the zones with count at 2 and 1 cruiser combine them into an Or condition and we're all dialed in 🙂

        I don't think my placement will work 100% correctly but it will only require 1 edit in less than 10% of the games, so i can live with that.

        Once again Thanks for all your help

        1 Reply Last reply Reply Quote 1
        • C Offline
          Cernel Moderators Lobby Moderators @wc_sumpton
          last edited by

          @wc_sumpton said in Trigger Question:

          @beelee from 'pact_of_steel_2.xml'

          activateTrigger   values: This will fire another named trigger.
                            Format: "triggerName:numberOfTimes:useUses:testUses:testConditions:testChance".
                            "activateTrigger" will be affected by "each" in a condition statement.
                            triggerName is the name of the trigger to fire, numberOfTimes is the number of times
                            to fire that trigger, useUses makes sure the firing uses up a "use" at the end of
                            this round, and the tests test the trigger before firing.
                            example: value="triggerAttachmentRussians5_FarEastReserves:1:false:false:false:false"
          

          So to answer your question, Yes the trigger will always fire if the last value is 'false', if the last value is 'true', then the conditions of the trigger are check prior to firing.

          Hope this helps 😉

          Cheers...

          No, actually:

          The activate trigger will always fire, upon the trigger firing (assuming this is what you mean), if the last 3 entries are "false:false:false".

          To check the condition of the trigger to activate (assuming such trigger has any), it is the penultimate entry that must be true (as per what you pasted, the ultimate one is testing chance).

          1 Reply Last reply Reply Quote 0
          • wc_sumptonW Offline
            wc_sumpton
            last edited by

            @beelee good to hear, still it seems funny that:

            <attachment name="conditionAttachmentFrenchCA2" attachTo="French" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
               <option name="directPresenceTerritories" value="map" count="2"/>
               <option name="unitPresence" value="cruiser" count="1"/>
            </attachment>
            

            Did not work for you when you had cruisers in at least 2 different territories. At least you figured out a work-around.

            Happy modding! 😉

            Cheers...

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              beelee @wc_sumpton
              last edited by

              @wc_sumpton

              yea i thought that was weird too. It makes sense the way you explained it. I'm gonna mess with it some more and see if i can get "map" count="2" to work. I just want to understand it correctly at this point.

              1 Reply Last reply Reply Quote 1
              • wc_sumptonW Offline
                wc_sumpton
                last edited by wc_sumpton

                @beelee if you have the time. Let me know what you discover! 😉

                Cheers...

                P.S. @beelee just ran a few check myself. The condition worked when I placed to Russian battleships on 'world_war_ii_v5_1942'. It also returned false with 2 BB in one territory.

                Works for me.

                Cheers...

                B 1 Reply Last reply Reply Quote 1
                • B Offline
                  beelee @wc_sumpton
                  last edited by

                  @wc_sumpton

                  Cool. Thanks for posting again. I gave it another crack and got it to work with map count =2. Needless to say that saves a lot of work. Idk what I did the other day when i tried it and failed. i thought I had that failure saved but I must've worked over it.

                  Oh well, alls well that ends well 🙂

                  HeppsH 1 Reply Last reply Reply Quote 0
                  • HeppsH Offline
                    Hepps Lobby Moderators @beelee
                    last edited by

                    @beelee Perhaps you were too 9d278d7a-93b8-42a0-b06f-aafe442fcfff-image.png

                    "A joyous heart sours with the burden of expectation"
                    Hepster

                    B 1 Reply Last reply Reply Quote 3
                    • B Offline
                      beelee @Hepps
                      last edited by

                      @Hepps
                      heh heh Too much performance enhancer can have the opposite effect :grinning_squinting_face:

                      1 Reply Last reply Reply Quote 3
                      • B Offline
                        beelee
                        last edited by beelee

                        Have another one. These two triggers are the same, except for when "when" fires. Is that enough to make them nut up ? Should they have different names ?

                        <attachment name="triggerAttachment_Fleet_Can_Turn_Free_Destroyer_Remove" attachTo="Neutral_True" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                        <option name="conditions" value="conditionAttachment_False"/>
                        <option name="removeUnits" value="93 Sea Zone:destroyer"/>
                        <option name="when" value="before:americansPlace"/>
                        </attachment>

                        <attachment name="triggerAttachment_Fleet_Can_Turn_Free_Destroyer_Remove" attachTo="Neutral_True" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                        <option name="conditions" value="conditionAttachment_False"/>
                        <option name="removeUnits" value="93 Sea Zone:destroyer"/>
                        <option name="when" value="before:britishPlace"/>
                        </attachment>

                        B 1 Reply Last reply Reply Quote 0
                        • B Offline
                          beelee @beelee
                          last edited by beelee

                          @beelee

                          well went ahead and renamed them. It didn't fix my issue though. The reason i originally asked, was I had gone through 4 players and they all worked and the 5th one started nuttin up.

                          Edit
                          I guess I just needed to struggle for a couple more hours lol. The 5th Player is unique and doesn't have a "Place" phase. It has "EndTurn" instead. About fried my poor little brain 🙂

                          Oh well, hopefully the next 48 hours will be more productive heh heh

                          1 Reply Last reply Reply Quote 0
                          • N Offline
                            Numetalfan
                            last edited by

                            Hi

                            I got a question to the trigger coding 'when'

                            How to determine a trigger to start excatly in a defined round, e.g. round 2

                            So would something like

                            ...
                            <option name="when" value="before:germanCombatMove:round 2"/>
                            ...

                            Is it possible? If, what is the correct syntax?
                            If not what else?

                            B 1 Reply Last reply Reply Quote 0
                            • B Offline
                              beelee @Numetalfan
                              last edited by

                              @Numetalfan add another condition to your trigger. Something like:

                              <attachment name="conditionAttachmentTurn2OrHigher" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                              <option name="rounds" value="2-+"/>
                              </attachment>

                              I think the -+ makes it fire after round 2 as well. i can't remember

                              1 Reply Last reply Reply Quote 1

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              • 1
                              • 2
                              • 2 / 2
                              • First post
                                Last post
                              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums