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

    EnemyPresence Trigger not working

    Scheduled Pinned Locked Moved Map Making
    14 Posts 3 Posters 1.9k Views 3 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.
    • C Online
      Cernel Moderators @RogerCooper
      last edited by

      @RogerCooper If you are getting no error, it should be something not validated. For example, are you sure the phase is called exactly as "JapaneseBidplace" (instead of, say, "japaneseBidPlace").

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

        @Cernel You were right on the capitalization issue, but fixing it did not solve the problem.

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

          @RogerCooper said in EnemyPresence Trigger not working:

          for every territory that contains an enemy unit.

          For this, you need a "map" value, instead of an "all" value, or the full list of territories ("all" doesn't actually mean all).

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

            @Cernel I put "map" in, but is doesn't help.

            Could the issue be the definition of "enemyPresenceTerritories"? There no preset alliances in the scenario, so enemy would be defined only through relationships.

            <attachment name="relationshipTypeAttachment" attachTo="War" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship">
                  <option name="archeType" value="war"/>
                  <option name="isDefaultWarPosition" value="true"/>
                </attachment>
            
            RogerCooperR C 2 Replies Last reply Reply Quote 0
            • RogerCooperR Offline
              RogerCooper @RogerCooper
              last edited by

              @RogerCooper I also tried the players option, but it didn't help.

              <attachment name="conditionAttachmentJapaneseEnemyUnitPresent" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                <option name="enemyPresenceTerritories" value="map" count="each"/>
                <option name="players" value="Japanese:Germans:British:Italians:Chinese:Americans"/>
               </attachment>
              
              
              B 1 Reply Last reply Reply Quote 0
              • B Offline
                beelee @RogerCooper
                last edited by beelee

                @RogerCooper

                Can you try "unitPresence" and then don't list Japan ?

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

                  @beelee Removing Japan does not make the trigger work.

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

                    @RogerCooper said in EnemyPresence Trigger not working:

                    @Cernel I put "map" in, but is doesn't help.

                    Could the issue be the definition of "enemyPresenceTerritories"? There no preset alliances in the scenario, so enemy would be defined only through relationships.

                    My assumption is that thing should look at everything owned by a player that is in an archetype "war" relationship with the attached player. So, if you have no fixed alliances, be sure to have that "War" relationship defined since before the trigger should fire (usually, with the relationships initialize).

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

                      @Cernel The war relationship is defined.

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

                        @RogerCooper It's not only the relationship that must be defined. It must also be assigned specifically to every couple of powers having it between one another. Normally this is done with the relationship initialize. Just trying to make sure.

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

                          @Cernel All the relationships are properly defined. I start with A&B at war with each other and everyone else neutral. Then this bit of code randomly distributes them into 2 alliances.

                              <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 foreach="$TriggerPlayer$" name="triggerAttachment@TriggerPlayer@ToA" attachTo="@TriggerPlayer@" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                                <option name="conditions" value="conditionAttachmentTurn1"/>
                                <option name="relationshipChange" value="@TriggerPlayer@:A:Neutrality:Allied"/>
                                <option name="uses" value="1"/>
                                <option name="chance" value="1:2"/>
                                <option name="when"  value="before:ABidPlace"/>
                          	</attachment>
                          
                          <attachment foreach="$TriggerPlayer$" name="triggerAttachment@TriggerPlayer@ToB" attachTo="@TriggerPlayer@" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                                <option name="conditions" value="conditionAttachmentTurn1"/>
                                <option name="relationshipChange" value="@TriggerPlayer@:B:Neutrality:Allied"/>
                                <option name="uses" value="1"/>
                                <option name="chance" value="1:1"/>
                                <option name="when"  value="before:BBidPlace"/>
                          	</attachment>
                          
                          

                          What I am trying to do now is to automatically balance the sides by giving money based upon the number of enemy units. If I can get this working I will have a neat system for randomizing any map,

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

                            @RogerCooper To be tested by the other triggers, that should happen at a point before when the triggers testing such relationships may fire. Just to make sure both triggers are not firing at the same time.

                            Assuming the former is true, then the matter, here, is that I'm seeing only triggers changing "Neutrality" to "Allied". Are you sure there are the needed archetype "War" relationships in effect, when you need them? May you post a screenshot of what you get in Game/Show Politics Panel at the moment, or the closest next stable point, in which the wanted triggers should fire?

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

                              @Cernel Here is the panel

                              844c0c9d-d5a3-4dcb-b165-45d2ad417fa2-image.png

                              The trick is that A&B start at war and the real players randomly ally with A or B. A & B are nominal players with no territories or units.

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