[Open Assets] Chat Manager

This content may be freely modified and/or maintained by anyone.
Status
Not open for further replies.

Lat'

Absolute territory where
Kart Krew™️
Has this thought never crossed your mind?
"Man having the chat drowned in console notifications kinda blows."
...Well me neither, but that's not the point!

"Say goodbye to daily log.txt checking whenever you missed something and console notifications drowning the latest messages out with Chat Manager!"
...That's what's written on the back of the box.

attachment.php


It has one simple function, making chatting better by only listing messages from players, and allowing you to scroll up or down the log at any time without having to alt tab out of the game, while also adding a lot of new practical functions and user customization.

So, what's so hot about it?
-Talk to people. It's not like you could do this before!
-Highly customizable, the chat can be moved anywhere, you can set the max width or the height to your heart's content!
-Mention people like it's Discord! (@everyone not included)
-Mute individual people that you don't like
-Execute commands in the chat like it's Minecraft
-Choose when you want a chat beep to play! ...if you want a chat beep to play, that is.
-And other stuff I probably forgot about

Overall this gif here sums up the cool stuff mentionned above:
attachment.php


And here is a non exhaustive list of all the functions and commands inside this spoiler. If you wonder about anything in game, be aware that the answer will always be to type 'cm_help' in the console and to read what it says.

1: How the frick do I use Chat Manager??

CUSTOM 2 toggles the chat log or normal chat. When the chat log is enabled, you're able to see any message no matter how old they are. When normal chat is active, it displays the latest messages like SRB2's regular chat.

CUSTOM 3 toggles chat scrolling. When on, press forward or backward to scroll up or down. Be aware that you cannot move while you are doing that.

TO MENTION SOMEONE, type @<name> anywhere in your message. Mentions are not case sensitive, and will autocomplete given that you type at least more than half of the name correctly. (typing "@lat" should mention anyone that happens to be called "Lat'", typing "@sonichedgehog" will also mention anyone that could called "Sonic The Hedgehog")
It's also possible to mention by playernum, for instance, typing "@0" will mention the host.

TO EXECUTE A CONSOLE COMMAND (without actually opening your console), type /<command> in a normal say. For instance, '/suicide' will execute 'suicide' in your console. Be aware that anything after the / will be input in your console. (no, endless /say loops don't work, you'll only flood YOUR chatbox by doing that, you smartass.)

2: How many commands does one need!?!?

Chat Manager provides a lot of console commands for you to take advantage of to get a better experience (tm)

YOUR LORD AND SAVIOR:
cm_help: Basically prints everything below in your console if you forgot how to use this wad. Pretty useful.

CUSTOMIZATION COMMANDS:
cm_posx <0-256>: Set the chatbox's X position. Default is 150.
cm_posy <0-164>: Set the chatbox's Y position. Default is 5.
cm_width <64-320>: Set the chatbox's width (in pixels), allowing sentences to be longer before having to make a new line. Default is 128
cm_width <6-32>: Set the number of lines the chatbox can display without scrolling. Default is 8
cm_align <0-8>: Sets a V_SNAPTO flag for software non-green resolutions (Irrelevant in green resolutions and OpenGL) As a reminder for alignment;
0=Top, 1=Top Left, 2=Left, 3=Bottom Left, 4=Bottom, 5=Bottom Right, 6=Right, 7=Top Right, 8=None. Default is 7.
cm_reset: Resets all of the above to their default values in case you screw up.
cm_minichattime <-1, 10>: Sets the amount of time in seconds messages stay displayed for in normal chat mode. -1 never deletes the messages, they will only get deleted when too many messages are present on screen.

