TripleA Logo TripleA Forum
    • TripleA Website
    • Recent
    • Popular
    • Register
    • Login

    Question about trenches domination 1914 no mans land

    Scheduled Pinned Locked Moved Map Making
    81 Posts 6 Posters 4.6k Views 7 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.
    • VictoryFirstV
      VictoryFirst @Ramon
      last edited by VictoryFirst

      @Ramon I ran into the same problem for the North Africa game. You need to make sure a land territory is adjacent to every sea territory using canal attachments.

      <attachment foreach="$SeaZones$" name="canalAttachmentSeaMine@SeaZones@" attachTo="A-B" javaClass="CanalAttachment" type="territory">
      	<option name="canalName" value="Sea Mine @SeaZones@"/>
      	<option name="landTerritories" value="A-B"/>
      	<option name="excludedUnits" value="none"/>
      </attachment>
      

      The code above makes sure every sea zone gets canal attached to the territory A-B, which is a territory belonging to a special player that deals with the mines. This way, this player is able to place sea mines in every territory. For your game, you would need to do this for every player in your game. You should attach the canal to a territory that is likely to be owned by that player for the entire game. I believe it doesn't need to be adjacent to a factory. If you make the sea mine a construction and have the relevant properties at the correct settings, I think you can get away with it.

      You can create canal attachments to every sea zone and every player using a nested foreach:

      <attachment foreach="$SeaZones$^$Territories$" name="canalAttachmentSeaMine@Territories@@SeaZones@" attachTo="@SeaZones@" javaClass="CanalAttachment" type="territory">
      	<option name="canalName" value="Sea Mine @Territories@ @SeaZones@"/>
      	<option name="landTerritories" value="@Territories@"/>
      	<option name="excludedUnits" value="none"/>
      </attachment>
      

      You also need one attached to the territories:

      <!-- NOTICE THAT THIS ONE SAYS attachTo="@Territories@" -->
      <attachment foreach="$SeaZones$^$Territories$" name="canalAttachmentSeaMine@Territories@@SeaZones@" attachTo="@Territories@" javaClass="CanalAttachment" type="territory"> 
      	<option name="canalName" value="Sea Mine @Territories@ @SeaZones@"/>
      	<option name="landTerritories" value="@Territories@"/>
      	<option name="excludedUnits" value="none"/>
      </attachment>
      

      and variable lists (this should be below diceSides at the top of the XML):

      <variableList>
      <variable name="SeaZones">
        <element name="Sea Zone 1"/>
        <element name="Sea Zone 2"/>
        <element name="Sea Zone 3"/>
      ...
      <variable name="Territories">
        <element name="Algiers Convoy UK"/>
        <element name="Algiers Convoy US"/>
        <element name="Atlantic Ocean Convoy"/>
      ...
      

      SeaZones should be a list containing all sea zones in the game. Territories should contain one territory for every player in the game that acts as the "sea mine base". If this territory is controlled by that player, they should be able to place sea mines in any sea zone. It can be a land-locked territory. You could for example put every player's capital territory in the list Territories, as if the capital is taken you cannot produce units anyway.

      Also, you need to specify connections between the territories and every sea zones in the connection list:

      <connection t1="A-B" t2="Sea Zone 1"/>
      <connection t1="A-B" t2="Sea Zone 2"/>
      <connection t1="A-B" t2="Sea Zone 3"/>
      
      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
      • 2
      • 3
      • 4
      • 5
      • 5 / 5
      • First post
        Last post
      Powered by NodeBB Forums