Skip to main content

Create database

The database is where you register reusable game data such as items, skills, classes, states, or custom objects.

Register data in provideServerModules

Once registered, you can use string IDs from the server:

Add data dynamically on a map

You can also register data at runtime:

What belongs in the database

  • items
  • skills
  • states
  • classes
  • custom server-side objects used by your game
  1. Put shared game data in database
  2. Keep map-specific or temporary content dynamic with map.addInDatabase()
  3. Use string IDs from gameplay code when possible

More details

See Items System for a complete example with item hooks and dynamic items.

Next step

Continue with Create sounds.