From The Mana World
(initial revision)
 
m (I thought I fixed those)
Line 25: Line 25:
</code>
</code>


When <code>mixed,/code> is <code>no</code>, a decimal with the largest units needed is used (ex: 1.05kg). When <code>mixed,/code> is <code>yes</code>, all non-0 levels are shown (ex: 1kg, 1g). When <code>mixed,/code> is <code>all</code>, all levels up to the largest needed are show (ex: 1 Mg, 0 kg, 0g). When <code>mixed,/code> is <code>full</code> all levels defined are show (ex: 0Mg, 1kg, 0g).
When <code>mixed</code> is <code>no</code>, a decimal with the largest units needed is used (ex: 1.05kg). When <code>mixed</code> is <code>yes</code>, all non-0 levels are shown (ex: 1kg, 1g). When <code>mixed</code> is <code>all</code>, all levels up to the largest needed are show (ex: 1 Mg, 0 kg, 0g). When <code>mixed</code> is <code>full</code> all levels defined are show (ex: 0Mg, 1kg, 0g).

Revision as of 16:10, 12 February 2009

This file describes the various units used in the interface, like currency and weight.

Structure

Unit files are in XML format.

<units>

This is the root element of the file.

<unit>

And individual unit definition. units have types, bases, and mixed values. The type describes the function of this unit, like "currency" or "weight". The base is the symbol of the base unit, like "gold" or "g" (gram). THe optional mixed describes how to handle different units (described later; default tbd).

<level>

Each unit can have multiple levels. levels have symbols and counts. symbol is the symbol to use for this level. count describes how many of the previous level is needed to for this level.

Example

<units>
    <unit type="currency" base="GP"/>
    <unit tpye="weight" base="g" mixed="no">
        <level symbol="kg" count="1000"/>
    </unit>
    ...
</unitss>

When mixed is no, a decimal with the largest units needed is used (ex: 1.05kg). When mixed is yes, all non-0 levels are shown (ex: 1kg, 1g). When mixed is all, all levels up to the largest needed are show (ex: 1 Mg, 0 kg, 0g). When mixed is full all levels defined are show (ex: 0Mg, 1kg, 0g).