Docs
What your mod needs to become a Console Admin, and how to set Console up correctly.
Console Admin requirements
- Console must be implemented fully and correctly into at least one of your mods. See Implementing Console.
- Your mod must have an average CCU of at least 10 and over 100 downloads.
- Telemetry and SyncData must be correctly implemented. See Telemetry and SyncData.
- 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.
- You cannot restrict console admin access to specific people on the main admins list, or remove super admin powers from super admins.
- Make sure telemetry is correctly implemented with CleanString. See CleanString.
- 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:
- Copy everything in the
Console/folder andConstants.csinto your project, in a folder of their own. Don't copyPlugin.cs; your mod already has its own plugin class. - Console starts its web requests with
Plugin.Instance.StartCoroutine(...), so make sure that resolves to your ownBaseUnityPlugininstance. - 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. - 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.
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.
| Field | Value | CleanString |
|---|---|---|
directory | Room code | 12, allows @ |
identity | Player's nickname | 12 |
region | Photon cloud region | 3 |
userid | Local player's user ID | 20 |
isPrivate | Whether the room is visible | no (bool) |
playerCount | Players in the room | no (number) |
gameMode | Game mode string | 128, allows ; |
menuName / menuVersion | Constants.Name / Constants.Version | no |
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.
| Field | Value |
|---|---|
directory, region, gameMode | Same as telemetry, with the same CleanString limits |
playersCount | Players in the room |
data | An 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:
- Removes every character that isn't an ASCII letter or digit, except the ones listed in
ignoredChars. - Cuts the result to
maxLengthcharacters. - 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.