deez.uk / docs

Docs

What your mod needs to become a Console Admin, and how to set Console up correctly.

Console Admin requirements

console-requirements.txt7 rules
  1. Console must be implemented fully and correctly into at least one of your mods. See Implementing Console.
  2. Your mod must have an average CCU of at least 10 and over 100 downloads.
  3. Telemetry and SyncData must be correctly implemented. See Telemetry and SyncData.
  4. Console must be the same as main Console. The only exception is adding your own admins, or yourself as super admin. If you do this, please create new admin indicator icons.
  5. You cannot restrict console admin access to specific people on the main admins list, or remove super admin powers from super admins.
  6. Make sure telemetry is correctly implemented with CleanString. See CleanString.
  7. Once you've met every requirement, contact me by email or join the Discord.

Implementing Console

Console's source is on Gitea. Players who only want to use it can drop Console.dll into their BepInEx plugins folder. To build it into your own mod:

  1. Copy everything in the Console/ folder and Constants.cs into your project, in a folder of their own. Don't copy Plugin.cs; your mod already has its own plugin class.
  2. Console starts its web requests with Plugin.Instance.StartCoroutine(...), so make sure that resolves to your own BaseUnityPlugin instance.
  3. Apply Harmony patches from your mod's assembly, for example new Harmony("your.mod.id").PatchAll(). Console doesn't do this itself, and SyncData won't send without it.
  4. Add the Console components when your plugin starts:
void Start()
{
    gameObject.AddComponent<HamburburData>();
    gameObject.AddComponent<TrackerManager>();
}

HamburburData loads Console for you, connects to wss://api.deez.uk, downloads the site data and sends Telemetry. TrackerManager is optional, but appreciated.

Admins send commands to Console users with Console.ExecuteCommand(command, target, parameters), where the target is an actor number, an array of actor numbers, or a ReceiverGroup. The full command list is in the README.

Rule 4 means Console must behave exactly like main Console. Adding your own admins (and your own admin indicator icons) is the only change allowed.

Telemetry

Every time the local player joins a room, Console sends one request to POST https://deez.uk/telemetry (TelemetryManagement.TelemetryRequest). Every text field must go through CleanString with the limits below.

FieldValueCleanString
directoryRoom code12, allows @
identityPlayer's nickname12
regionPhoton cloud region3
useridLocal player's user ID20
isPrivateWhether the room is visibleno (bool)
playerCountPlayers in the roomno (number)
gameModeGame mode string128, allows ;
menuName / menuVersionConstants.Name / Constants.Versionno

The server ignores repeat telemetry for the same player and room within 10 seconds, so you don't need to throttle it yourself.

SyncData

When another player's cosmetics finish loading, Console sends their details to POST https://deez.uk/syncdata (TelemetryManagement.SendRigData). It never sends data about the local player or about Console admins.

FieldValue
directory, region, gameModeSame as telemetry, with the same CleanString limits
playersCountPlayers in the room
dataAn object keyed by the player's user ID, with userId, userName, userCreationDate, rawCosmeticString, customProperties, roomCode, playersInCode and gameMode

This runs from a Harmony patch on VRRig, so it only works if your mod applies its Harmony patches (see Implementing Console).

CleanString

TelemetryManagement.CleanString(input, maxLength, ignoredChars) makes text safe to send:

  1. Removes every character that isn't an ASCII letter or digit, except the ones listed in ignoredChars.
  2. Cuts the result to maxLength characters.
  3. Converts it to upper case.
CleanString(PhotonNetwork.CurrentRoom.Name, 12, ['@'])
CleanString(PhotonNetwork.CloudRegion, 3)
CleanString(NetworkSystem.Instance.GameModeString, 128, [';'])

Use the exact limits and allowed characters from the Telemetry table. Sending raw, uncleaned strings fails rule 6.

Site data

Console downloads deez.uk/data on startup and refreshes it every 60 seconds. It holds the admin list, super admins, known people, cheats and mods, and the message of the day. HamburburData.OnDataReloaded fires each time it's reloaded if your mod wants to react to it.

Applying

Once your mod meets every requirement, email deez@deez.uk or ask in the Discord. Found a bug in Console? Open an issue.