A Wiki in the Desert
Log in

Difference between revisions of "Template:HerbTableBody"

From A Wiki in the Desert
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#arraydefine:herb|{{#ask:[[-Has subobject::{{{1}}}]]|?Affects attribute#=|?Has magnitude#=|format=plainlist|link=none|mainlabel=-}}}}{{#arraysearcharray:herbtidy|herb|/^.*?\/(.+)\s\((.+)\).*$/|0|-1|$1 $2}}{{!}}-
+
<includeonly>
{{!}}{{#vardefine:herbimage|Herbs_{{#replace:{{#replace:{{#replace:{{{1}}}|Herb/|}}| |}}|'|}}}}[[Image:{{#ifexist: File:{{#var:herbimage}}.png|{{#var:herbimage}}.png|{{#var:herbimage}}.jpg}}|thumb|250x250px]]
+
{{#ask:[[-Has subobject::{{{1}}}]]|?Affects attribute#=|?Has magnitude#=|format=array|name=herb|mainlabel=-}}{{#arraysearcharray:herbtidy|herb|/^.*?\/(.+)<PROP>(.+).*$/|0|-1|$1 $2}}{{!}}-
{{!}}[[{{{1}}}|{{#replace:{{{1}}}|Herb/}}]]
+
{{!}} {{#if: {{{7}}}|[[{{{7}}}|thumb|250x250px]]}}
{{!}}{{#ifeq: {{{2}}}|Action/|Unknown|[[{{{2}}}|{{#replace:{{{2}}}|Action/|}}]]}}
+
{{!}} [[{{{1}}}|{{#replace:{{{1}}}|Herb/}}]]
{{!}}{{#ifeq: {{{3}}}|Herb/Leaf/|Unknown|[[{{{3}}}|{{#replace:{{{3}}}|Herb/Leaf/|}}]]}}
+
{{!}} {{#if: {{{2|}}}|[[{{{2}}}|{{#replace:{{{2}}}|Action/|}}]]|Unknown}}
{{!}}{{#ifeq: {{{4}}}|Herb/Stem/|Unknown|[[{{{4}}}|{{#replace:{{{4}}}|Herb/Stem/|}}]]}}
+
{{!}} {{#if: {{{3|}}}|[[{{{3}}}|{{#replace:{{{3}}}|Herb/Leaf/|}}]]|Unknown}}
{{!}}{{#arraydefine:colors|{{#replace:{{{5}}}|Herb/Color/|}}}}{{#if:{{#arraysize:colors}}|{{#arrayprint:colors|,&nbsp;|@@@@|[[Herb/Color/@@@@|@@@@]]}}|Unknown}}
+
{{!}} {{#if: {{{4|}}}|[[{{{4}}}|{{#replace:{{{4}}}|Herb/Stem/|}}]]|Unknown}}
 +
{{!}} {{#arraydefine:colors|{{#replace:{{{5}}}|Herb/Color/|}}}}{{#ifeq:{{#arraysize:colors}}|0|Unknown|{{#arrayprint:colors|,&nbsp;|@@@@|[[Herb/Color/@@@@|@@@@]]}}}}
 
{{!}} {{#arraydefine:similar|{{#replace:{{{6}}}|Herb/|}}}}{{#arrayprint:similar|,&nbsp;|@@@@|[[Herb/@@@@|@@@@]]}}
 
{{!}} {{#arraydefine:similar|{{#replace:{{{6}}}|Herb/|}}}}{{#arrayprint:similar|,&nbsp;|@@@@|[[Herb/@@@@|@@@@]]}}
 
{{!}} {{AttributeSign | {{#explode:{{#arrayindex:herbtidy|{{#arraysearch:herbtidy|/Strength/}}}}| |1}}}}
 
{{!}} {{AttributeSign | {{#explode:{{#arrayindex:herbtidy|{{#arraysearch:herbtidy|/Strength/}}}}| |1}}}}
Line 15: Line 16:
 
{{!}} {{AttributeSign | {{#explode:{{#arrayindex:herbtidy|{{#arraysearch:herbtidy|/Perception/}}}}| |1}}}}
 
{{!}} {{AttributeSign | {{#explode:{{#arrayindex:herbtidy|{{#arraysearch:herbtidy|/Perception/}}}}| |1}}}}
 
{{!}}-
 
{{!}}-
 +
</includeonly>
 +
<noinclude>
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"label": "Herb",
 +
"type": "string",
 +
"required": true
 +
},
 +
"2": {
 +
"label": "Requires",
 +
"type": "string",
 +
"required": true
 +
},
 +
"3": {
 +
"label": "Has leaf",
 +
"type": "string",
 +
"required": true
 +
},
 +
"4": {
 +
"label": "Has stem",
 +
"type": "string",
 +
"required": true
 +
},
 +
"5": {
 +
"label": "Has color",
 +
"type": "string",
 +
"required": true
 +
},
 +
"6": {
 +
"label": "Is similar to",
 +
"type": "string",
 +
"required": true
 +
},
 +
"7": {
 +
"label": "Has image",
 +
"type": "string",
 +
"required": true
 +
}
 +
},
 +
"paramOrder": [
 +
"1",
 +
"2",
 +
"3",
 +
"4",
 +
"5",
 +
"6",
 +
"7"
 +
],
 +
"description": "This template is used as part of a semantic media wiki query to generate the body of a query for herb data."
 +
}
 +
</templatedata>
 +
</noinclude>

Latest revision as of 18:50, 25 May 2021


This template is used as part of a semantic media wiki query to generate the body of a query for herb data.

Template parameters

ParameterDescriptionTypeStatus
Herb1

no description

Stringrequired
Requires2

no description

Stringrequired
Has leaf3

no description

Stringrequired
Has stem4

no description

Stringrequired
Has color5

no description

Stringrequired
Is similar to6

no description

Stringrequired
Has image7

no description

Stringrequired