Navigation

    TripleA Logo

    TripleA Forum

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

    Proposal: Simpler '<canal>' node

    Map Making
    2
    5
    311
    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.
    • LaFayette
      LaFayette Admin last edited by

      Proposal, introduce a <canal> tag to replace: <attachment javaClass="games.strategy.triplea.attachments.CanalAttachment"

      Example

      <map>
        <canals>
          <canal name= seaZone1="" seaZone2="">
             <landTerritory name="Central America" />
             <landTerritory name="Colombia" />
          </canal>
        </canals>
      </map>
      

      Example (existing, to be replaced)

      <attachment 
              name="canalAttachmentCentral America - Colombia" 
              attachTo="25 Sea Zone"
              javaClass="games.strategy.triplea.attachments.CanalAttachment"
             type="territory">
        <option name="canalName" value="the Central America - Colombia channel"/>
        <option name="landTerritories" value="Central America:Colombia"/>
      </attachment>
      <attachment 
           name="canalAttachmentCentral America - Colombia" 
           attachTo="100 Sea Zone" 
           javaClass="games.strategy.triplea.attachments.CanalAttachment"
           type="territory">
      
         <option name="canalName" value="the Central America - Colombia channel"/>
         <option name="landTerritories" value="Central America:Colombia"/>
      </attachment>
      

      Backward Compatibility

      If a canal is redefined as an attachment then the game would generate an error to indicate the invalid configuration. Otherwise the new 'canals' tag would be optional and the existing attachment tag would continue to work.

      C 1 Reply Last reply Reply Quote 0
      • C
        Cernel Moderators @LaFayette last edited by

        @LaFayette The code should at least allow for multiple canals between the same two zones and for defining whether you need to be able to move through all of them or at least one of them (AND/OR).

        The name "canal" itself is counter intuitive and logically wrong, as a canal is something that allows movement. Instead, the "TripleA" canals have the only function of possibly impeding movement. Meaning that if you delete the "Suez Canal", for example, everything can pass, while you would think that, realistically, without the canal, nothing would be able to pass. So what TripleA calls "canal" is actually not the canal, but the ability of closing it. I suggest finding a better name for it, like "boom" or "lock".
        https://en.wikipedia.org/wiki/Boom_(navigational_barrier)

        1 Reply Last reply Reply Quote 0
        • LaFayette
          LaFayette Admin last edited by

          @Cernel Could you point me to the current XML attachment values that specifies: "defining whether you need to be able to move through all of them or at least one of them (AND/OR)."

          C 1 Reply Last reply Reply Quote 0
          • C
            Cernel Moderators @LaFayette last edited by

            @LaFayette It's the "Control All Canals Between Territories To Pass" property (I think it should have been an option, so that you could have had both serial and parallel canals for the same game).

            This is also related to an actual change to the default TripleA behaviour, made at some point, as the default used to be "AND" and it was changed to "OR" (in my opinion, the "AND" default made more sense: Since the "canal" are blockers, if you have two blockers for the same connection, you should normally be able to go past both).

            1 Reply Last reply Reply Quote 0
            • LaFayette
              LaFayette Admin last edited by

              Thanks for pointing me to the property @Cernel ;

              I'd like to keep updates limited to the game data assembly layer. That means for now I'll leave the "Control All Canals Between Territories To Pass" property unaltered.

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