Skip to content

Currencies

The shop system supports multiple currency types. Each shop specifies which currency it uses via the currencyId field. Currencies are provided by different mods and can also be based on physical items in the player’s inventory.

PropertyValue
Currency IDquest_tokens
Provided byQuest mod
Earned throughCompleting quests (awarded as quest rewards)

Quest tokens are the primary progression currency. Players earn them by completing quests, and they can be spent in shops that accept quest_tokens.

Example quest reward
{
"type": "quest_tokens",
"amount": 5
}
PropertyValue
Currency IDachievement_points
Provided byAchievement mod
Earned throughUnlocking achievements

Achievement points are earned passively as players complete achievements. They serve as a secondary currency for shops that reward long-term play.

Shop using achievement points
{
"id": "rare_collector",
"currencyId": "achievement_points",
"items": [ ... ]
}
PropertyValue
Currency IDitem:<ItemId>
Provided byCore mod (auto-detected)
Earned throughGathering, crafting, looting

Any Hytale item can be used as a currency. The system counts items in the player’s inventory and removes them on purchase. No additional setup is required — the server automatically creates an item currency provider when it encounters an item: prefix.

Shop using gold bars as currency
{
"id": "example_shop",
"currencyId": "item:Ingredient_Bar_Gold",
"items": [ ... ]
}

Common item currencies:

Currency IDItem
item:Ingredient_Bar_GoldGold Bars
item:Ingredient_Bar_IronIron Bars
item:Ore_GoldGold Ore
item:Rock_Gem_RubyRubies

When a player opens a shop, the system looks up the currency provider matching the shop’s currencyId. The provider handles three operations:

  1. Balance check — How many tokens/points/items does the player have?
  2. Spend — Deduct the cost when a purchase is made.
  3. Refund — Return the cost if the item could not be delivered (e.g. inventory full).

When a player buys an item, the following checks happen in order:

  1. Permission — Does the player have the required permission (if set)?
  2. Purchase limit — Has the player exceeded maxPurchases for this item today?
  3. Balance — Does the player have enough currency?
  4. Transaction — Currency is deducted and the item is given.
  5. Refund on failure — If the item cannot be placed in the inventory, the currency is returned.

Purchase counts reset daily. A player who has bought 3 out of 3 allowed pickaxes today will be able to buy again tomorrow.

To create a shop that uses quest tokens:

shops/quest_rewards.json
{
"id": "quest_rewards",
"title": "Quest Reward Shop",
"currencyId": "quest_tokens",
"settings": {
"itemsPerPage": 9,
"dailyShopSize": 0,
"showSoldOut": true,
"allowBuyMultiple": false
},
"items": [
{
"itemId": "Potion_Health_Greater",
"name": "Greater Health Potion",
"quantity": 3,
"cost": 5,
"description": "3x Greater Health Potions",
"category": "consumables"
},
{
"itemId": "Weapon_Sword_Adamantite",
"name": "Adamantite Sword",
"quantity": 1,
"cost": 50,
"description": "The finest blade",
"category": "weapons",
"maxPurchases": 1
}
]
}