Navigation

    TripleA Logo

    TripleA Forum

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

    Connection Option - "Air Corridor"

    Feature Requests & Ideas
    3
    16
    931
    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.
    • SlendyMcTendies
      SlendyMcTendies last edited by SlendyMcTendies

      On my heavily edited version of Path to Victory, I'd like to be able to allow Air Units to pass over the Sahara Desert but not ground units. From what I understand, this is not currently possible to set up in the game XML file and is currently an engine limitation.

      I tried looking through the source code but I'm having trouble figuring our how the game knows where connections are and (more importantly) what units are allowed to pass through those connections.

      It would be nice if there was a way to simply mark a territory connection in the XML file as "airOnly".

      TheDog 1 Reply Last reply Reply Quote 0
      • TheDog
        TheDog @SlendyMcTendies last edited by TheDog

        You will need something like this, where;
        All-Ground-Units is a a list of just that
        3 means 3+1=4 movement to enter, meaning all All-Ground-Units cannot enter, because it costs 4 to enter

        <!-- Desert  -->
            <attachment name="territoryEffectAttachment" attachTo="desert" javaClass="TerritoryEffectAttachment" type="territoryEffect">
        <option name="movementCostModifier" value="$All-Ground-Units$" count="3"/>
        	</attachment>
        

        more here
        https://forums.triplea-game.org/topic/2892/how-i-am-using-movementcostmodifier

        SlendyMcTendies 1 Reply Last reply Reply Quote 0
        • SlendyMcTendies
          SlendyMcTendies @TheDog last edited by SlendyMcTendies

          @thedog The Sahara Desert is not its own territory. It's just a section detailed on the overlay (see image).

          Sahara Desert.png

          The Sahara Desert covers a bunch of territory borders, and in Path to Victory, all of the connections between territories that the Sahara covers are simply not there in the XML file. However, this prevents Air Units from crossing the Sahara, which does not make sense to me.

          What I'm asking for is a way for Air Units to pass over the Sahara, but not Ground Units.

          Your suggestion, unfortunately, does not work here because it would apply to an entire territory, not just the connection between two of them.

          EDIT: To further illustrate what I mean, I've attached another image.

          In this image, I've added lines between each territory to note how I'd like the connections set up.

          BLUE = Air & Ground units may travel between.
          WHITE = Where I want Air Only.

          (However, as of right now, Ground Units can pass between all of these connections. I would rather they be limited to the blue route.)

          Sahara Desert connection edit.png

          TheDog W 2 Replies Last reply Reply Quote 0
          • TheDog
            TheDog @SlendyMcTendies last edited by

            Currently there is no connection control in the xml to do what you want.

            As you have gathered the only way is to make the Sahara a territory or 2 or 3.

            SlendyMcTendies 1 Reply Last reply Reply Quote 0
            • SlendyMcTendies
              SlendyMcTendies @TheDog last edited by SlendyMcTendies

              @thedog I'm not opposed to that, but I haven't made my own territories before. What would I need to know in order to do that?

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

                @slendymctendies

                In this case you will need to create a "canal" between the territories:

                <!-- Tobruk to Anglo-Egyptian Sudan -->
                <attachment name="canalAttachmentTobrukAnglo-EgyptianSudan" attachTo="Tobruk" javaClass="CanalAttachment" type="territory">
                  <option name="canalName" value="TobrukAnglo-EgyptianSudanTravel"/>
                  <option name="landTerritories" value="Pripet Marshes"/>
                </attachment>
                
                <attachment name="canalAttachmentTobrukAnglo-EgyptianSudan" attachTo="Anglo-Egyptian Sudan" javaClass="CanalAttachment" type="territory">
                  <option name="canalName" value="TobrukAnglo-EgyptianSudanTravel"/>
                  <option name="landTerritories" value="Pripet Marshes"/>
                </attachment>
                
                <!-- Tobruk to French Central Africa -->
                <attachment name="canalAttachmentTobrukFrenchCentralAfrica" attachTo="Tobruk" javaClass="CanalAttachment" type="territory">
                  <option name="canalName" value="TobrukFrenchCentralAfricaTravel"/>
                  <option name="landTerritories" value="Pripet Marshes"/>
                </attachment>
                
                <attachment name="canalAttachmentTobrukFrenchCentralAfrica" attachTo="French Central Africa" javaClass="CanalAttachment" type="territory">
                  <option name="canalName" value="TobrukFrenchCentralAfricaTravel"/>
                  <option name="landTerritories" value="Pripet Marshes"/>
                </attachment>
                ...
                ...
                ...
                

                Cheers...

                TheDog SlendyMcTendies 2 Replies Last reply Reply Quote 2
                • TheDog
                  TheDog @wc_sumpton last edited by

                  @wc_sumpton
                  Now that is creative 😁

                  1 Reply Last reply Reply Quote 1
                  • SlendyMcTendies
                    SlendyMcTendies @wc_sumpton last edited by

                    @wc_sumpton I considered a "dummy" canal, but canals act as blockers for enemy units, not allied ones. If I understand correctly, they also require being connected to water territories in some way as a sanity check by the engine so you couldn't get Sea Units on land somehow with a weird canal setup.

                    The reason why Canals have Submarines and Aircraft in their excluded units is because the line of logic is that enemy Submarines are stealthy and hard to prevent from crossing, and Aircraft can fly over them. "Excluded Units" in this case means "not blocked".

                    I appreciate the effort, but this doesn't quite work either.

                    W 1 Reply Last reply Reply Quote 1
                    • TheDog
                      TheDog @SlendyMcTendies last edited by

                      @slendymctendies said in Connection Option - "Air Corridor":

                      @thedog I'm not opposed to that, but I haven't made my own territories before. What would I need to know in order to do that?

                      You will need the modify the following files
                      baseTiles using say Inkscape
                      reliefTiles using say GIMP or paint.net
                      centers.txt
                      place.txt...........safer to splice the two files together, the changed territories and old unchanged territories
                      polygons.txt...safer to splice the two files together, the changed territories and old unchanged territories

                      It will be a steep learning curve and the reliefTiles will probably look out as you dont have the original graphic source file only the flatten png

                      As you have never done the above before, what about using another map that has what you are after on it and just move your code into that new map?

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

                        @slendymctendies said in Connection Option - "Air Corridor":

                        "Excluded Units" in this case means "not blocked"

                        You are right!! But 'Himalayas' is "isImpassable" so "landTerritories" can equal 'Himalayas'. No one can own this territory, so it becomes impassable. And remove "excludedUnits" because "isAir" units, by default, are not verified.

                        Cheers...

                        P.S. Better yet use 'Pripet Marshes' as 'Himalayas' ownership is given "Chinese"

                        Cheers...

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

                          @wc_sumpton I think you're ultimately missing the point: Canals are specifically considering Sea Zones. The owners of the Land Territories are how they determine who owns the Canal, and therefore who is and isn't allowed to pass. The game will throw an error if I don't properly connect two Sea Zones, and we're working with Land Territory here.

                          I think my ultimate solution will be to edit the map and add Sahara sectors as territories. This will get me closest to what I ultimately want.

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

                            @slendymctendies

                            This works if 'Tobruk' connections are present, they are not in the default xml:

                            <connection t1="Anglo-Egyptian Sudan" t2="Tobruk"/>
                            <connection t1="French Central Africa" t2="Tobruk"/>
                            

                            Canal connections can be between 2 land territories, the land territory that is needed for ownership, does not need to be part of the canal. Try it, I did, you might be surprised!!

                            Cheers...

                            SlendyMcTendies 2 Replies Last reply Reply Quote 2
                            • SlendyMcTendies
                              SlendyMcTendies @wc_sumpton last edited by

                              @wc_sumpton Hmmm.... 🤔

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

                                @wc_sumpton Well well, I stand corrected.

                                I took your idea a small step further though. I created an extremely small territory that is effectively impossible to find on the map, made THAT impassible and have 0 connections (and soon will have a territory effect where it disallows all units, just in case). I made THAT the "owner" territory.

                                Why? Because I made Pripet Marshes and Himalayas passable by foot soldiers, and therefore technically conquerable. I might revert that change and use the "Air Canals" we just got figured out instead. Because, again, I don't see why aircraft can't pass over these territories. Not sure yet.

                                Thank you! I've never been more happy to be wrong lol

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

                                  @slendymctendies said in Connection Option - "Air Corridor":

                                  I created an extremely small territory that is effectively impossible to find on the map

                                  No Land
                                  centers.txt
                                  No Land (0,0)

                                  polygons.txt
                                  No Land < (0,0) (0,1) (1,0) (1,1) >

                                  place.txt
                                  No Land (0,0) | overflowToLeft=false

                                  xml

                                  <territory name="No Land"/>
                                  ...
                                  ...
                                  ...
                                  <attachment name="territoryAttachment" attachTo="No Land" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
                                     <option name="isImpassable" value="true"/>
                                  </attachment>
                                  

                                  That simple, no need to edit the map.

                                  Cheers...

                                  Edited to show @SlendyMcTendies correction, thank you!!

                                  Cheers...

                                  SlendyMcTendies 1 Reply Last reply Reply Quote 1
                                  • SlendyMcTendies
                                    SlendyMcTendies @wc_sumpton last edited by

                                    @wc_sumpton Right, that's what I did and meant. However, territories must have a height & width greater than 0, so "NoLand" would need to be < (0,0) (0,1) (1,0) (1,1) > in "polygons.txt", and assumedly the center and placement marker within those bounds as well. Didn't test if they could be outside the bounds, but I don't see any reason to either.

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