Difference between revisions of "Template:5e Weapon"

From Rlyehwiki
Jump to: navigation, search
Line 23: Line 23:
 
|align="right"|{{#if: {{{cost|}}} | [[Cost::{{{cost}}}]] | [[Cost::—]]}} <!-- cost -->
 
|align="right"|{{#if: {{{cost|}}} | [[Cost::{{{cost}}}]] | [[Cost::—]]}} <!-- cost -->
 
|{{{damage}}}{{#set:Damage={{{damage}}}}}&nbsp;{{#switch: {{{dtype}}}
 
|{{{damage}}}{{#set:Damage={{{damage}}}}}&nbsp;{{#switch: {{{dtype}}}
   |b = [[SRD5:Bludgeoning{{!}}Bludgeoning]]{{#set:DamageType=Bludgeoning}}
+
   |b = [[SRD5:Bludgeoning{{!}}bludgeoning]]{{#set:DamageType=Bludgeoning}}
   |p = [[SRD5:Piercing{{!}}Piercing]]{{#set:DamageType=Piercing}}
+
   |p = [[SRD5:Piercing{{!}}piercing]]{{#set:DamageType=Piercing}}
   |s = [[SRD5:Slashing{{!}}Slashing]]{{#set:DamageType=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}}}]]&nbsp;lbs | [[Weight::—]]}}
 
|align="center"|{{#if: {{{weight|}}} | [[Weight::{{{weight}}}]]&nbsp;lbs | [[Weight::—]]}}
| {{#if: {{{ammo|}}}|[[SRD5:Ammunition{{!}}Ammunition]][[Category:5e Ammunition Weapons]]{{#set:Ammunition=true}}{{#set: Properties=Ammunition}}|}}{{#if: {{{fine|}}}|,&ensp; [[SRD5:Finesse{{!}}Finesse]][[Category:5e Finesse Weapons]]{{#set:Finesse=true}}{{#set:Properties=Finesse}}|}}{{#if: {{{heavy|}}}|,&ensp;[[SRD5:Heavy Weapon{{!}}Heavy]][[Category:5e Heavy Weapons]]{{#set:Heavy=true}}{{#set:Properties=Heavy}}|}}{{#if: {{{light|}}}|,&ensp;[[SRD5:Light Weapon{{!}}Light]][[Category:5e Light Weapons]]{{#set:Light=true}}{{#set:Properties=Finesse}}|}}{{#if: {{{load|}}}|,&ensp;[[SRD5:Loading{{!}}Loading]][[Category:5e Loading Weapons]]{{#set:Loading=true}}{{#set:Properties=Loading}}}}{{#if: {{{range|}}}|,&ensp;[[SRD5:Range{{!}}Range]]&ensp;({{{range}}}){{#set:Range={{{range}}}}}{{#set:Properties=Range&ensp;{{{range}}}}}|}}{{#if: {{{reach|}}}|,&ensp;[[SRD5:Reach{{!}}Reach]][[Category:5e Reach Weapons]]{{#set: Reach=true}}{{#set:Properties=Reach}}|}}{{#if: {{{special|}}} |,&ensp;[[SRD5:Special{{!}}Special]][[Category:5e Special Weapons]]{{#set: Special=true}}{{#set:Properties=Special}}|}}{{#if: {{{thrown|}}} |,&ensp;[[SRD5:Thrown{{!}}Thrown]] [[Category:5e Thrown Weapons]]{{#set:Thrown=true}}{{#set:Properties=Thrown}}|}}{{#if: {{{twohand|}}}|,&ensp;[[SRD5:Two-Handed{{!}}Two-Handed]][[Category:5e Two-Handed Weapons]]{{#set:Two-Handed=true}}{{#set:Properties=Two-Handed}}|}}{{#if: {{{vers|}}} |,&ensp;[[SRD5:Versatile{{!}}Versatile]]({{{vers}}})[[Category:5e Versatile Weapons]]{{#set:Versatile=true}}{{#set:Properties=Versatile}}}}{{#if: {{{otherp|}}} |,&ensp;{{{otherp}}}{{#set:OtherP={{{otherp}}}}}{{#set:Properties={{{otherp}}}}}|}}
+
| {{#if: {{{ammo|}}}|[[SRD5:Ammunition{{!}}Ammunition]][[Category:5e Ammunition Weapons]]{{#set:Ammunition=true}}{{#set: Properties=Ammunition}}|}}{{#if: {{{fine|}}}|,&ensp;[[SRD5:Finesse{{!}}Finesse]][[Category:5e Finesse Weapons]]{{#set:Finesse=true}}{{#set:Properties=Finesse}}|}}{{#if: {{{heavy|}}}|,&ensp;[[SRD5:Heavy Weapon{{!}}Heavy]][[Category:5e Heavy Weapons]]{{#set:Heavy=true}}{{#set:Properties=Heavy}}|}}{{#if: {{{light|}}}|,&ensp;[[SRD5:Light Weapon{{!}}Light]][[Category:5e Light Weapons]]{{#set:Light=true}}{{#set:Properties=Light}}|}}{{#if: {{{load|}}}|,&ensp;[[SRD5:Loading{{!}}Loading]][[Category:5e Loading Weapons]]{{#set:Loading=true}}{{#set:Properties=Loading}}}}{{#if: {{{range|}}}|,&ensp;[[SRD5:Range{{!}}Range]]&ensp;({{{range}}}){{#set:Range={{{range}}}}}{{#set:Properties=Range&ensp;{{{range}}}}}|}}{{#if: {{{reach|}}}|,&ensp;[[SRD5:Reach{{!}}Reach]][[Category:5e Reach Weapons]]{{#set: Reach=true}}{{#set:Properties=Reach}}|}}{{#if: {{{special|}}} |,&ensp;[[SRD5:Special{{!}}Special]][[Category:5e Special Weapons]]{{#set: Special=true}}{{#set:Properties=Special}}|}}{{#if: {{{thrown|}}} |,&ensp;[[SRD5:Thrown{{!}}Thrown]] [[Category:5e Thrown Weapons]]{{#set:Thrown=true}}{{#set:Properties=Thrown}}|}}{{#if: {{{twohand|}}}|,&ensp;[[SRD5:Two-Handed{{!}}Two-Handed]][[Category:5e Two-Handed Weapons]]{{#set:Two-Handed=true}}{{#set:Properties=Two-Handed}}|}}{{#if: {{{vers|}}} |,&ensp;[[SRD5:Versatile{{!}}Versatile]]({{{vers}}})[[Category:5e Versatile Weapons]]{{#set:Versatile=true}}{{#set:Properties=Versatile}}}}{{#if: {{{otherp|}}} |,&ensp;{{{otherp}}}{{#set:OtherP={{{otherp}}}}}{{#set:Properties={{{otherp}}}}}|}}
 
|}{{#if: {{{note|}}} |<br />'''Note:''' {{{note}}} }} </includeonly><noinclude>
 
|}{{#if: {{{note|}}} |<br />'''Note:''' {{{note}}} }} </includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
[[Category:5e Templates|Weapon Template 5e]]
 
[[Category:5e Templates|Weapon Template 5e]]
 
</noinclude>
 
</noinclude>

Revision as of 13:32, 13 June 2019

Template documentation (for the above template, sometimes hidden or invisible)

Syntax

{{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

|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

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?)