You must be logged in to post messages.
Please login or register

Modding and Scripting
Moderated by Yeebaagooon, TAG, nottud

Hop to:    
Welcome! You are not logged in. Please Login or Register.4 replies
Age of Mythology Heaven » Forums » Modding and Scripting » How do I train units?
Bottom
Topic Subject:How do I train units?
Commodore999
Mortal
posted 01 October 2007 09:24 PM EDT (US)         
I made a copy of the military barracks, but it wont train anything! It works, I added an anim and language file, and it works ingame, but the unit "Swordsman" doesnt show up. This is what I put down:
<unit id="801" name="SwordmanRoman">
<dbid>x</dbid>
<displaynameid>48975</displaynameid>
<footprint>Footprint Villager</footprint>
<icon>infantry x murmillo icons 32</icon>
<containedattack>0.0500</containedattack>
<initialhitpoints>30.0000</initialhitpoints>
<maxhitpoints>30.0000</maxhitpoints>
<los>9.0000</los>
<portraiticon>infantry x murmillo icons 64</portraiticon>
<obstructionradiusx>0.4900</obstructionradiusx>
<obstructionradiusz>0.4900</obstructionradiusz>
<soundvariant>Hack</soundvariant>
<ballisticsplashproto>Splash</ballisticsplashproto>
<ballisticbounceproto>Dust Medium</ballisticbounceproto>
Body
<maxvelocity>4.5000</maxvelocity>
<movementtype>land</movementtype>
<turnrate>14.0000</turnrate>
<unitaitype>HandCombative</unitaitype>
<populationcount>1</populationcount>
<trainpoints>5.0000</trainpoints>
<allowedage>2</allowedage>
<cost resourcetype="Food">35.0000</cost>
<cost resourcetype="Gold">15.0000</cost>
<bounty resourcetype="Favor">1.0800</bounty>
<bountyfactor resourcetype="Favor">1.0000</bountyfactor>
<rollovertextid>22847</rollovertextid>
<rolloveruseagainstid>22850</rolloveruseagainstid>
<rollovercounterwithid>22851</rollovercounterwithid>
<rolloverupgradeatid>22852</rolloverupgradeatid>
<buttonpos row="0" column="0"></buttonpos>
<armor damagetype="Hack" percentflag="1">0.85</armor>
<armor damagetype="Pierce" percentflag="1">0.01</armor>
<armor damagetype="Crush" percentflag="1">0.99</armor>
<unittype>LogicalTypeValidTremorAttack</unittype>
<unittype>LogicalTypeVolcanoAttack</unittype>
<unittype>LogicalTypeSuperPredatorsAutoAttack</unittype>
<unittype>LogicalTypeCanBeHealed</unittype>
<unittype>LogicalTypeAffectedByRestoration</unittype>
<unittype>LogicalTypeAffectedByVortex</unittype>
<unittype>LogicalTypeValidTraitorsTarget</unittype>
<unittype>LogicalTypeMilitaryUnitsAndBuildings</unittype>
<unittype>LogicalTypeParticipatesInBattlecries</unittype>
<unittype>LogicalTypeTornadoAttack</unittype>
<unittype>LogicalTypeScreamsOnSpiderPull</unittype>
<unittype>LogicalTypeSuperPredatorsAttack</unittype>
<unittype>LogicalTypeValidFlamingWeaponsTarget</unittype>
<unittype>LogicalTypeConvertsHerds</unittype>
<unittype>LogicalTypeMummyMinionTarget</unittype>
<unittype>LogicalTypeCanBeThrown</unittype>
<unittype>LogicalTypeValidBoltTarget</unittype>
<unittype>LogicalTypeFimbulWinterTCEvalType</unittype>
<unittype>LogicalTypeEarthquakeAttack</unittype>
<unittype>LogicalTypeFavoriteUnit</unittype>
<unittype>LogicalTypeValidSpyTarget</unittype>
<unittype>LogicalTypeValidShiftingSandsTarget</unittype>
<unittype>LogicalTypePredatorsAttack</unittype>
<unittype>LogicalTypeEscapesFrostOnTransform</unittype>
<unittype>LogicalTypeValidSpiderTarget</unittype>
<unittype>LogicalTypeNeededForVictory</unittype>
<unittype>LogicalTypeHandUnitsAutoAttack</unittype>
<unittype>LogicalTypeValidFrostTarget</unittype>
<unittype>LogicalTypeCanBeStoned</unittype>
<unittype>LogicalTypeLandMilitary</unittype>
<unittype>LogicalTypeImplodeAttack</unittype>
<unittype>LogicalTypeAffectedByFrostGiant</unittype>
<unittype>LogicalTypeAffectedByChaos</unittype>
<unittype>LogicalTypeValidSPCUnitsDeadCondition</unittype>
<unittype>LogicalTypeAffectedByHealingSpring</unittype>
<unittype>LogicalTypeUnitsNotBuildings</unittype>
<unittype>LogicalTypeRangedUnitsAutoAttack</unittype>
<unittype>LogicalTypeVillagersAttack</unittype>
<unittype>LogicalTypeHandUnitsAttack</unittype>
<unittype>LogicalTypeRangedUnitsAttack</unittype>
<unittype>LogicalTypeTartarianGateValidOverlapPlacement</unittype>
<unittype>LogicalTypeGarrisonOnBoats</unittype>
<unittype>LogicalTypeValidForestFireTarget</unittype>
<unittype>LogicalTypeSeaSerpentAttack</unittype>
<unittype>LogicalTypeValidMeteorTarget</unittype>
<unittype>LogicalTypeMinimapFilterMilitary</unittype>
<unittype>LogicalTypeNonGreekUnit</unittype>
<unittype>LogicalTypeAffectedByHeroize</unittype>
<unittype>LogicalTypeOdinRegenerates</unittype>
<unittype>LogicalTypeIdleMilitary</unittype>
<unittype>Unit</unittype>
<unittype>UnitClass</unittype>
<unittype>Military</unittype>
<unittype>AbstractInfantry</unittype>
<unittype>HumanSoldier</unittype>
<flag>ShowGarrisonButton</flag>
<flag>CollidesWithProjectiles</flag>
<flag>ObscuredByUnits</flag>
<flag>DontRotateObstruction</flag>
<flag>ApplyHandicapTraining</flag>
<flag>CorpseDecays</flag>
<flag>Tracked</flag>
<command>Work</command>
<action name="HandAttack">
<param name="MaximumRange" value1="0.3"></param>
<param name="Damage" type="Hack" value1="11"></param>
<param name="AttackAction"></param>
<param name="Rate" type="All" value1="7.0"></param>
</action>
</unit>
<unit id="711" name="romanmilitario">
<dbid>x</dbid>
<displaynameid>23002</displaynameid>
<icon>Building Barracks icons 32</icon>
<maxcontained>1</maxcontained>
<initialhitpoints>1500.0000</initialhitpoints>
<maxhitpoints>1500.0000</maxhitpoints>
<los>7.0000</los>
<portraiticon>Building Barracks icons 64</portraiticon>
<obstructionradiusx>2.0000</obstructionradiusx>
<obstructionradiusz>2.0000</obstructionradiusz>
<deadreplacement>Destruction 4x4</deadreplacement>
<maxvelocity>0.0000</maxvelocity>
<movementtype>land</movementtype>
<initialunitaistance>Aggressive</initialunitaistance>
<buildpoints>55.0000</buildpoints>
<buildingworkrate>1.0000</buildingworkrate>
<allowedheightvariance>8.0000</allowedheightvariance>
<allowedage>1</allowedage>
<cost resourcetype="Wood">75.0000</cost>
<cost resourcetype="Gold">35.0000</cost>
<bounty resourcetype="Favor">4.3200</bounty>
<bountyfactor resourcetype="Favor">1.0000</bountyfactor>
<bounty resourcetype="Gold">5.0000</bounty>
<rollovertextid>23001</rollovertextid>
<rollovercounterwithid>23003</rollovercounterwithid>
<rolloverupgradeatid>23004</rolloverupgradeatid>
<buttonpos row="0" page="2" column="0"></buttonpos>
<decay delay="0.1000" duration="1.0000"></decay>
<armor damagetype="Hack" percentflag="1">0.30</armor>
<armor damagetype="Pierce" percentflag="1">0.96</armor>
<armor damagetype="Crush" percentflag="1">0.05</armor>
<unittype>LogicalTypeVolcanoAttack</unittype>
<unittype>LogicalTypeSuperPredatorsAutoAttack</unittype>
<unittype>LogicalTypeAffectedByRestoration</unittype>
<unittype>LogicalTypeTornadoAttack</unittype>
<unittype>LogicalTypeSuperPredatorsAttack</unittype>
<unittype>LogicalTypeConvertsHerds</unittype>
<unittype>LogicalTypeFimbulWinterTCEvalType</unittype>
<unittype>LogicalTypeEarthquakeAttack</unittype>
<unittype>LogicalTypeSiegeAutoAttack</unittype>
<unittype>LogicalTypeNeededForVictory</unittype>
<unittype>LogicalTypeHandUnitsAutoAttack</unittype>
<unittype>LogicalTypeBuildingNotTitanGate</unittype>
<unittype>LogicalTypeValidDeconstructionTarget</unittype>
<unittype>LogicalTypeBuildingsThatTrainMilitary</unittype>
<unittype>LogicalTypeBuildingsNotWalls</unittype>
<unittype>LogicalTypeBuildingsNotHouses</unittype>
<unittype>LogicalTypeTimeshift</unittype>
<unittype>LogicalTypeRangedUnitsAutoAttack</unittype>
<unittype>LogicalTypeVillagersAttack</unittype>
<unittype>LogicalTypeHandUnitsAttack</unittype>
<unittype>LogicalTypeRamAttack</unittype>
<unittype>LogicalTypeRangedUnitsAttack</unittype>
<unittype>LogicalTypeTartarianGateValidOverlapPlacement</unittype>
<unittype>LogicalTypeValidForestFireTarget</unittype>
<unittype>LogicalTypeSeaSerpentAttack</unittype>
<unittype>LogicalTypeValidMeteorTarget</unittype>
<unittype>LogicalTypeMinimapFilterMilitary</unittype>
<unittype>Building</unittype>
<unittype>BuildingClass</unittype>
<unittype>MilitaryBuilding</unittype>
<unittype>AbstractBarracks</unittype>
<unittype>ConvertableBuilding</unittype>
<unittype>Age2Building</unittype>
<train row="1" page="1" column="1">SwordmanRoman</train>
<tech row="1" page="1" column="3">Conscript Mainline Units</tech>
<tech row="1" page="1" column="3">Levy Mainline Units</tech>
<tech row="1" page="1" column="2">Champion Archers</tech>
<tech row="1" page="1" column="2">Heavy Archers</tech>
<tech row="1" page="1" column="2">Medium Archers</tech>
<tech row="1" page="1" column="0">Medium Infantry</tech>
<tech row="1" page="1" column="0">Heavy Infantry</tech>
<tech row="1" page="1" column="0">Champion Infantry</tech>
<flag>ObscuresUnits</flag>
<flag>HasGatherPoint</flag>
<flag>Immoveable</flag>
<flag>NoBloodOnDeath</flag>
<flag>NonAutoFormedUnit</flag>
<flag>CollidesWithProjectiles</flag>
<flag>DontFadeInOnBuild</flag>
<flag>Doppled</flag>
<flag>InitialGarrisonOnly</flag>
<flag>SelectWithObstruction</flag>
<flag>PaintTextureWhenPlacing</flag>
<flag>NoIdleActions</flag>
<flag>FlattenGround</flag>
<flag>Tracked</flag>
</unit>

