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

    Units in Combat - can we limit what a nonAA unit can target in combat?

    Scheduled Pinned Locked Moved Map Making
    9 Posts 5 Posters 1.7k Views 5 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.
    • cameronC Offline
      cameron
      last edited by

      Units in Combat - can we limit what a nonAA unit can target in combat?

      context: i would like to make a unit that can only target fortifications (eg trenches) in combat.
      i can see other uses for this ability (or restriction).
      is this possible?

      there seems to be some hardcoded restrictions but i have failed to find an option that isn't for AA.

      TheDogT 1 Reply Last reply Reply Quote 0
      • TheDogT Online
        TheDog @cameron
        last edited by

        @cameron
        Yes, see 1941 Global Command Decision, it uses this
        <option name="canNotTarget" value="$All-Air$"/>
        a lot

        and Aircraft use this, they cannot target infantry
        <option name="canNotTarget" value="$All-Infantry--Motorized$:$All-Air$"/>

        and a 4 engine Bomber cannot target sea units
        <option name="canNotTarget" value="$All-Air$:$All-Sea$"/>

        Also checkout Artillery line 6275 it suppresses -1 to enemy Bunker Atk & Def

        https://forums.triplea-game.org/tags/thedog
        https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

        1 Reply Last reply Reply Quote 2
        • cameronC Offline
          cameron
          last edited by

          interesting...
          "canNotTarget" is not in the XML Option Browser... i'm wondering how many other options are missing...
          i don't suppose that there is a "canOnlyTarget" option...?

          i shall have to explore yet another xml and experiment.

          W RogerCooperR 2 Replies Last reply Reply Quote 0
          • W Offline
            wc_sumpton @cameron
            last edited by

            @cameron

            XML Option Browser is a very good tool. But it is also updated. A better source would be PoS2 xml, but that too is lacking.

            Cheers...

            C 1 Reply Last reply Reply Quote 2
            • cameronC Offline
              cameron
              last edited by

              i find the PoS2 xml rather hard to parse. it's more helpful if i already know what i'm looking for...
              although i can never get over the name - i can't help but read "PoS" as "Piece of S..." 😉

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

                @cameron canNotTarget is in POS 2.

                	canNotTarget						values: colon delimited list of units that this unit can't target in battles, ex. subs not being able to target air units
                	canNotBeTargetedBy					values: colon delimited list of units that can't target this unit, ex. air units not being able to target subs
                

                Lots of great options in there.

                cameronC 1 Reply Last reply Reply Quote 3
                • C Offline
                  Cernel Moderators @wc_sumpton
                  last edited by

                  @wc_sumpton said in Units in Combat - can we limit what a nonAA unit can target in combat?:

                  A better source would be PoS2 xml, but that too is lacking.

                  Can you make a post with the list of all that is missing?

                  W 1 Reply Last reply Reply Quote 2
                  • W Offline
                    wc_sumpton @Cernel
                    last edited by wc_sumpton

                    @cernel

                    unitAttachment:
                    "canRetreatOnStalemate" is still not documented.

                    conditionAttachment:
                    "isAI" 2.6+ only not documented.

                    unitSupportAttachment:
                    "bonusType" needs to be reworded:
                    This, to me, would be very hard to explain. Given
                    Attack with 2 Infantry 1 Elite and 1 Artillery
                    Infantry attacks at 1
                    Elite attacks at 2
                    Artillery can support both Infantry and Elite with a bonus of 1
                    number = 1
                    stack count = 3
                    both infantry attack at 1, artillery attacks at 2, elite attacks at 3
                    number = 2
                    stack count = 3
                    both infantry attack at 1, artillery attacks at 2, elite attacks at 4
                    number = 3
                    stack count =2
                    one infantry attacks at 1, one infantry and artillery attack at 2, elite attacks at 4
                    number = X
                    stack count = -1
                    both infantry attack at 1, artillery attacks at 2, elite attacks at 5.

                    I won't try to explain what happens when another support unit, Heavy Artillery is added. The bonusType can be the same, but count can be different. And then...

                    So, in this I defer to someone better than me to explain how this works.

                    Cheers...

                    P.S. When I first posted these tests, I had forgotten that I had "improvedArtillerySupport" enabled. Thus the test numbers were incorrect. I have corrected the numbers, and the outcomes have become more predictable. I apologies for any misinformation this may have caused.

                    Cheers...

                    1 Reply Last reply Reply Quote 1
                    • cameronC Offline
                      cameron @RogerCooper
                      last edited by

                      @rogercooper said in Units in Combat - can we limit what a nonAA unit can target in combat?:

                        canNotTarget	...
                      

                      i guess i was hoping i could just list the two units i want it to be able to target rather than list every other unit - combination of laziness and desire for less clutter and desire to have less things to update when i invariably end up adding more units...

                      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