Fandom

Age Of Wonders 3 Wiki

Tooltips

137pages on
this wiki
Add New Page
Comments0 Share

This Page will give an overview of the existing tools and templates that enable the editors to insert unit/ability/spell tooltips or their general information inside and article.


Displaying TooltipsEdit

Tooltips are called with their respective Templates. There is one template made specifically to summon the tooltips to your text.

Be aware that linking to tooltips - in all circumstances - require perfect spelling. Generally, the rules for this are those basic one for naming used everywhere on every wikia; First letter is a capital letter, first letters of important words are capital letters as well, and all others are lowercase. Examples:

Note that there are certain abilities, like BackGroundTry Heart of the Arctic, that also exist as something else - in this case a building. These must be names with a (Ability) suffix, like this:

{{Abil|Heart of the Arctic(Ability)}}

Which becomes:
BackGroundTry Heart of the Arctic
When forgotten, you'll usually end up with an error like this: 20px Heart of the Arctic

As a general note, all other parameters must be completely in lowercase, which means 'altar of bound souls", not "Altar of Bound Souls", as the visible naming system would suggest. This is implemented to reduce the amount of coding mistakes that can be made. The ONLY parameters that allow capital letters are: name= and (linked object name).

Ability TooltipsEdit

To display an Ability tooltip, you will need the {{Abil|...}} Template. This will generate a tooltip, for example:

{{Abil|Seduce}}

Which will become:
Seduce Seduce.

By default, all tooltips will use the name of the ability they link to as text. If this is not desired, you can use the name override, for example:

{{Abil|Seduce|name=Some Text}}

Which will become:
Some Text.

Some abilities however, will require some more work. For example, take

{{Abil|Shoot Bow}}
.

This will result in the Shoot Bow Shoot Bow tooltip, with the ability's base damage, 8 Physical Text. However, a Mounted Archer has a stronger version - for 10 Physical Text damage. To change the shown value, you can enter a new damage after the ability name, like this:

{{Abil|Shoot Bow|10 {{Physical}}}}

Which results in Shoot Bow Shoot Bow(10 Physical Text). This allows any other damage types, like for example when the Mounted archer is build in a city with a Focus Chamber. In this case, you'll need to write:

{{Abil|Shoot Bow|12 {{Physical}} 1 {{Shock}}}}

Resulting in Shoot Bow Shoot Bow(12 Physical Text 1 Shock Text). Note, however, that correctly called Unit tooltips will already show the correct values.

Lastly, the automatically displayed Icon in front of the ability can be removed by adding pic=no as an additional argument; for example:

{{Abil|Shoot Bow|pic=no}}

Becomes: Shoot Bow
Note that filling in the name parameter will also have this effect, to make it easier to use in larger blocks of text. If you want a picture while the name has been included, supply a pic=yes as parameter.

{{Abil|Shoot Bow|pic=yes|name=Some Text}}

Becomes: Shoot Bow Some Text


Supported Overrides for the {{Abil|...}} Template:

Override Example
Damage
{{Abil|Shoot Bow|12 {{Physical}} 1 {{Shock}}}}
Shoot Bow Shoot Bow(12 Physical Text 1 Shock Text)
Display name
{{Abil|Shoot Bow|name=Text}}
Text
Picture
{{Abil|Shoot Bow|pic=no}}
Shoot Bow

Protections and WeaknessesEdit

Elemental Protections and Weaknesses follow a slightly different form, because of the fact that they show magnitude before the ability name in-game, they have seperate templates.

Elemental Protections should be called as follows:

{{Prot|(Magnitude)|(Element)}}

So for example:

Goblins have {{Prot|40|Blight}}

Which will become: Goblins have Blight Protection 40%Blight Text Protection

Weaknesses are almost the same, but should be called with "Weak" instead of "Prot". For example:

High Elves have {{Weak|20|Blight}}

Which will become: High Elves have Blight Weakness 20% Blight Text Weakness

As with other abilities, Protections and Weaknesses accept the name= and pic= overrides.

Unit TooltipsEdit

Unit Tooltips have some more options. In the case of abilities, all the variation there is might be some higher or lower damage values and durations - Units have experience ranks, Mystical City Upgrades, and in the case of Class units, differing races. All of these can be specified with the {{Unit|...}} Tooltip.

A basic use is just like the {{Abil|...}} Tooltip, to just show a unit's most basic statistics. For example, use:

{{Unit|Scoundrel}}

