air units: how to make them not crash
-
how does one make an air unit not susceptable to crashing after non-combat move phase? how do the air units not crash in dragon_war? does it somehow just have the game skip that phase so that no air units can crash?
thanks for any help.
-
@cameron Probably because they have isKamikaze set. I am not sure they aren't dying in battle. http://www.starlords3k.com/triplea_xml_v1000.html#propertyList
-
@cameron not sure I understand your question, but have you tried to set the removeAirThatCanNotLand step property as false?
<step name="americanNonCombatMove" delegate="move" player="Americans" display="Non Combat Move"> <stepProperty name="removeAirThatCanNotLand " value="false"/> </step>
-
i'm guessing that would make all air units not crash. i was hoping that there was a way to make only some units immune to crashing.
eg airships don't crash but planes do.
it's easy to make this happen in water territories - just set the transport cost to 0. just don't know how to make it happen over land... -
@cameron Not having an air units crash could be used to create fully amphibious units. For example, Conquest of Nerath has elementals which can their move at sea and dragons that can't end their move at sea.
-
fully amphibious units would be a good thing to have available; even if in my case i still don't want the air units to be able to take territories...
although i would like them to be able to hover over newly taken territories. need that really for a special unit that gets captured when the island it starts on gets conquered - but then it want's to crash. -
@azimuth said in air units: how to make them not crash:
@cameron not sure I understand your question, but have you tried to set the removeAirThatCanNotLand step property as false?
<step name="americanNonCombatMove" delegate="move" player="Americans" display="Non Combat Move"> <stepProperty name="removeAirThatCanNotLand " value="false"/> </step>
okay... so when i try that i get:
Could not parse:C:\Users\fmcs2\triplea\downloadedMaps\steampunk_fmcs\map\games\Steampunk_fmcs.xml, Parsing halted at line: 2885, column: 3, while mapping to: org.triplea.map.data.elements.GamePlay.Sequence, error: ParseError at [row,col]:[2885,3] Message: The element type "sequence" must be terminated by the matching end-tag " ". XmlParsingException: Parsing halted at line: 2885, column: 3, while mapping to: org.triplea.map.data.elements.GamePlay.Sequence, error: ParseError at [row,col]:[2885,3] Message: The element type "sequence" must be terminated by the matching end-tag " ". XMLStreamException: ParseError at [row,col]:[2885,3] Message: The element type "sequence" must be terminated by the matching end-tag " ".
when i try it w/o the </step> bit it runs but ignores the instruction and still crashes the air units...
-
@cameron
Check one of my earlier maps, and download it, it has what are looking for.
https://forums.triplea-game.org/topic/2467/settlers-fallen-empire-official-thread
Search for this string of text
note the lack of /It shows how to use removeAirThatCanNotLand
Note the line above and its use has no /like this
<step name="AlAnfaNonCombatMove" delegate="move" player="AlAnfa" display="Non Combat Move">
<stepProperty name="removeAirThatCanNotLand" value="false"/>
</step> -
i'm not seeing any difference...
grrr... frustratingedit: got it. that flaming forward slash. it's always the little things...
thank you kindly
-
So how exactly should this code be written? I am getting the same error message as you but I don't know where I should add a forward slash.
-
<!-- turn sequence --> <step name="GermanyTech" delegate="tech" player="Germany" display="Research Technology"/> <step name="GermanyCombatMove" delegate="move" player="Germany" display="Combat Move"/> <step name="GermanyPurchase" delegate="purchase" player="Germany" display="Purchase Units"/> <step name="GermanyBattle" delegate="battle" player="Germany" display="Combat"/> <step name="GermanyNonCombatMove" delegate="move" player="Germany" display="Non Combat Move"> <stepProperty name="removeAirThatCanNotLand" value="false"/> </step> <step name="GermanyPlace" delegate="place" player="Germany" display="Place Units"> <stepProperty name="removeAirThatCanNotLand" value="false"/> </step> <step name="GermanyTechActivation" delegate="tech_activation" player="Germany" display="Activate Technology"/> <step name="GermanyEndTurn" delegate="endTurn" player="Germany" display="Turn Complete"/>
you have to remove the "/" at the end of the step that you're going to add a stepProperty to. awkward to explain. and not where one normally looks for such. or at least if one is a clueless coder like me.
-
Omg thank you it worked!! I was spending so much time on this! I completely missed the absence of the forward slash! Lol pretty weird indeed, I just started XML coding yesterday and it has been giving me multiple headaches so far