Age Of Wonders 3 Wiki
Advertisement
Age Of Wonders 3 Wiki

This page server to help in making new unit templates.

Introduction

Currently, unit templates are being worked with the Javascript at MediaWiki:Units.js to allow the values to change depending on race, experience rank, and Mystical City Upgrades which are selected. For example:

Scoundrel.png
  

Unit: ScoundrelRecruitOrigin: Rogue Requires: Rogue's Palace
Tier I: 35 Hit Points 28 Movement 8 Defense 8 Resistance Cost: 45 Gold Upkeep: 4 Gold/Turn
Abilities:
  • The most in-elegant way to force a line break.
  • The most in-elegant way to force a line break.
  • The most in-elegant way to force a line break.
  • The most in-elegant way to force a line break.
Experience Ranks:
Unique Racial Effects:

Therefore, the code behind the units can't take much errors, and anything else than minor modifications to the below code requires basic knowledge of Wiki markup, HTML, CSS, JS, and their interactions.

Example code:

Unit Example

<div class="template-unit " <!--
-->data-basehealth="35" <!--
-->data-basedefense="8" <!--
-->data-baseresistance="8" <!--
-->data-tier="1" <!--
-->data-size="{{{size|large}}}" <!--
-->data-initrank="{{{rank|0}}}" <!--
-->data-race="{{Readrace|{{{race|0}}}}}" <!--
-->data-support="true" <!--
-->data-initupg0="{{Readupgrade|{{{upgrade|0}}}}}" <!--
-->data-initupg1="{{Readupgrade|{{{upgrades|0}}}}}" <!--
-->data-initupg2="{{Readupgrade|{{{upgraded|0}}}}}"><!--

This is the Div around the entire unit. These values will be used by JS to calculate the basic numeral stats. Also, any upgrades need to be enabled in this div, like support in this case.

-->[[File:UNITNAME.png|right]]<span class="size unitSpecs {{#ifeq:{{{tt}}}|0|hidden|nothidden}}"><!--
--><span class="select-rank"></span> <span style="visibility:hidden;">m</span> <!--
--><span class="select-race"></span><!--
--><br/><!--
--><span class="select-upgrade"></span><!--
--><br/></span><!--  

This is the part where the JS inserts the menu's. At the top is the picture of the unit.

