Difference between revisions of "Template:5e Alignment Array"

From Dungeons and Dragons Wiki
Jump to: navigation, search
(nodb option)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{1|}}}|{{#switch: {{lc:{{{1}}}}}
+
<includeonly>{{#if: {{{nodb|}}}|{{#if: {{{1|}}}|{{#switch: {{lc:{{{1}}}}}
  | chaotic = {{SRD5|Alignment#Chaotic|{{#if: {{{2|}}}|chaotic|Chaotic|}}|Alignment}}[[Category:5e Chaotic Monsters]]
+
  | chaotic = {{SRD5|Chaotic|{{#if: {{{2|}}}|chaotic|Chaotic|}}}}
  | chaotic evil = {{SRD5|Alignment#Chaotic Evil|{{#if: {{{2|}}}|chaotic evil|Chaotic Evil|}}|Alignment}}[[Category:5e Chaotic Evil Monsters]]
+
| chaotic evil = {{SRD5|Chaotic Evil|{{#if: {{{2|}}}|chaotic evil|Chaotic Evil|}}}}
  | chaotic good = {{SRD5|Alignment#Chaotic Good|{{#if: {{{2|}}}|chaotic good|Chaotic Good|}}|Alignment}}[[Category:5e Chaotic Good Monsters]]
+
| chaotic good = {{SRD5|Chaotic Good|{{#if: {{{2|}}}|chaotic good|Chaotic Good|}}}}
  | chaotic neutral = {{SRD5|Alignment#Chaotic Neutral|{{#if: {{{2|}}}|chaotic neutral|Chaotic Neutral|}}|Alignment}}[[Category:5e Chaotic Neutral Monsters]]
+
| chaotic neutral = {{SRD5|Chaotic Neutral|{{#if: {{{2|}}}|chaotic neutral|Chaotic Neutral|}}}}
  | evil = {{SRD5|Alignment#Evil|{{#if: {{{2|}}}|evil|Evil|}}|Alignment}}[[Category:5e Evil Monsters]]
+
| evil = {{SRD5|Evil|{{#if: {{{2|}}}|evil|Evil|}}}}
  | good = {{SRD5|Alignment#Good|{{#if: {{{2|}}}|good|Good|}}|Alignment}}[[Category:5e Good Monsters]]
+
| good = {{SRD5|Good|{{#if: {{{2|}}}|good|Good|}}}}
  | lawful = {{SRD5|Alignment#Lawful|{{#if: {{{2|}}}|lawful|Lawful|}}|Alignment}}[[Category:5e Lawful Monsters]]
+
| lawful = {{SRD5|Lawful|{{#if: {{{2|}}}|lawful|Lawful|}}}}
  | lawful evil = {{SRD5|Alignment#Lawful Evil|{{#if: {{{2|}}}|lawful evil|Lawful Evil|}}|Alignment}}[[Category:5e Lawful Evil Monsters]]
+
| lawful evil = {{SRD5|Lawful Evil|{{#if: {{{2|}}}|lawful evil|Lawful Evil|}}}}
  | lawful good = {{SRD5|Alignment#Lawful Good|{{#if: {{{2|}}}|lawful good|Lawful Good|}}|Alignment}}[[Category:5e Lawful Good Monsters]]
+
| lawful good = {{SRD5|Lawful Good|{{#if: {{{2|}}}|lawful good|Lawful Good|}}}}
  | lawful neutral = {{SRD5|Alignment#Lawful Neutral|{{#if: {{{2|}}}|lawful neutral|Lawful Neutral|}}|Alignment}}[[Category:5e Lawful Neutral Monsters]]
+
| lawful neutral = {{SRD5|Lawful Neutral|{{#if: {{{2|}}}|lawful neutral|Lawful Neutral|}}}}
  | neutral = {{SRD5|Alignment#Neutral|{{#if: {{{2|}}}|neutral|Neutral|}}|Alignment}}[[Category:5e Neutral Monsters]]
+
| neutral = {{SRD5|Neutral|{{#if: {{{2|}}}|neutral|Neutral|}}}}
  | neutral good = {{SRD5|Alignment#Neutral Good|{{#if: {{{2|}}}|neutral good|Neutral Good|}}|Alignment}}[[Category:5e Neutral Good Monsters]]
+
| neutral good = {{SRD5|Neutral Good|{{#if: {{{2|}}}|neutral good|Neutral Good|}}}}
  | neutral evil = {{SRD5|Alignment#Neutral Evil|{{#if: {{{2|}}}|neutral evil|Neutral Evil|}}|Alignment}}[[Category:5e Neutral Evil Monsters]]
+
| neutral evil = {{SRD5|Neutral Evil|{{#if: {{{2|}}}|neutral evil|Neutral Evil|}}}}
  | unaligned = {{SRD5|Alignment#Unaligned|{{#if: {{{2|}}}|unaligned|Unaligned|}}|Alignment}}[[Category:5e Unaligned Monsters]]
+
| unaligned = {{SRD5|Unaligned|{{#if: {{{2|}}}|unaligned|Unaligned|}}}}
  | [[SRD5:Alignment|{{#if: {{{2|}}}|{{lc:{{{1}}}}}|{{{1}}}|}}]]<!--default result-->
+
| [[SRD5:Alignment|{{#if: {{{2|}}}|{{lc:{{{1}}}}}|{{{1}}}}}]]<!--default result-->
}} |<span style="text-color:red;">!!Alignment Missing!!</span>}}</includeonly><noinclude>
+
}} |<!--<span style="text-color:red;">!!Alignment Missing!!</span>-->}}|<!--NOT nodb-->{{#if: {{{1|}}}|{{#switch: {{lc:{{{1}}}}}
 +
| chaotic = {{SRD5|Chaotic|{{#if: {{{2|}}}|chaotic|Chaotic|}}|Alignment}}[[Category:5e Chaotic Monsters]]
 +
  | chaotic evil = {{SRD5|Chaotic Evil|{{#if: {{{2|}}}|chaotic evil|Chaotic Evil|}}|Alignment}}[[Category:5e Chaotic Evil Monsters]]
 +
  | chaotic good = {{SRD5|Chaotic Good|{{#if: {{{2|}}}|chaotic good|Chaotic Good|}}|Alignment}}[[Category:5e Chaotic Good Monsters]]
 +
  | chaotic neutral = {{SRD5|Chaotic Neutral|{{#if: {{{2|}}}|chaotic neutral|Chaotic Neutral|}}|Alignment}}[[Category:5e Chaotic Neutral Monsters]]
 +
  | evil = {{SRD5|Evil|{{#if: {{{2|}}}|evil|Evil|}}|Alignment}}[[Category:5e Evil Monsters]]
 +
  | good = {{SRD5|Good|{{#if: {{{2|}}}|good|Good|}}|Alignment}}[[Category:5e Good Monsters]]
 +
  | lawful = {{SRD5|Lawful|{{#if: {{{2|}}}|lawful|Lawful|}}|Alignment}}[[Category:5e Lawful Monsters]]
 +
  | lawful evil = {{SRD5|Lawful Evil|{{#if: {{{2|}}}|lawful evil|Lawful Evil|}}|Alignment}}[[Category:5e Lawful Evil Monsters]]
 +
  | lawful good = {{SRD5|Lawful Good|{{#if: {{{2|}}}|lawful good|Lawful Good|}}|Alignment}}[[Category:5e Lawful Good Monsters]]
 +
  | lawful neutral = {{SRD5|Lawful Neutral|{{#if: {{{2|}}}|lawful neutral|Lawful Neutral|}}|Alignment}}[[Category:5e Lawful Neutral Monsters]]
 +
  | neutral = {{SRD5|Neutral|{{#if: {{{2|}}}|neutral|Neutral|}}|Alignment}}[[Category:5e Neutral Monsters]]
 +
  | neutral good = {{SRD5|Neutral Good|{{#if: {{{2|}}}|neutral good|Neutral Good|}}|Alignment}}[[Category:5e Neutral Good Monsters]]
 +
  | neutral evil = {{SRD5|Neutral Evil|{{#if: {{{2|}}}|neutral evil|Neutral Evil|}}|Alignment}}[[Category:5e Neutral Evil Monsters]]
 +
  | unaligned = {{SRD5|Unaligned|{{#if: {{{2|}}}|unaligned|Unaligned|}}|Alignment}}[[Category:5e Unaligned Monsters]]
 +
  | [[SRD5:Alignment|{{#if: {{{2|}}}|{{lc:{{{1}}}}}|{{{1}}}|Alignment}}]]<!--default result-->
 +
}} |<!--<span style="text-color:red;">!!Alignment Missing!!</span>-->}}|}}</includeonly><noinclude>
  
 
==Use==
 
==Use==
Line 21: Line 37:
  
 
===Returns===
 
===Returns===
Link to matching alignment and Alignment property.
+
Link to matching alignment, Alignment property, Monster alignment category.
  
 
==Syntax==
 
==Syntax==
'''<nowiki>{{5e Alignment Array|alignmentType|optLowerCase}}</nowiki>'''
+
<pre>{{5e Alignment Array|alignmentType|optLowerCase}}</pre>
 +
===Add'l Entries===
 +
<pre>|nodb= <!--blank, true to skip properties and categories--></pre>
  
 
==Examples==
 
==Examples==
<nowiki>{{5e Alignment Array|Foo}}</nowiki> -> {{5e Alignment Array|Foo}}
+
<nowiki>{{5e Alignment Array|Foo}}</nowiki> -> {{5e Alignment Array|Foo|nodb=true}}
 
   
 
   
<nowiki>{{5e Alignment Array|Lawful Good}}</nowiki> -> {{5e Alignment Array|Lawful Good}}
+
<nowiki>{{5e Alignment Array|Lawful Good}}</nowiki> -> {{5e Alignment Array|Lawful Good|nodb=true}}
 
   
 
   
<nowiki>{{5e Alignment Array|Evil|y}}</nowiki> -> {{5e Alignment Array|Evil|y}}
+
<nowiki>{{5e Alignment Array|Evil|y}}</nowiki> -> {{5e Alignment Array|Evil|y|nodb=true}}
 
   
 
   
 
[[Category:5e Templates]]
 
[[Category:5e Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 02:54, 5 April 2022


Use[edit]

For automated links to 5th edition alignments

Returns[edit]

Link to matching alignment, Alignment property, Monster alignment category.

Syntax[edit]

{{5e Alignment Array|alignmentType|optLowerCase}}

Add'l Entries[edit]

|nodb= <!--blank, true to skip properties and categories-->

Examples[edit]

{{5e Alignment Array|Foo}} -> Foo

{{5e Alignment Array|Lawful Good}} -> Lawful Good

{{5e Alignment Array|Evil|y}} -> evil