Navigation

    TripleA Logo

    TripleA Forum

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

    How to assign bonus production to NoPU countries for completing objectives?

    Map Making
    5
    20
    134
    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.
    • Jason Green-Lowe
      Jason Green-Lowe last edited by

      Hello! I've been working on creating a TripleA version of my 1941 WW2_v3 Balanced Mod. Mostly it's working as intended, but I can't figure out how to give the Chinese a bonus artillery when the Allies control the Burma Road. I've tested the objective and it shows up as "true" in the Objectives tab of the game, and I tried 3 different ways of giving artillery, but none of them seem to work - the Chinese still aren't getting any artillery.

      Note that the Chinese do not have an IPC-based economy; instead, they get 1 infantry per 2 territories. I also want them to get 1 artillery per turn if the Burma Road is open.

      Any thoughts on how to make this happen?

      <attachment name="objectiveAttachmentBurmaRoad" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
        <option name="alliedOwnershipTerritories" value="India:Burma:Yunnan" count="3"/>
      </attachment>
      <attachment name="triggerAttachmentBurmaRoadOpen" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
        <option name="conditions" value="objectiveAttachmentBurmaRoad"/>
        <option name="purchase" value="artillery" count="1"/>
        <option name="placement" value="Yunnan:artillery"/>
        <option name="playerProperty" value="productionPerXTerritories" count="6:artillery"/>	
      </attachment>
      R 1 Reply Last reply Reply Quote 0
      • R
        RogerCooper @Jason Green-Lowe last edited by

        I don't see what the purchase and playerproperty options are doing. You also need a "when" option. See this code from a project I am working on.

            <attachment name="triggerAttachmentIraqToGermanyUnits" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
              <option name="conditions" value="conditionAttachmentTurn5"/>
              <option name="when" value="before:germanPurchase"/>
              <option name="placement" value="Iraq:infantry"/>
            </attachment>
        
        
        1 Reply Last reply Reply Quote 0
        • Jason Green-Lowe
          Jason Green-Lowe last edited by

          @RogerCooper said in How to assign bonus production to NoPU countries for completing objectives?:

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

          Thanks, but I tried that, and it didn't help.

          <attachment name="triggerAttachmentBurmaRoadOpen" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
            <option name="conditions" value="objectiveAttachmentBurmaRoad"/>
            <option name="when" value="before:chinesePurchase"/>
            <option name="placement" value="Yunnan:artillery"/>
          </attachment>
          B 1 Reply Last reply Reply Quote 0
          • B
            beelee @Jason Green-Lowe last edited by

            @Jason-Green-Lowe i'm not certain but you could try making the objective a conditionAttachment in case the trigger isn't recognizing the objective as a condition

            1 Reply Last reply Reply Quote 0
            • Jason Green-Lowe
              Jason Green-Lowe last edited by

              Thanks, but I tried that too, and it is still not working.

              <attachment name="conditionAttachmentBurmaRoad" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                <option name="alliedOwnershipTerritories" value="India:Burma:Yunnan" count="3"/>
              </attachment>
              <attachment name="triggerAttachmentBurmaRoadOpen" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                <option name="conditions" value="conditionAttachmentBurmaRoad"/>
                <option name="when" value="before:chinesePurchase"/>
                <option name="placement" value="Yunnan:artillery"/>
              </attachment>
              1 Reply Last reply Reply Quote 0
              • B
                beelee last edited by

                I imagine it defaults to "1" but try adding count="1" after artillery

                1 Reply Last reply Reply Quote 0
                • B
                  beelee last edited by

                  also for giggles you could try setting when to

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

                  1 Reply Last reply Reply Quote 0
                  • Jason Green-Lowe
                    Jason Green-Lowe last edited by Jason Green-Lowe

                    Still no good. I appreciate the help, but I imagine the problem has to do with the interaction between the "noPU" economy and the trigger, rather than just being a syntax error in my code, because all of my non-Chinese national objectives are working just fine. Does anyone know enough about how the noPUPurchaseDelegate to help me troubleshoot this from that angle?

                    <attachment name="conditionAttachmentBurmaRoad" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                      <option name="alliedOwnershipTerritories" value="India:Burma:Yunnan" count="3"/>
                    </attachment>
                    <attachment name="triggerAttachmentBurmaRoadOpen" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                      <option name="conditions" value="conditionAttachmentBurmaRoad"/>
                      <option name="when" value="before:chinesePurchase"/>
                      <option name="placement" value="Yunnan:artillery" count="1"/>
                    </attachment>
                    1 Reply Last reply Reply Quote 0
                    • W
                      wc_sumpton last edited by

                      @Jason-Green-Lowe

                      Is the 'National Objective' property true:

                      <property name="National Objectives" value="true" editable="true">
                         <boolean/>
                      </property>
                      

                      Also 'when="before:chinesePurchase"'. This is not firing because China has no PUs to purchase anything, so the step is being skipped. Change it to a step that does fire, maybe "before:chineseCombatMove".

                      Cheers...

                      1 Reply Last reply Reply Quote 0
                      • Jason Green-Lowe
                        Jason Green-Lowe last edited by

                        Thanks; both values are set to true, and I've tried several different "when" statements, none of which are having any effect.

                        C 1 Reply Last reply Reply Quote 0
                        • C
                          Cernel Moderators @Jason Green-Lowe last edited by

                          @Jason-Green-Lowe If you are getting no errors (are you?), it has to be something that is not validated, that is one or more of the following:

                          • There is no phase called exactly as "chinesePurchase".
                          • There is no "Use Triggers" property valued true.

                          Side note, I tend to see objectives as a legacy item. What little they do can be done by combinations of conditions and triggers.

                          1 Reply Last reply Reply Quote 1
                          • Jason Green-Lowe
                            Jason Green-Lowe last edited by

                            No, I'm not getting any errors, and I've triple-checked the spelling.

                            The second point is very interesting; I didn't know I needed to have a "Use Triggers" property, and I don't have any other triggers other than this one Chinese one in the game, so maybe that's the problem.

                            How do I set use triggers to true?

                            C 1 Reply Last reply Reply Quote 0
                            • C
                              Cernel Moderators @Jason Green-Lowe last edited by

                              @Jason-Green-Lowe

                                  <property name="Use Triggers" value="true" editable="false">
                                    <boolean/>
                                  </property>
                              
                              1 Reply Last reply Reply Quote 2
                              • Jason Green-Lowe
                                Jason Green-Lowe last edited by

                                That fixed it! Thank you very much for the help. 🙂

                                8964d61d-786d-4170-bd0d-4157289bffcd-image.png

                                B 1 Reply Last reply Reply Quote 1
                                • B
                                  beelee @Jason Green-Lowe last edited by

                                  @Jason-Green-Lowe Re your git post what all did you change for your mod ? You may be able to make a "Map Option" which has the changes to the original and players can just click on that before game start to activate it.

                                  I'm not sure who originally made that map, although I think Black Elk drew the map. Anyway, contact whoever is in charge of it and it might be a better way to go.

                                  Otherwise probably best to just go with the separate mod.

                                  1 Reply Last reply Reply Quote 0
                                  • Jason Green-Lowe
                                    Jason Green-Lowe last edited by

                                    There is an all new set of national objectives, plus some minor setup changes and different movement rules for the Chinese. It is intended as a variant of the main WW2_v3_1941 map, but it's not just a single house rule; it's a detailed mod.

                                    You can read more about it here if you luike:
                                    https://www.axisandallies.org/forums/topic/32453/balanced-mod-anniversary-41?page=1

                                    B 1 Reply Last reply Reply Quote 1
                                    • B
                                      beelee @Jason Green-Lowe last edited by

                                      @Jason-Green-Lowe Hmm...Chinese movement might be the only issue then. Idk. But you can make a custom gameProperty

                                      <attachment name="BMAnniversary" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                                      <option name="gameProperty" value="Balanced Mod Anniversary"/>
                                      </attachment>

                                      Then add that to triggers and objectives as a condition.

                                      <attachment name="triggerAttachmentBurmaRoadOpen" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                                      <option name="conditions" value="BMAnniversary:conditionAttachmentBurmaRoad"/>
                                      <option name="when" value="before:chineseCombatMove"/>
                                      <option name="placement" value="Yunnan:artillery" count="1"/>
                                      </attachment>

                                      <property name="Balanced Mod Anniversary" value="false" editable="true">
                                      <boolean/>
                                      </property>

                                      Then hit the checkmark in map options before game start and the trigger will fire, otherwise it wont. Add that condition "BMAnniversary" to all the new stuff and you should be good to go.

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        beelee last edited by

                                        Here's an example for setup changes since you only have the one trigger. Go with original setup and do your changes with a trigger.

                                        <attachment name="triggerAttachment_GermansRemoveBombers" attachTo="Germans" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                                        <option name="conditions" value=""BMAnniversary/>
                                        <option name="placement" value="Germany:tactical_bomber" count="1"/>
                                        <option name="removeUnits" value="Germany:bomber" count="1"/>
                                        <option name="uses" value="1"/>
                                        <option name="when" value="before:germansPurchase"/>
                                        </attachment>

                                        1 Reply Last reply Reply Quote 0
                                        • Jason Green-Lowe
                                          Jason Green-Lowe last edited by

                                          Hi Beelee -- is that friendly advice, or are those the instructions I need to follow in order to get the game included as a downloadable option in TripleA? If you're the admin who would be including the game, and if you insist, then I will make your changes, but otherwise I'm content with the way it's laid out now.

                                          B 1 Reply Last reply Reply Quote 1
                                          • B
                                            beelee @Jason Green-Lowe last edited by

                                            @Jason-Green-Lowe heh heh friendly advice 🙂 was just saying you could have it included in the original map for a one click activation instead of an entirely separate map 🙂

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