-->'''Unit:[[Template:UNITNAME|UNITNAME]]''' <!--
--><span class=medal><!--
-->{{#ifeq:{{{rank|0}}}|0|{{RankRecruit}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|1|{{RankTrooper}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|2|{{RankVeteran}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|3|{{RankExpert}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|4|{{RankElite}}|}}<!--
--></span><!--
-->'''Origin: '''<!--
-->[[Warlord]] <!--
-->''' Requires:''' <!--
-->Warlord's Command<br/><!--

The first line, giving the unit's name, generating a link to it's template, drawing the medal, and noting where the unit comes from and what structure enables it's construction.

-->Tier I :<!--
--><span class=health>{{HealthCalc|hp=35|tier=1|rank={{{rank|0}}}|race={{{race|0}}}}}</span><!--
--> {{Health}} <!--
-->28 {{Movement}} <!--
--><span class=defense>{{DefenseCal|def=8|rank={{{rank|0}}}|race={{{race|0}}}|upgrade={{{upgrade|0}}}|upgrades={{{upgrades|0}}}|upgraded={{{upgraded|0}}}}}</span><!--
--> {{Defense}} <!--
--><span class=resistance>{{ResistanceCalc|res=8|rank={{{rank|0}}}|race={{{race|0}}}}}</span><!--
--> {{Resistance}} <!--
-->Cost: <span class="draconian hidden">130 {{Gold}} 40 {{Mana}}</span><span class="goblin hidden">117 {{Gold}} 27 {{Mana}}</span><span class="dwarf hidden">143 {{Gold}} 33 {{Mana}}</span><span class="norace frostling halfling highelf human orc">130 {{Gold}} 30 {{Mana}}</span><!--
--> Upkeep: <!--
-->4 {{Gold}}'''/'''{{Turn}}<br/><!--

This is the second line. The HealthCalc functions are wiki-templates that do the same calculations as the JS does, but this works in tooltips, whereas the JS did not(and might still not.). Therefore, to maintain the right information in tooltips, they should still be written as this. The cost sections should be set up like this, so that the JS will change the cost according to selected race.

---------------------------------########  Abilities
-->'''Abilities:'''<ul class="abilities col2list"><!--
--><li class="col2entry damage" <!--
                      -->data-type="melee" <!--
                      -->data-primary={{Readdamage|0}} <!--
                      -->data-physical="9" <!--
                      -->data-physicaldaminc1="1" <!--
                      -->data-physicaldaminc2="0" <!--
                      -->data-physicaldaminc3="1" <!--
                      -->data-physicaldaminc4="0"><!--
                      -->{{DamageAbil|Melee Strike|physical=9|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry damage norace draconian dwarf frostling halfling highelf orc human" <!--
                      -->data-type="ranged" <!--
                      -->data-primary={{Readdamage|0}} <!--
                      -->data-physical="11" <!--
                      -->data-physicaldaminc1="0" <!--
                      -->data-physicaldaminc2="1" <!--
                      -->data-physicaldaminc3="0" <!--
                      -->data-physicaldaminc4="1"><!--
                      -->{{DamageAbil|Shoot Light Crossbow|physical=11|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry damage goblin hidden" <!--
                      -->data-type="ranged" <!--
                      -->data-primary={{Readdamage|0}} <!--
                      -->data-physical="11" <!--
                      -->data-physicaldaminc1="0" <!--
                      -->data-physicaldaminc2="1" <!--
                      -->data-physicaldaminc3="0" <!--
                      -->data-physicaldaminc4="1" <!--
                      -->data-blight="4" <!--
                      -->data-blightdaminc1="0" <!--
                      -->data-blightdaminc2="0" <!--
                      -->data-blightdaminc3="0" <!--
                      -->data-blightdaminc4="0"><!--
                      -->{{DamageAbil|Shoot Light Crossbow|physical=11|blight=4|tt={{{tt|1}}}}}</li><!--

The ability header, and the damage abilities. The Header never needs change. The damage abilities require a primary damage channel(used to "open up" that channel, and to allow ranged damage upgrades, which always only take the primary channel), and a type(ranged/melee). After that, for every damage type, you must write the data for the class itself, and for all the damageincreases, even if all of them end up 0. This is because the JS checks only for the existance of the damage type, and then read the increases as well. For the ability itself, DamageAbil must be used, since this will generate the damage numbers that the JS can change.

--><li class="col2entry important">{{Abillink|Sprint|tt={{{tt|1}}}}} </li><!--
--><li class="col2entry hidden markbloodsacrifice">{{Abillink|Mark Blood Sacrifice|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Sabotage|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Walking|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Support|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|True Sight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden boundsoul">{{Abillink|Bound Soul|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden resurgence">{{Abillink|Resurgence|tt={{{tt|1}}}}}</li><!--

Insert the other abilities, giving every li element the col2entry class - the CSS will change this to a 2-column list. First note all the actives, and then the passive abilities. If an li element also has the important class, it will show up in small tooltips, but all important abilities must be noted above any others - the JS merely counts the amount of important classes that it shows, not the individual elements. For abilities caused by another ability, like True Sight.png True Sight being caused by Support.png Support, it should be noted directly down. However, the rule about active abilities is more important.

########    Being of normal Racial Traits. 
--><li class="col2entry hidden draconian">{{Abillink|Draconian|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Abillink|Fast Healing|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden dwarf">{{Abillink|Dwarf|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden dwarf">{{Abillink|Mountaineering|tt={{{tt|1}}}}}</li><!--
(Frostling Abilities)
--><li class="col2entry hidden goblin">{{Abillink|Goblin|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin dwarf">{{Abillink|Cave Crawling|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Abillink|Wetland Walking|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Abillink|Wetland Foraging|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Abillink|Halfling|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Abillink|Lucky|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden highelf">{{Abillink|High Elf|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling highelf">{{Abillink|Forestry|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden human">{{Abillink|Human|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden human">{{Abillink|Mariner|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc">{{Abillink|Orc|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc goblin dwarf">{{Abillink|Night Vision|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc">{{Abillink|Victory Rush|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry dedicatedtoevil hidden">{{Abillink|Dedicated to Evil|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry lifesteal hidden">{{Abillink|Life Steal|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry dedicatedtogood hidden">{{Abillink|Dedicated to Good|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden rank4">{{Abillink|Inflict Bleeding Wounds|tt={{{tt|1}}}}}</li><!--
########    Begin of Protections/Weaknesses
--><li class="col2entry hidden dwarf">{{Prot|20|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Prot|40|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden highelf">{{Weak|20|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Weak|20|Physical|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Prot|20|Fire|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Weak|20|Frost|tt={{{tt|1}}}}}</li><!--

Here concludes the list of abilities that are dependent on race or rank. Now, for some abilities(often fast healing), they can be bestowed in multiple ways. For example, if this units would get Fast Healing anyway on veteran rank, the ability under the Draconian abilities should be looking like this:

--><li class="col2entry hidden draconian rank2">{{Abillink|Fast Healing|tt={{{tt|1}}}}}</li><!--

All ways an ability can be obtained can be given to the same ability - this unsures that an ability can never be shown more than once.

In the case of abilities that appear at once rank and disappear at a later on(protections on a Draconian Crusher for example), the classes rankis2 and its variations will display an ability only when that specific rank is selected - or another of the classes that that ability has.

--></ul><div style="visibility: hidden;"><ul><li>The most in-elegant way to force a line break.<br/></li><li>The most in-elegant way to force a line break.<br/></li></ul></div><div style="visibility: hidden;" class="draconian halfling frostling dwarf goblin highelf orc human"><ul><li>The most in-elegant way to force a line break.<br/></li><li>The most in-elegant way to force a line break.<br/></li></ul></div><!--

This part is more important than it seems - when omitted, the CSS transforming the abilities in a list of 2 columns will force the subsequent text into a third next to the abilities. This part gets sucked in first, thereby preserving the desired markup. It might not be neat, but it works.

--><span class="size"><!--End span Size changer
####End of General Racial Variation####
--><span class="rank4inv">'''Experience Ranks:'''<br/><!--
--><ul><!--
--><li class="rank1inv">{{RankTrooper}} +1 {{Physical}} Melee +2 {{Health}}</li><!--
--><li class="rank2inv">{{RankVeteran}} +1 {{Physical}} Ranged +2 {{Health}} +1 {{Defense}}</li><!--
--><li class="rank3inv">{{RankExpert}} +1 {{Physical}} Melee +2 {{Health}} +1 {{Resistance}}</li><!--
--><li>{{RankElite}} +1 {{Physical}} Ranged +4 {{Health}} +1 {{Defense}}</li><!--
--></ul></span><!--

This is the level up table. Things noted here do not affect any calculations - however, the information should be correct to prevent confusion. the rankinv classes will hide these entries when their rank is obtained.

--><span class=norace>'''Unique Racial Effects:'''<!--
--><ul><!--
--><li>[[Humans]]: Cost: 55 {{Gold}} 10 {{Mana}}, Gains {{Abillink|Throw Net|tt={{{tt|1}}}}}</li><!--
--><li>[[Goblins]]: Cost: 45 {{Gold}} 10 {{Mana}}, Gains {{Abillink|Wetlands Concealment|tt={{{tt|1}}}}}</li><!--
--><li><span style="visibility:hidden;">Goblins: </span>Also gains + 4 {{Blight}} Ranged ({{Abillink|Shoot Light Crossbow|11 {{Physical}} 4 {{Blight}}|tt={{{tt|1}}}}})</li><!--
--><li>[[High Elves]]: Gains {{Abillink|Forest Concealment|tt={{{tt|1}}}}}</li><!--
--><li>[[Dwarves]]: Gains {{Abillink|Mountain Concealment|tt={{{tt|1}}}}}</li><!--
--></ul></span></span><!--
--></div><!--
--><noinclude>

This is the last part. Outside of units differing per race, this part should be omitted and replaced by:

--></span><!--
--></div><!--
--><noinclude>

In other cases, this is the part to write down differences to race that aren't applied to all units of that race. Like the experience table, it has no effect on the calculations, but still should be correct.

[[Category:Unit Data Templates]]
<br/>Accepted Overrides:<br/>
rank (0,1,2,3,4)<br/>
race (high elf, human, halfling, draconian, dwarf, orc, goblin, frostling)<br/>
upgrade,upgrades,upgraded (mystical city upgrade, all lowercase, normal spaces(example: altar of bound souls))<br/>
size(small, large)

Now adapted for changing values!
</noinclude>

Closing part of the template. Nothing special.

Class units example

<div class="template-unit " <!--
-->data-basehealth="35" <!--
-->data-basedefense="8" <!--
-->data-baseresistance="8" <!--
-->data-tier="1" <!--
-->data-size="{{{size|large}}}" <!--
-->data-initrank="{{{rank|0}}}" <!--
-->data-race="{{Readrace|{{{race|0}}}}}" <!--
-->data-initupg0="{{Readupgrade|{{{upgrade|0}}}}}" <!--
-->data-initupg1="{{Readupgrade|{{{upgrades|0}}}}}" <!--
-->data-initupg2="{{Readupgrade|{{{upgraded|0}}}}}"><!--
-->[[File:.png|right]]<span class="size unitSpecs {{#ifeq:{{{tt}}}|0|hidden|nothidden}}"><!--
--><span class="select-rank"></span> <span style="visibility:hidden;">m</span> <!--
--><span class="select-race"></span><!--
--><br/><!--
--><span class="select-upgrade"></span><!--
--><br/></span><!--  
-->'''Unit:[[Template:|]]''' <!--
--><span class=medal><!--
-->{{#ifeq:{{{rank|0}}}|0|{{RankRecruit}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|1|{{RankTrooper}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|2|{{RankVeteran}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|3|{{RankExpert}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|4|{{RankElite}}|}}<!--
--></span><!--
-->'''Origin: '''<!--
-->[[Warlord]] <!--
-->''' Requires:''' <!--
-->Warlord's Command<br/><!--
-->Tier I :<!--
--><span class=health>{{HealthCalc|hp=35|tier=1|rank={{{rank|0}}}|race={{{race|0}}}}}</span><!--
--> {{Health}} <!--
-->28 {{Movement}} <!--
--><span class=defense>{{DefenseCal|def=8|rank={{{rank|0}}}|race={{{race|0}}}|upgrade={{{upgrade|0}}}|upgrades={{{upgrades|0}}}|upgraded={{{upgraded|0}}}}}</span><!--
--> {{Defense}} <!--
--><span class=resistance>{{ResistanceCalc|res=8|rank={{{rank|0}}}|race={{{race|0}}}}}</span><!--
--> {{Resistance}} <!--
-->Cost: <span class="draconian hidden">130 {{Gold}} 40 {{Mana}}</span><span class="goblin hidden">117 {{Gold}} 27 {{Mana}}</span><span class="dwarf hidden">143 {{Gold}} 33 {{Mana}}</span><span class="norace frostling halfling highelf human orc">130 {{Gold}} 30 {{Mana}}</span><!--
--> Upkeep: <!--
-->4 {{Gold}}'''/'''{{Turn}}<br/><!--
---------------------------------########  Abilities
-->'''Abilities:'''<ul class="abilities col2list"><!--
--><li class="col2entry damage" <!--
                      -->data-type="melee" <!--
                      -->data-primary={{Readdamage|0}} <!--
                      -->data-physical="9" <!--
                      -->data-physicaldaminc1="1" <!--
                      -->data-physicaldaminc2="0" <!--
                      -->data-physicaldaminc3="1" <!--
                      -->data-physicaldaminc4="0"><!--
                      -->{{DamageAbil|Melee Strike|physical=9|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry damage norace draconian dwarf frostling halfling highelf orc human" <!--
                      -->data-type="ranged" <!--
                      -->data-primary={{Readdamage|0}} <!--
                      -->data-physical="11" <!--
                      -->data-physicaldaminc1="0" <!--
                      -->data-physicaldaminc2="1" <!--
                      -->data-physicaldaminc3="0" <!--
                      -->data-physicaldaminc4="1"><!--
                      -->{{DamageAbil|Shoot Light Crossbow|physical=11|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry damage goblin hidden" <!--
                      -->data-type="ranged" <!--
                      -->data-primary={{Readdamage|0}} <!--
                      -->data-physical="11" <!--
                      -->data-physicaldaminc1="0" <!--
                      -->data-physicaldaminc2="1" <!--
                      -->data-physicaldaminc3="0" <!--
                      -->data-physicaldaminc4="1" <!--
                      -->data-blight="4" <!--
                      -->data-blightdaminc1="0" <!--
                      -->data-blightdaminc2="0" <!--
                      -->data-blightdaminc3="0" <!--
                      -->data-blightdaminc4="0"><!--
                      -->{{DamageAbil|Shoot Light Crossbow|physical=11|blight=4|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Sprint|tt={{{tt|1}}}}} </li><!--
--><li class=col2entry>{{Abillink|Sabotage|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Walking|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Fast Healing|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Inflict Crippling Wounds|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Wall Climbing|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Irregular|tt={{{tt|1}}}}}</li><!--
########    Being of normal Racial Traits. 
--><li class="col2entry hidden draconian">{{Abillink|Draconian|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Abillink|Fast Healing|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden dwarf">{{Abillink|Dwarf|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden dwarf">{{Abillink|Mountaineering|tt={{{tt|1}}}}}</li><!--
(Frostling Abilities)
--><li class="col2entry hidden goblin">{{Abillink|Goblin|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin dwarf">{{Abillink|Cave Crawling|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Abillink|Wetland Walking|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Abillink|Wetland Foraging|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Abillink|Halfling|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Abillink|Lucky|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden highelf">{{Abillink|High Elf|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling highelf">{{Abillink|Forestry|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden human">{{Abillink|Human|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden human">{{Abillink|Mariner|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc">{{Abillink|Orc|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc goblin dwarf">{{Abillink|Night Vision|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc">{{Abillink|Victory Rush|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry dedicatedtoevil hidden">{{Abillink|Dedicated to Evil|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry lifesteal hidden">{{Abillink|Life Steal|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry dedicatedtogood hidden">{{Abillink|Dedicated to Good|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden rank4">{{Abillink|Inflict Bleeding Wounds|tt={{{tt|1}}}}}</li><!--
########    Begin of Protections/Weaknesses
--><li class="col2entry hidden dwarf">{{Prot|20|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Prot|40|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden highelf">{{Weak|20|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Weak|20|Physical|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Prot|20|Fire|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Weak|20|Frost|tt={{{tt|1}}}}}</li><!--
--></ul><div style="visibility: hidden;"><ul><li>The most in-elegant way to force a line break.<br/></li><li>The most in-elegant way to force a line break.<br/></li></ul></div><div style="visibility: hidden;" class="draconian halfling frostling dwarf goblin highelf orc human"><ul><li>The most in-elegant way to force a line break.<br/></li><li>The most in-elegant way to force a line break.<br/></li></ul></div><!--
--><span class="size"><!--End span Size changer
####End of General Racial Variation####
--><span class="rank4inv">'''Experience Ranks:'''<br/><!--
--><ul><!--
--><li class="rank1inv">{{RankTrooper}} +1 {{Physical}} Melee +2 {{Health}}</li><!--
--><li class="rank2inv">{{RankVeteran}} +1 {{Physical}} Ranged +2 {{Health}} +1 {{Defense}}</li><!--
--><li class="rank3inv">{{RankExpert}} +1 {{Physical}} Melee +2 {{Health}} +1 {{Resistance}}</li><!--
--><li>{{RankElite}} +1 {{Physical}} Ranged +4 {{Health}} +1 {{Defense}}</li><!--
--></ul></span><!--
--><span class=norace>'''Unique Racial Effects:'''<!--
--><ul><!--
--><li>[[Humans]]: Cost: 55 {{Gold}} 10 {{Mana}}, Gains {{Abillink|Throw Net|tt={{{tt|1}}}}}</li><!--
--><li>[[Goblins]]: Cost: 45 {{Gold}} 10 {{Mana}}, Gains {{Abillink|Wetlands Concealment|tt={{{tt|1}}}}}</li><!--
--><li><span style="visibility:hidden;">Goblins: </span>Also gains + 4 {{Blight}} Ranged ({{Abillink|Shoot Light Crossbow|11 {{Physical}} 4 {{Blight}}|tt={{{tt|1}}}}})</li><!--
--><li>[[High Elves]]: Gains {{Abillink|Forest Concealment|tt={{{tt|1}}}}}</li><!--
--><li>[[Dwarves]]: Gains {{Abillink|Mountain Concealment|tt={{{tt|1}}}}}</li><!--
--></ul></span></span><!--
--></div><!--
--><noinclude>

[[Category:Unit Data Templates]]
<br/>Accepted Overrides:<br/>
rank (0,1,2,3,4)<br/>
race (high elf, human, halfling, draconian, dwarf, orc, goblin, frostling)<br/>
upgrade,upgrades,upgraded (mystical city upgrade, all lowercase, normal spaces(example: altar of bound souls))<br/>
size(small, large)

Now adapted for changing values!
</noinclude>

Non-class unit example

<div class="template-unit " <!--
   -->data-basehealth="60" <!--
   -->data-basedefense="11" <!--
   -->data-baseresistance="11" <!--
   -->data-tier="2" <!--
   -->data-size="{{{size|large}}}" <!--
   -->data-initrank="{{{rank|0}}}" <!--
   -->data-race="-1" <!--
   -->data-summoned="true" <!--
   -->data-initupg0="{{Readupgrade|{{{upgrade|0}}}}}" <!--
   -->data-initupg1="{{Readupgrade|{{{upgrades|0}}}}}" <!--
   -->data-initupg2="{{Readupgrade|{{{upgraded|0}}}}}"><!--
-->[[File:.png|right]]<span class="size unitSpecs {{#ifeq:{{{tt}}}|0|hidden|nothidden}}"><!--
--><span class="select-rank"></span> <span style="visibility:hidden;">m</span> <!--
--><span class="select-race hidden"></span><!--
--><br/><!--
--><span class="select-upgrade"></span><!--
--><br/></span><!--  
-->'''Unit: [[Template:|]]''' <!--
--><span class=medal><!--
-->{{#ifeq:{{{rank|0}}}|0|{{RankRecruit}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|1|{{RankTrooper}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|2|{{RankVeteran}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|3|{{RankExpert}}|}}<!--
-->{{#ifeq:{{{rank|0}}}|4|{{RankElite}}|}}<!--
--></span><!--
-->'''Origin: '''<!--
-->[[Monsters]] <!--
--><!--''' Requires:''' 
--><br/><!--Barracks
-->Tier II :<!--
--><span class=health>{{HealthCalc|hp=60|tier=2|rank={{{rank|0}}}}}</span><!--
--> {{Health}} <!--
-->28 {{Movement}} <!--
--><span class=defense>{{DefenseCal|def=11|rank={{{rank|0}}}}}</span><!--
--> {{Defense}} <!--
--><span class=resistance>{{ResistanceCalc|res=11|rank={{{rank|0}}}}}</span><!--
--> {{Resistance}} <!--
-->Cost: 100 {{Gold}}<!--
--> Upkeep: <!--
-->8 {{Gold}}'''/'''{{Turn}}<br/><!--
--><i>Can be summoned with {{Spelllink|Summon  Animal}}(40 {{CastingPoints}} 6 {{Mana}}'''/'''{{Turn}})</i><br/><!--
---------------------------------########  Abilities
-->'''Abilities:'''<ul class="abilities col2list"><!--
--><li class="col2entry damage" <!--
    -->data-type="melee" <!--
    -->data-primary={{Readdamage|0}} <!--
    -->data-physical="8" <!--
    -->data-physicaldaminc1="1" <!--
    -->data-physicaldaminc2="0" <!--
    -->data-physicaldaminc3="1" <!--
    -->data-physicaldaminc4="0"><!--
                             -->{{DamageAbil|Melee Strike|physical=8|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry damage" <!--
    -->data-type="ranged" <!--
    -->data-primary={{Readdamage|0}} <!--
    -->data-physical="11" <!--
    -->data-physicaldaminc1="0" <!--
    -->data-physicaldaminc2="1" <!--
    -->data-physicaldaminc3="0" <!--
    -->data-physicaldaminc4="1"><!--
                             -->{{DamageAbil|Shoot Light Crossbow|physical=11|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Evolve| Elemental|tt={{{tt|1}}}}} </li><!--
--><li class=col2entry>{{Abillink|Projectile Resistance|tt={{{tt|1}}}}} </li><!--
--><li class=col2entry>{{Abillink|Night Vision|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Backstab|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Elemental|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Inflict Exhausting Fatigue|tt={{{tt|1}}}}} </li><!--
--><li class=col2entry>{{Abillink|Forest Concealment|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Wetlands Concealment|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Urban Concealment|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Mountain Concealment|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Floating|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Elemental|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Abillink|Magical Origin|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden supercharged">{{Abillink|Supercharged|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry dedicatedtoevil hidden">{{Abillink|Dedicated to Evil|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry lifesteal hidden">{{Abillink|Life Steal|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry dedicatedtogood hidden">{{Abillink|Dedicated to Good|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden rank2">{{Abillink|Inflict Frostbite|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden rank4">{{Abillink|Inflict Freezing Cold|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Prot|100|Blight|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Prot|40|Frost|tt={{{tt|1}}}}}</li><!--
--><li class=col2entry>{{Weak|40|Spirit|tt={{{tt|1}}}}}</li><!--
########    Begin of Protections/Weaknesses
--></ul><div style="visibility: hidden;"><ul><li>The most in-elegant way to force a line break.<br/></li><li>The most in-elegant way to force a line break.<br/></li></ul></div><!--
--><span class="size"><!--End span Size changer
####End of General Racial Variation####
--><span class="rank4inv">'''Experience Ranks:'''<br/><!--
--><ul><!--
--><li class="rank1inv">{{RankTrooper}} +1 {{Physical}} Melee +4 {{Health}}</li><!--
--><li class="rank2inv">{{RankVeteran}} +1 {{Physical}} Ranged +4 {{Health}} +1 {{Defense}}</li><!--
--><li class="rank3inv">{{RankExpert}} +1 {{Physical}} Melee +4 {{Health}} +1 {{Resistance}}</li><!--
--><li>{{RankElite}} +1 {{Physical}} Ranged +8 {{Health}} +1 {{Defense}}</li><!--
--></ul></span></span><!--
--></div><!--
--><noinclude>

[[Category:Unit Data Templates]]
<br/>Accepted Overrides:<br/>
rank (0,1,2,3,4)<br/>
race (high elf, human, halfling, draconian, dwarf, orc, goblin, frostling)<br/>
upgrade,upgrades,upgraded (mystical city upgrade, all lowercase, normal spaces(example: altar of bound souls))<br/>
size(small, large)

Now adapted for changing values!
</noinclude>

Mystical City Upgrades

These are the lines that have to be implemented for the applicable MCU's. The top line is for insertion in the outer Div of the unit, the others for their appropriate places in the ability list - preferable directly behind the abilities that enable them.


Machine:
-->data-machine="true" <!--
--><li class="col2entry hidden flowrockmachinery">{{Abillink|Flowrock Machinery|tt={{{tt|1}}}}}</li><!--

Irregular:
-->data-irregular="true" <!--
--><li class="col2entry hidden mercenary">{{Abillink|Mercenary|tt={{{tt|1}}}}}</li><!--

Support:
-->data-support="true" <!--
--><li class="col2entry hidden boundsoul">{{Abillink|Bound Soul|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden resurgence">{{Abillink|Resurgence|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden markbloodsacrifice">{{Abillink|Mark Blood Sacrifice|tt={{{tt|1}}}}}</li><!--

Summoned:
-->data-summoned="true" <!--
--><li class="col2entry hidden summoned">{{Abillink|Summoned|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden supercharged">{{Abillink|Supercharged|tt={{{tt|1}}}}}</li><!--

Armored:
-->data-armored="true" <!--
--><li class="col2entry hidden enchantedarmor">{{Abillink|Enchanted Armor|tt={{{tt|1}}}}}</li><!--

Infantry:
-->data-infantry="true" <!--
--><li class="col2entry hidden killingmomentum">{{Abillink|Killing Momentum|tt={{{tt|1}}}}}</li><!--

Archer:
-->data-archer="true" <!--
--><li class="col2entry hidden focused">{{Abillink|Focused|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden mindcontrolimmunity">{{Abillink|Mind Control Immunity|tt={{{tt|1}}}}}</li><!--

Pikeman:
-->data-pikeman="true" <!--
--><li class="col2entry hidden stylite">{{Abillink|Stylite|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden projectileresistance">{{Abillink|Projectile Resistance|tt={{{tt|1}}}}}</li><!--

Mounted:
-->data-mounted="true" <!--
--><li class="col2entry hidden vigorousmount">{{Abillink|Vigorous Mount|tt={{{tt|1}}}}}</li><!--   
--><li class="col2entry hidden highmorale">{{Abillink|High Morale|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden freemovement">{{Abillink|Free Movement|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden fasthealing">{{Abillink|Fast Healing|tt={{{tt|1}}}}}</li><!--

Racial Difference

These are the generic differences between the races. They should already be included in the class unit template, but just for reference:

--><li class="col2entry hidden draconian">{{Abillink|Draconian|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Abillink|Fast Healing|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden dwarf">{{Abillink|Dwarf|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden dwarf">{{Abillink|Mountaineering|tt={{{tt|1}}}}}</li><!--
(Frostling Abilities)
--><li class="col2entry hidden goblin">{{Abillink|Goblin|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin dwarf">{{Abillink|Cave Crawling|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Abillink|Wetland Walking|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Abillink|Wetland Foraging|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Abillink|Halfling|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Abillink|Lucky|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden highelf">{{Abillink|High Elf|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling highelf">{{Abillink|Forestry|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden human">{{Abillink|Human|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden human">{{Abillink|Mariner|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc">{{Abillink|Orc|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc goblin dwarf">{{Abillink|Night Vision|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden orc">{{Abillink|Victory Rush|tt={{{tt|1}}}}}</li><!--
########    Begin of Mystical City Upgrades

########    Begin of Protections/Weaknesses
--><li class="col2entry hidden dwarf">{{Prot|20|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden goblin">{{Prot|40|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden highelf">{{Weak|20|Blight|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden halfling">{{Weak|20|Physical|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Prot|20|Fire|tt={{{tt|1}}}}}</li><!--
--><li class="col2entry hidden draconian">{{Weak|20|Frost|tt={{{tt|1}}}}}</li><!--

Damage Write

This is the grouping of damage modifiers that should make up the "Strength" part of any damage ability, and provides handles for the JS to change the damage inside the tooltip dependent on the selected unit rank, race and upgrades.

{{{1|<span class="writedamage"><!--         List of Damage types and according tags:
--><span class="physical {{{physical|hidden}}}"><span class=physicalval>{{{physical|10}}}</span> {{Physical}} </span><!--
--><span class="spirit {{{spirit|hidden}}}"><span class=spiritval>{{{spirit|10}}}</span> {{Spirit}} </span><!--
--><span class="blight {{{blight|hidden}}}"><span class=blightval>{{{blight|10}}}</span> {{Blight}} </span><!--
--><span class="shock {{{shock|hidden}}}"><span class=shockval>{{{shock|10}}}</span> {{Shock}} </span><!--
--><span class="fire {{{fire|hidden}}}"><span class=fireval>{{{fire|10}}}</span> {{Fire}} </span><!--
--><span class="frost {{{frost|hidden}}}"><span class=frostval>{{{frost|10}}}</span> {{Frost}} </span></span>}}}
Advertisement