[This message has been edited by Commodore999 (edited 10-01-2007 @ 09:42 PM).]

AuthorReplies:
TartarianCerberus
Mortal
(id: Cerberus_001)
posted 01 October 2007 09:31 PM EDT (US)     1 / 4       
please use the code tag

Eg.

[ code ]Code here[ /code ]

except dont put spaces in the code tags.

Cerberus- The three headed guard dog who guards the entrance to Hades; son of Typhon.

"If I threw up on you, you'd be pissed." -Big Baby, House MD

sporeh censusmaster, mafiamaster, competitionmaster, showcasemaster

aomh | sporeh | pds | website | sign up for unicellular mafia at sporeh
The God of Mods
Mortal
posted 01 October 2007 10:32 PM EDT (US)     2 / 4       
put them in a building in the proto(x).xml and in techtree(x).xml enable them in whatever age you need them (or god).

Leader of Modification for Purple Design Studios
Proud Designer of Modsmith Studios
Current Projects: Roman Legion Xin Dynasty
I don't like my name, but I can't change.....
I <3 Gmax
Commodore999
Mortal
posted 02 October 2007 06:51 PM EDT (US)     3 / 4       
what do you mean?
The God of Mods
Mortal
posted 02 October 2007 08:02 PM EDT (US)     4 / 4       
<train row="1" page="1" column="3">SwordmanRoman</train>
<train row="1" page="1" column="3">Romanmilitario</train>
Put those in the code of a building in the proto(x).
<effect type="Data" amount="1.00" subtype="Enable" relativity="Absolute">
<target type="ProtoUnit">SwordmanRoman</target>
</effect>

<effect type="Data" amount="1.00" subtype="Enable" relativity="Absolute">
<target type="ProtoUnit">Romanmilitario</target>
</effect>
And put those in some age technology(age 1,2,3,4) in the techtree(x).

Leader of Modification for Purple Design Studios
Proud Designer of Modsmith Studios
Current Projects: Roman Legion Xin Dynasty
I don't like my name, but I can't change.....
I <3 Gmax

[This message has been edited by The God of Mods (edited 10-02-2007 @ 08:03 PM).]

You must be logged in to post messages.
Please login or register

Hop to:    

Age of Mythology Heaven | HeavenGames