Way too much stuff, I need to commit more often >_<
[tablebottom.git] / Messages.txt
blobdc25fff081b40d8188097af2e091e88d0f48443a
1         Byte and bit order is little-endian.\r
2         An LStr is a 4-byte string length, followed by the string body.\r
3 \r
4         A message consists of:\r
5         4-byte body size(being the length of the remainder of the message).\r
6         4-byte message type.\r
7         A payload, comprising the rest of the message.\r
8 \r
9 \r
11                 Null Message\r
12         mBugged(00)\r
13         Nature: Indicates some uncaught error on the other side(or in the network connection). Never supposed to happen.\r
14         Payload: Could be anything, really.\r
18                 Container Message\r
19         mBatch(FE)\r
20         Nature: Simply a container for multiple messages. Intended to simplify parsing when the GM client \r
21         Payload: Zero or more concatenated messages.\r
25                 Basic Connection Messages\r
26         For all of these that don't specify a payload, the payload is your name(conceptually, "sender"). The reference client generates a starting name based on local IP and port, but that's hardly necessary. The clients trust each other to strictly account for name changes.\r
28         mConnect(01)\r
29         Nature: Tells other clients that you've connected. They'll respond with mIAm messages, and the GM client will respond with a full set of map messages.\r
31         mDiscon(02)\r
32         Nature: Tells other clients that you've disconnected.\r
34         mLog(03)\r
35         Nature: Tells other clients that you've changed your name. Also sends new IC/OOC state, but this is obsolete - the reference client only logs OOC.\r
36         Payload: One byte, 00 for OOC or 01 for IC, followed by two LStrs, old name and new name.\r
38         mIAm(04)\r
39         Nature: Tells other clients that you're there. Sent in response to an mConnect message, since if you connected before them, they didn't see your mConnect.\r
41         mVersion(EE)\r
42         Nature: Tells a client what the current reference client version is. Sent by the server in response to a connection.\r
43         Payload: A version string, like "1.0.0.42".\r
45         mSetRoom(EF)\r
46         Nature: Tells a server what room you want. Entering a room is ideally a one-way trip, but you could "disconnect", change room, and then "reconnect".\r
47         Payload: The room name. The reference client simply uses the campaign pack name.\r
51                 Chat Messages\r
52         For all of these, the payload is the string to print. This should include your name, in human-readable form.\r
54         mSay(05)\r
55         Nature: Says something ICly.\r
57         mOSay(06)\r
58         Nature: Says something OOCly.\r
60         mUplink(0D)\r
61         Nature: Says something privately to the GM. Non-GM clients should ignore these.\r
65                 Raw Info Message\r
66         mFact(09)\r
67         Nature: A simple statement of fact; intended for the GM to send things like "The weather grows cloudy.".\r
68         Payload: The string to print.\r
72                 Dice/Math Messages\r
73         For all of these, the payload is the string to print. This should include your name, in human-readable form, and some indication of what you're doing.\r
75         mCalc(07)\r
76         Nature: Tells the other clients you're using the CALC command, or equivalent. It should include both what equation you calculated, and the result.\r
78         mRoll(08)\r
79         Nature: Tells the other clients you're making a roll native to the game system. It should include both what you rolled, and the result.\r
81         mCheck(0A)\r
82         Nature: An alternative to mRoll. As such, it's not useful, and the reference client doesn't send mCheck messages.\r
86                 Map Messages\r
87         mMapUp(0B)\r
88         Nature: Tells the other clients about a BG, MG, or Mini.\r
89         Payload: A byte indicating the subtype(0=BG, 1=MG, 2=Mini), followed by information depending on type.\r
90         • BG/MG: A 4-byte square X coordinate, a 4-byte square Y coordinate, and an LStr with the name of the BG or MG image.\r
91         • Mini: A 4-byte pixel X coordinate, a 4-byte pixel Y coordinate, an LStr with the name of the Mini image, and a 4-byte UID. Further mMapUp Mini messages with the same UID refer to the same virtual mini; if the image name changes, the virtual mini has transformed.\r
93         mMapClear(0C)\r
94         Nature: Tells the other clients to clear their BG and MG data. Intended for GM use only.\r
95         Payload: None, though future versions may have a payload.\r
97         mPointer(0E)\r
98         Nature: \r
99         Payload: A 4-byte pixel X coordinate, a 4-byte pixel Y coordinate, an LStr with the sender's IP and port(or equivalent unique string), and an LStr with the name of the pointer image to use. Further mPointer messages with the same IP-and-port string refer to the same pointer; if the image name changes, the pointer looks different. An empty image name indicates the pointer should be hidden or cease to exist.\r
103                 AT Messages\r
104         mATData(0F)\r
105         Nature: Updates the other clients on your AT.\r
106         Payload: The string to print. This should include some indication of what's happening, and for a non-GM, your name, in human-readable form.\r
108         mNextAT(10)\r
109         Nature: Commands the other clients to advance their AT.\r
110         Payload: None, though future versions may have a payload.\r