Persistence Guide
ElysIdentity supports two built-in persistence backends and can be extended with custom implementations.
JSON Backend
Best for prototyping and small servers.
- Single file:
players.json - Entire file rewritten on every save
- Human-readable for debugging
{
"players": [
{
"PlayerGUID": "550e8400-e29b-41d4-a716-446655440000",
"AccountName": "adventurer42",
"PINHash": "a1b2c3...",
"PINSalt": "d4e5f6...",
"ExternalIDs": { "Steam": "76561198..." },
"CreatedAt": "2026-01-15T10:30:00Z",
"LastSeenAt": "2026-03-17T14:22:00Z"
}
]
}
SQLite Backend
Recommended for production servers.
- WAL mode for better concurrency
- Indexed lookups for fast queries
- Two tables:
playersandexternal_ids
Schema
CREATE TABLE players (
PlayerGUID TEXT PRIMARY KEY,
AccountName TEXT UNIQUE COLLATE NOCASE,
PINHash TEXT NOT NULL,
PINSalt TEXT NOT NULL,
CreatedAt TEXT NOT NULL,
LastSeenAt TEXT NOT NULL
);
CREATE TABLE external_ids (
PlayerGUID TEXT NOT NULL,
PlatformName TEXT NOT NULL,
ExternalID TEXT NOT NULL,
PRIMARY KEY (PlayerGUID, PlatformName),
FOREIGN KEY (PlayerGUID) REFERENCES players(PlayerGUID)
);
CREATE INDEX idx_external_lookup ON external_ids(PlatformName, ExternalID);
Custom Backends
Implement FERPIdentityPersistence to create your own backend:
class FMyCustomPersistence : public FERPIdentityPersistence
{
public:
virtual bool LoadAll(TMap<FString, FERPPlayerIdentity>& OutMap) override;
virtual bool SaveAll(const TMap<FString, FERPPlayerIdentity>& Map) override;
};
Database Path Tokens
The DatabasePath setting supports token expansion:
| Token | Expands To |
|---|---|
{ProjectSaved} | <ProjectDir>/Saved/ |
Example: {ProjectSaved}/ElysIdentity/players → C:/MyProject/Saved/ElysIdentity/players.db