Pretty much everyone is annoyed by how little text you can fit in a chat message. I looked at the limiting factors on chat messages a bit earlier today. Here's what I found:
- The function that handles taking input for the chat message, and then prepares the chat command packet, is called StatusBar_OnUIEvent in the OllyDbg comment file. At 4118C2, it checks if the current input is less than 36 characters before it tries adding new characters. At 4119D1 and 4119D7, if the string length is greater than 63 (obviously a much bigger number than 36), it clips the string to that length.
- The bottom text bar (where chat messages/etc. get displayed) has a character limit of 78 including the null terminator. The top bar (where chat text is inputted) has a much bigger limit, I didn't test how much exactly yet.
- Each message log entry has a character limit of 51 including null terminator.
- For chat messages, they are prefixed with "[Player name]: ", and since player names can be up to 12 characters, that's up to 14 characters for that prefix. Message log entries are prefixed with "[Mark]: ", and if we assume mark doesn't go beyond 4 digits in a typical game, that's up to 6 characters for that prefix. So for a chat message in the message log, that's up to 20 characters for the prefix, which leaves 30 characters for the content of the chat message before it gets truncated. Also, if a single word is longer than the width of the message log box, it won't get split up and wrapped around to the next line at all, you won't be able to read anything that goes past the right side of the box.
- The command packet itself has a limit of 255 characters including the terminator because the dataLength variable in the packet header is a single byte.
If we increase the length of message log messages, then we can bump up chat message length to 57. If we increase the length of the buffer for text in the bottom text bar, we can go even further with it. Does anyone have any familiarity with the message log code and how we could change that? (That means you, Hooman.