This articles 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 |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 }} |} |
|
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.
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
- ↑ Also check out the strategy section, it's brilliant.