ItemValue Configuration
This configuration file defines custom prices for items, including support for alternative currencies (WCoinC, WCoinP, GoblinPoints).
File Location#
Data/Item/ItemValue.xml
Dependencies#
| Depends On | Purpose |
|---|---|
| Item.xml | Item definitions and default prices (Money attribute) |
| ItemStack.xml | Determines whether an item is stackable, which affects how Value is totaled |
See also: ItemMove.xml for per-item sell/trade/drop restrictions, ItemOption.xml for the stat effects of excellent Grades referenced here.
How It Works#
- When an item is priced (NPC buy, NPC sell, personal store listing, or inventory value refresh), the server looks up a matching entry in ItemValue.
- Matching walks every entry with the same
Indexand picks the first one whereLevelandGradeeither match exactly or are wildcards. See "Match Priority" below for the exact order. - When a match is found,
Valueand the three currency toggles set the buy price.SellPriceandSellCurrencyset the sell price: the buy toggles never change the sell currency. WithSellPrice="0"(or missing) a Zen-bought entry sells forValue / 3Zen and a coin-bought entry sells for the item's normal Zen price. - For stackable items (see ItemStack.xml), the NPC buy total is
Value * StackCount. Bolts (Index 2055) and Arrows (Index 2063) are treated as non-stackable for pricing and always use a singleValue. - If no entry matches, the default buy/sell price calculated from the
Moneyattribute in Item.xml is used (sell = Money / 3).
Structure#
<Item Index="7181" Level="*" Grade="*" Value="90000000"
WCoinC="0" WCoinP="0" GoblinPoint="0" SellPrice="100"
Name="Jewel of Bless"/>
Attributes#
| Attribute | Type | Description |
|---|---|---|
Index | int | Item index (Category * 512 + Type) |
Level | string | * for any level, or 0-15 for a specific +level |
Grade | string | * for any grade, or the item's excellent-option bitmask value to match |
Value | int64 | Buy price (per-unit for stackables, except Bolts/Arrows) |
WCoinC | int | 1 = price is in WCoinC, 0 = not used |
WCoinP | int | 1 = price is in WCoinP, 0 = not used |
GoblinPoint | int | 1 = price is in GoblinPoints, 0 = not used |
SellPrice | int64 | What the NPC pays, in SellCurrency. 0 or missing: Zen-bought entry = Value / 3 Zen, coin-bought entry = the item's normal Zen sell price |
SellCurrency | string | Zen (default), WCoinC, WCoinP or GoblinPoint (or 0-3). Only used when SellPrice is above 0 |
Name | string | Item name (optional, for reference) |
Currency Priority#
When multiple currency toggles are set to 1:
GoblinPoint > WCoinP > WCoinC > Zen
If all toggles are 0, price is in Zen.
Examples#
<!-- Jewel of Bless: Buy 90M Zen, Sell 100 Zen -->
<Item Index="7181" Level="*" Grade="*" Value="90000000"
WCoinC="0" WCoinP="0" GoblinPoint="0" SellPrice="100"
Name="Jewel of Bless"/>
All currency toggles = 0 means Zen is used.
<!-- Buy for 30 WCoinC, sell for the normal Zen price -->
<Item Index="26" Level="0" Grade="*" Value="30"
WCoinC="1" WCoinP="0" GoblinPoint="0"
Name="Flameberge"/>
<!-- Buy for 50 WCoinP, NPC pays 2,000,000 Zen -->
<Item Index="6693" Level="*" Grade="*" Value="50"
WCoinC="0" WCoinP="1" GoblinPoint="0" SellPrice="2000000" SellCurrency="Zen"
Name="Horn of Fenrir"/>
<!-- Coin-shop-only item: buy for 100 GoblinPoints, sell back for 25 GoblinPoints -->
<Item Index="7181" Level="*" Grade="*" Value="100"
WCoinC="0" WCoinP="0" GoblinPoint="1" SellPrice="25" SellCurrency="GoblinPoint"
Name="Coin shop item"/>
<!-- Different prices per item level -->
<Item Index="2055" Level="0" Grade="*" Value="100" ... Name="Bolt"/>
<Item Index="2055" Level="1" Grade="*" Value="1400" ... Name="Bolt"/>
<Item Index="2055" Level="2" Grade="*" Value="2200" ... Name="Bolt"/>
<Item Index="2055" Level="3" Grade="*" Value="3000" ... Name="Bolt"/>
Higher level = higher price.
<!-- Different prices for excellent options -->
<Item Index="6659" Level="*" Grade="0" Value="960000" ... Name="Horn of Dinorant"/>
<Item Index="6659" Level="*" Grade="1" Value="1260000" ... Name="Horn of Dinorant"/>
<Item Index="6659" Level="*" Grade="3" Value="1560000" ... Name="Horn of Dinorant"/>
Grade = NewOption (excellent) value. Higher grade = more valuable.