The Lord of the Rings Minecraft Mod Wiki
Advertisement
The Lord of the Rings Minecraft Mod Wiki

Renew this page to show changes

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Bar_money/doc to edit this documentation. (How does this work?)

Description

This template creates a bar of coins.

It is a money version of the bar templates and called by the more comfortable {{Bar simple}} template.

It handles

  • Splitting up the number into several bars according to the coins available in the Mod
    -> Uses the {{Bar raw}} template to display these bars.
  • Selecting the bar height -> Uses the {{Bar height}} template for that.
  • Displaying larger numbers in a different way (see samples below).

It handles not all the fancy stuff like

  • Default values
  • Special display for prices and value ranges.
  • Plain text if non-numeric.
  • The whole display wrapping around lines.
  • Adding tags.

-> All this has to be done by calling templates.

Syntax

Type {{Bar money|<number>|<options>}} somewhere.

  • <number> is the number of icons to be displayed. The number must be a integer. No default defined. Causes error, when non-integer!
  • <options> the options are so far:
    • ext=<extension> extension of the filename .jpg, .gif, ... default is .png
    • size=<size> height of the 100-coin in px (the 10-coin and 1-coin are smaller by default). Default is original size. You can also use a symbolic name here, like infobox, which selects a predefined size as defined in the {{Bar height}} template.
    • tooltip=<text> to define the text, which is shown, when hovering over the lower part of the bar, default is the <number> parameter.
    • tooltip2=<text> to define the text, which is shown, when hovering over the higher part of the bar bar, default is the <tooltip> parameter, if defined, otherwise the <number> parameter.
    • link=<text> to define the link, where the bar links to.

Samples

type this to get this
{{Bar money}}
No parameters -> default.
{{Bar money|some text}}
Non numeric -> error.
Expression error: Unrecognized word "some".Expression error: Unrecognized word "x".Expression error: Unrecognized word "t".
{{Bar money|2.5}}
Non integer -> wrong display (205).
 2.5 
{{Bar money|284}}
Numbers < 1000 -> mixed display.
 284  284  284 
{{Bar money|1284}}
Large numbers -> compacted display.
12 x  1200  +  84  84 
{{Bar money|5|ext=.jpg}}
Extension specified -> not .png.
 5 
{{Bar money|235|size=11}}
Different size.
 235  235  235 
{{Bar money|235|size=infobox}}
Predefined size.
 235  235  235 
{{Bar money|423|tooltip=cash}}
Tooltip defined.
 cash  cash  cash 
{{Bar money|1423|tooltip=cash|tooltip2=money}}
Both tooltips defined.
14 x  money  +  cash  cash 
{{Bar money|2345|link=Corn}}
Link defined.
23 x  2300  +  45  45 }