Transcendence Wiki

Documenting the Universe.

User Tools

Site Tools


modding:xml:economytype

Overview

<EconomyType> is used to define new currencies. The default currency is Credits, which serves as the baseline for conversion/exchange rates. This can be used to create new economies, such as Rin, or the other currencies introduced in Eternity Port.

With <EconomyType> you can define and handle new currencies on your stations.

Usage

From George's 1.06 post here.

 <EconomyType UNID="..."
   id="rin"
   currency="rin|rin"
   conversion="500"
 />

id= is an identifier for the currency. It can be used optionally wherever a price is listed (see below).

currency= describes the name of the currency. Use the same syntax as item names to indicate pluralization. [The example says that the plural of “rin” is “rin”.] Note: This is confusing, but the right hand rin is the plural.

conversion= is the standard conversion into credits of 100 units of the currency. In this case, 100 rin = 500 credits.

You can assign prices to an item in any currency. For example:

 <ItemType ...
       ...
       value="rin:75"
       ...
 </ItemType>

The above code prices the given item in rin.

The <Trade> section of a station uses the currency= attribute to specify the currency used by the station. For example, Ringer stations specify that they use rin. Prices are automatically converted as appropriate.

objGetSellPrice and objGetBuyPrice return values in whatever currency the station uses.

You may use objGetDefaultCurrency to figure out what currency a station uses. You may use itmGetDefaultCurrency to figure out what currency an item is priced in. You may use ecoExchange to convert from one currency to another. You may use fmtCurrency to format a string containing a currency value.

The priceAdj= attribute in a <Trade> element takes some special variants:

priceAdj=“constant:xxx” sets the price to xxx (as opposed to adjusting the price by some percentage) priceAdj=“unavailable” means that the specified item(s) are not for sale or not bought by the station

modding/xml/economytype.txt · Last modified: 2016/07/04 06:59 by xephyr