How to make a unit that does not require a factory to be built/placed.
-
Does anyone know how to make a unit (say infantry) that does not require a factory to be built or placed?
Thanks.
Shawn
-
@SLW2000 You can make any unit not require a factory and be placed anywhere by setting
isConstruction
to true. An example would be like bunkers in NWO/WaW:<attachment name="unitAttachment" attachTo="Bunker" javaClass="UnitAttachment" type="unitType"> <option name="attack" value="0"/> <option name="defense" value="3"/> <option name="hitPoints" value="2"/> <option name="isConstruction" value="true"/> <option name="constructionType" value="bunker"/> <option name="constructionsPerTerrPerTypePerTurn" value="1"/> <option name="maxConstructionsPerTypePerTerr" value="1"/> </attachment>
-
@redrum Thanks for the info and it works great.
I had another question: how do you enable "More Constructions without Factory"? I wanted the unit to be buildable up to the territory value like other land units.
Thanks.
Shawn
-
@SLW2000 You just need to add these 2 properties and set them to true to the properties list at the end of the XML:
<!-- if true you may have a number of constructions up to the value of the territory, in territories with factories --> <property name="More Constructions with Factory" value="true" editable="true"> <boolean/> </property> <!-- if true you may have a number of constructions up to the value of the territory, in territories without factories --> <property name="More Constructions without Factory" value="true" editable="true"> <boolean/> </property>
-
-
@SLW2000 Please, take a look at the descriptions. "Maps & Mods" says: "Talk about and work on specific Maps and Mods".
Moving this thread to Mapmaking.
When you will have your specific map or mod, feel free to open a thread about that in "Maps & Mods" (though I still suggest opening threads in Mapmaking for the technicalities, to keep your thread cleaner for general feedback).