Navigation

    TripleA Logo

    TripleA Forum

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

    Question about an optional trigger

    Map Making
    3
    8
    334
    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.
    • Schulz
      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.

      RogerCooper 1 Reply Last reply Reply Quote 0
      • RogerCooper
        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
        • W
          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...

          Schulz 1 Reply Last reply Reply Quote 0
          • Schulz
            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
            • W
              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...

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

                @wc_sumpton Thank you. Worked perfectly.

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