Custom data

The resources listed above have the option of attaching custom data. Custom data allows you to define additional information that you want to be stored against any resource definition. For example, this could be a resource description, the path to the texture that should be used to render the resource, or any additional resource properties that you want to change without having to rebuild your game. Custom data uses JSON format and is optional in your configuration. The maximum size for custom data is 5 KB.

For example, consider a Sword inventory item. You could add the following code in the Custom data field to assign the sword properties, as well as the path to find its image asset:

"damage": 5,
"strength": 10,
"durability": 20,
"assetPath": "/assets/sword.png"

The Custom Data editor comes with a built-in validation tool for JSON. Click BEAUTIFY to automatically reformat the code to optimize its legibility.

Instance data

An additional type of custom data is instance data, which is the data associated with a player’s instance of a particular inventory item. This data is set using the SDK or game API, uses the JSON format, and is visible using the Economy dashboard’s Find Player button. The main difference is that it does not relate to the configuration item, but to the specific player instance in the game.

Additional resources