Difference between revisions of "Template:Honor infobox/echoSkillLevel"

From Pathfinder Wiki
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><onlyinclude>{{#iferror: {{#expr: (0 < {{{skill}}}) and ({{{skill}}} < 4)}} | {{Template:Honor infobox/echoSkillLevel/echoUnknown}} | {{#ifexpr: (0 < {{{skill}}}) and ({{{skill}}} < 4) | {{#loop: numOfBadge | 1 | 3 | {{Honor infobox/echoSkillLevel/echoBadge|act-skill={{{skill}}}|skill-of-badge={{#var: numOfBadge }}}}}} | {{Template:Honor infobox/echoSkillLevel/echoUnknown}}}}}}</onlyinclude></includeonly>
+
<includeonly><onlyinclude>{{#iferror: {{#expr: (0 < {{{skill}}}) and ({{{skill}}} < 4)}} | {{Template:Honor infobox/echoSkillLevel/echoUnknown}} | {{#ifexpr: (0 < {{{skill}}}) and ({{{skill}}} < 4) | {{Honor infobox/echoSkillLevel/echoBadge|act-skill={{{skill}}}|skill-of-badge=1}}{{Honor infobox/echoSkillLevel/echoBadge|act-skill={{{skill}}}|skill-of-badge=2}}{{Honor infobox/echoSkillLevel/echoBadge|act-skill={{{skill}}}|skill-of-badge=3}}| {{Template:Honor infobox/echoSkillLevel/echoUnknown}}}}}}</onlyinclude></includeonly>
 
<templatedata>
 
<templatedata>
 
{
 
{
Line 16: Line 16:
 
=== Examples ===
 
=== Examples ===
 
<div class="toccolours">
 
<div class="toccolours">
:<nowiki>{{Honor infobox/echoSkillLevel | skill=0 }}</nowiki>
+
:<nowiki>{{Honor infobox/echoSkillLevel | skill=0 }}</nowiki>     -> '''unknown'''
:<nowiki>{{Honor infobox/echoSkillLevel | skill=1 }}</nowiki>
+
:<nowiki>{{Honor infobox/echoSkillLevel | skill=1 }}</nowiki>     -> '''Level 1'''
:<nowiki>{{Honor infobox/echoSkillLevel | skill=2 }}</nowiki>
+
:<nowiki>{{Honor infobox/echoSkillLevel | skill=2 }}</nowiki>     -> '''Level 2'''
:<nowiki>{{Honor infobox/echoSkillLevel | skill=3 }}</nowiki>
+
:<nowiki>{{Honor infobox/echoSkillLevel | skill=3 }}</nowiki>     -> '''Level 3'''
:<nowiki>{{Honor infobox/echoSkillLevel | skill=4 }}</nowiki>
+
:<nowiki>{{Honor infobox/echoSkillLevel | skill=4 }}</nowiki>     -> '''unknown'''
:<nowiki>{{Honor infobox/echoSkillLevel | skill=test }}</nowiki>
+
:<nowiki>{{Honor infobox/echoSkillLevel | skill=test }}</nowiki> -> '''unknown'''
:<nowiki>{{Honor infobox/echoSkillLevel | skill= }}</nowiki>
+
:<nowiki>{{Honor infobox/echoSkillLevel | skill= }}</nowiki>     -> '''unknown'''
:<nowiki>{{Honor infobox/echoSkillLevel}}</nowiki>
+
:<nowiki>{{Honor infobox/echoSkillLevel}}</nowiki>               -> '''unknown'''
 
</div>
 
</div>
 +
==== Output ====
 +
<div class="toccolours">
 
{{Honor infobox/echoSkillLevel | skill=0 }}<br>
 
{{Honor infobox/echoSkillLevel | skill=0 }}<br>
 
{{Honor infobox/echoSkillLevel | skill=1 }}<br>
 
{{Honor infobox/echoSkillLevel | skill=1 }}<br>
Line 33: Line 35:
 
{{Honor infobox/echoSkillLevel | skill= }}<br>
 
{{Honor infobox/echoSkillLevel | skill= }}<br>
 
{{Honor infobox/echoSkillLevel}}<br>
 
{{Honor infobox/echoSkillLevel}}<br>
 +
</div>

Latest revision as of 23:48, 17 March 2021

This template creates the calls the template (Template:Honor infobox/echoSkillLevel/echoBadge) to create the Skill Level Badges. It also verifies the input "skill". If it isn't valid, it calls the Template (Template:Honor infobox/echoSkillLevel/echoUnknown).

Template parameters

ParameterDescriptionTypeStatus
Skill Levelskill

Defines the actual Skill Level. Invalid values are Strings, numbers smaller than 1 or bigger than 3.

Example
1, 2, 3
Numberrequired

Examples

{{Honor infobox/echoSkillLevel | skill=0 }} -> unknown
{{Honor infobox/echoSkillLevel | skill=1 }} -> Level 1
{{Honor infobox/echoSkillLevel | skill=2 }} -> Level 2
{{Honor infobox/echoSkillLevel | skill=3 }} -> Level 3
{{Honor infobox/echoSkillLevel | skill=4 }} -> unknown
{{Honor infobox/echoSkillLevel | skill=test }} -> unknown
{{Honor infobox/echoSkillLevel | skill= }} -> unknown
{{Honor infobox/echoSkillLevel}} -> unknown

Output

???
123
123
123
???
???
???
???