Template:SkillCode: Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#switch:{{lc:{{{1}}}}}
<includeonly>{{#switch:{{lc:{{{1}}}}}
|shield|shield usage|su|leather armor|leather|la|cloth armor|cloth|ca|bone armor|bone|ba|light armor|light chain|lc|nc|neutral chain|heavy chain|hc|chain armor|light plate|lp|brigandine|heavy plate|hp|plate armor|defense|def||defending|parry|parry ability|pa|multi|multi-opponent|multi opponent|mo|offhand|offhand weapon|ow|light edge|light edged|le|medium edge|medium edged|me|small edge|small edged|se|heavy edge|heavy edged|he|2handed edge|2handed edged|twohanded edge|twohanded edged|the|2he|light blunt|lb|medium blunt|mb|small blunt|sb|heavy blunt|large blunt|hb|twohanded blunt|2handed blunt|thb|2hb|sling|slings|sl|staff slings|staff sling|sts|short bow|sb|long bow|longbow|lob|composite bow|cb|bow|light crossbow|light xbow|lx|heavy crossbow|heavy xbow|hx|xb|short staff|ss|quarter staff|qs|staff|st|pike|pikes|pi|halberds|halberd|hal|pl|light thrown|lt|heavy thrown|ht|brawling|brawl|br|melee mastery|mem|missile mastery|mim|lunar magic|holy magic|life magic|elemental magic|inner magic|inner fire|primary magic|pm|harness|harness ability|ha|power perceive|power perception|pp|attunement|magic devices|magical devices|md|arcana|ar|targeted magic|tm|evasion|ev|climb|climbing|cl|swim|swimming|sw|escape|escaping|es|athletics|ath|perception|pe|scouting|tracking|sc|hiding|hi|stalking|sta|stealth|sth|disarm|disarm traps|dt|lockpicking|lo|steal|stealing|ste|thv|thievery|first aid|fa|forage|foraging|fo|animal lore|al|outdoorsmanship|out|backstab|back stab|backstabbing|back stabbing|bs|skin|skinning|sk|bardic lore|bl|scholarship|teach|teaching|te|sch|mech lore|mechanical lore|ml|musical theory|mt|appraise|appraisal|ap|tactics|tac|enchanting|enc|outfiting|oft|forging|for|engineering|eng|alchemy|alc|trading|tr|percussion|percussions|pcn|string|strings|str|wind|winds|wi|vocal|vocals|vo|empathy|transference|em|thanatology|than|th|astrology|as|small shield|ssh|medium shield|msh|large shield|lsh=1|}}</includeonly><noinclude>
|shield|shield usage|su=Shield Usage
|leather armor|leather|la|cloth armor|cloth|ca|bone armor|bone|ba|light armor=Light Armor
|light chain|lc|nc|neutral chain|heavy chain|hc|chain armor=Chain Armor
|light plate|lp|brigandine=Brigandine
|heavy plate|hp|plate armor=Plate Armor
|defense|def=Defense
|defending|multi|multi-opponent|multi opponent|mo=Defending
|parry|parry ability|pa=Parry Ability
|offhand|offhand weapon|ow=Offhand Weapon
|light edge|light edged=Light Edged
|le={{#switch:{{{t}}}|s=Large Edged|Light Edged}}
|medium edge|medium edged|me=Medium Edged
|small edge|small edged|se=Small Edged
|heavy edge|heavy edged|he=Heavy Edged
|2handed edge|2handed edged|twohanded edge|twohanded edged|the|2he=Twohanded Edged
|light blunt|lb=Light Blunt
|medium blunt|mb=Medium Blunt
|small blunt=Small Blunt
|sb={{#switch:{{{t}}}|s=Small Blunt|Short Bow}}
|heavy blunt|large blunt|hb=Heavy Blunt
|twohanded blunt|2handed blunt|thb|2hb=Twohanded Blunt
|sling|slings|sl|staff slings|staff sling|sts=Slings
|short bow|shb=Short Bow
|long bow|longbow|lob={{#switch:{{{t}}}|s=Bow|Long Bow}}
|composite bow|cb={{#switch:{{{t}}}|s=Bow|Composite Bow}}
|bow=Bow
|light crossbow|light xbow|lx={{#switch:{{{t}}}|s=Crossbow|Light Crossbow}}
|heavy crossbow|heavy xbow|hx={{#switch:{{{t}}}|s=Crossbow|Heavy Crossbow}}
|Crossbow|xb=Crossbow
|short staff|ss={{#switch:{{{t}}}|s=Staves|Short Staff}}
|quarter staff|qs={{#switch:{{{t}}}|s=Staves|Quarter Staff}}
|staff|st=Staves
|pike|pikes|pi|halberds|halberd|hal|pl=Polearms
|light thrown|lt=Light Thrown
|heavy thrown|ht=Heavy Thrown
|brawling|brawl|br=Brawling
|melee mastery|mem=Melee Mastery
|missile mastery|mim=Missle Mastery
|lunar magic|holy magic|life magic|elemental magic|inner magic|inner fire|primary magic|pm=Primary Magic
|harness|harness ability|ha|power perceive|power perception|pp|attunement=Attunement
|magic devices|magical devices|md|arcana|ar=Arcana
|targeted magic|tm=Targeted Magic
|evasion|ev=Evasion
|climb|climbing|cl|swim|swimming|sw|escape|escaping|es|athletics|ath=Athletics
|perception|pe=Perception
|scouting|tracking|sc=Scouting
|hiding|hi|stalking|sta|stealth|sth=Stealth
|disarm|disarm traps|dt|lockpicking|lo=Locksmithing
|steal|stealing|ste|thievery|thv=Thievery
|first aid|fa=First Aid
|forage|foraging|fo|animal lore|al|outdoorsmanship|out=Outdoorsmanship
|backstab|back stab|backstabbing|back stabbing|bs=Backstab
|skin|skinning|sk=Skinning
|scholarship|teach|teaching|te|sch=Scholarship
|mech lore|mechanical lore|ml|engineer|engineering|eng=Engineering
|bardic lore|bl|musical theory|mt=Bardic Lore
|appraise|appraisal|ap=Appraisal
|tactics|tac=Tactics
|enchanting|enc=Enchanting
|outfiting|oft=Outfitting
|forging|for=Forging
|alchemy|alc=Alchemy
|trading|tr=Trading
|percussion|percussions|pcn|string|strings|str|wind|winds|wi|vocal|vocals|vo=Performance
|empathy|transference|em=Empathy
|thanatology|than|tha=Thanatology
|astrology|as=Astrology
|neutral plate|np={{#If:{{{error}}}|{{#If:{{{error|}}}|{{{error}}}|SKILLCODE ERROR}}|}}
|small shield|ssh={{#Ifeq:{{lc:{{{disableadd}}}}}|n|{{#If:{{{error}}}|{{#If:{{{error|}}}|{{{error}}}|SKILLCODE ERROR}}}}|Small Shield}}
|medium shield|msh={{#Ifeq:{{lc:{{{disableadd}}}}}|n|{{#If:{{{error}}}|{{#If:{{{error|}}}|{{{error}}}|SKILLCODE ERROR}}}}|Medium Shield}}
|large shield|lsh={{#Ifeq:{{lc:{{{disableadd}}}}}|n|{{#If:{{{error}}}|{{#If:{{{error|}}}|{{{error}}}|SKILLCODE ERROR}}}}|Large Shield}}
|rock=Rock
|arrow=Arrow
|bolt=Bolt
|dart=Dart
|{{#If:{{{error}}}|{{#If:{{{error|}}}|{{{error}}}|SKILLCODE ERROR}}
|#default=}}}}</includeonly><noinclude>
==Usage Documentation==
==Usage Documentation==
This template will test whether or not variable one contains a valid value for [[Template:SkillCode]] and return 1 if it does or nothing if it does not. Mainly used by [[Template:TitleReq]].
This template will take the skillcodes associated with {{com|experience}} and convert them to their skills.

In addition, to assist with armor type processing, it will return and SSH, MSH or LSH as Small Shield, Medium Shield, or Large Shield. To disable this, add <nowiki>|disableadd=n</nowiki> to the variable list.

In the case of most items, the 2.0 codes will be returned as the 3.0 codes, with the exception of the weapons which still have size restrictions, such as Medium/Light edges for offhand and backstabbing. If "t=" is set to "s" then it will return the skill used for the weapon, while otherwise it will return the weapon type.

If the code for neutral plate is added, as it no longer exists, it will spit out an error code.

If there are no matches, this template will return SKILLCODE ERROR, unless the variable <nowiki>|error=</nowiki> is included. If error is set to empty or to whitespace, nothing will be returned on error, otherwise the given string will be returned.

<b>Note</b>: All variable contents will be handled on case insensitive basis.


===Syntax===
===Syntax===
<pre>
<pre>
{{SkillCode|code}}
{{SkillCodeTest|code}}


Additional options are:
|t=
|disableadd=
|error=
</pre>
</pre>
{{cat|Templates,Templates for Templates}}
{{cat|Templates,Templates for Templates}}

Revision as of 15:39, 26 March 2021

Usage Documentation

This template will test whether or not variable one contains a valid value for Template:SkillCode and return 1 if it does or nothing if it does not. Mainly used by Template:TitleReq.

Syntax

{{SkillCodeTest|code}}