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

    Paratroops not working need help with XML

    Scheduled Pinned Locked Moved Player Help
    2 Posts 2 Posters 8 Views 2 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.
    • C
      craigviau
      last edited by

      I've benn trying with AI to make this work. I'm going to drop the various code I've added which is probably 500 times what is needed but AI keeps hacking away at this. The first secion is in the player list <playerList>
      <!-- In turn order -->
      <player name="Finns" optional="false"/>
      <attachment name="techAttachment" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
      <option name="paratroopers" value="true"/>
      <option name="mechanizedinfantry" value="true"/>
      </attachment>

      Then added tech activation
      <step name="finnsTech" delegate="tech" player="Finns"/>
      <step name="finnsTechActivation" delegate="tech_activation" player="Finns"/>

      Then added under technology
      <techInitialize>
      <techName name="paratroopers" player="Finns"/>

      <techTokens>
      <token name="paratroopers"/>
      <token name="mechanizedinfantry"/>
      </techTokens>

      Then
      <attachment name="techAttachment" attachTo="Finns" javaClass="games.strategy.triplea.attachments.TechAttachment" type="player">
      <option name="paratroopers" value="true"/>

      Then
      <attachment name="conditionAttachmentAlwaysTrue" attachTo="Finns" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
      <option name="switch" value="true"/>
      </attachment>

      	<attachment name="triggerAttachmentUseTransports" attachTo="Finns" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
      		<option name="conditions" value="conditionAttachmentAlwaysTrue"/>
      		<option name="tech" value="paratroopers"/>
      		<option name="when" value="before:finnsPurchase"/>
      		<option name="uses" value="1"/>
      	</attachment>	
      

      Then for the paratroop itself:
      <attachment name="unitAttachment" attachTo="Paratroop" 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"/>
      <!-- Tells the engine this unit is allowed to load into air transport slots -->
      <option name="isAirTransportable" value="true"/>
      <option name="isAir" value="false"/>
      </attachment>

      Then for the bomber:
      <attachment name="unitAttachment" attachTo="Light_Bomber" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
      <option name="movement" value="6"/>
      <!-- Base attack/defense set to 4, matching its baseline capabilities -->
      <option name="attack" value="4"/>
      <option name="defense" value="4"/>
      <option name="isAir" value="true"/>
      <!--option name='isStrategicBomber' value='true'/-->
      <option name='canAirBattle' value='true'/>
      <option name="canEvade" value="true"/>
      <option name="airAttack" value="2"/>
      <option name="airDefense" value="2"/>

      		<option name="isAirTransport" value="true"/>
      		<option name="transportCapacity" value="2"/> <!-- Can carry 1 paratrooper -->
      		<option name="bombingMaxDieSides" value="5"/>
      		<option name="bombingBonus" value="1"/>
      		<option name='bombingTargets' value='factory_minor:Factory:AirBase:NavalBase'/>
      	</attachment>	
      

      Then in the property section:
      <property name="Tech Development" value="true" editable="true">
      <boolean/>
      </property>
      <property name="Use Triggers" value="true" editable="true">
      <boolean/>
      </property>
      <property name='Paratroopers Can Attack Deep Into Enemy Territory' value='true' editable='true'>
      <boolean/>
      </property>
      <property name='Paratroopers Can Move During Non Combat' value='true' editable='true'>
      <boolean/>
      </property>
      <property name="Air Transportable Units Require Air Base" value="false"/>
      <property name="Paratroopers Can Only Launch From Own Territories" value="false"/>

      Still not working the bomber and paratroop and airbase all start in the same spot i don't get an option to load.

      B 1 Reply Last reply Reply Quote 2
      • B
        beelee @craigviau
        last edited by beelee

        @craigviau

        Hi Craig

        So if you click on the Bmbr it doesn't ask if you want to load the Para ?

        I can't remember how it works. I will check an old map that has it. In the mean time will ping @wc_sumpton for you

        Edit
        Try adding

        <option name="isAirTransport" value="true"/>

        to the Bmbr

        oh you already have that.

        Double check that the Para tech activated on the sidebar under Technology.

        Edit 2
        Are you modding an existing map or is this a new map ?

        1 Reply Last reply Reply Quote 1

        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 / 1
        • First post
          Last post
        Powered by NodeBB Forums