Total War: WARHAMMER Wiki
Advertisement

This article is an introduction to the rather complex system of infoboxes used on the wiki. Fear not, it's actually somewhat less complicated than it appears.

Overview[]

In order to match the complexity of the Total War system and avoid hardcoding data into pages (which is a bit of a bad idea come every patch), the wiki breaks down the information into a system of templates. Let's use Spearmen (Shields) as an example.[1] The markup is as follows:

{{Infobox unit
|image      =wh_main_emp_spearmen_shield.png
|faction    =[[Empire]]
|type       =[[File:infantry_spear.png|right|30px]] Empire spear infantry
|general    ={{wh_main_emp_inf_spearmen_1 general}}
|main       ={{wh_main_emp_inf_spearmen_1 main}}
|melee      ={{wh_main_emp_spear}}
|ranged     =
|armor      ={{wh_main_emp_light}}
|shield     ={{wh_missile_block_30_metal}}
|attributes ={{wh_chargeReflectorVsL_hideForest}}
|unit size = 120
|unit speed =31
}}

Several fields are self-explanatory. The image is either the in-game shot or the army bar portrait of the unit in question. Faction, type, unit size, and speed are also easy to follow. But what in Sigmar's name is the rest of those?

Breakdown[]

Each template belongs to a specific category and defines a portion of the unit's properties. The following table breaks these relationships down. First comes the base infobox, then the constituent templates from top to bottom.

{{Infobox unit
|image      =wh_main_emp_spearmen_shield.png
|faction    =[[Empire]]
|type       =[[File:infantry_spear.png|right|30px]] Empire spear infantry
|main       ={{wh_main_emp_inf_spearmen_1 main}}
|general    ={{wh_main_emp_inf_spearmen_1 general}}
|melee      ={{wh_main_emp_spear}}
|ranged     =
|armor      ={{wh_main_emp_light}}
|shield     ={{wh_missile_block_30_metal}}
|attributes ={{wh_chargeReflectorVsL_hideForest}}
|unit size = 120
|unit speed =31
}}

 
 
 
 
 
 
Template:wh_main_emp_inf_spearmen_1 main
The main template in this category. This is the first of a pair of templates that define the general properties of a unit. This particular one defines the faction properties: Buildings required, upkeep, recruitment (in single and multi player modes) etc.
The data for this template is imported from db/main_units_tables.
 
For standardized formatting, all templates use Template:Unit main.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Template:wh_main_emp_inf_spearmen_1 general
The general template in this category. This is the second of a pair of templates that define the general properties of a unit. This particular one defines their health, leadership, speed, attack skills, and charge bonus (if any).
The data for this template is imported from db/land_units_tables.
 
For standardized formatting, all templates use Template:Unit general.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Template:wh_main_emp_spear
The weapon template in this category. These templates define the damage the unit does; melee weapons go in the melee field, ranged in the ranged field.
The data for this template is imported from db/melee_weapons_tables or db/projectiles_tables
 
For standardized formatting, all templates use Template:Unit weapon.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Template:wh_main_emp_light
The armor template in this category. These templates define the unit's innate protection.
The data for this template is imported from db/unit_armour_types_tables
 
For standardized formatting, all templates use Template:Unit armor.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wh_missile_block_30_metal
The shield template in this category. These templates define the unit's shield (if any).
The data for this template is imported from db/unit_shield_types_tables
 
For standardized formatting, all templates use Template:Unit shield.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Template:wh_chargeReflectorVsL_hideForest
The attributes template. This one is very complex and the finished template is placed in this category.
 
Each bulletpoint set bases on templates in this category, which combine individual properties into sets.
Each attribute group bases on data from db/unit_attributes_to_groups_junctions_tables
 
And each of these, in turn, relies on templates here, which base on the localization strings in text/unit_attributes__.loc
 
 
 

Bulletpoints[]

  • The bulletpoints in the main body of the article are based on db/ui_unit_bullet_point_unit_overrides_tables. The localizations are contained within text/db/ui_unit_bullet_point_enums.loc.

Total War: Warhammer III updates[]

  • With the release of the final Total War game set in the Warhammer Fantasy universe, our infoboxes did change somewhat. The most important element is the inclusion of the id variable (id = ), which uses the unit's internal name (eg. wh_main_emp_inf_spearmen_0) to pull data directly from templates. Most of these use the #switch parser function.
  • The ID is used by the Infobox template to set a variable (unit_id), which is then passed to the different Switch templates automatically:
  • To update the infoboxes with new units, be sure to set the right unit id, then add entries to the above templates as necessary.
  • Note: The above behavior only happens when corresponding infobox fields are left entry, otherwise, whatever's in the article overrides it.
Other functions
  • Notably, the next infobox comes with separate fields for races (race = ) and factions (faction = ). Race should be input without brackets and will be parsed as-is. Furthermore, the infobox autocategorizes the unit based on the race field and the type input. For the sake of consistency, top-level categories should only use the top categories found in the army builder menu accessible in the game.

Notes[]

It's a bit on the complex side. Here are some more notes:

  • The basic convention is to retain the internal configuration name (wh_main_emp_inf_spearmen_1 in this case) where possible, for consistency. Main and general templates are distinguished by the suffix.
  • It's best to use the base templates mentioned above to add new units, otherwise you're going to get a headache.
  • Seriously, this is very complex. Scream at Tagaziel very loud if something's unclear.

References[]

  1. Also check out the strategy section, it's brilliant.
Advertisement