Template:MHS ToHit

From Stiki

Jump to: navigation, search

This template constructs a table of probabilities for To Hit rolls in the Shooting Phase for games of Warhammer 40,000. The To Hit roll is based on the attacker's Ballistic Skill. Optionally some weapons allow failed To Hit rolls to be re-rolled. There are further some additional weapons with special rules that supersede the normal rules.

The template copes with all of these variations, displaying up to three columns of probabilities in the body of the table, with units types split by Ballistic Skill defining the rows, and weapons split by different rules as the column headers. Any unnecessary rows or columns are not shown.

Usage

{{MHS_ToHit | Weapons | Reroll | Special |
 BS10 | BS9 | BS8 | BS7 | BS6 | BS5 | BS4 | BS3 | BS2 | BS1 | BS0 |
 Special10 | Special9 | Special8 | Special7 | Special6 | Special5 |
 Special4 | Special3 | Special2 | Special1 | Special1}}

Where:

  • 'Weapons' is the text to display as the header for the first column of weapons. These are weapons that roll To Hit normally. If left blank, "All other weapons" will appear as the header for that column. If all three of 'Weapons' and Reroll and 'Special' are left blank, "All weapons" will appear as the header for the column.
  • 'Reroll' is the text to display as the header for the second column of weapons. These are weapons that re-roll failed To Hit rolls. If left blank, no second column of probabilities will be shown.
  • 'Special' is the text to display as the header for the third column of weapons. These are weapons that have special rules for making To Hit rolls. If left blank, no third column of probabilities will be shown.
  • 'BS10' to 'BS0' are the strings of text to display as the unit names for each Ballistic Skill from 10 to 0 respectively. They will appear in descending order in the leftmost column. If left blank, no row will appear for that Ballistic Skill value.
  • 'Special10' to 'Special0' are the probabilities to display for the 'Special' column for each Ballistic Skill from 10 to 0 respectively. If left blank, the cell contents in the third column of probabilities will be left blank.

Note that the parameters are named as above, so arguments can be passed directly by parameter name. For example:

{{MHS_ToHit | Weapons=Bolter | BS4=Space Marines}}

Template code

Probability of hitting with a ranged weapon
Model \ WeaponAll weapons
Personal tools