Template:5e Weapon: Difference between revisions

From Rlyehwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>'''<big>{{{weap}}}</big>'''{{#if: {{{nodb|}}}|<--skip sortkey-->|{{#if:{{{sorttext|}}}|{{DEFAULTSORTKEY:{{{sorttext}}} 5e}}|{{DEFAULTSORTKEY:{{PAGENAME}} 5e}} }} }}[[Category:5e Weapons]]{{#if: {{{canon|}}}|[[Canon::true| ]][[Category:5e Canon Weapons]]|}}
<noinclude>
{{#cargo_declare:
_table = 5e_Weapon
|Sort_Text = String
|Weapon_Name=String
|Proficiency=String <!--Simple/Martial-->
|Weapon_Type=String <!--Melee/Ranged-->
|Cost=String
|Damage=String
|Damage_Type=String
|Weight=String <!--in pounds-->
|Properties=List (, ) of Wikitext string
|Magic=Boolean
|Polearm=Boolean
|PBA=Boolean <!--Polearm Bonus Attack-->
|PROA=Boolean <!--Polearm Reach Opportunity Attack->
|Monk_Weapon=Boolean
|Note=Wikitext
|Canon=Boolean
|Pointer=Boolean
|Hidden=Boolean
}}</noinclude><includeonly>'''<big>{{{weap}}}</big>'''{{#if: {{{nodb|}}}|<--skip sortkey-->|{{#if:{{{sorttext|}}}|{{DEFAULTSORTKEY:{{{sorttext}}} 5e}}|{{DEFAULTSORTKEY:{{PAGENAME}} 5e}} }} }}[[Category:5e Weapons]]{{#if: {{{canon|}}}|[[Category:5e Canon Weapons]]|}}


'''{{#switch: {{{smo}}}
'''{{#switch: {{{smo}}}
   |s = Simple[[Proficiency::Simple| ]] [[Category:5e Simple Weapons]]  
   |s = Simple [[Category:5e Simple Weapons]]  
   |m = Martial[[Proficiency::Martial| ]] [[Category:5e Martial Weapons]]
   |m = Martial [[Category:5e Martial Weapons]]
   |#default = {{{smo}}}[[Proficiency::{{{smo}}}| ]]
   |#default = {{{smo}}}
  |<span style="color: red;">Enter 's'imple, 'm'artial, or value for parameter 'sme'</span>
}} {{#switch: {{{mr}}}
}} {{#switch: {{{mr}}}
   |m = Melee[[Type::Melee| ]] [[Category:5e Melee Weapons]]
   |m = Melee [[Category:5e Melee Weapons]]
   |r = Ranged[[Type::Ranged| ]][[Category:5e Ranged Weapons]]
   |r = Ranged[[Category:5e Ranged Weapons]]
   |none = [[Type::—| ]]
   |none = &mdash;
   |#default = {{{mr}}}[[Type::{{{mr}}}| ]]
   |#default = {{{mr}}}
  |<span style="color: red;">Enter 'm'=melee, 'r'=ranged, or 'none', for parameter 'mr'</span>
}} [[SRD5:Weapon|Weapon]]'''
}} [[SRD5:Weapon|Weapon]]'''
{| class="d20 zebra"
{| class="d20 zebra"
Line 30: Line 49:
   |<span style="color: red;">Enter 'b', 'p', 's', or value for parameter 'dtype'</span>
   |<span style="color: red;">Enter 'b', 'p', 's', or value for parameter 'dtype'</span>
}}
}}
|align="center"|{{#if: {{{weight|}}} | [[Weight::{{{weight}}}| ]]{{{weight}}}&nbsp;lbs | [[Weight::—]]}}
|align="center"|{{#if: {{{weight|}}} |{{{weight}}}&nbsp;lbs | &ndash; }}
|{{#if: {{{ammo|}}}|[[SRD5:Ammunition{{!}}Ammunition]][[Category:5e Ammunition Weapons]][[Ammunition::true| ]][[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]][[Finesse::true| ]][[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]][[Heavy::true| ]][[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]][[Light::true| ]][[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]][[Loading::true| ]][[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}}&ensp;({{{range}}})[[Range::{{{range}}}| ]][[Properties::Range&ensp;({{{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]][[Reach::true| ]][[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]][[Special::true| ]][[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]][[Thrown::true| ]][[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]][[Two-Handed::true| ]][[Properties::Two-Handed| ]]{{5e Weapon Prop Not First|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--not Twohand-->{{#if: {{{vers|}}}|{{SRD5|Versatile}} ({{{vers}}})[[Category:5e Versatile Weapons]][[Versatile::true| ]][[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|}}}
|{{#if: {{{ammo|}}}|{{SRD5|Ammunition}}[[Category:5e Ammunition Weapons]]{{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|}}}}}|<!--
| True =
  not ammo-->{{#if: {{{fine|}}}|{{SRD5|Finesse}}[[Category:5e Finesse Weapons]]{{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|}}}}}|<!--
| true =
    Not fine-->{{#if: {{{heavy|}}}|{{SRD5|Heavy}}[[Category:5e Heavy Weapons]]{{5e Weapon Prop Not First|light={{{light|}}}|load={{{load|}}}|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--
| y =
      not heavy-->{{#if: {{{light|}}}|{{SRD5|Light}}[[Category:5e Light Weapons]]{{5e Weapon Prop Not First|load={{{load|}}}|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--
| Y =
        not Light-->{{#if: {{{load|}}}|{{SRD5|Loading}}[[Category:5e Loading Weapons]]{{5e Weapon Prop Not First|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--
| t =
          not Load-->{{#if: {{{range|}}}|{{SRD5|Range}}&ensp;({{{range}}}){{5e Weapon Prop Not First|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--
| T = [[Magic::true| ]]
            not Range-->{{#if: {{{reach|}}}|{{SRD5|Reach}}[[Category:5e Reach Weapons]]{{5e Weapon Prop Not First|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--
| False =
              not Reach-->{{#if: {{{special|}}}|{{SRD5|Special}}[[Category:5e Special Weapons]]{{5e Weapon Prop Not First|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--
| false =
                not Special-->{{#if: {{{thrown|}}}|{{SRD5|Thrown}}[[Category:5e Thrown Weapons]]{{5e Weapon Prop Not First|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--
| n =
                  not Thrown-->{{#if: {{{twohand|}}}|{{SRD5|Two-Handed}}[[Category:5e Two-Handed Weapons]]{{5e Weapon Prop Not First|vers={{{vers|}}}|otherp={{{otherp|}}}}}|<!--
| N =
                    not Twohand-->{{#if: {{{vers|}}}|{{SRD5|Versatile}} ({{{vers}}})[[Category:5e Versatile Weapons]]{{5e Weapon Prop Not First|otherp={{{otherp|}}}}}|<!--
| f =
                      not Versatile-->{{#if: {{{otherp|}}}|{{5e Weapon Other Property|{{{otherp}}}}}|<!--
| F = [[Magic::false| ]]
                      No Properties-->}}<!--
| [[Magic::false| ]]
                    end otherp-->}}<!--
}}{{#if: {{{polearm|}}}|[[Category:5e Polearms]][[Polearm::true| ]]{{#if: {{{polearm bonus attack|}}}|[[Polearm Bonus Attack::true| ]]|}}{{#if: {{{polearm op attack reach|}}}|[[ Polearm Opportunity Reach Attack::true| ]]|}}|}}
                  end versa-->|}}<!--
|}{{#if: {{{note|}}} |<br />'''Note:''' {{{note}}} }}</includeonly><noinclude>
                end twohand-->|}}<!--
              end thrown-->|}}<!--
            end special-->|}}<!--
          end reach-->|}}<!--
        end range-->|}}<!--
        end load-->|}}<!--
      end light-->|}}<!--
    end heavy-->|}}<!--
  end fine-->|}}<!--
end ammo-->{{#if: {{{magic|}}}|[[Category:5e Magic Weapon]]|}}{{#if: {{{polearm|}}}|[[Category:5e Polearms]]|}}
|}{{#if: {{{note|}}} |<br />'''Note:''' {{{note}}} }}{{#if: {{{nodb|}}}|<!--skip-->|<!--cargo store -->{{#cargo_store:
_table = 5e_Weapon
|Sort_Text = {{#if:{{{sorttext|}}}|{{{sorttext}}} 5e}}|{{PAGENAME}} 5e}}
|Weapon_Name={{{weap|}}}
|Proficiency={{#switch: {{{smo}}}
  |s = Simple
  |m = Martial
  |#default = {{{smo}}}
}}
|Weapon_Type={{#switch: {{{mr}}}
  |m = Melee
  |r = Ranged
  |none = &mdash;
  |#default = {{{mr}}}
}}
|Cost={{{cost|}}}
|Damage={{{damage|}}}
|Damage_Type={{{dtype|}}}
|Weight={{{weight|}}}
|Properties={{5e Weapon Prop List|ammo={{{ammo|}}}|fine={{{fine|}}}|heavy={{{heavy|}}}|light={{{light|}}}|load={{{load|}}}|range={{{range|}}}|reach={{{reach|}}}|special={{{special|}}}|thrown={{{thrown|}}}|twohand={{{twohand|}}}|vers={{{vers|}}}|otherp={{{otherp|}}}}}
|Magic={{#if: {{{magic|}}}|1}}
|Polearm={{#if: {{{polearm|}}}|1}}
|PBA={{#if: {{{polearm bonus attack|}}}|1}}
|PROA={{#if: {{{polearm op attack reach|}}}|1}}
|Monk_Weapon={{#if: {{{monk|}}}|1}}
|Note={{{note|}}}
|Canon={{#if: {{{canon|}}}|1}}
|Pointer={{#if: {{{pointer|}}}|1}}
|Hidden={{#if: {{{hidden|}}}|1}}
}} }}</includeonly><noinclude>
{{documentation}}
{{documentation}}
[[Category:5e Templates|Weapon Template 5e]]
[[Category:5e Templates|Weapon Template 5e]]
</noinclude>
</noinclude>

Revision as of 12:02, 12 April 2020

This template defines the table "5e_Weapon". View table.

{{{smo}}} {{{mr}}} Weapon

Name Cost Damage Type Weight Properties
{{{weap}}} {{{dtype}}}[[DamageType::{{{dtype}}}| ]]

}}</includeonly>

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

Syntax

{{5e Weapon
|weap= <!--name-->
|sorttext= <!--blank, or category sort-->
|refs= <!--references-->
|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 -->
|monk=true <!-- if monk weapon -->
|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 -->
|racial= <!-- blank or list of races/subraces-->

Examples

The example weapon below is defined in wiki-text as follows:

{{5e Weapon
|weap=Needler
|sorttext= <!--blank, or category sort-->
|refs=<ref>{{Cite Pub|Foo's Guide to Future Weapons|pages=36}} Licensed: [[Public Domain]].</ref>
|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<--skip sortkey-->

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