Template:Skill-DC: Difference between revisions

From Epic Path
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 14: Line 14:
* '''n''' = modify numeric value with a positive or negative number. "n=-2" lowers skill DC by 2 before outputting the skill DC.
* '''n''' = modify numeric value with a positive or negative number. "n=-2" lowers skill DC by 2 before outputting the skill DC.
* '''op''' = modify the operand. Values are "op=mult" and "op=div", allowing you to multiply or divide by parameter n's value. Default is addition (with negative numbers subtracting).
* '''op''' = modify the operand. Values are "op=mult" and "op=div", allowing you to multiply or divide by parameter n's value. Default is addition (with negative numbers subtracting).
* '''nohi''' = don't highlight the text.  Values: Y, or exclude variable.  By default, the text is highlighted in a pleasant orange color.


'''Examples:'''
'''Examples:'''
Line 25: Line 26:
If you don't specify a challenge category, it will default to Average.
If you don't specify a challenge category, it will default to Average.


</noinclude><includeonly>{{#expr:
</noinclude><includeonly>{{#ifeq:{{{nohi|}}}|Y|<span style="padding:0px 3px 0px 3px;">|<span style="background:#f5cd05; padding:0px 3px 0px 3px;">}}{{#expr:
   {{#switch: {{{1}}}
   {{#switch: {{{1}}}
| Average =    {{Average-Skill-DC|transcludesection=
| Average =    {{Average-Skill-DC|transcludesection=
                   {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                   {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) < 1 | 1 |  
                      {{#if:{{#var:Pattern1|}}|
                       {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) > 44 | 44 |  
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                         {{#expr: ({{#var:Skill-DC-CR}} + {{{2|0}}})
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) < 1 | 1 |  
                       {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) > 44 | 44 |  
                         {{#expr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }})
                         }}
                         }}
                       }}
                       }}
Line 66: Line 37:
                 }}
                 }}
| Challenging = {{Challenging-Skill-DC|transcludesection=
| Challenging = {{Challenging-Skill-DC|transcludesection=
                   {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                   {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) < 1 | 1 |  
                      {{#if:{{#var:Pattern1|}}|
                       {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) > 44 | 44 |  
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                         {{#expr: ({{#var:Skill-DC-CR}} + {{{2|0}}})
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) < 1 | 1 |  
                       {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) > 44 | 44 |  
                         {{#expr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }})
                         }}
                         }}
                       }}
                       }}
Line 104: Line 45:
                 }}
                 }}
| Easy =        {{Easy-Skill-DC|transcludesection=
| Easy =        {{Easy-Skill-DC|transcludesection=
                   {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                   {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) < 1 | 1 |  
                      {{#if:{{#var:Pattern1|}}|
                       {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) > 44 | 44 |  
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                         {{#expr: ({{#var:Skill-DC-CR}} + {{{2|0}}})
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) < 1 | 1 |  
                       {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) > 44 | 44 |  
                         {{#expr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }})
                         }}
                         }}
                       }}
                       }}
Line 142: Line 53:
                 }}
                 }}
| Hard =        {{Hard-Skill-DC|transcludesection=
| Hard =        {{Hard-Skill-DC|transcludesection=
                   {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                   {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) < 1 | 1 |  
                      {{#if:{{#var:Pattern1|}}|
                       {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) > 44 | 44 |  
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                         {{#expr: ({{#var:Skill-DC-CR}} + {{{2|0}}})
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) < 1 | 1 |  
                       {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) > 44 | 44 |  
                         {{#expr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }})
                         }}
                         }}
                       }}
                       }}
Line 180: Line 61:
                 }}
                 }}
| Impossible =  {{Impossible-Skill-DC|transcludesection=
| Impossible =  {{Impossible-Skill-DC|transcludesection=
                   {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                   {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) < 1 | 1 |  
                      {{#if:{{#var:Pattern1|}}|
                       {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) > 44 | 44 |  
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                         {{#expr: ({{#var:Skill-DC-CR}} + {{{2|0}}})
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) < 1 | 1 |  
                       {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) > 44 | 44 |  
                         {{#expr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }})
                         }}
                         }}
                       }}
                       }}
Line 218: Line 69:
                 }}
                 }}
| #default =    {{Average-Skill-DC|transcludesection=
| #default =    {{Average-Skill-DC|transcludesection=
                   {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                   {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) < 1 | 1 |  
                      {{#if:{{#var:Pattern1|}}|
                       {{#ifexpr: ({{#var:Skill-DC-CR}} + {{{2|0}}}) > 44 | 44 |  
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                         {{#expr: ({{#var:Skill-DC-CR}} + {{{2|0}}})
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) < 1 | 1 |  
                       {{#ifexpr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }}) > 44 | 44 |  
                         {{#expr: ({{#var:CR}} + {{{2|0}}} +
                      {{#if:{{#var:Pattern1|}}|
                        {{#ifexpr:{{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern1}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }} +
                      {{#if:{{#var:Pattern2|}}|
                        {{#ifexpr:{{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|
                        {{:{{#var:Pattern2}}|transcludesection=Increase-All-Existing-Skills}}|0
                        }}|0
                      }})
                         }}
                         }}
                       }}
                       }}
Line 260: Line 81:
       }}{{{n}}}|
       }}{{{n}}}|
   }} round 0
   }} round 0
}}</includeonly>
}}</span></includeonly>

Latest revision as of 18:42, 30 December 2021

Outputs the skill DC for the specified challenge category when called, based on the CR of the monster. Primarily used inside the Monster template. Call as follows:

{{Skill DC|Easy}}
{{Skill DC|Average}}
{{Skill DC|Challenging}}
{{Skill DC|Hard}}
{{Skill DC|Impossible}}

Parameters (all are optional):

  • (unnamed) = modify CR with a positive or negative number. -2 lowers CR by two before outputting skill DC.
  • n = modify numeric value with a positive or negative number. "n=-2" lowers skill DC by 2 before outputting the skill DC.
  • op = modify the operand. Values are "op=mult" and "op=div", allowing you to multiply or divide by parameter n's value. Default is addition (with negative numbers subtracting).
  • nohi = don't highlight the text. Values: Y, or exclude variable. By default, the text is highlighted in a pleasant orange color.

Examples:

  • {{Skill DC|Average|-2}} - outputs an Average skill DC as though CR was two lower than actual.
  • {{Skill DC|Easy|n = 2|op = mult}} - outputs double the normal Easy skill DC value for a monster of that CR.

You can also use {{Skill DC}} outside of a Monster template, but you must specify the CR:

  • {{Skill DC|Impossible|12}} - outputs an impossible skill DC for CR 12, if used outside a monster template. Inside a monster template, it would add 12 to the monster's existing CR.

If you don't specify a challenge category, it will default to Average.