CHATTING COMMANDS / USER PREFERENCES:
cm_consolechat <On/Off>: Toggles message displaying in the console. Be aware that if set to off (default value), the chat does not automatically get saved to log.txt. See DATA COMMANDS below for more details.
cm_mentions <On/Off>: Toggles message highlighting on mentions.
cm_ignore <node>: Adds a player to your ignore list. You will not recieve any message or notifications from ignored players.
cm_ignorelist: Shows your ignore list in your console.
cm_clearignores: Resets your ignore list.
cm_notifications <0-2>: Sets when to play a chat beep. 0 never plays it, 1 always plays it, 2 only plays it on mentions (if enabled) and PMs. Default is 2

DATA COMMANDS / SAVE INFORMATION
cm_savechat: Prints the entierety of the chat in the console to save it to log.txt. This is to compensate the lack of console chat.
cm_clearchat: Clears the entierety of the chat. Useful if it gets a little messy.

NOTE: For SRB2 Plus C users, the chat will automatically get saved in ./luafiles/cm_chatlog.txt in a log containing ONLY the chat. The cm_savechat command is useless in this case.


---

TECHNICAL DIFFICULTIES
It's not a wad Lat' made without weird unintended stuff, here's a quick list of issues.

-320x200 is shit and doesn't work unless you're some advanced life form that can make out what squares translate to as letters.

-Don't forget that by default, the chat doesn't get saved to log.txt, please check the spoiler above containing commands and further explanations about this. This is not a bug, but rather something to avoid alienating sights of messages both at the top of your screen and in the chat box.

-Due to the lack of buttons checks avaiable to Lua, I was forced to use C2 and C3, which may clash with a few characters, I apologize for any inconvenience.

-While all CVars are saved, config.cfg only loads those on game load, so it won't work unless you boot the game with ChatManager. I recommand you make yourself an alias or a bind in autoexec if you have settings you prefer over defaults.

-The chat typing zone cannot be moved, and thus is still at the top of the screen.

-It's impossible to draw HUDs during intermissions, so normal SRB2 chat is turned on temporarily during these. Messages sent during that interval will still be visible in the chatbox afterwards.

-Because thinkers don't run when the game is paused, the script thinks of it as an intermission time and will enable console chat as stated above. This doesn't break anything, but I feel like it's important to mention it

-The chat text may sometimes leak out of the box depending on the message. Nothing too big, it's because of how stringWidth works with small text.

-Changing width mid-use will cause some oddities with messages containing no spaces ...by adding spaces.

-The chatbox will overlap any existing HUD, this cannot be fixed.

-Make sure to add chatmanager last to not have it be overlapped by any custom HUD

-Avoid adding the file mid game as that may cause some issues depending on the circumstances. (cannot really be fixed)

-Because it's much more relevant than you think it is, the HUD (showhud 1) is automatically enabled when starting any game. It's honestly something you probably don't care about, but just in case there's a weirdo constantly playing with showhud off, we never know.

-I've been reported some oddities with client detection sometimes picking the wrong player but have never been able to reproduce the issue.

---

If you have any question, please type cm_help in the console or read what's inside the spoiler.

Welp, I had fun making it, so have fun using it as well!
 

Attachments

  • srb20109.png
    srb20109.png
    106.8 KB · Views: 1,452
  • srb20052.gif
    srb20052.gif
    1.7 MB · Views: 5,548
  • cmlogo.png
    cmlogo.png
    561 bytes · Views: 3,692
  • srb20110.png
    srb20110.png
    5.8 KB · Views: 966
  • chatmanager_1.07.rar
    7.4 KB · Views: 643
Last edited:
Sorry to keep you waiting Lat'. This is an AMAZING wad. It really does make chatting in Srb2 much more efficient. I couldn't find any bugs in my play-though so...

Welcome to Releases my friend!
 
Awesome! A separate chat. It will be a stuggle to get used to af first but very neat.
 
Wait... Why is this in "Mods" rather than "Lua" (or maybe "Miscellaneous")? It looks pretty neat, of course, but... it feels more like a "script" kind of thing in my opinion.
Edit: It has been fixed/moved to "Lua" now.
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top