Paratroops not working need help with XML
-
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.
-
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 ? -
"paratroopers" are a default tech, what that means is that it does not need to be added. Only if you want certain or created techs does "paratroopers" needed to be added.
<attachment name="techAttachment" attachTo="Finns" javaClass="TechAttachment" type="player"> <option name="paratroopers" value="true"/> </attachment>A map that has no technologies will still contain all default techs, so this will give Finns the "paratroopers" tech.
Units that do air transport need "isAirTransport" set and a value for "transportCapacity". Units that will be transported by air will need "isAirTransportable" set and a value for "transportCost".That's it. tech and tech_activation delegates are not necessary. "Tech Development" can be false. And the whole technology section can be bypassed with <technology></technology>.
Cheers...
-
@beelee Sorry for the late late reply i was not home last night.
But after 5-6 hrs with AI I could never get no matter how many combinations of the tech above to even get any load prompt. -
Totally awesome it worked. I've spent at least 6 hours with AI trying to figure this out. I must have tried 30 to 50 different combinations of the code I listed as it would often say one conflicts with the other or you only need this or that or these 2 or 3 then another set of 3. Have no fear of AI its at least 100 years away from actual Intelligence. Some might say that about me too but if the shoe fits.
-
Thanks for the help I got it working with the other fellows instructions.
-
@beelee Thanks for the help I got it working with the wc_sumpton's instructions.
-
Some might say that about me too but if the shoe fits.
Yea... us 10 and halves are quite a mentally challenged group.

Cheers...
-
Nice you got it working
xml work can be frustrating, unless you were born with a large amount of patience
I try to look at it as a puzzle anymore, as opposed to wanting to throw my computer down the driveway lolPactofSteel2 xml is still the best information source, next to wc

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