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

    Require Airbase to Intercept

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    18 Posts 6 Posters 6.4k Views 6 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.
    • HeppsH Offline
      Hepps Moderators
      last edited by Hepps

      Wondering if it is possible to make the intercepting function be attachable to another unit in the same way that you can set an airfield to enable scrambling?

      Would be a very good addition to games that use the airfield mechanism and add another really realistic mechanism to an already great feature.
      0_1539690870237_Implemented small.png
      Example
      Have interception require an airbase and only be able to send 2 air units per airbase.

      Add to air unit:

      <option name="canIntercept" value="true"/>
      <option name="requiresAirbaseToIntercept" value="true"/>
      

      Add to airbase:

      <option name="isAirBase" value="true"/>
      <option name="maxInterceptCount" value="2"/>
      

      PR: https://github.com/triplea-game/triplea/pull/4140

      "A joyous heart sours with the burden of expectation"
      Hepster

      1 Reply Last reply Reply Quote 2
      • prastleP Offline
        prastle Moderators Admin
        last edited by

        Suspiciously thinks about what your attaching now. 🙂

        If we open a quarrel between past and present, we shall find that we have lost the future! Sir Winston Churchill

        HeppsH 1 Reply Last reply Reply Quote 0
        • HeppsH Offline
          Hepps Moderators @prastle
          last edited by

          @prastle This is actually a pretty straight forward request. In games where airfields govern the abilities of aircraft it doesn't make any sense that fighter can launch to intercept if there is no airfield present or if it is disabled.

          "A joyous heart sours with the burden of expectation"
          Hepster

          prastleP B 2 Replies Last reply Reply Quote 0
          • prastleP Offline
            prastle Moderators Admin @Hepps
            last edited by

            @hepps Ah now I understand where you are going with this good idea!

            If we open a quarrel between past and present, we shall find that we have lost the future! Sir Winston Churchill

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

              @hepps yea that would be sweet.

              This might be overreaching but would be cool if the airfield could use the "requires units" thingy so planes could get + or - bonuses.

              I remember trying to have bombers get +2 on their sbr raids but only if they left from a airfield. Wasn't able to do it though.

              Anyway, not to sidetrack things too much : )

              HeppsH 1 Reply Last reply Reply Quote 0
              • HeppsH Offline
                Hepps Moderators @beelee
                last edited by Hepps

                @beelee Issue with that is that the SBR would be checking for the pressence of the Airfield in the territory it is attacking... not from the territory from whence it came.

                I shall think on it though.

                "A joyous heart sours with the burden of expectation"
                Hepster

                B redrumR 2 Replies Last reply Reply Quote 0
                • B Offline
                  beelee @Hepps
                  last edited by

                  @hepps yea I think that's what happened. Think i tried making a ftr a airfield so it could escort but that screwed all sorts of stuff up

                  1 Reply Last reply Reply Quote 0
                  • General_ZodG Offline
                    General_Zod Moderators
                    last edited by

                    Yes agreed, intercept rules would function more logically, if they require airfields. Especially if scramble rules already requires airfields and in affect.

                    1 Reply Last reply Reply Quote 0
                    • redrumR Offline
                      redrum Admin @Hepps
                      last edited by redrum

                      @hepps Yeah, this should be doable in a similar way that scramble works. I'll just need to make sure to keep the existing functionality as well for maps that are already using it. Most likely either add additional parameters to canIntercept, a new unit property requiresUnitToIntercept, or property to require airbase.

                      Options:
                      1.

                      <option name="canIntercept" value="true:germanAirfield:italianAirfield:japaneseAirfield"/>
                      
                      <option name="canIntercept" value="true"/>
                      <option name="requiresUnitsToIntercept" value="germanAirfield:italianAirfield:japaneseAirfield"/>
                      
                      <option name="canIntercept" value="true"/>
                      <option name="requiresAirbaseToIntercept" value="true"/>
                      

                      TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                      alkexrA HeppsH 2 Replies Last reply Reply Quote 2
                      • alkexrA Offline
                        alkexr @redrum
                        last edited by

                        @redrum said in Intercepting ability attached to Airfields:

                        <option name="canIntercept" value="true"/>
                        <option name="requiresUnitsToIntercept" value="germanAirfield:italianAirfield:japaneseAirfield"/>

                        This just happens so many times in mapmaking. You have to manually list all units that you know are all "things that obviously enable intercepting". The same happens when e.g. you have to keep listing all units that can accept a particular support, or units that can be targeted by a particular AA attack, etc. It would make things a hell a lot easier if we had macros, or definable unit / territory / etc. categories. Something like

                        <categories>
                            <category name="enableIntercept" type="unit">
                                <element name="germanAirfield"/>
                                <element name="italianAirfield"/>
                                <element name="japaneseAirfield"/>
                            </category>
                            
                            <category name="isAffectedByMyFavouriteTrigger" type="unit">
                                <element name="aLongListOfUnits"/>
                                <element name="evenMoreUnits"/>
                                <element name="youDontHaveToModifyAMillionTriggers"/>
                                <element name="whenYouChangeAroundStuff"/>
                                <element name="youOnlyHaveToModifyThisCategory"/>
                            </category>
                        </categories>
                        

                        and then

                        <option name="canIntercept" value="true"/>
                        <option name="requiresUnitsToIntercept" value="enableIntercept"/>
                        

                        and

                        <attachment name="triggerAttachment_myFavouriteTrigger_No_13618567561" attachTo="Japanese" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
                        	<option name="conditions" value="conditionAttachment_myFavouriteCondition_No_13618567561"/>
                        	<option name="unitType" value="isAffectedByMyFavouriteTrigger"/>
                        	<option name="unitProperty" value="attack" count="1"/>
                        	<option name="uses" value="1"/>
                        </attachment>
                        

                        And if you decide that in the next version the unit evenMoreUnits is no longer worthy of being affected by all of the million triggers, you simply delete one line, instead of deleting one line from each trigger.

                        "For the world is changing: I feel it in the water, I feel it in the earth, and I smell it in the air."

                        redrumR 1 Reply Last reply Reply Quote 1
                        • HeppsH Offline
                          Hepps Moderators @redrum
                          last edited by

                          @redrum said in Intercepting ability attached to Airfields:

                          @hepps Yeah, this should be doable in a similar way that scramble works. I'll just need to make sure to keep the existing functionality as well for maps that are already using it. Most likely either add additional parameters to canIntercept, a new unit property requiresUnitToIntercept, or property to require airbase.

                          Options:
                          1.
                          <option name="canIntercept" value="true:germanAirfield:italianAirfield:japaneseAirfield"/>

                          <option name="canIntercept" value="true"/>
                          <option name="requiresUnitsToIntercept" value="germanAirfield:italianAirfield:japaneseAirfield"/>

                          <option name="canIntercept" value="true"/>
                          <option name="requiresAirbaseToIntercept" value="true"/>

                          Option 3 seems like it would work best. Since you could make it (as with so many other properties) so that if it was not defined in the XML it would automatically default to "false" in all games. Thereby not affecting any existing game.

                          "A joyous heart sours with the burden of expectation"
                          Hepster

                          1 Reply Last reply Reply Quote 0
                          • redrumR Offline
                            redrum Admin @alkexr
                            last edited by

                            @alkexr I think something like categories to help create group of unit types and other things is a good idea though deserves its own thread.

                            @Hepps Yeah, I think option 3 probably is best since we already have the concept of airbase.

                            TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                            1 Reply Last reply Reply Quote 0
                            • HeppsH Offline
                              Hepps Moderators
                              last edited by

                              The other thing that I meant to add to this is to also allow for a count functionality the same as scrambling as well.

                              <option name="maxinterceptCount" value="2"/>

                              "A joyous heart sours with the burden of expectation"
                              Hepster

                              redrumR 1 Reply Last reply Reply Quote 0
                              • redrumR Offline
                                redrum Admin @Hepps
                                last edited by

                                @hepps Alright, added suggested implementation details to the first post.

                                TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                                HeppsH 1 Reply Last reply Reply Quote 1
                                • HeppsH Offline
                                  Hepps Moderators @redrum
                                  last edited by

                                  @redrum Just to clarify the first thing you added to the airbase is already in the code.

                                  <option name="isAirBase" value="true"/>

                                  "A joyous heart sours with the burden of expectation"
                                  Hepster

                                  redrumR 1 Reply Last reply Reply Quote 0
                                  • redrumR Offline
                                    redrum Admin @Hepps
                                    last edited by

                                    @hepps Yeah, both first lines "canIntercept" and "isAirBase" already exist. Those are just to give context to the 2 new properties (1 on air unit, 1 on airbase unit) for requiring airbase and max count for interception.

                                    TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                                    HeppsH 1 Reply Last reply Reply Quote 2
                                    • HeppsH Offline
                                      Hepps Moderators @redrum
                                      last edited by

                                      @redrum To quote Neil Diamond.... "Good times never seemed so good".

                                      "A joyous heart sours with the burden of expectation"
                                      Hepster

                                      redrumR 1 Reply Last reply Reply Quote 1
                                      • redrumR Offline
                                        redrum Admin @Hepps
                                        last edited by

                                        @hepps Who is Neil Diamond?

                                        Anyways, here is the PR: https://github.com/triplea-game/triplea/pull/4140

                                        This has no impact on existing maps that don't use the new parameters. But allows maps to require airbase for interception just like scrambling. It also allows specifying the max number each airbase can send to intercept (default is infinite).

                                        I tested it by editing TWW to have fighters require airfields to intercept and have a limit of 1. Here is the XML examples:

                                        Airfield

                                            <attachment name="unitAttachment" attachTo="britishAirfield" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                              <option name="isAirBase" value="true"/>
                                              <option name="maxInterceptCount" value="1"/>
                                        

                                        Fighter

                                            <attachment name="unitAttachment" attachTo="britishFighter" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                              <option name="canIntercept" value="true"/>
                                              <option name="requiresAirbaseToIntercept" value="true"/>
                                        

                                        TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

                                        1 Reply Last reply Reply Quote 2

                                        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