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

    sleeping nations trigger function

    Scheduled Pinned Locked Moved Map Making
    10 Posts 3 Posters 1.6k 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.
    • N Offline
      Numetalfan
      last edited by

      Hi all,

      is it opssible to make a nation at the start of the game "none-existant", means there no units at all on the board
      and create a trigger that activates that country.

      After that activation that nation is active has it normal movements, combats and unit placing phases.

      To make an example.

      in AA41-anniversary the Chinese start an get instead of income an infantry for 2 territories

      let's say thexml already knows a "resistance Chinese".

      The trigger would be: if 4 of the Chinese territories are lost to the Axis, the trigger activates the "resistance Chinese". I want to know:

      • definition of a sleeping nation with no units on the board
      • trigger to activate
      • trigger that activates the nation

      Maybe someone knows a downloadable game with such a coding, then I check it myself.

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

        @numetalfan You might want to check CrazyG's WW1 scenario.

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

          @schulz

          that was a very interesting game link,

          but he solves the problem differently:
          By triggering former neutral countries become part of an original nation and will be from then on played as part of that country.

          something like:
          <option name="notification" value="GreeceJoinsTheWar"/>
          <option name="changeOwnership" value="Greece 01:NeutralNations:UnitedKingdom:true"/>

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

            I still look for a trigger that skips the nations steps until the condition occured.

            In my example it would be the Chinese:

            <step name="chinesePurchase" delegate="purchaseNoPU" player="Chinese"/>
            <step name="chineseCombatMove" delegate="move" player="Chinese"/>
            <step name="chineseBattle" delegate="battle" player="Chinese"/>
            <step name="chineseNonCombatMove" delegate="move" player="Chinese" display="Non Combat Move"/>
            <step name="chinesePlace" delegate="place" player="Chinese"/>
            <step name="chineseEndTurn" delegate="endTurnNoPU" player="Chinese">

            Anyone an idea how the skip those steps by a Trigger A
            and later activate them by a Trigger B

            and where condition A and B contradict each other, so that always only one of them can be valid and so only one of the triggers too.

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

              @Numetalfan

              You really can not turn steps off and on with triggers. This could be simulated, by reducing the movement of all units to 0 prior to combat move and then returning the movement back to normal after non-combat:

              <attachment name="triggerAttachmentChineseDoNotMove" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                 <option name="conditions" value="conditionAttachmentChineseDoNotMove"/>
                 <option name="unitType" value="infantry:etc..."/>
                 <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/>
                 <option name="unitProperty" value="movement" count="0"/>
                 <option name="when" value="before:chineseCombatMove"/>
              </attachment>
              
              <attachment name="triggerAttachmentChineseOneMoveUnits" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                 <option name="conditions" value="conditionAttachmentAlwaysTrue"/>
                 <option name="unitType" value="infantry:artillery"/>
                 <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/>
                 <option name="unitProperty" value="movement" count="1"/>
                 <option name="when" value="after:chineseNonCombatMove"/>
              </attachment>
              
              

              The number of territories could be set to a very high number for 'purchaseNoPU'.

              Hope this gives you some ideas.

              Cheers...

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

                @wc_sumpton

                thx. Interesting I had the same idea just before you answered.

                Go via the territories. An impossible combo from the start and later triggering the normal situation. The impossible combo keeps the "sleeping nation" out of the game, later it "wakes up" by a trigger condition.

                I will try it this way and report.

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

                  another question:

                  <attachment name='rulesAttachment' attachTo='Chinese' javaClass='RulesAttachment' type='player'>
                  <option name='movementRestrictionTerritories' value='Sinkiang:Central China:China:Manchuria:Kwangtung:French Indochina'/>
                  <option name='movementRestrictionType' value='allowed'/>
                  <option name='productionPerXTerritories' value='infantry' count='2'/>

                  the
                  <option name='productionPerXTerritories' value='infantry' count='2'/>
                  works as the Chinese are the territory owner themselves

                  is there a way to

                  a) define several countries
                  b) define they have to be controlled by the same alliance (e.g. Allies)
                  c) then to make those countries count to the ..perXTerritorries

                  this would for the Chinese be Burma as an example.

                  Is Burma controlled by the British it counts for the Chinese for their ..perXTerritorries as if it is one of their countries.

                  possible or not?

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

                    @Numetalfan

                    The ownership of Burma would have to be changed over to Chinese:

                    <attachment name="triggerAttachmentBurmaChineseOwnership" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                       <option name="conditions" value="conditionAttachmentAlwaysTrue"/>
                       <option name="territories" value="Burma"/>
                       <option name="territoryAttachmentName" value="TerritoryAttachment" count="territoryAttachment"/>
                       <option name="territoryProperty" value="originalOwner" count="Chinese"/>
                       <option name="when" value="before:chineseEndTurn"/>
                    </attachment>
                    

                    If an ally of Chinese controls Burma, then as the 'originalOwner', control of the territory should switch over to Chinese. Then after Chinese endTurn 'originalOwner' should be changed back to its original setting, or '-reset-' to remove.

                    Hope this works for you.

                    Cheers...

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

                      @wc_sumpton

                      Hi,

                      thats a fine idea.
                      however the idea is - in this example - that at the time the <option name='productionPerXTerritories' value='infantry' count='2'/> for the Chinese is done, Burma is also part of it.

                      So when exactly does the engine count all Chinese territories to get the number of new infantries?

                      If it is
                      <step name="chinesePurchase" delegate="purchaseNoPU" player="Chinese"/>
                      then the trigger should be changend into

                      <option name="territoryProperty" value="originalOwner" count="Chinese"/>
                      <option name="when" value="before:chinesePurchase"/>

                      instead of

                      <option name="when" value="before:chineseEndTurn"/>

                      is chineseEnd turn not too late?

                      wc_sumptonW 1 Reply Last reply Reply Quote 1
                      • wc_sumptonW Online
                        wc_sumpton @Numetalfan
                        last edited by

                        @Numetalfan

                        You are probably right. I was thinking collect income, which is done at endTurn.

                        Cheers...

                        1 Reply Last reply Reply Quote 1

                        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