for a basic Scoundrel tooltip, showing the most basic of abilities, along with where to get it. The Tooltips will provide some basic information, along with the means of transportation - note Grimbeak Crows shows a flying Icon for movement. However, to show some more information about it, use;

{{Unit|Scoundrel|size=large}}

To show the Scoundrel in all it's glory. Since the Scoundrel is a class unit, this will show the basic unit, along with the special effects a certain race has on this unit. However, it's also possible to tell it what race to use for the Template, by stating:

{{Unit|Scoundrel|size=large|race=goblin}}

Which will make the Tooltip calculate the Scoundrel's new stats, lowering Health Text Health, and giving it new goblin abilities, and even the +4 Blight Text Damage in it's Shoot Light Crossbow. However, note that this is needed only on Class units that exist in multiple races; for Racial or non-race units, those stats are already included. Also, the cost is not updated for the goblin and dwarf races, but all other stats and abilities are.
NOTE:Providing a Race on a unit that already has one, may lead to inaccurate stats.
If you want to show how strong your scoundrel was at Gold Medal Text Elite Rank, you can also specify it's experience rank. This is done like this:

{{Unit|Scoundrel|size=large|rank=4}}

This will show a nice Scoundrel Tooltip, complete with updated stats according to it's leveling bonuses. Also, any obsolete Ranks will be automatically omitted, see for example this Scoundrel, which has only two experience ranks to go before he's Elite.

As with the "{{Abil|...}}" Tooltips, you can use the name= override to display another name.

This {{Unit|Scoundrel|size=large|name=Rogue Irregular}} has no race.

This Rogue Irregular has no race.

Lastly, you can specify any Mystical City Upgrades that affect a unit's statistics. This will affect a unit's abilities, for example with a Altar of Bound Souls in a city where you build a Succubus.

{{Unit|Succubus|size=large|upgrade=altar of bound souls}}

Will give Succubus - note it's raised Resistance Text Resistance and the added Resurgence Resurgence. For a unit where 2 Mystical City upgrades apply, use upgrades as the next tag:

{{Unit|Succubus|size=large|upgrade=altar of bound souls|upgrades=blood altar}}

to get: Succubus
NOTE: Any and all Mystical City Upgrades that are wrongly given are almost guaranteed to cause erroneous information to show up.
List of possible Mystical City Upgrades(MCU):

Parameter Only use for:
altar of bound souls Support Support Units
arcane catalyst Cast Spell Summoned Units units
blood altar Support Support Units
enchanted armory Armored Armored Units
flowrock citadel Machine Machine Units
focus chamber Archer Archer Units
mercenary camp Irregular Irregular Units
pillar of the stylites Pikeman Pikeman Units
slaughter pits Infantry Infantry Units
stables of vigor Mounted Mounted Units

Supported Overrides for the {{Unit|...}} Template:

Override Example Allowed Parameters
Tooltip Size
{{Unit|Scoundrel|size=large}}
Scoundrel small/large
Class unit race
{{Unit|Scoundrel|race=goblin}}
Scoundrel dwarf/draconian/halfling/human/high elf/goblin/orc
Experience Rank
{{Unit|Scoundrel|rank=4}}
Scoundrel 0/1/2/3/4
Displayed name
{{Unit|Scoundrel|name=Rogue Irregular}}
Rogue Irregular Anything
Mystical City Upgrade 1
{{Unit|Dwarf Forge Priest|upgrade=enchanted armory}}
Dwarf Forge Priest Applicable MCU only
Mystical City Upgrade 2
{{Unit|Dwarf Forge Priest|upgrades=altar of bound souls}}
Dwarf Forge Priest Applicable MCU only
Mystical City Upgrade 3
{{Unit|Dwarf Forge Priest|upgraded=blood altar}}
Dwarf Forge Priest Applicable MCU only

Displaying Information TablesEdit

Ability TablesEdit

Aside from the Tooltips, you can also put the content directly on the page. For example, this is done on the Unit's home pages, and on the Abilities page - beware, loading time ahead. At the moment of writing, there are 389 Ability Template pages, which are listed under their respective Special:Categories.

To display a information table, best is to directly call its Template, like this:

{{Break Control}}

which results in:

Ability: Break Control Strength: 100%
Type: Active Subtype: Buff Range: Touch
Break Control Removes all Mind Control effects and Spirit Text debuffs and gives Strong Will Strong Will for 1 Turns Text to target unit

Calling the Template directly of course also allows for the usual overrides:

