40k Crusade Traits

Warhammer 40k

Description (more info)

Consolidated dice roller for Battle Traits and/or Battle Scars in Warhammer 40k Crusades.

This chart supports all Battle Honor and Battle Scar tables for a variety of factions and source books. It can also be configured to display the unit name so the chart can be embedded directly into webpages or displayed by the Twelves discord bot.

1) Enter your desired faction or source book.
2) Enter your desired trait Type or enter "None" to display valid options.
3) (Optional) Add a descriptive name for the unit, e.g. "Ultramarines Terminator Captain Octavius"

This chart uses input variables
Result

{% _faction = lower input:Faction %}

{# See if we get exactly one match on the main table #}
{% factions = get_chart cols:1 id:103912 %}
{% matches = filter pattern:_faction source:factions %}

{# If we don't have an exact match, try to salvage the situation using the aliases table #}
{%if matches.size != 1%}
{% aliases = get_chart id:104358 %}
{% matches = filter cols:1 pattern:_faction source:aliases %}
{%if matches.size == 1%}
{% _faction = roll_chart cols:2 filter:_faction filter_cols:1 id:104358 %}
{%end%}
{%end%}

{# If we have a match, get our results #}
{%if matches.size == 1%}
{% result = roll_chart cols:2 filter:_faction filter_cols:1 id:103912 %}
{% is_error = filter pattern:result source:[Error] %}
{%if is_error.size < 1 and Name != "(Optional) Unit Name"%}
{% _type = lower input:Type %}
{% is_battlescar = filter pattern:"scar" source:[_type] %}

{$Name} is rolling a {{ if_true condition:{is_battlescar.size>0} else:"Battle Honor" then:"Battle Scar" }}!

{%end%}
{$result}

{# If we have no matches or too many matches, print some helpful text. #}
{%else%}
{%if _faction == "none"%}
Welcome to the Battle Trait roller for Warhammer 40k Crusade!
Please enter the following input_vars:
- Faction: a supported source book or faction from the list below
- Type: unit keyword for the desired Battle Honor table, or "Battle Scar"
- (Optional) Name: a descriptive unit name, such as "Ultramarines Terminator Captain Octavius"
{%else%}
Error while rolling a Battle Trait: Faction "{$Faction}" has no match or too many matches!
{%end%}

Supported factions and sources are: '{{ title input:{{ join sep:"', '" source:factions }} }}'

Partial matches and common alternate/abbreviated names are accepted as long as they match a single result.
"Space Marines" is allowed as a special case because of course it is.
{%end%}

Subcharts

Factions (d15)

d15 Source Result

1

core

Roll on "40k Crusade Core Traits"

2

pariah nexus

Roll on "40k Crusade Pariah Nexus Traits"

3

space marines (adeptus astartes)

Roll on "40k Crusade Space Marine Traits"

4

adepta sororitas

Roll on "40k Crusade Adepta Sororitas Traits"

5

adeptus custodes

Roll on "40k Crusade Adeptus Custodes Traits"

6

adeptus mechanicus

Roll on "40k Crusade Adeptus Mechanicus Traits"

7

agents of the imperium

Roll on "40k Crusade Agents of the Imperium Traits"

8

astra militarum

Roll on "40k Crusade Astra Militarum Traits"

9

chaos space marines

Roll on "40k Crusade Chaos Space Marines Traits"

10

aeldari

Roll on "40k Crusade Aeldari Traits"

11

genestealer cults

Roll on "40k Crusade Genestealer Cults Traits"

12

necrons

Roll on "40k Crusade Necrons Traits"

13

orks

Roll on "40k Crusade Orks Traits"

14

tau

Roll on "40k Crusade Tau Traits"

15

tyranids

Roll on "40k Crusade Tyranids Traits"

Aliases (d9)

d9 Alias Result

1

space marines adeptus astartes

adeptus astartes

2

sisters of battle battle sisters

adepta sororitas

3

adeptus mechanicus admech

adeptus mechanicus

4

imperial agents inquisition

agents of the imperium

5

csm

chaos space marines

6

gsc

genestealer cults

7

imperial guard ig

astra militarum

8

eldar

aeldari

9

t'au empire tau empire

tau