Navigation

    TripleA Logo

    TripleA Forum

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

    Can a condition check how many units were built?

    Map Making
    4
    18
    784
    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

      I'm trying to create a version of BBR for TripleA, and one of the BBR national objectives is that the USA should get bonus PUs if it places at least two units in the Western US territory.

      I know how to check for the presence of units in a territory, but this is subtly different: what matters is whether the units were bought and placed there this turn, not whether the units are simply present. For example, if the units are left over from last turn, then the American player should not get the bonus.

      How can I do this?

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

        @jason-green-lowe you could try adding another condition "rounds"

        <attachment name="conditionAttachmentTurn1OrHigher" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
        <option name="rounds" value="1-+"/>
        </attachment>

        the -+ makes it check every rd after. Might have todo one for every turn. Idk if you can get by with 1 trigger or not. I guess trigger called condition these days but yea, should be able to make it work

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

          @beelee I don't mind having multiple triggers, but I don't really understand how forcing it to check every round will help -- doesn't a condition get checked every turn by default?

          The problem is not that my condition is only being checked on round 1; the problem is that I need to check whether there are any new units that were just placed this turn.

          B W 2 Replies Last reply Reply Quote 0
          • B
            beelee @Jason Green-Lowe last edited by

            @jason-green-lowe yea was just explaining the -+ in the example. Too be clearer, hopefully heh heh, you'd want todo a condition for each rd and add it to the trigger that sees if the dudes are there or not.

            So <attachment name="conditionAttachmentTurn1" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
            <option name="rounds" value="1"/>
            </attachment>
            <attachment name="conditionAttachmentTurn1OrHigher" attachTo="Germans" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
            <option name="rounds" value="1-+"/>
            </attachment>

            first one will only check rd 1

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

              @beelee ahh ok just reread your post. I'll think on it a minute

              B W 2 Replies Last reply Reply Quote 0
              • B
                beelee @beelee last edited by

                @beelee hmm ... yea i don't think that can be done. Or very easily. You'd need a shitload of triggers and that won't work.

                We better ask the master @wc_sumpton 🙂

                1 Reply Last reply Reply Quote 1
                • W
                  wc_sumpton @beelee last edited by

                  @beelee
                  😁

                  Cheers...

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

                    @jason-green-lowe

                    Sorry no. You can't save values in TripleA. A condition could be used to check for greater than 'X' units, compared to another condition that checks for less than 'X' units. Just to check for up to 3 units would take about 9 conditions, so to check for 100 units, would take up to 900 conditions. If these conditions were created, there would be no place to store the answer, and yet another 900 conditions would need to be checked for the increase.

                    And even if you could do something like 'save the value as a unit', you would still have the problem of querying produced units, which also cannot be done.

                    Sorry, I can think of no workaround for these limitations.

                    Cheers...

                    B 1 Reply Last reply Reply Quote 1
                    • B
                      beelee @wc_sumpton last edited by beelee

                      @wc_sumpton would a "special" unit that gets built and then turns into a "normal" one possibly work ? Like would change at endtTurn ?

                      edit
                      or next turn i guess lol Start of next players turn ? idk lol

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

                        @beelee

                        The problem is not the unit, but the counting of units to determine if objective for USA is achieved. @Jason-Green-Lowe wants to know if the units in the Western US territory have increased by 2 between the end of Noncombat Movement, and the end of the Placement phase. And if these units were purchased during that player turn. Maybe the count can be finagled, but there is no way to determine when these units were purchased.

                        Cheers...

                        B 1 Reply Last reply Reply Quote 1
                        • B
                          beelee @wc_sumpton last edited by beelee

                          @wc_sumpton can a little tiny almost invisible tty be added and then those units get moved to Western USA ?

                          Edit
                          or maybe a box ?
                          Can check the box then at when could change to WUSA

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

                            @jason-green-lowe

                            The only way I can think of to accomplish this is to ask USA if they wish to produce the 2 infantry units for Western US.

                            Cheers...

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

                              @beelee This ought to work, I think. Put a minor factory in the box, allow the US player to deploy units there if he wishes, and then have a condition check after placement if there are 2+ units in that box. If so, the player gets their bonus PUs. Immediately afterward, if there are 1+ units in the box, then another trigger automatically moves the units from the box to the main Western US territory. The box is not adjacent to Western US, so players cannot cheat by moving units back into the box.

                              Thanks for the idea!

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

                                @jason-green-lowe

                                Going a step further, and playing off of @beelee brilliant out of the box thinking, allow the USA to only purchase 'mock Infantry'. Which are the same as regular infantry to fool the AI, with the added ability 'createsUnitsList', to create an infantry unit at the end of the USA turn. Check Western US for the necessary 'mock infantry', then remove.

                                LOL sometime @beelee has the strangest of ideas!!

                                Cheers...

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

                                  @wc_sumpton Well, that's interesting, but the way I'm supposed to make this NO work is that the units can be any units at all -- including sea units in the adjacent sea zone. Creating ~15 new unit types with associated triggers sounds like trouble.

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

                                    @jason-green-lowe

                                    Let's talk about the counting first. Western US and two adjacent sea zones, Sea Zone 1 and Sea Zone 2:

                                    <!-- Checking to see if a territory has two units -->
                                    <attachment name="conditionAttachment2UnitsIn1Territory" attachTo="USA" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                                       <option name="directPresenceTerritories" value="Western US:Sea Zone 1:Sea Zone 2" count="1"/>
                                       <option name="unitPresence" value="mock_Infantry:mock_Armor:etc..." count="2"/>
                                    </attachment>
                                    
                                    <!-- Checking to see if 2 territories have 1 unit -->
                                    <attachment name="conditionAttachment1UnitIn2Territories" attachTo="USA" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                                       <option name="directPresenceTerritories" value="Western US:Sea Zone 1:Sea Zone 2" count="2"/>
                                       <option name="unitPresence" value="mock Infantry:mock Armor:etc..." count="1"/>
                                    </attachment>
                                    

                                    With two conditions, using mock units, it is easier to determine the additional units.

                                    Cheers...

                                    RogerCooper 1 Reply Last reply Reply Quote 0
                                    • RogerCooper
                                      RogerCooper @wc_sumpton last edited by

                                      What is BBR?

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

                                        @rogercooper

                                        Bloodbath Rules

                                        Cheers...

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