{{Shoot Bow|10 {{Physical 2 {{Shock}}}}
Ability: Shoot Bow Strength: 10 Physical Text 2 Shock Text
Type: Active Subtype: Damage Range: Medium
Shoot Bow Shoots arrows at target enemy unit.
  • Does less damage at long range
  • Can trigger up to 3 times
  • Arcing Shot
  • Cannot be used while unit is engaged

The only overrides that cannot be used, are the name= and pic= overrides, since they don't do anything in the template itself, but are only used by the tooltip generator.

Unit TablesEdit

Unit tables follow the same rules as the Tooltips, and allow the same overrides, of course with the exception of the name override. These have an additional override, and providing show=yes as a argument, will provide a link to the source template - this will allow for easy access to editing the template, for example to update it's stats after a new patch. Standard, this is enabled on the main pages.

Creating TooltipsEdit

So you're in for some creation work? Good - I can use the help.

The following parts will assume you are using the Source Editor - its what I use, and I honestly don't know how to do all this in the visual Editor.

Creating Ability TooltipsEdit

Creating Ability Tooltips starts out from the Template:Newability Template. From there, copy-paste into the new Template of the right name, and change all lines to the good values. Feel free to click publish to see where you are, and resume editing after - it can be hard to predict how a table will look from the editing(or even the preview) mode.

The general rule is that the Tooltips must look easy to read, and the importance of this trumps most other rules noted here.

Displaying Override ValuesEdit

In the Ability Tooltips, use {{{1|DEFAULT VALUE}}} to display the provided override Values. Replace DEFAULT VALUE with the ability's default value - if it has one. Otherwise, leave N/A or a similar message to show when there is no override specified.

It is recommended to change the table's column width's to show the ability's name as well as damage/magnitude without causing line breaks. Used ways to ensure this include removing the range(if not applicable anyway), or moving it to the second row. Also, it is possible to relocate and adjust the colspan values for finetuning.

Specifically for abilities, there is a duration= override. However, most Templates only accept the magnitude override. However, on the long term, it would be nice if they accepted the duration as well. If a value should accept duration foremost, and Magnitude if Duration isn't supplied, use: {{{duration{{{1|DEFAULT VALUE}}}}}}.

Creating Spell TooltipsEdit

Spell tooltips are very similar to the Ability Tooltips, but originating from Template:NewSpell, which carries a series of forms to choose from, since a Summon Spell is going to use a lot of parameters that an Empire Upgrade doesn't use.

LinkingEdit

To link from an ability to another one, do NOT use Abil or Abillink. For this purpose, there are the Status, Status2 and Status3 Templates. These function almost exactly the same, and will prevent the occurrence of Template Loops. Start with Status, and move up in number only if you get Template Loop Errors.

Furthermore, you must always pass tt={{{tt|1}}} as a argument. This will tell the Tooltip generating Templates not to try and put tooltips inside an existing tooltip - which leads to misrendering or tooltips, insubordinate load times, and hard to track down template loop errors.

General form of linking:

{{Status|ABILITYNAME|MAG OVERRIDE|tt={{{tt|1}}}}} 

Or course replacing Abilityname and Mag override with the correct values. In the case of Status Effects, the MAG OVERRIDE corresponds to Duration rather than effect, to accomodate for differences like those of Stunned Inflict Stun and Stunning Touch Stunning Touch, which give different durations.

Linking to other templates:
Linking to other templates OUTSIDE of the ability kind, should be done with the special templates made for this; these are the same as those used on normal pages, but with an added -link. So, don't use {{Unit|...}}, but use {{Unitlink|...}}. Also, be sure to pass the tt={{{tt|1}}} argument - the same rules about tooltips-in-tooltips apply here as well as within the ability tooltips themselves.

Unit TooltipsEdit

Unit tooltips are far more complicated than the Ability ones. Best is to start at Template:NewUnit, and copy-paste that into the Template of the Unit you're making. It contains functional logic of most situations, and if you don't delete the wrong parts, it should all work fine. Also, the NewUnit template page contains example code for all Mystical City Upgrades.

Unit Override ValuesEdit

The Unit Templates should accept the following overrides:
race:
Only on units that can have a different race, which are currently just the racial-different class units and the laborers. Supplying this variable will allow for automatic inclusion of the racial differences between the Calc templates, and serve to compare with the #ifeq: template logic for the inclusion of race-specific stats. The General Racial differences have been included in the NewUnit template, and should be left untouched most of the time, unless they have overlap with the Unit's inherent abilities.
rank:
This allows to include a certain Medal Rank in the tooltips, to accordingly update stats and add abilities, and to hide certain parts of the the Experience header, such that only the unearned bonuses will be shown. This should also always be supplied to the Calc templates, so that those values will also update for any provided rank.
upgrade, upgrades, upgraded:
The names stems from a time when the Javascript didn't allow numbers as variables; though that has been resolved, this workaround had already been chosen. These allow for the passing of Mystical City Upgrades, and the Masters' Guild for the Builder(which gets Repair Machine Repair Machine when build in a city where the Master's guild is present - just like how the Mystical City Upgrades are applied.) These must be passed to the appropriate Calc Templates, as well as used to add the correct abilities. For the exact lines used, see Template:NewUnit#Mystical City Upgrade Support, where there is specified what should be done for each classification that triggers Mystical City Upgrades.
size:
This override specifies whether all unit specs should be shown, or just the basic ones. This is included in the NewUnit tooltip, and should work fine.
show:
if show=yes, than this will show an link to the template you're making on the page where it is used. This allows for easy updating of the template. This is included in the NewUnit tooltip, and should work fine.

Calculation TemplatesEdit

The Unit templates have highly varying values for a lot of stats. The numeric stats can be calculated with the help of several templates, being Template:DamageCalc, Template:HealthCalc, Template:DefenseCalc and Template:ResistanceCalc. All these have a basic description of their working as well as which variables they must be passed to function, with examples of different units.

These Templates will calculate their values out of the provided parameters - they all need a base value, and they will add increases based on rank, race and, if supplied, Mystical City Upgrades.


DamageCalc
Will calculate any damage values. It accepts the type= parameter, which will allow you to apply racial effects. This parameter should ONLY be passed on physical damage, and does nothing unless a recognized race is supplied as well. The type= parameter only accepts "ranged" and "melee".

To incorporate rank bonuses, it has the daminc1=, daminc2=, daminc3= and daminc4= parameters. Since the scaling of damage effects is different among all units, these can be used to pass the magnitude of the damage increase with the ranks trooper, veteran, expert and elite respectively. These do NOT differentiate between damage type. These will do nothing at all if no rank= has been specified. See Template:DamageCalc for more details.


HealthCalc:
This calculates the units health. It need the base health and tier, and can incorporate race bonuses when supplied. The upgrade-family should only be passed for machines. No scaling for tier can be specified, as this is uniform across all units. However, it does need the rank= parameter for this.


DefenseCalc, ResistanceCalc:
These calculate defense and resistance respectively. Both of them require base value, rank, and allow Mystical city upgrades. Since the rank bonuses are uniform across all units, no scaling can be specified.

Unit AbilitiesEdit

The abilities are displayed in a 2-column list to spare space. However, while creating the template, it is usually best for clarity to have them all listed at a maximum of 1 per line. This will allow you to easier compare them to check for doubles, and verify their conditions. The inherent ones are listed at the top, with the actives above the passives. It is preferred to keep it in this order, even if active abilities(like Steal Enchantment Steal Enchantment) are added to the list. These can be added in the middle without affecting layout.

Keep the Tome of Wonders on the side as the abilities are filled in. In the case of class units, make sure to compare them side-by-side to make sure the given stats are really those of the base unit. There are seperate headers(inside comment marks), which will show the location of the different conditions that can add abilities, ranging from rank and race to Mystical city upgrades.

Once all abilities have been verified, remove all newlines among the conditional abilities. If you don't there will be shown large whitespaces in the list once the Template has been published. this is because when none to the conditions has been met, nothing will show up, and the Wikia will interpret it as a lot of newlines - and render them. However, not including manual newlines in the source editor WILL prevent this.

Above part should be obsolete when creating new templates, but on old ones it is required to understand.

ExperienceEdit

When editing the Experience, be sure not to mess up the according logic, as it takes a while to debug them if you do. As long as you stay between the <li> and </li> tags, you should be fine. Note that Defense and Resistance never change, and health is always equal to 2*tier, except for elite rank, where it's 4*tier.

Racial SpecificsEdit

Needless to say, remove this part unless you're making a racial different class unit. This is the place to note all the special abilities certain races get with this unit that not all units of this race have, like for example Throw Net Throw Net for most HumanIcon Human Irregular Irregulars. When it's changed be sure to also note down changed Cost here, as well as include it in the logic for the cost.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.