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

    Question about an optional trigger

    Scheduled Pinned Locked Moved Map Making
    8 Posts 3 Posters 1.0k 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.
    • SchulzS Offline
      Schulz
      last edited by

      I would like to create a trigger that which game will be started without some features if it is selected before game launched. These are Strategic Bombing-Intercept-Convoy blockades.

      I'am not even sure if it is possible.

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

        @schulz You can do that with options. See the Global Game Redesign. But my suggestion is to have 2 xml files.

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

          @Schulz

          Almost all unit options can be changed with triggers. For something like SBR:

          <attachment name="unitAttachment" attachTo="bomber" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
             ...
             <option name="isStrategicBomber" value="true"/>
          </attachment>
          

          Then create a custom property in the <property> section of the xml:

          <property name="Bomber can SBR" value="true" editable="true">
             <boolean/>
          </property>
          

          A condition to read the custom property:

          <attachment name="conditionAttachmentUseSBR" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
             <option name="gameProperty" value="Bomber can SBR"/>
          </attachment>
          

          And a trigger to set the option:

          <attachment name="triggerAttachmentTurnOffSBR" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
             <option name="conditions" value="conditionAttachmentUseSBR"/>
             <option name="invert" value="true"/>
             <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/>
             <option name="unitType" value="bomber"/>
             <option name="unitProperty" value="isStrategicBomber" count="false"/>
             <option name="when" value="before:germansCombatMove"/>
             <option name="uses" value="1"/>
          </attachment>
          

          Separate game properties could be developed for each change, or use 1 property.

          Hope this is helpful.

          Cheers...

          SchulzS 1 Reply Last reply Reply Quote 0
          • SchulzS Offline
            Schulz @wc_sumpton
            last edited by Schulz

            @wc_sumpton @rogercooper Thank you. I just wonder if there is any way to start without blockade zones instead of cancelling blockade abilities of ships.

            Also is it possible to make upkeep optional?

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

              @Schulz

              For blockade zones:

                 <option name="territoryAttachmentName" value="TerritoryAttachment" count="territoryAttachment"/>
                 <option name="territories" value="Sea Zone 1:Sea Zone 2"/>
                 <option name="territoryProperty" value="blockadeZone" count="false"/>
              

              For upkeep cost:

                 <option name="unitProperty" value="createsResourcesList" count="-reset-"/>
              

              Cheers...

              SchulzS 1 Reply Last reply Reply Quote 2
              • SchulzS Offline
                Schulz @wc_sumpton
                last edited by

                @wc_sumpton Thank you. Worked perfectly.

                SchulzS 1 Reply Last reply Reply Quote 1
                • SchulzS Offline
                  Schulz @Schulz
                  last edited by

                  @wc_sumpton Currently I have a property called "AI compatibility" which turn off upkeep-bombing-intercept. Is it possible to make only Allies countries selectable and making Axis hard AI as default with single property as well?

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

                    @Schulz

                    Sorry, none that I am aware of. You can set the Player to AI with 'defaultType="AI"'. This can be selected by the player at the start of the game.

                    Cheers...

                    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