Difference between revisions of "Template:5e Weapon"
From Dungeons and Dragons Wiki
m (troubleshooting) |
m (refs) |
||
(15 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>'''<big>{{{weap}}}</big>'''[[Category:5e Weapons]][[Category:5e | + | <includeonly>'''<big>{{{weap}}}</big>''' {{{refs|}}}{{#if:{{{sorttext|}}}|{{DEFAULTSORTKEY:{{{sorttext}}} 5e}}|{{DEFAULTSORTKEY:{{PAGENAME}} 5e}} }}[[Category:5e Weapons]]{{#if: {{{canon|}}}|{{#set: Canon=true}}[[Category:5e Canon Weapons]]|}} |
'''{{#switch: {{{smo}}} | '''{{#switch: {{{smo}}} | ||
Line 13: | Line 13: | ||
|<span style="color: red;">Enter 'm'=melee, 'r'=ranged, or 'none', for parameter 'mr'</span> | |<span style="color: red;">Enter 'm'=melee, 'r'=ranged, or 'none', for parameter 'mr'</span> | ||
}} [[SRD5:Weapon|Weapon]]''' | }} [[SRD5:Weapon|Weapon]]''' | ||
− | {| class="zebra" | + | {| class="d20 zebra" |
!Name | !Name | ||
!Cost | !Cost | ||
− | !Damage | + | !{{#if: {{{damage|}}}|Damage|Damage Type|}} |
!Weight | !Weight | ||
!Properties | !Properties | ||
Line 22: | Line 22: | ||
|{{{weap}}} | |{{{weap}}} | ||
|align="right"|{{#if: {{{cost|}}} | [[Cost::{{{cost}}}]] | [[Cost::—]]}} <!-- cost --> | |align="right"|{{#if: {{{cost|}}} | [[Cost::{{{cost}}}]] | [[Cost::—]]}} <!-- cost --> | ||
− | |{{{damage}}}{{#set:Damage={{{damage}}}}} {{#switch: {{{dtype}}} | + | |{{#if: {{{damage|}}}|{{{damage}}}{{#set:Damage={{{damage}}}}} |}}{{#switch: {{{dtype}}} |
− | |b = [[SRD5:Bludgeoning{{!}} | + | |b = [[SRD5:Bludgeoning{{!}}bludgeoning]]{{#set:DamageType=Bludgeoning}} |
− | |p = [[SRD5:Piercing{{!}} | + | |p = [[SRD5:Piercing{{!}}piercing]]{{#set:DamageType=Piercing}} |
− | |s = [[SRD5:Slashing{{!}} | + | |s = [[SRD5:Slashing{{!}}slashing]]{{#set:DamageType=Slashing}} |
|none = {{#set:DamageType=—}} | |none = {{#set:DamageType=—}} | ||
|#default = [[DamageType::{{{dtype}}}]] | |#default = [[DamageType::{{{dtype}}}]] | ||
Line 31: | Line 31: | ||
}} | }} | ||
|align="center"|{{#if: {{{weight|}}} | [[Weight::{{{weight}}}]] lbs | [[Weight::—]]}} | |align="center"|{{#if: {{{weight|}}} | [[Weight::{{{weight}}}]] lbs | [[Weight::—]]}} | ||
− | | {{#if: {{{ammo|}}} | [[SRD5:Ammunition{{!}}Ammunition]] [[Category:5e Ammunition Weapons]] {{#set: | + | |{{#if: {{{ammo|}}}|[[SRD5:Ammunition{{!}}Ammunition]][[Category:5e Ammunition Weapons]]{{#set:Ammunition=true}}{{#set: Properties=Ammunition}}{{5e Weapon Prop Not First|fine={{{fine|}}}|heavy={{{heavy|}}}|light={{{light|}}}|load={{{load|}}}|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not ammo-->{{#if: {{{fine|}}}|{{SRD5|Finesse}}[[Category:5e Finesse Weapons]]{{#set:Finesse=true}}{{#set:Properties=Finesse}}{{5e Weapon Prop Not First|heavy={{{heavy|}}}|light={{{light|}}}|load={{{load|}}}|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--Not fine-->{{#if: {{{heavy|}}}|{{SRD5|Heavy}}[[Category:5e Heavy Weapons]]{{#set:Heavy=true}}{{#set:Properties=Heavy}}{{5e Weapon Prop Not First|light={{{light|}}}|load={{{load|}}}|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not heavy-->{{#if: {{{light|}}}|{{SRD5|Light}}[[Category:5e Light Weapons]]{{#set:Light=true}}{{#set:Properties=Light}}{{5e Weapon Prop Not First|load={{{load|}}}|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not Light-->{{#if: {{{load|}}}|{{SRD5|Loading}}[[Category:5e Loading Weapons]]{{#set:Loading=true}}{{#set:Properties=Loading}}{{5e Weapon Prop Not First|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not Load-->{{#if: {{{range|}}}|{{SRD5|Range}} ({{{range}}}){{#set:Range={{{range}}}}}{{#set:Properties=Range ({{{range}}})}}{{5e Weapon Prop Not First|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not Range-->{{#if: {{{reach|}}}|{{SRD5|Reach}}[[Category:5e Reach Weapons]]{{#set:Reach=true}}{{#set:Properties=Reach}}{{5e Weapon Prop Not First|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not Reach-->{{#if: {{{special|}}}|{{SRD5|Special}}[[Category:5e Special Weapons]]{{#set:Special=true}}{{#set:Properties=Special}}{{5e Weapon Prop Not First|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not Special-->{{#if: {{{thrown|}}}|{{SRD5|Thrown}}[[Category:5e Thrown Weapons]]{{#set:Thrown=true}}{{#set:Properties=Thrown}}{{5e Weapon Prop Not First|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not Thrown-->{{#if: {{{twohand|}}}|{{SRD5|Two-Handed}}[[Category:5e Two-Handed Weapons]]{{#set:Two-Handed=true}}{{#set:Properties=Two-Handed}}{{5e Weapon Prop Not First|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not Twohand-->{{#if: {{{vers|}}}|{{SRD5|Versatile}} ({{{vers}}})[[Category:5e Versatile Weapons]]{{#set:Versatile=true}}{{#set:Properties=Versatile ({{{vers}}})}}{{5e Weapon Prop Not First|otherp={{{otherp|}}}}}|<!--not Versatile-->{{#if: {{{otherp|}}}|{{5e Weapon Other Property|{{{otherp}}}}}|<!--No Properties-->}}<!--end otherp-->}}<!--end versa-->|}}<!--end twohand-->|}}<!--end thrown-->|}}<!--end special-->|}}<!--end reach-->|}}<!--end range-->|}}<!--end load-->|}}<!--end light-->|}}<!--end heavy-->|}}<!--end fine-->|}}<!--end ammo-->{{#switch: {{{magic|}}} |
− | | | + | | True = |
− | + | | true = | |
− | {{#if: {{{ | + | | y = |
− | <!--{{# | + | | Y = |
− | + | | t = | |
− | + | | T = {{#set: Magic=true}} | |
− | + | | False = | |
− | </includeonly><noinclude> | + | | false = |
+ | | n = | ||
+ | | N = | ||
+ | | f = | ||
+ | | F = {{#set: Magic=false}} | ||
+ | | {{#set: Magic=false}} | ||
+ | }}{{#if: {{{polearm|}}}|[[Category:5e Polearms]]{{#set: Polearm=true}}{{#if: {{{polearm bonus attack|}}}|{{#set: Polearm Bonus Attack=true}}|}}{{#if: {{{polearm op attack reach|}}}|{{#set: Polearm Opportunity Reach Attack=true}}|}}|}} | ||
+ | |}{{#if: {{{note|}}} |<br />'''Note:''' {{{note}}} }}</includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
− | [[Category:5e Templates]] | + | [[Category:5e Templates|Weapon Template 5e]] |
− | |||
</noinclude> | </noinclude> |
Latest revision as of 17:25, 31 December 2022
Template documentation (for the above template, sometimes hidden or invisible)
Contents
Syntax[edit]
{{5e Weapon |weap= <!--name--> |sorttext= <!--blank, or category sort--> |smo= <!-- s=simple m=martial value if other (ex. exotic, dwarven only) --> |mr= <!-- m=melee r=ranged --> |damage= |dtype= <!--(b=bludgeoning, p=piercing, s=slashing, value if other)--> |weight= <!-- in lbs. --> |cost= |ammo= <!-- y=uses Ammunition--> |fine= <!-- y=is Finesse --> |heavy= <!-- y=is Heavy --> |light= <!-- y=is Light --> |load= <!-- y=Loading --> |range= <!-- enter value, example: 20/60) --> |reach= <!-- y=has Reach --> |special= <!-- y=has Special rules --> |thrown= <!-- y=may be thrown --> |twohand= <!-- y=is two-handed weapon --> |vers= <!-- enter value if Versatile, example: 1d10 --> |otherp= <!-- enter value if non-standard property, example: exotic --> |note= <!-- add'l notes --> }}
Add'l Entries[edit]
|canon=true <!-- for published weapons --> |magic=true <!-- for magic weapons --> |polearm=true <!-- if polearm --> |polearm bonus attack=true <!-- if polearm master feat grants bonus attack --> |polearm op attack reach=true <!-- if polearm feat givess reach to op attack -->
Examples[edit]
The example weapon below is defined in wiki-text as follows:
{{5e Weapon |weap=Needler |sorttext= <!--blank, or category sort--> |smo=m <!-- s=simple m=martial value if other (ex. exotic, dwarven only) --> |mr=r <!-- m=melee r=ranged --> |damage=1d4 |dtype=p <!--(b=bludgeoning, p=piercing, s=slashing, value if other)--> |weight=1 <!-- in lbs. --> |cost=30 |ammo=y <!-- y=uses Ammunition--> |fine= <!-- y=is Finesse --> |heavy= <!-- y=is Heavy --> |light=y <!-- y=is Light --> |load=y <!-- y=Loading --> |range=60/120 <!-- enter value, example: 20/60) --> |reach= <!-- y=has Reach --> |special= <!-- y=has Special rules --> |thrown= <!-- y=may be thrown --> |twohand= <!-- y=is two-handed weapon --> |vers= <!-- enter value if Versatile, example: 1d10 --> |otherp= <!-- enter value if non-standard property, example: exotic --> |note= <!-- add'l notes --> }}
This text becomes:
Needler
Martial Ranged Weapon
Name | Cost | Damage | Weight | Properties |
---|---|---|---|---|
Needler | 30 | 1d4 piercing | 1 lbs | Ammunition, Light, Loading, Range (60/120) |
Visit Template:5e Weapon/doc to edit this text! (How does this work?)