Owners realm - NexusTomorrow/server GitHub Wiki
The realm owner: each account's characters while its session is on character select, and the answer to every character-select request. How it fits the server is on Owners.
Character select
Each answer that depends on a write waits for its commit, so the client never hears about a character that isn't saved.
| Request | What happens |
|---|---|
| List | The first request of a session loads the account's characters once; later ones answer from that copy. Another session for the same account loads them again |
| Create | Checked in order: the list is loaded, the creation option is offered, the path is valid and no look id repeats; the name is allowed; the account isn't full, counting creates in flight; the name isn't taken. Then the character is written, and the reply follows the commit |
| Delete | The character has to be in the session's list; the reply follows the commit |
| Rename | Only a character marked for rename, one rename at a time, with the same name rules as creation |
| Select | Refused with its reason: the character needs a rename, is disabled, or the general reason. There's no world to enter yet |
The results the client is sent, and what each value means, are on Messages-Pregame.
Characters
Names
A character name is 5 to 31 characters, each part 1 to 29: the client's own limits for a whole name and for each part. It has no space at either end, at least two parts, and letters only, which is our rule. A name already taken, or waiting to be saved, is refused as taken whatever its case; the database's index holds the same rule.
Creation
| Rule | Holds |
|---|---|
| The options offered | From the client's character creation table: enabled, not costume-only, not starting at level 50, and needing no entitlement or currency |
| A new character's level | The one its option's experience reaches in the client's experience table |
| Where it stands | Its faction's configured start location, or the origin of world 0 when there's none |
| The tables | Read once at start-up from your client data; without them, every create is refused |
Ids
Character ids come in blocks from the database, and the realm owner asks for the next block once fewer than half of the current one are left.
Known edges
- Selecting a character is always refused until step 3's second stage hands it to a map.
- Start locations aren't checked at start-up; a faction without one starts at the origin of world 0.
Where the code lives
| Piece | Path |
|---|---|
| The realm owner, names and creation options | Source/NexusTomorrow.Owners/Realm/ |
| Tests | Tests/NexusTomorrow.Owners.Tests/ |