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

    Simple Trigger Help

    Scheduled Pinned Locked Moved Map Making
    74 Posts 9 Posters 26.1k Views 9 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.
    • N Offline
      Name @wc_sumpton
      last edited by

      @wc_sumpton

      Ok I think I get most of it.
      switch = always true.
      Setting switch to false for a condition will disable it.
      uses 1 = 1 time in total that the trigger can fire.

      Those triggers seem to all fire during the politics phase. I'll keep it that way without "when" for now, until the gameplay is more settled on and I know when I want them.

      Question:
      Can I have a notification display to all or a number of players?

      My confusing question rephrased, and probably answered:
      Does a trigger run again on it's own during the next turn if it failed it's roll? Probably not. What I was asking for about "rolls" (chances) is if it could roll two times next turn. One because it triggered again and one because it keeps checking from the previous turn. This chanceIncrementOnFailure made me think that possibly a trigger could auto-retry with increased chances next turn. Probably not.

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

        @Name said in Simple Trigger Help:

        Question:
        Can I have a notification display to all or a number of players?

        Yes add <option name="players" value="Rhodos:Macedon"/>. Just list the players, separated with a colon.

        @Name said in Simple Trigger Help:

        My confusing question rephrased, and probably answered:
        Does a trigger run again on it's own during the next turn if it failed it's roll?

        Yes, if the condition, the fleets are still there. No if the fleets are not there. Chance has nothing to do with the trigger firing, only the 'conditions' value.

        Turn 1: two Fleet units in Cretan Sea so trigger Lyttian_War fires and chance 1:6 fails.

        Turn 2: one Fleet still in Cretan Sea with the other in Carpathian Sea with a Pirate_Fleet so trigger will fire. If you added:

           <option name="chanceIncrementOnFailure" value="1"/>
        

        Now the chance is 2 or less out of 6, but fails again.

        Turn 3 the Fleet as left Carpathian Sea leaving the Pirate_Fleet with a Fleet in Cretan Sea. The trigger 'Lyttian_War' will not fire.

        Turn 4 the Pirate_Fleet moved to Cretan Sea with the Fleet and the trigger will fire again, this time at 3:6. Success and Rhodos and Macedon are at war!

        Turn 5 the Pirate_Fleet and Fleet are still in Cretan Sea. Trigger 'Lyttian_War' fires at 3:6 failure but Rhodos and Macedon are still at war.

        Turns 6-9 the Fleet has left Cretan Sea for Carpathian Sea so Trigger 'Lyttian_War' does not fire

        Turns 10-15 the Pirate_Fleet has joined the Fleet at Carpathian Sea so Trigger 'Lyttian_War' will fire. Some fail, some success. With every failure the chance will increase by 1 until it matches 6, then the chance will not fail. With every success Rhodos and Macedon will be set to War, even if they are already at war, and everyone listed in the 'players' value will get notified.

        So yes the trigger will fire again and again, as long as 2 units are in 1 of the listed territories, the trigger will fire.

        And yes on every failure with 'chanceIncrementOnFailure' value of 1 will increase the chance of success until it reaches state of always true (6:6).

        Hope this helps...

        Cheers...

        N 1 Reply Last reply Reply Quote 2
        • redrumR Offline
          redrum Admin @Name
          last edited by

          @Name Anything is possible and I'd need to take a closer look at the code and do some testing but I'm 99% sure that isDefaultWarPosition would only ever cause chaining war and cause additional war declarations which doesn't appear to be the issue you're seeing 🙂

          TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

          B 1 Reply Last reply Reply Quote 3
          • B Online
            beelee @redrum
            last edited by

            @redrum said in Simple Trigger Help:

            @Name Anything is possible ...

            👍

            1 Reply Last reply Reply Quote 0
            • N Offline
              Name @wc_sumpton
              last edited by

              I've made a thread for the map showcasing some of it's planned features.
              https://forums.triplea-game.org/topic/1726/ancient-empires-222-bc

              @wc_sumpton
              Thanks, everything seems clear now 🙂

              wc_sumptonW redrumR 2 Replies Last reply Reply Quote 1
              • wc_sumptonW Offline
                wc_sumpton @Name
                last edited by

                @Name
                Sure, no problem. Have fun and welcome to TripleA xml scripting.

                Cheers...

                1 Reply Last reply Reply Quote 2
                • redrumR Offline
                  redrum Admin @Name
                  last edited by

                  @Name So I looked a bit closer and the reason alliancesCanChainTogether isn't working as we would think is that it only happens during the politics phase not during triggered relationship changes. So if you'd say declare war using a politics action instead of the trigger then you would see the effect I described. This could probably be enhanced and either way a bit better documentation in POS2 would be helpful.

                  TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                  N 1 Reply Last reply Reply Quote 3
                  • N Offline
                    Name @redrum
                    last edited by

                    @redrum
                    Thanks. I think I can deal with it for now, setting only a number of essential triggered changes to depict the era and including whatever players are needed in each case.

                    1 Reply Last reply Reply Quote 0
                    • RogerCooperR Offline
                      RogerCooper @Name
                      last edited by

                      @Name Yes, all powers start at neutral, with alliances set with triggers.

                      Here is the code

                            <attachment name="relationshipTypeAttachment" attachTo="War" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship">
                            <option name="archeType" value="war"/>
                            <option name="isDefaultWarPosition" value="true"/>
                          </attachment>
                          <attachment name="relationshipTypeAttachment" attachTo="Allied" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship">
                            <option name="archeType" value="allied"/>
                            <option name="alliancesCanChainTogether" value="true"/>
                          </attachment>
                          <attachment name="relationshipTypeAttachment" attachTo="Neutrality" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship">
                            <option name="archeType" value="neutral"/>
                          </attachment>
                      <attachment name="conditionAttachmentTurn1" attachTo="A" 
                      javaClass="games.strategy.triplea.attachments.RulesAttachment"  type="player"><option name="rounds"  value="1"/></attachment>
                      
                      <attachment name="triggerAttachmentJapanToA" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Japanese:A:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:2"/>
                            <option name="when"  value="before:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentJapanToB" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Japanese:B:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:1"/>
                            <option name="when"  value="after:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentGermansToA" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Germans:A:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:2"/>
                            <option name="when"  value="before:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentGermansToB" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Germans:B:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:1"/>
                            <option name="when"  value="after:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentItaliansToA" attachTo="Italians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Italians:A:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:2"/>
                            <option name="when"  value="before:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentItaliansToB" attachTo="Italians" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Italians:B:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:1"/>
                            <option name="when"  value="after:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentChineseToA" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Chinese:A:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:2"/>
                            <option name="when"  value="before:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentChineseToB" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Chinese:B:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:1"/>
                            <option name="when"  value="after:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentAmericansToA" attachTo="Americans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Americans:A:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:2"/>
                            <option name="when"  value="before:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentAmericansToB" attachTo="Americans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="Americans:B:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:1"/>
                            <option name="when"  value="after:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentBritishToA" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="British:A:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:2"/>
                            <option name="when"  value="before:ABidPlace"/>
                          </attachment>
                      <attachment name="triggerAttachmentBritishToB" attachTo="British" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                            <option name="conditions" value="conditionAttachmentTurn1"/>
                            <option name="relationshipChange" value="British:B:Neutrality:Allied"/>
                            <option name="uses" value="1"/>
                            <option name="chance" value="1:1"/>
                            <option name="when"  value="after:ABidPlace"/>
                          </attachment>
                      
                      

                      Each power has 50% of joining alliance A, and a 50% of joining alliance B.

                      Note that alliances chain together not wars. Declaring war on a member of an alliance does not put you at war with the rest. However allying with another country gives you identical diplomatic relationships (for the peace and war archetypes).

                      N RogerCooperR 2 Replies Last reply Reply Quote 3
                      • N Offline
                        Name @RogerCooper
                        last edited by Name

                        @RogerCooper Thanks, I'll consider it when I get more deeply into how to handle diplomacy.

                        Btw does this format work with trigger notifications? or only with political actions?

                        Social_War=<body>Blah Blah!</body>
                        Social_War.NOTIFICATION_SUCCESS=<body>Aetolia is now Allied with Sparta against Macedon!</body>
                        Social_War.OTHER_NOTIFICATION_SUCCESS=<body>Aetolia is now Allied with Sparta against Macedon!</body>
                        Social_War.NOTIFICATION_FAILURE=<body>Aetolia is not yet Allied with Sparta against Macedon!</body>
                        Social_War.OTHER_NOTIFICATION_FAILURE=<body>Aetolia is not yet Allied with Sparta against Macedon!</body>
                        

                        I can't seem to get it replace things like:

                        Trigger Rolling is a Failure! (Rolled at 3 out of 6 Result: 4  for Social War)
                        
                        C 1 Reply Last reply Reply Quote 0
                        • C Offline
                          Cernel Moderators @Name
                          last edited by

                          @Name Yeah, as far as I know, the success/failure notifications are manageable only from the user side. If so, I certainly believe this is unpolished, as it should be up to the mapmaker to decide if to show them or not, at least as default (for example, there is no point showing a success notification if that also triggers a custom notification, explaining the matter).

                          N 1 Reply Last reply Reply Quote 0
                          • N Offline
                            Name @Cernel
                            last edited by

                            @Cernel Makes sense. Anyway I'll refrain from using chances and make all diplomacy conditions more linear for now until I have implemented all my players.

                            C 1 Reply Last reply Reply Quote 0
                            • C Offline
                              Cernel Moderators @Name
                              last edited by

                              @Name It's unpolished, but not a big deal. Users will just have to disable showing all trigger chance rolls. Of course, I'm sure most users will not realize they can, at least not very soon. So, yeah... You can open a feature request, I suppose.

                              A problem with having many trigger chances (talking about having tens of them) is that, playing live, they cause a considerable delay (I guess because the rolls have to be sent to all participants each time). Try War of the Relics, if you want.

                              N 1 Reply Last reply Reply Quote 0
                              • N Offline
                                Name @Cernel
                                last edited by

                                @Cernel I see, but that was actually the secondary reason for avoiding chances. My main concern is messing up alliances if some triggers don't succeed before others. So I'll keep it simple (at least for now).

                                1 Reply Last reply Reply Quote 1
                                • Captain CrunchC Offline
                                  Captain Crunch Banned
                                  last edited by Captain Crunch

                                  so was the whole point of this thread to get the couple trolls with many accounts to make a really really pointless and waste of time super complicated thread about Triggers and call it "simple Trigger" help?

                                  I just wondered for what mod/map is this for?

                                  N wc_sumptonW 2 Replies Last reply Reply Quote 1
                                  • N Offline
                                    Name @Captain Crunch
                                    last edited by

                                    @Captain-Crunch No it just started as the title describes and due to many factors got carried away at times. It's for this map https://forums.triplea-game.org/topic/1726/ancient-empires-222-bc (in early development).

                                    1 Reply Last reply Reply Quote 4
                                    • wc_sumptonW Offline
                                      wc_sumpton @Captain Crunch
                                      last edited by

                                      @Captain-Crunch
                                      LoL now I'm a troll... 😉 👍

                                      Cheers...

                                      prastleP 1 Reply Last reply Reply Quote 0
                                      • prastleP Offline
                                        prastle Moderators Admin @wc_sumpton
                                        last edited by

                                        @wc_sumpton I always thought you smelled trollish 🙂

                                        If we open a quarrel between past and present, we shall find that we have lost the future! Sir Winston Churchill

                                        1 Reply Last reply Reply Quote 1
                                        • RogerCooperR Offline
                                          RogerCooper @RogerCooper
                                          last edited by

                                          @RogerCooper TripleA has 2 different systems for defining the relationships between powers. They can be designated using the "Alliance" property or by using diplomatic relationships. Alliances are set at the beginning of the game and can't be changed. Diplomatic relationships can be hard to track, especially if there are random elements with powers that can be on different sides.

                                          It would be useful if there was a way to combine these systems. A setAlliance trigger would be handy. An inAlliance condition would also be useful.

                                          C 1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            Cernel Moderators @RogerCooper
                                            last edited by Cernel

                                            @RogerCooper Alliances just automatically generate the implied set of relationships, unless you cover all of them directly, defining a full set with "relationshipInitialize". Alliances and relationships are not two systems to do the same thing. The Alliance is the side that may win the game together, all the power of a same Alliance winning, or not, at the same time (each power being its own alliance only if it is a FFA). The relationships are merely what is going on at the moment between two specific powers. The fact that the Alliance generates a full set of relationships is just an unnecessary aid. Also the fact that such relationships are generated so that two powers are allied, if part of the same alliance, and at war, if not, is just a standard. The two things are not mandatory. For example, you could make a WW2 game in which Russians and British are in separate Alliances, if they are meant to win separately (either one or the other wins, not both), while having them allied with each other for the entire game. Of course, in a case like this, you should take care to define victory conditions in a way that you won't end in an unwinnable scenario, since none of these two "allied" Alliances can take territories from the other one. The only thing that the Alliance are really for are victory conditions and statistic totals (the players tab), the fact that they also generate a set of relationships, if you don't provide it, is just an aid for map makers, based on the fact that, normally, you are always allied within the alliance and always at war without (but nobody bars you from making a game in which all powers of the same Alliance are at war with each other and allied with the other ones; you just need to be very creative with victory conditions, on how such a game is supposed to be played and won).

                                            Of course, the number of Alliances also normally gives the minimum number of players (persons) needed to play the game.

                                            1 Reply Last reply Reply Quote 0

                                            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
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums