Migrate from v4 to v5
RPGJS v5 keeps the core v4 product model: the same gameplay can run as a standalone RPG or an MMORPG, the server owns multiplayer gameplay state, maps act as rooms, and players, events, hooks, database content, and GUI commands remain the primary framework concepts. The main migration is architectural. V5 favors explicit entries, plain module definitions, providers, replaceable runtime adapters, and CanvasEngine game components over compiler-controlled autoload and decorators.Migration Paths
Run the v4 project structure on the v5 runtime
UsecompatibilityV4Plugin() when the project should keep its v4 directory
layout, rpg.toml, flagged imports, and Tiled asset conventions. See
V4 Compatibility for the current setup and known
limitations.
This is the preferred first step for an existing game because it separates the
runtime upgrade from the source migration.
Migrate incrementally to native v5 modules
After the game runs on the v5 runtime, migrate one module at a time:- keep server gameplay hooks and commands
- replace decorated module configuration with
defineModule() - register runtime integrations through
provideX()providers - move visual components to the chosen v5 GUI or CanvasEngine integration
- validate the module in standalone and MMORPG modes
Replace Signe types leaked by early v5 betas
Early v5 betas re-exported reactive and DI implementation types from RPGJS packages. Replace those imports before v5 stable:
Plugins that deliberately use Signe internals should import and declare their
@signe/* dependencies directly. See
Advanced Signe Extension Points.
Register providers through RPGJS contracts
Import provider types from@rpgjs/common, including on the client and server.
Factories may initialize asynchronously; the runtime waits for their result
before exposing the provider:
useValue,
useClass, useFactory, or useExisting. These contracts catch conflicting
strategies during type checking instead of silently ignoring one.
For synchronized gameplay property declarations, import
RpgReadableSignal or RpgWritableSignal from @rpgjs/common. See
Synchronization for the gameplay-level API. Import
@signe/reactive directly only when an advanced plugin intentionally needs
Signe behavior that RPGJS does not expose.
Use the stable Node storage names
Node storage factories and their RPGJS-owned contracts come from the same entry:databasePath for an
RPGJS-owned connection or database for an existing compatible connection.
See Node server in production for the
memory lifecycle and production persistence guidance.
Compatibility Matrix
Compatibility Categories
Every v4 feature must be assigned one category before v5 stable:- Compatible: works without source changes
- Translated: the compatibility layer adapts it automatically
- Migration required: a documented, mechanical source change is required
- Deprecated: still works in v5 but native v5 code should use another API
- Unsupported: intentionally removed with a documented reason and alternative