Dev's NoxDev's Nox
Relay Protocol

Enter

Join a game instance with permission validation and player configuration.

The Enter message allows clients to join a specific game instance.

It handles permissions, passwords, whitelists/blacklists and configures the player's profile in the instance.

Priority

High - This message has a high priority to allow quick access to instances.

The Enter message requires the client to be authenticated. Requests sent before authentication will be rejected.


Client → Server Request

Payload Format

[instance_id: byte]
[flags: byte]
(UsePseudonyme ? [pseudonyme: string])
(UsePassword ? [password: string])

Detailed Structure

TypeNameDescription
byteInstanceIDID of the instance to join
byteFlagsInstance entry options
stringPseudonymeCustom display name (conditional)
stringPasswordInstance password (conditional)

Enter Flags

ValueNameDescription
0x00NoneStandard entry
0x01AsBotJoin as a bot
0x02UsePseudonymeUse a custom pseudonym
0x04UsePasswordProvide a password
0x08HideInListHide from player lists

Payload Example

[0x05]                          // InstanceID = 5
[0x00]                          // Flags = None

Entry with Pseudonym and Password

[0x03]                          // InstanceID = 3
[0x06]                          // Flags = UsePseudonyme | UsePassword
[0x0A, "PlayerName"]            // Pseudonyme = "PlayerName" (10 chars)
[0x08, "secret123"]             // Password = "secret123" (8 chars)

Entering as a Bot

[0x01]                          // InstanceID = 1
[0x09]                          // Flags = AsBot | HideInList

Server → Client Response

Payload Format

[instance_id: byte]
[result: byte]
(Success ? (
    [player_flags: uint]
    [player_id: ushort]
    [user_id: uint]
    [server_address: string]
    [display_name: string]
    [created_at: DateTime]
    [tps: byte]
    [threshold: byte]
))
(Blacklisted ? [expires_at: DateTime])
(Error in result ? [reason?: string])

Detailed Structure

TypeNameDescription
byteInstanceIDID of the instance concerned
byteResultEntry result code
uintPlayerFlagsPlayer flags in the instance
ushortPlayerIDUnique player ID in the instance
uintUserIDAuthenticated user ID
stringServerAddressServer address
stringDisplayNamePlayer display name
DateTimeCreatedAtPlayer creation timestamp
byteTPSInstance refresh rate
byteThresholdInstance latency threshold
stringReasonRejection or ban reason
DateTimeExpiresAtBan expiration date

Enter Results

ValueNameDescription
0x00SuccessSuccessfully entered the instance
0x01NotFoundInstance not found
0x02FullInstance full
0x03BlacklistedUser banned from the instance
0x04NotWhitelistedUser not authorized
0x05InvalidGameIncompatible game
0x06IncorrectPasswordIncorrect password
0x07UnknownUnknown error
0x08RefusedConnection refused
0x09InvalidPseudonymeInvalid pseudonym

Player Flags (Success)

ValueNameDescription
0x001IsBotThe player is a bot
0x002InstanceMasterReference player of the instance
0x004InstanceModeratorInstance moderator
0x008InstanceOwnerInstance owner
0x010GuildModeratorGuild moderator
0x020MasterModeratorMaster moderator
0x040WorldOwnerWorld owner
0x080WorldModeratorWorld moderator
0x100AuthUnverifiedAuthentication unverified
0x200HideInListHidden from lists
0x400HasCustomDisplayCustom display name

Response Example - Success

[0x05]                          // InstanceID = 5
[0x00]                          // Result = Success
[0x00, 0x00, 0x00, 0x00]        // PlayerFlags = None
[0x00, 0x01]                    // PlayerID = 1
[0x00, 0x00, 0x04, 0x2A] // UserID = 1066
[0x0A, "nox.server"]            // ServerAddress = "nox.server"
[0x0C, "PlayerName123"]         // DisplayName = "PlayerName123"
[0x00, 0x00, 0x01, 0x8A, 0x32, 0x1F, 0x80, 0x00] // CreatedAt (timestamp)
[0x3C]                          // TPS = 60
[0x32]                          // Threshold = 50

Response Example - Instance Full

[0x05]                          // InstanceID = 5
[0x02]                          // Result = Full
[0x0E, "Instance is full"]      // Reason = "Instance is full"

Response Example - Blacklisted

[0x05]                          // InstanceID = 5
[0x03]                          // Result = Blacklisted
[0x0F, "Disruptive behavior"]   // Reason = "Disruptive behavior"
[0x00, 0x00, 0x01, 0x8A, 0x32, 0x1F, 0x80, 0x00] // ExpiresAt (timestamp)

Response Example - Incorrect Password

[0x05]                          // InstanceID = 5
[0x06]                          // Result = IncorrectPassword
[0x12, "Incorrect password"]    // Reason = "Incorrect password"

Processing

Server Side

  1. Instance validation: Check that the instance exists
  2. Presence check: Ensure the client is not already in the instance
  3. Capacity control: Check that the instance is not full
  4. Permission validation: Check the blacklists/whitelists
  5. Flags processing: Configure the connection options
  6. Password validation: If required by the instance
  7. Player creation: Assign an ID and configure within the instance
  8. Notification: Update the Master Server

Client Side

  1. Data preparation: Assemble the instance ID and the flags
  2. Conditional sending: Append the pseudonym and/or password if necessary
  3. Response processing: Local configuration according to the result

Special Behaviors

Bot Mode

To join as a bot, the instance must allow bots (InstanceFlags.AuthorizeBot). Otherwise, the connection will be refused.

Custom Pseudonym

The pseudonym temporarily replaces the player's display name in this specific instance.

Password Protection

Protected instances require the UsePassword flag and a valid password.

Control Lists

  • Whitelist: If enabled, only authorized users can join
  • Blacklist: Banned users cannot join

Notification Messages

Join

When a player joins successfully, all other players in the instance receive a Join message with the new player's information.

Synchronization

The new player also receives data for all players already present, including:

  • Avatar information via AvatarChanged
  • Transformations via Transform

Error Codes

Permission Errors

  • NotWhitelisted: The user is not on the whitelist
  • Blacklisted: The user is banned with an expiration date
  • Refused: Connection refused (e.g. bot not allowed)

Instance Errors

  • NotFound: The instance does not exist
  • Full: The instance has reached maximum capacity
  • IncorrectPassword: Incorrect password provided

Data Errors

  • InvalidPseudonyme: The provided pseudonym is invalid
  • Unknown: Generic or unknown error

On this page