Difference between revisions of "Template:TB"

From Hyrule Castle Library
Jump to: navigation, search
(tweaks)
(testing)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| width="200px" align="right" table class="wikitable"
+
#REDIRECT [[:Template:TreasureBox]]
{{#if:{{{title|}}}|! colspan=2{{!}} {{{title|}}}
 
{{!}}-|! colspan=2{{!}} {{PAGENAME}}
 
{{!}}-}}
 
{{#if:
 
{{{image|}}}
 
|{{!}} colspan=2 align="center"{{!}} [[Image:{{{image|}}}|180px]]
 
{{!}}-
 
|}}
 
! Type
 
| {{{type|}}}
 
|-
 
! Fields
 
| {{#if:{{{field1|}}}|[[{{{field1|}}}]]{{#if:{{{field2|}}}|, [[{{{field2|}}}]]{{#if:{{{field3|}}}|, [[{{{field3|}}}]]{{#if:{{{field4|}}}|, [[{{{field4|}}}]]{{#if:{{{field5|}}}|, [[{{{field5|}}}]]{{#if:{{{field6|}}}|, [[{{{field6|}}}]]{{#if:{{{field7|}}}|, [[{{{field7|}}}]]{{#if:{{{field8|}}}|, [[{{{field8|}}}]]{{#if:{{{field9|}}}|, [[{{{field9|}}}]]{{#if:{{{field10|}}}|, [[{{{field10|}}}]]|{{#if:{{{field11|}}}|, [[{{{field11|}}}]]|{{#if:{{{field12|}}}|, [[{{{field12|}}}]]|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}
 
|-
 
! Costs
 
| {{#if:{{{set|}}}|{{{set|}}} rupees|}}{{#ifeq:{{{difficulty|}}}|1|:''Easiest''<br>|
 
{{#ifeq:{{{difficulty|}}}|2|:''Easier''|
 
{{#ifeq:{{{difficulty|}}}|3|:''Normal''|
 
{{#ifeq:{{{difficulty|}}}|4|:''Harder''|
 
{{#ifeq:{{{difficulty|}}}|5|:''Hardest''|}}}}}}}}}}
 
{{#ifeq:{{{difficulty|}}}|1|'''{{{PWC|}}}5:''' 10 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|2|'''{{{PWC|}}}5:''' 30 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|3|'''{{{PWC|}}}5:''' 40 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|4|'''{{{PWC|}}}5:''' 60 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|5|'''{{{PWC|}}}5:''' 70 rupees<br>|}}}}}}}}}}{{#ifeq:{{{difficulty|}}}|1|'''{{{PWC|}}}4:''' 15 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|2|'''{{{PWC|}}}4:''' 35 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|3|'''{{{PWC|}}}4:''' 50 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|4|'''{{{PWC|}}}4:''' 70 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|5|'''{{{PWC|}}}4:''' 85 rupees<br>|}}}}}}}}}}{{#ifeq:{{{difficulty|}}}|1|'''{{{PWC|}}}3:''' 20 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|2|'''{{{PWC|}}}3:''' 40 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|3|'''{{{PWC|}}}3:''' 60 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|4|'''{{{PWC|}}}3:''' 80 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|5|'''{{{PWC|}}}3:''' 100 rupees<br>|}}}}}}}}}}{{#ifeq:{{{difficulty|}}}|1|'''{{{PWC|}}}2:''' 25 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|2|'''{{{PWC|}}}2:''' 45 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|3|'''{{{PWC|}}}2:''' 70 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|4|'''{{{PWC|}}}2:''' 90 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|5|'''{{{PWC|}}}2:''' 115 rupees<br>|}}}}}}}}}}{{#ifeq:{{{difficulty|}}}|1|'''{{{PWC|}}}1:''' 30 rupees|
 
{{#ifeq:{{{difficulty|}}}|2|'''{{{PWC|}}}1:''' 50 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|3|'''{{{PWC|}}}1:''' 80 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|4|'''{{{PWC|}}}1:''' 100 rupees<br>|
 
{{#ifeq:{{{difficulty|}}}|5|'''{{{PWC|}}}1:''' 130 rupees<br>|}}}}}}}}}}{{#if:{{{custom|}}}|{{#if:{{{P5|}}}|'''P5:''' {{{{P5|}}} rupees|}}
 
{{#if:{{{W5|}}}|'''W5:''' {{{{W5|}}} rupees|}}
 
{{#if:{{{C5|}}}|'''C5:''' {{{{C5|}}} rupees|}}
 
{{#if:{{{P4|}}}|'''P4:''' {{{{P4|}}} rupees|}}
 
{{#if:{{{W4|}}}|'''W4:''' {{{{W4|}}} rupees|}}
 
{{#if:{{{C4|}}}|'''C4:''' {{{{C4|}}} rupees|}}
 
{{#if:{{{P3|}}}|'''P3:''' {{{{P3|}}} rupees|}}
 
{{#if:{{{W3|}}}|'''W3:''' {{{{W3|}}} rupees|}}
 
{{#if:{{{C3|}}}|'''C3:''' {{{{C3|}}} rupees|}}
 
{{#if:{{{P2|}}}|'''P2:''' {{{{P2|}}} rupees|}}
 
{{#if:{{{W2|}}}|'''W4:''' {{{{W2|}}} rupees|}}
 
{{#if:{{{C2|}}}|'''C2:''' {{{{C2|}}} rupees|}}
 
{{#if:{{{P1|}}}|'''P1:''' {{{{P1|}}} rupees|}}
 
{{#if:{{{W1|}}}|'''W1:''' {{{{W1|}}} rupees|}}
 
{{#if:{{{C1|}}}|'''C1:''' {{{{C1|}}} rupees|}}|}}
 
|}
 
<noinclude>{{clear}}
 
==Usage==
 
This versatile template is used to create the infobox at the upper-right of every Treasure page.  It can be used in one of several different ways, depending on the complexity of the treasure's PWC cost.  Regardless of PWC cost, however, this template will always use the following two fields:
 
* '''type''' should include the treasure's intention (Offensive, Defensive, or Utility) followed by its form (Spell, Song, Magical Item, etc.).  If the treasure is Major, it should have "Major" listed at the beginning of this entry.  E.g., "Major Defensive Spell" would be a valid entry, as would, "Utility Mechanical Item".
 
* '''field1''', '''field2''', etc.  All applicable fields should be listed.  If there's only three fields, leave '''field4''' and all subsequent fields blank.  If there's more than four fields, add entries for '''field5''', '''field6''', and so on, as necessary.
 
 
 
 
 
===Typical===
 
This assumes the treasure follows the normal pricing mechanic of difficulty (Easiest to Hardest), and is only attributed to one aspect of PWC.
 
 
 
* '''difficulty''' equals "1" for Easiest, and "5" for Hardest, etc.
 
* '''PWC''' defines what aspect of PWC the treasure is attributed to; it should generally only be one letter, such as "P" or "C".
 
 
 
<pre>{{TB
 
|type=
 
|field1=
 
|field2=
 
|field3=
 
|field4=
 
|difficulty=
 
|PWC=
 
}}
 
 
 
===Set===
 
This assumes the treasure has one set price, regardless of PWC.
 
 
 
</pre>
 
OR
 
<pre>{{TB
 
|type=
 
|field1=
 
|field2=
 
|field3=
 
|field4=
 
|set=
 
}}</pre>
 
 
 
===Variable===
 
This assumes the treasure has a price which fluctuates with PWC, but either doesn't fall into the normal difficulty scale, or is attributed to multiple aspects of PWC.  The price for each level and attribute (P3, W5, C1, etc.) is entered manually.  Any line which doesn't have an entry won't appear in the infbox.  (If a treasure is attributed to Power and Wisdom, for example, the "C" lines should all be left blank.)
 
<pre>{{TB
 
|type=
 
|field1=
 
|field2=
 
|field3=
 
|field4=
 
 
 
|P5=
 
|P4=
 
|P3=
 
|P2=
 
|P1=
 
|W5=
 
|W4=
 
|W3=
 
|W2=
 
|W1=
 
|C5=
 
|C4=
 
|C3=
 
|C2=
 
|C1=
 
}}</pre>
 
 
 
===Optional Fields===
 
* '''image''' is an optional line which can be added to any version of this template.  If an the name of an uploaded image (such as "thisimage.jpg") is entered, that image will appear in the infobox, immediately below the header.
 
* '''title''' is an optional line which can be added  to any version of this template.  Normally, the header at the top of the infobox is equal to the name of the page on which the infobox appears.  The contents of '''title''', if any are entered, will replace the header text.
 
[[Category:Templates]]</noinclude>
 

Latest revision as of 15:47, 13 October 2013