Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    combined condition attachment for triggers

    Map Making
    4
    9
    44
    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
      Numetalfan last edited by

      Hi all,

      <attachment name="conditionAttachmentXYZ" attachTo="Germans:Italians:Japanese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">

      does not work

      <attachment name="conditionAttachmentXYZ" attachTo="Germans"
      plus one for Italians plus one for Japanese might work but looks ugly and doesn't seem sophisticated

      and <attachment name="conditionAttachmentXYZ" attachTo="Axis" may not fit to type="player", as the Axis are an Alliance not a single player.

      What is the correct solution to this problem?

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

        second question:

        is it possible to make a count condition?

        Let's say a national objective, where e.g. US gets as many IPC as the Chinese have countries with each country is worth 1 IPC.

        Is this possible?

        1 Reply Last reply Reply Quote 0
        • Z
          Zaroph last edited by

          @numetalfan

          Hi all,

          <attachment name="conditionAttachmentXYZ" attachTo="Germans:Italians:Japanese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">

          does not work

          <attachment name="conditionAttachmentXYZ" attachTo="Germans"
          plus one for Italians plus one for Japanese might work but looks ugly and doesn't seem sophisticated

          and <attachment name="conditionAttachmentXYZ" attachTo="Axis" may not fit to type="player", as the Axis are an Alliance not a single player.

          What is the correct solution to this problem?

          Add in:

          <option name="players" value="Germans:Italians:Japanese"/>
          

          This option makes the condition effect all the players in an OR relationship.

          @numetalfan

          second question:

          is it possible to make a count condition?

          Let's say a national objective, where e.g. US gets as many IPC as the Chinese have countries with each country is worth 1 IPC.

          Is this possible?

          Im not sure on how/if you could do this elegantly in a single objectiveAttachment.

          If you want some future help, I found that browsing the XML browser can be really useful.

          N 2 Replies Last reply Reply Quote 0
          • N
            Numetalfan @Zaroph last edited by

            @zaroph said in combined condition attachment for triggers:

            <option name="players" value="Germans:Italians:Japanese"/>

            Thanks, tested - it works, had to remove the ..attach to.. of course

            I check the http://www.starlords3k.com/XOB.html
            out frequently, however sometimes the examples are not clear enough or too unspecific. despite that a very fine site.

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

              @zaroph

              strange, it worked but now there is an error.

              <attachment name="conditionAttachmentVichyFrancecaptured" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
              <option name="players" value="Germans:Italians:Japanese"/>
              <option name="directOwnershipTerritories" value="Vishy France"/>
              </attachment>

              is it correct that way?
              Is it correct to remove the
              attachTo="..."

              Hepps 1 Reply Last reply Reply Quote 0
              • Hepps
                Hepps Moderators @Numetalfan last edited by

                @numetalfan said in combined condition attachment for triggers:

                <option name="directOwnershipTerritories" value="Vishy France"/>

                Your problem may stem from how you spelt "Vichy" at the end of that trigger

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

                  @hepps

                  good point,

                  but it is
                  <territory name="Vishy France"/>

                  that fits to
                  <option name="directOwnershipTerritories" value="Vishy France"/>

                  so this is not the reason

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

                    6294640d-9b74-4714-ae1a-ff1ab001bf82-grafik.png

                    1 Reply Last reply Reply Quote 0
                    • W
                      wc_sumpton last edited by

                      @Numetalfan

                      You still need 'attachTo'.

                      When you use 'players', 'attachTo' will be added:

                      <attachment name="conditionAttachmentVichyFrancecaptured" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                      <option name="players" value="Germans:Italians:Japanese"/>
                      <option name="directOwnershipTerritories" value="Vishy France"/>
                      </attachment>
                      

                      will work the same as:

                      <attachment name="conditionAttachmentVichyFrancecaptured" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                      <option name="players" value="Italians:Japanese"/>
                      <option name="directOwnershipTerritories" value="Vishy France"/>
                      </attachment>
                      

                      Cheers...

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post
                      Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums