Navigation

    TripleA Logo

    TripleA Forum

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

    Infantry-Only Factories

    Map Making
    production
    3
    3
    267
    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.
    • RogerCooper
      RogerCooper last edited by

      I am working on a mod that has infantry-only factories. Here is my code:

          <attachment name="unitAttachment" attachTo="infantry" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="movement" value="1"/>
            <option name="attack" value="1"/>
            <option name="defense" value="2"/>
            <option name="transportCost" value="2"/>
            <option name="artillerySupportable" value="true"/>
            <option name="isInfantry" value="true"/>
            <option name="isAirTransportable" value="true"/>
            <option name="requiresUnits" value="recruitmentCenter"/>
            <option name="requiresUnits" value="factory"/>
          </attachment>
          <attachment name="unitAttachment" attachTo="artillery" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="movement" value="1"/>
            <option name="attack" value="2"/>
            <option name="defense" value="2"/>
            <option name="transportCost" value="3"/>
            <option name="artillery" value="true"/>
            <option name="requiresUnits" value="factory"/>
          </attachment>
         <attachment name="unitAttachment" attachTo="factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="isFactory" value="true"/>
            <option name="isAAforBombingThisUnitOnly" value="true"/>
          </attachment>
          <attachment name="unitAttachment" attachTo="recruitmentCenter" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="isFactory" value="true"/>
            <option name="isAAforBombingThisUnitOnly" value="true"/>
          </attachment>
       
      

      However, come placement phase I can still place artillery at a recruitmentCenter. Is there something else I need to do?

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

        @RogerCooper

        The following property:

        <property name="Unit Placement Restrictions" value="true" editable="false">
           <boolean/>
        </property>
        

        Also for the infantry, which will be built at both facilities you could remove 'requiresUnits'.

        Cheers...

        1 Reply Last reply Reply Quote 1
        • N
          Numetalfan last edited by

          Hi Roger,

          check

          https://forums.triplea-game.org/topic/2066/new-production-unit-barracks

          for this - I had the same topic before.

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