Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hyperx.dev/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Character Data stores frequently changing game data such as inventory, currency, and progression. Define tables and fields in Console first. After sign-in, the client uses a user access token to save or load data for that user’s representative character.

Save data

await HyperX.Core.CharacterData.SaveJson(
    "inventory",
    userAccessToken,
    "{\"gold\":1000,\"level\":12}"
);
  • The first argument is the table key defined in Console.
  • The second argument is the user access token.
  • The third argument is a JSON object matching the Console schema.
  • Unknown fields or mismatched field types return a server error.
You can also pass JsonData directly.
var data = HyperX.Json.JsonMapper.ToObject("{\"gold\":1000,\"level\":12}");
await HyperX.Core.CharacterData.Save("inventory", userAccessToken, data);

Load data

var payload = await HyperX.Core.CharacterData.Get("inventory", userAccessToken);

if (payload.Exists)
{
    int gold = (int)payload.Data["gold"];
    int level = (int)payload.Data["level"];
}
The returned payload contains:
public readonly struct Payload
{
    public readonly bool Exists;
    public readonly int SchemaVersion;
    public readonly JsonData Data;
}

MVP limitations

This version focuses on save and load.
  • Conditional searches such as gold > 1000 or level between 10 and 20 are not supported.
  • Saved data is validated against fields defined in Console.
  • The public SDK currently targets the signed-in user’s representative character data.