Difference between revisions of "Template:NPC location info"
Jump to navigation
Jump to search
m |
m (Protected "Template:NPC location info" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))) |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>|- {{#vardefine:npclocationinfocnt|{{#expr:{{#var:npclocationinfocnt|0}}+1}}}}{{#subobject:npclocation{{#var:npclocationinfocnt}} | <includeonly>|- {{#vardefine:npclocationinfocnt|{{#expr:{{#var:npclocationinfocnt|0}}+1}}}}{{#subobject:npclocation{{#var:npclocationinfocnt}} | ||
| Has location index = {{#var:npclocationinfocnt}} | |||
| Has location info = {{{1|?}}};{{#explode:{{{2|?}}}|,|0}};{{#explode:{{{2|?}}}|,|1}};{{#explode:{{{2|?}}}|,|2}} | | Has location info = {{{1|?}}};{{#explode:{{{2|?}}}|,|0}};{{#explode:{{{2|?}}}|,|1}};{{#explode:{{{2|?}}}|,|2}} | ||
| Has level range = {{#vardefineecho:min_level_range|{{#explode:{{{3|1}}}|-|0}}}};{{#vardefineecho:max_level_range|{{#explode:{{{3|1}}}|-|1}}}} | | Has level range = {{#ifeq:{{{3|}}}|-|0;?|{{#vardefineecho:min_level_range|{{#explode:{{{3|1}}}|-|0}}}};{{#vardefineecho:max_level_range|{{#if:{{#pos:{{{3|}}}|-}}|{{#explode:{{{3|1}}}|-|1}}|?}}}} }} | ||
}} | }} | ||
| style="width:200px;" | [[{{{1|''Unknown''}} | | style="width:200px;" | {{#if:{{{1|}}}|[[{{{1}}}]]|''Unknown''}} | ||
| style="width: | | style="width:150px; text-align: left;" | {{#if:{{{2|}}}|{{Convert coordinate|{{{2|0,0,0}}}}}|''Unknown''}} | ||
| style="width: | | style="width:22%; text-align: center;" | {{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|-|—|{{#var:min_level_range}}{{#if:{{#pos:{{{3|}}}|-}}|–{{#var:max_level_range}}}}}}|''Unknown''}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
Line 12: | Line 13: | ||
<pre> | <pre> | ||
{{NPC location info|<location>|<coordinate-x>,<coordinate-y>,<coordinate-z>|<min-level> | {{NPC location info|<location>|<coordinate-x>,<coordinate-y>,<coordinate-z>|<min-level>-<max-level>}} | ||
</pre> | </pre> | ||
== Parameters == | == Parameters == | ||
; Unnamed parameter 1 | ; Unnamed parameter 1 | ||
: The location such as region the NPC is located in. | : The location such as region the NPC is located in. Defaults to ''Unknown''. | ||
; Unnamed parameter 2 | ; Unnamed parameter 2 | ||
: Coordinates X, Y and Z separated by commas. | : Optional. Coordinates X, Y and Z separated by commas. Defaults to ''Unknown''. | ||
; Unnamed parameter 3 | ; Unnamed parameter 3 | ||
: Level range, separated by hyphen. | : Optional. Level range, separated by hyphen or single value for non-variable level. The "-" symbol translates to "—". Defaults to ''Unknown''. | ||
== Example == | == Example == | ||
<pre>{| class="location table" | <pre>{| class="location table" | ||
{{NPC location table header}} | {{NPC location table header}} | ||
{{NPC location info|South Shroud|20.7,19.3|4-12}} | {{NPC location info|South Shroud|20.7,19.3,23.5|4-12}} | ||
|} | |} | ||
</pre> | </pre> | ||
{| class="location table" | {| class="location table" | ||
{{NPC location table header}} | {{NPC location table header}} | ||
{{NPC location info|South Shroud|20.7,19.3|4-12}} | {{NPC location info|South Shroud|20.7,19.3,23.5|4-12}} | ||
|} | |||
<pre>{| class="location table" | |||
{{NPC location table header}} | |||
{{NPC location info}} | |||
|} | |||
</pre> | |||
{| class="location table" | |||
{{NPC location table header}} | |||
{{NPC location info}} | |||
|} | |||
<pre>{| class="location table" | |||
{{NPC location table header}} | |||
{{NPC location info|Eastern Thanalan|12,34|-}} | |||
|} | |||
</pre> | |||
{| class="location table" | |||
{{NPC location table header}} | |||
{{NPC location info|Eastern Thanalan|12,34|-}} | |||
|} | |} | ||
[[Category:Location formatting templates]] | [[Category:Location formatting templates]] | ||
</noinclude> | </noinclude> |
Latest revision as of 12:26, 31 August 2018
Usage
Creates a row storing a variable NPC location info. For use with {{NPC location table header}} or {{NPC location table row}}.
{{NPC location info|<location>|<coordinate-x>,<coordinate-y>,<coordinate-z>|<min-level>-<max-level>}}
Parameters
- Unnamed parameter 1
- The location such as region the NPC is located in. Defaults to Unknown.
- Unnamed parameter 2
- Optional. Coordinates X, Y and Z separated by commas. Defaults to Unknown.
- Unnamed parameter 3
- Optional. Level range, separated by hyphen or single value for non-variable level. The "-" symbol translates to "—". Defaults to Unknown.
Example
{| class="location table" {{NPC location table header}} {{NPC location info|South Shroud|20.7,19.3,23.5|4-12}} |}
Zone | Coordinates | Level range |
---|---|---|
South Shroud | (X:20.7, Y:19.3, Z:23.5) | 4–12 |
{| class="location table" {{NPC location table header}} {{NPC location info}} |}
Zone | Coordinates | Level range |
---|---|---|
Unknown | Unknown | Unknown |
{| class="location table" {{NPC location table header}} {{NPC location info|Eastern Thanalan|12,34|-}} |}
Zone | Coordinates | Level range |
---|---|---|
Eastern Thanalan | (X:12, Y:34) | — |