Template:Infobox creature: Difference between revisions
Jump to navigation
Jump to search
(Code cleanup, fix level display (don't display hidden level).) |
(Further code cleanup.) |
||
Line 39: | Line 39: | ||
<!-- Saving throw bonuses --> | <!-- Saving throw bonuses --> | ||
{{#lvardef: | {{#lvardef: str_save | {{plus if pos | {{#lvar:str_mod}} {{#if: {{{str save prof|}}} | {{#lvar:prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: dex_save | {{plus if pos | {{#lvar:dex_mod}} {{#if: {{{dex save prof|}}} | {{#lvar:prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: con_save | {{plus if pos | {{#lvar:con_mod}} {{#if: {{{con save prof|}}} | {{#lvar:prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: int_save | {{plus if pos | {{#lvar:int_mod}} {{#if: {{{int save prof|}}} | {{#lvar:prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: wis_save | {{plus if pos | {{#lvar:wis_mod}} {{#if: {{{wis save prof|}}} | {{#lvar:prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: cha_save | {{plus if pos | {{#lvar:cha_mod}} {{#if: {{{cha save prof|}}} | {{#lvar:prof_bonus}} }} }} }} | ||
<!-- | <!-- | ||
Line 115: | Line 108: | ||
<!-- Explorer saving throw bonuses --> | <!-- Explorer saving throw bonuses --> | ||
{{#lvardef: | {{#lvardef: e_str_save | {{plus if pos | {{#lvar:e_str_mod}} {{#if: {{#lvar:e_str_save_prof}} | {{#lvar:e_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: e_dex_save | {{plus if pos | {{#lvar:e_dex_mod}} {{#if: {{#lvar:e_dex_save_prof}} | {{#lvar:e_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: e_con_save | {{plus if pos | {{#lvar:e_con_mod}} {{#if: {{#lvar:e_con_save_prof}} | {{#lvar:e_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: e_int_save | {{plus if pos | {{#lvar:e_int_mod}} {{#if: {{#lvar:e_int_save_prof}} | {{#lvar:e_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: e_wis_save | {{plus if pos | {{#lvar:e_wis_mod}} {{#if: {{#lvar:e_wis_save_prof}} | {{#lvar:e_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: e_cha_save | {{plus if pos | {{#lvar:e_cha_mod}} {{#if: {{#lvar:e_cha_save_prof}} | {{#lvar:e_prof_bonus}} }} }} }} | ||
{{# | |||
<!-- Explorer resistances, actions, conditions, passives --> | <!-- Explorer resistances, actions, conditions, passives --> | ||
Line 197: | Line 183: | ||
<!-- Tactician saving throw bonuses --> | <!-- Tactician saving throw bonuses --> | ||
{{#lvardef: | {{#lvardef: t_str_save | {{plus if pos | {{#lvar:t_str_mod}} {{#if: {{#lvar:t_str_save_prof}} | {{#lvar:t_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: t_dex_save | {{plus if pos | {{#lvar:t_dex_mod}} {{#if: {{#lvar:t_dex_save_prof}} | {{#lvar:t_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: t_con_save | {{plus if pos | {{#lvar:t_con_mod}} {{#if: {{#lvar:t_con_save_prof}} | {{#lvar:t_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: t_int_save | {{plus if pos | {{#lvar:t_int_mod}} {{#if: {{#lvar:t_int_save_prof}} | {{#lvar:t_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: t_wis_save | {{plus if pos | {{#lvar:t_wis_mod}} {{#if: {{#lvar:t_wis_save_prof}} | {{#lvar:t_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: t_cha_save | {{plus if pos | {{#lvar:t_cha_mod}} {{#if: {{#lvar:t_cha_save_prof}} | {{#lvar:t_prof_bonus}} }} }} }} | ||
<!-- Tactician resistances, conditions, passives --> | <!-- Tactician resistances, conditions, passives --> | ||
Line 281: | Line 260: | ||
<!-- Honour saving throw bonuses --> | <!-- Honour saving throw bonuses --> | ||
{{#lvardef: | {{#lvardef: h_str_save | {{plus if pos | {{#lvar:h_str_mod}} {{#if: {{#lvar:h_str_save_prof}} | {{#lvar:h_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: h_dex_save | {{plus if pos | {{#lvar:h_dex_mod}} {{#if: {{#lvar:h_dex_save_prof}} | {{#lvar:h_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: h_con_save | {{plus if pos | {{#lvar:h_con_mod}} {{#if: {{#lvar:h_con_save_prof}} | {{#lvar:h_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: h_int_save | {{plus if pos | {{#lvar:h_int_mod}} {{#if: {{#lvar:h_int_save_prof}} | {{#lvar:h_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: h_wis_save | {{plus if pos | {{#lvar:h_wis_mod}} {{#if: {{#lvar:h_wis_save_prof}} | {{#lvar:h_prof_bonus}} }} }} }} | ||
{{#lvardef: | {{#lvardef: h_cha_save | {{plus if pos | {{#lvar:h_cha_mod}} {{#if: {{#lvar:h_cha_save_prof}} | {{#lvar:h_prof_bonus}} }} }} }} | ||
<!-- Honour resistances, conditions, passives --> | <!-- Honour resistances, conditions, passives --> |
Revision as of 19:02, 7 June 2024
This is the main creature infobox template. It does a bunch of processing on its parameters before passing on all the results to Template:Infobox creature/internal for displaying.
List of helper sub-templates:
- Template:Infobox creature/internal
- Template:Infobox creature/actions format
- Template:Infobox creature/actions query
- Template:Infobox creature/conditions format
- Template:Infobox creature/conditions query
- Template:Infobox creature/passives format
- Template:Infobox creature/passives parser
- Template:Infobox creature/passives query
Usage tips:
- To override stats for Explorer, Tactician, or Honour mode, use parameters starting with e, t, or h, respectively. E.g. use
t hp
to specify the HP value for Tactician difficulty. Explorer and Tactician fall back to Balanced (default) stats when a stat isn't overridden; Honour falls abck to Tactician stats. - The
passives
list may contain elements of the formatPassive name @ Item name
to specify the item that grants the passive. This will make that item's icon be used if the passive itself doesn't have an icon. - The
image
property may contain a<gallery>...</gallery>
. - The provided image will be automatically set as the page image (as if using Template:PageSeo), unless it's a gallery. If it's a gallery, you can use the
page image
property instead to set the page image.
Example use:
{{Infobox creature | name = Test | title = Title | image = <gallery> Steel Watcher Ranged.png|Ranged Steel Watcher Model.png|Model </gallery> | full name = Duke Wellington | va = Keanu Reeves | role = Mascot | faction = Gondor | family = The Reeves' | hometown = The Shire | size = Smol | type = Mammal | race = Cat | class = Felinid | background = Outlander | level = 10 | hp = 10 | ac = 10 | initiative = +5 | prof bonus = +4 | movement m = 9 | weight kg = 600 | str = 11 | dex = 12 | con = 13 | int = 14 | wis = 15 | cha = 16 | dex save prof = yes | con save prof = yes | resistances = fire resistant, cold resistant, lightning vulnerable | conditions = Aura of Protection, Aura of Hate | passives = Agile Chassis, Cull the Weak (Drider) | e level = 8 | e hp = 8 | e ac = 8 | e initiative = +4 | e prof bonus = +3 | e str = 10 | e dex = 11 | e con = 12 | e int = 13 | e wis = 14 | e cha = 15 | e resistances = cold resistant | e conditions = Aura of Protection | e passives = Agile Chassis | t level = 12 | t hp = 12 | t ac = 12 | t initiative = +6 | t prof bonus = +5 | t movement m = 12 | t weight kg = 800 | t str = 13 | t dex = 14 | t con = 15 | t int = 16 | t wis = 17 | t cha = 18 | t resistances = fire immune, cold resistant, slashing immune nm, piercing immune nm, bludgeoning immune nm | t conditions = Aura of Protection, Aura of Hate, Unstoppable | t passives = Agile Chassis, Cull the Weak (Drider), Adamantine Shield @ Adamantine Shield | h level = 14 | h hp = 14 | h ac = 14 | h initiative = +7 | h prof bonus = +6 | h str = 14 | h dex = 15 | h con = 16 | h int = 17 | h wis = 18 | h cha = 19 | h resistances = fire immune, cold immune, slashing immune nm, piercing immune nm, bludgeoning immune nm | h conditions = Aura of Protection, Aura of Hate, Unstoppable, Legendary Resistance: Incapacitation | h passives = Agile Chassis, Cull the Weak (Drider), Adamantine Shield @ Adamantine Shield, Fast Hands }}