Wynncraft Wiki
m (forgot how to use css list tags)
Tag: Source edit
(One intermediate revision by the same user not shown)
Line 12: Line 12:
 
-->{{#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}}]]}}}}<!--
 
-->{{#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
-->{{#vardefine:loot_tier1|{{#explode:{{{loot_tier|}}}|, |0}}}}<!--
 
-->{{#vardefine:loot_tier2|{{#explode:{{{loot_tier|}}}|, |1}}}}<!--
+
-->{{#vardefine:loot_tier1|0}}{{#vardefine:loot_tier2|0}}{{#vardefine:loot_tier3|0}}{{#vardefine:loot_tier4|0}}{{#vardefine: i | 0}}{{#while:
-->{{#vardefine:loot_tier3|{{#explode:{{{loot_tier|}}}|, |2}}}}<!--
+
|{{#explode: {{{loot_tier|}}} |,| {{#var:i}} }}
-->{{#vardefine:loot_tier4|{{#explode:{{{loot_tier|}}}|, |3}}}}<!--
+
|{{#switch: {{#explode: {{{loot_tier|}}} |,| {{#var:i}} }}
-->{{#vardefine:loot_tier5|{{#explode:{{{loot_tier|}}}|, |4}}}}<!--
+
| 1 = {{#vardefine: loot_tier1 | {{#expr:{{#var:loot_tier1}} + 1}} }}
  +
| 2 = {{#vardefine: loot_tier2 | {{#expr:{{#var:loot_tier2}} + 1}} }}
  +
| 3 = {{#vardefine: loot_tier3 | {{#expr:{{#var:loot_tier3}} + 1}} }}
  +
| 4 = {{#vardefine: loot_tier4 | {{#expr:{{#var:loot_tier4}} + 1}} }}
  +
}}{{#vardefine: i | {{#expr:{{#var:i}} + 1}} }}
  +
}}
  +
<!--
   
 
-->{| class='wikitable' style="width: 30em; text-align: center"
 
-->{| class='wikitable' style="width: 30em; text-align: center"
Line 37: Line 43:
 
{{!-}}}}
 
{{!-}}}}
 
{{#if:{{{loot_tier|}}}|!style="width:15%"{{!}}Loot
 
{{#if:{{{loot_tier|}}}|!style="width:15%"{{!}}Loot
{{!}}{{WynnIcon|chest}} [[Loot Chests|Tier {{#var:loot_tier1}} Loot Chest]]{{#if:{{#var:loot_tier2}}|<br>{{WynnIcon|chest}} [[Loot Chests|Tier {{#var:loot_tier2}} Loot Chest]]}}{{#if:{{#var:loot_tier3}}|<br>{{WynnIcon|chest}} [[Loot Chests|Tier {{#var:loot_tier3}} Loot Chest]]}}{{#if:{{#var:loot_tier4}}|<br>{{WynnIcon|chest}} [[Loot Chests|Tier {{#var:loot_tier4}} Loot Chest]]}}{{#if:{{#var:loot_tier5}}|<br>{{WynnIcon|chest}} [[Loot Chests|Tier {{#var:loot_tier5}} Loot Chest]]}}
+
{{!}}<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.

Revision as of 23:56, 13 June 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!