Game ideas & features

Your next feature

Items

Unique equipment with properties, catalog rules and a clear player inventory.

SDK developRequires a player session
Godot
Illustration of Items
Your visible result

After saving, the catalog contains starter_sword. After the reviewed sample purchase, the current inventory contains its unique instanceId.

Video coming later

This step does not have a video yet. The guide and MCP request are ready to use.

Items

Prepare the same project

  1. Choose the same project in the dashboard as in your game configuration.

    Items →
  2. Create or reuse these test entries in the dashboard form. These are example values, not current project data.

    Key
    starter_sword
    Name
    Quickstart Sword
    Type
    equipment
    Rarity
    common
    Active
    true
    Base properties
    {"damage":5}
    Property rules
    []

    Items are individual objects with their own IDs and properties. Countable resources stay in Player Values; display cosmetics stay in Player Profile.

    Prepare coins using the Player Values guide. Then save an active offer starter-sword: cost 10 coins, item reward 1 starter_sword.

    Player values →
  3. Save, reload and verify the entries before running the example. Preserve unrelated definitions.

Build this feature

You can preview the guide. Running it requires an active project key. Prepare project

SDK installed, project configuration imported and player signed in.

This SDK example uses develop. Check whether the required APIs exist in your installed SDK.

Complete the Quickstart connection with the intended player. Call read_catalog_page(), read_inventory() from an explicit button or scene action. Opening the file alone sends no request.

GDScript
res://scripts/items.gd
horizOn call
1extends Node
2​
3# Connect and restore the existing player first. Each function is an explicit action.
4func read_inventory() -> void:
5 var user = Horizon.auth.getCurrentUser()
6 if user == null:
7 return
8 var result = await Horizon.items.getInventory(user.userId)
9 if not result.success:
10 push_warning(result.errorCode)
11 return
12 for item in result.data.instances:
13 print(item.instanceId, ": ", item.itemKey)
14 # Keep result.data.revision for a separately reviewed mutation.
15​
16func read_catalog_page() -> void:
17 var user = Horizon.auth.getCurrentUser()
18 if user == null:
19 return
20 var result = await Horizon.items.getCatalog(user.userId, "", 1)
21 if not result.success:
22 push_warning(result.errorCode)
23 return
24 print("Catalog revision: ", result.data.revision)
25 # Explicit Next retains revision and nextAfterKey; no automatic page loop.
26# Durable mutations: addons/horizon_sdk/examples/features/items_example.gd.
27# Preserve original instance/body/revision and the original PV purchase operationId.
28# Initial success may include item references; retained replay may return empty applied/items.
29# Read the current inventory separately; never reconstruct earlier item references.
30# A failed refresh never authorizes another purchase or a local item grant.
Open the complete SDK sample ↗

Use the saved item

Import the official sample and its helpers. Review the offer, then run the sequence below with the existing player. Wait for each step and confirm the purchase once. Keep the original request after an uncertain response.

items_example.gd: load_catalog_page() → review_offer("starter-sword") → purchase_reviewed_offer() → refresh_inventory()

Test your new feature.

After saving, the catalog contains starter_sword. After the reviewed sample purchase, the current inventory contains its unique instanceId.

Choose the same project in the dashboard as in your game configuration.

Endpoints
  • GET/items
  • GET/items/catalog
  • POST/items/adjust
  • POST/items/equip
  • POST/items/discard
All endpoints in the API reference
Our suggestion for your next step

Give every round a high score.

Save the score after a round and show who's ahead. Keep using your connection and player session.