Wynncraft Wiki
(improved loot_tier display)
Tag: Source edit
(added link row at bottom for MinorLocation transclusions)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:mob1|{{#explode:{{{mobs|}}}|, |0}}}}<!--
+
<includeonly>{{#vardefine:moblist| [[{{#explode: {{{mobs|}}}|,|0 }}]] }}{{#vardefine:x|1}}{{#while:
-->{{#vardefine:mob2|{{#explode:{{{mobs|}}}|, |1}}}}<!--
+
|{{#explode: {{{mobs|}}} |,| {{#var:x}} }}
-->{{#vardefine:mob3|{{#explode:{{{mobs|}}}|, |2}}}}<!--
+
|{{#vardefine:moblist| {{#var:moblist}}{{*}}[[{{#explode: {{{mobs|}}} |,| {{#var:x}} }}]]}}{{#vardefine: x | {{#expr:{{#var:x}} + 1}} }}
  +
}}<!--
-->{{#vardefine:mob4|{{#explode:{{{mobs|}}}|, |3}}}}<!--
 
-->{{#vardefine:mob5|{{#explode:{{{mobs|}}}|, |4}}}}<!--
 
-->{{#vardefine:mob6|{{#explode:{{{mobs|}}}|, |5}}}}<!--
 
-->{{#vardefine:mob7|{{#explode:{{{mobs|}}}|, |6}}}}<!--
 
-->{{#vardefine:mob8|{{#explode:{{{mobs|}}}|, |7}}}}<!--
 
-->{{#vardefine:mob9|{{#explode:{{{mobs|}}}|, |8}}}}<!--
 
-->{{#vardefine:mob10|{{#explode:{{{mobs|}}}|, |9}}}}<!--
 
 
-->{{#vardefine:moblist|[[{{#var:mob1}}]]{{#if:{{#var:mob2}}|{{*}}[[{{#var:mob2}}]]}}{{#if:{{#var:mob3}}|{{*}}[[{{#var:mob3}}]]}}{{#if:{{#var:mob4}}|{{*}}[[{{#var:mob4}}]]}}{{#if:{{#var:mob5}}|{{*}}[[{{#var:mob5}}]]}}{{#if:{{#var:mob6}}|{{*}}[[{{#var:mob6}}]]}}{{#if:{{#var:mob7}}|{{*}}[[{{#var:mob7}}]]}}{{#if:{{#var:mob8}}|{{*}}[[{{#var:mob8}}]]}}{{#if:{{#var:mob9}}|{{*}}[[{{#var:mob9}}]]}}{{#if:{{#var:mob10}}|{{*}}[[{{#var:mob10}}]]}}}}<!--
 
   
 
> handle loot chests as a csv; while there are still elements, iterate through them and increase loot_tierX depending on the value
 
> handle loot chests as a csv; while there are still elements, iterate through them and increase loot_tierX depending on the value
Line 24: Line 16:
 
<!--
 
<!--
   
-->{| class='wikitable' style="width: 30em; text-align: center"
+
-->{| class='wikitable' style="width: 50%; text-align: center"
 
!colspan="2" | {{#switch: {{lc:{{{name|}}}}}
 
!colspan="2" | {{#switch: {{lc:{{{name|}}}}}
 
| cave = <big>Cave</big>
 
| cave = <big>Cave</big>
Line 40: Line 32:
 
| grind = {{WynnIcon|blaze powder}} Grinding
 
| grind = {{WynnIcon|blaze powder}} Grinding
 
| transport = {{WynnIcon|saddle}} Transportation
 
| transport = {{WynnIcon|saddle}} Transportation
  +
| #default = {{{purpose|}}}
 
}}
 
}}
 
{{!-}}}}
 
{{!-}}}}
 
{{#if:{{{loot_tier|}}}|!style="width:15%"{{!}}Loot
 
{{#if:{{{loot_tier|}}}|!style="width:15%"{{!}}Loot
{{!}}{{#ifexpr:{{#var:loot_tier1}}|<ul>{{#var:loot_tier1}} {{WynnIcon|chest}} [[Loot Chests|Tier 1 Loot Chest]]{{plural:{{#var:loot_tier1}}||s}}</ul>}}{{#ifexpr:{{#var:loot_tier2}}|<ul>{{#var:loot_tier2}} {{WynnIcon|chest}} [[Loot Chests|Tier 2 Loot Chest]]{{plural:{{#var:loot_tier2}}||s}}</ul>}}{{#ifexpr:{{#var:loot_tier3}}|<ul>{{#var:loot_tier3}} {{WynnIcon|chest}} [[Loot Chests|Tier 3 Loot Chest]]{{plural:{{#var:loot_tier3}}||s}}</ul>}}{{#ifexpr:{{#var:loot_tier4}}|<ul>{{#var:loot_tier4}} {{WynnIcon|chest}} [[Loot Chests|Tier 4 Loot Chest]]{{plural:{{#var:loot_tier4}}||s}}</ul>}}
+
{{!}}<ul>{{#ifexpr:{{#var:loot_tier1}}|<li>{{#var:loot_tier1}} {{WynnIcon|chest}} [[Loot Chests|Tier 1 Loot Chest]]{{plural:{{#var:loot_tier1}}||s}}</li>}}{{#ifexpr:{{#var:loot_tier2}}|<li>{{#var:loot_tier2}} {{WynnIcon|chest}} [[Loot Chests|Tier 2 Loot Chest]]{{plural:{{#var:loot_tier2}}||s}}</li>}}{{#ifexpr:{{#var:loot_tier3}}|<li>{{#var:loot_tier3}} {{WynnIcon|chest}} [[Loot Chests|Tier 3 Loot Chest]]{{plural:{{#var:loot_tier3}}||s}}</li>}}{{#ifexpr:{{#var:loot_tier4}}|<li>{{#var:loot_tier4}} {{WynnIcon|chest}} [[Loot Chests|Tier 4 Loot Chest]]{{plural:{{#var:loot_tier4}}||s}}</li>}}</ul>
 
{{!-}}|!style="width:15%"{{!}}Loot
 
{{!-}}|!style="width:15%"{{!}}Loot
 
{{!}}There are no loot chests at this location.
 
{{!}}There are no loot chests at this location.
Line 49: Line 42:
 
{{#if:{{{mobs|}}}|!style="width:15%"{{!}}Mobs
 
{{#if:{{{mobs|}}}|!style="width:15%"{{!}}Mobs
 
{{!}} {{#var:moblist}}
 
{{!}} {{#var:moblist}}
  +
{{!-}}}}
  +
{{#if:{{{mobs_raw|}}}|!style="width:15%"{{!}}Mobs
  +
{{!}} {{{mobs_raw|}}}
 
{{!-}}}}
 
{{!-}}}}
 
{{#if:{{{info|}}}|!style="width:15%"{{!}}Info
 
{{#if:{{{info|}}}|!style="width:15%"{{!}}Info
 
{{!}} {{{info}}}
 
{{!}} {{{info}}}
  +
{{!-}}}}
  +
{{#if:{{{link|}}}|!colspan="2" style="font-size:smaller;"{{!}} [[{{{link|}}}|{{{link_name|{{{link|}}}}}}]]
 
{{!-}}}}
 
{{!-}}}}
 
|}</includeonly>
 
|}</includeonly>

Latest revision as of 15:09, 28 July 2021

Template-info.png Documentation

This template creates an table that provides info about a minor location, like caves and ruins.

Generally, any notable structure where loot chests and unique mobs spawn should use this template. Do not use this template for important locations; they should have their own pages made for them.

{{MinorLocation
| name =
| icon =
| location =
| loot_tier = 
| mobs or mobs_raw =
| info =
| level =
| purpose =
}}
  • name - the name of the minor location. Unnamed locations should be called "cave", "ruins", etc. If no value is given, defaults to "Location".
  • icon - the icons displayed next to the location's name. Values here are put directly into Template:WynnIcon. If no value is given, defaults to icons if the location has a general name, otherwise, defaults to a sign.
  • location - the coordinates of the location. If not given, defaults to "?".
  • loot_tier - the tier of the loot chest that spawns at the location.
  • mobs - mobs that may spawn at the location. Should be a comma-separated list of the names of the mobs.
  • mobs_raw - direct wikitext input into the mobs cell. Use this if you want a different display than the dotlist mobs generates.
  • info - any extra info that pertains to the minor location.
  • level - the minimum recommended level for entering this cave.
  • purpose - the purpose of the cave. Can be anything, but special ones are loot, transport, grind, and quest.

Examples

Example Result
{{MinorLocation
| name = Ruins
| location =  -547, 67, -1619
| loot_tier = 1
| mobs = Fire Zombie, Weak Zombie, Zombie (Lv. 3), Zombie (Lv. 5)
| purpose = grind
}}
Ruins
Location: -547, 67, -1619
Purpose
Grinding
Loot
Mobs Fire Zombie • Weak Zombie • Zombie (Lv. 3) • Zombie (Lv. 5)
{{MinorLocation
| name = Weird Place
| icon = earth powder
| location =  -628, 50, -1953
| loot_tier = 2
| mobs = Corrupted Jumla, Corrupted Grian, Zombie (Lv. 10), Zombie Assassin, Zombie Archer (Lv. 4)
| level = 10
}}
Weird Place
Location: -628, 50, -1953
Recommended Min. Level: 10
Loot
Mobs Corrupted Jumla • Corrupted Grian • Zombie (Lv. 10) • Zombie Assassin • Zombie Archer (Lv. 4)
{{MinorLocation
| location = 442, 71, -1153
| info = A strange place!
}}
Location
Location: 442, 71, -1153
Loot There are no loot chests at this location.
Info A strange place!