Navigation

    TripleA Logo

    TripleA Forum

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

    AI won't use trains/railroads

    AI
    3
    5
    619
    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.
    • I
      iratoric last edited by

      I noticed that in maps which have them, the AI will not use trains to transport land units and instead will walk the units over long distances. However, when the AI has the option to use trucks it WILL use them to transport units and actually uses them quite handily. So the issue is not with the isLandTransport option as I thought it was.

      The only difference between these two units is that the truck can move wherever it wants, but the train can only move on rails. I think that the problem might be that the AI doesn't recognize the requiresUnitsToMove option.

      It would be great if we could get this unit working because it is very thematic (trains were used to move a lot of troops in WWII, WWI, the American Civil War, etc.) and makes moving units across large maps a lot faster and more fun.

      I 1 Reply Last reply Reply Quote 1
      • I
        iratoric @iratoric last edited by

        @iratoric

        Also here are the unit attachments I am using:

        <attachment name="unitAttachment" attachTo="truck" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
        	<option name="movement" value="6"/>
        	<option name="attack" value="0"/>
        	<option name="defense" value="0"/>
        	<option name="canBlitz" value="true"/>
        	<option name="isLandTransport" value="true"/>
        	<option name="transportCapacity" value="2"/>
        	<option name="isInfrastructure" value="true"/>
        </attachment>
        
        <attachment name="unitAttachment" attachTo="railroad" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
        	<option name="movement" value="0"/>
        	<option name="isInfrastructure" value="true"/>
        	<option name="isConstruction" value="true"/>
        	<option name="constructionType" value="railroad"/>
        	<option name="constructionsPerTerrPerTypePerTurn" value="1"/>
        	<option name="maxConstructionsPerTypePerTerr" value="1"/>
        </attachment>
        
        <attachment name="unitAttachment" attachTo="train" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
        	<option name="movement" value="6"/>
        	<option name="attack" value="0"/>
        	<option name="defense" value="0"/>
        	<option name="isInfrastructure" value="true"/>
        	<option name="isLandTransport" value="true"/>
        	<option name="transportCapacity" value="6"/>
        	<option name="requiresUnitsToMove" value="railroad"/>
        </attachment>
        
        B 1 Reply Last reply Reply Quote 0
        • B
          beelee @iratoric last edited by

          @iratoric you could ask @RogerCooper He knows how to manipulate the AI into doing certain things.

          RogerCooper 1 Reply Last reply Reply Quote 1
          • RogerCooper
            RogerCooper @beelee last edited by

            Railroads as units doesn't make a lot of sense. Most wargames treat railroads as terrain.

            Easy ways of handling railroads are:

            1. Increase the movement allowance of all ground units and make non-railroad areas must stop terrain

            2. Have train stations give a movement bonus to ground units (like air bases giving a bonus to air units)

            I 1 Reply Last reply Reply Quote 1
            • I
              iratoric @RogerCooper last edited by

              @rogercooper I will try increasing the move value of all the units. The base problem I am trying to solve is that I have a large map and I don't want it to take forever to move units across it.

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