New Chat System Now Live!

UPDATE: This is now live for all games. Please post if you have any issues.

The new chat is nearing a state where it could fully replace the old chat and we need a couple of games to try it out before we move on to a more wide release.

Please post your placeId if you would like to sign up for the beta.
If you think your game may not work with new chat due to removing unknown objects inserted into ServerStorage or similar you can post the placeId for a test version of your game and make sure to get that working right now.

NOTE: If you sign up to the beta and want to edit the chat, you should copy the whole chat before editing it as parts of the API may change before final release.

If you want to try out the new chat, it is currently live on a number of games including Natural Disaster Survival.

Here is an example of how easy the new chat is to customize:
SciFi chat theme


Chat System Overview

There are four main components of the chat. They are parented to the Chat service and will be cloned out of here to where by the corescript chat installer scripts on game startup. Any component can be replaced individually if you only want to edit that component. You can place the replacement either in the Chat service or it’s final location (ServerScriptService, ServerStorage, ect.)

ChatServiceRunner
This is the main server side component of the chat. It is parented to ServerScriptService. You normally should not need to override this, and instead add to the ChatModules.
ChatModules
This is a folder parented to ServerStorage containing the server side chat modules. Modules parented here are required by ChatServiceRunner and they are expected to return a single function, taking a reference to the ChatService object as an argument. The default modules include TeamChat and PrivateMessaging.
ChatScript
This is the client side chat component. It will be parented to StarterPlayerScripts.
ClientChatModules
The client chat modules include client side ChatSettings, CommandModules and MessageCreatorModules. The ChatSettings provide access to a bunch of features that are off by default, such as channel tabs and chat window resizing. The command modules allow you to easily add client side chat commands that do not need to be sent to the server. Default commands include /console and /clear. The MessageCreatorModules are used to create chat messages of various types.


Documentation

A wiki article containing all the documentation is coming soon. For now, you can see the server side documentation on the previous post here.

[details=MessageData format]

{
    int ID
    string FromSpeaker
    string OriginalChannel
    bool IsFiltered
    int MessageLength
    string Message
    string MessageType
    int Time
    table ExtraData {
        Color3 ChatColor
        Color3 NameColor
        Enum.Font Font
        int TextSize
        table Tags
    }
}
```[/details]

[details=Client Side Documentation]
Command modules return a table in the following format:

{
int ProcessorType = …,
function ProcessorFunction(message, ChatWindow, [ChatBar], ChatSettings)
}

There are two processor types, one for in progress chat messages and one for completed chat messages. Only command modules of processor type IN_PROGRESS_MESSAGE_PROCESSOR get the ChatBar argument passed in. This is currently experimental and only used for the client side of whisper. It does not return a processed bool like normal command modules, but instead returns a chat bar custom state object which is used for modifying the chat bar.

Message Creator Modules return format:

{
string MessageType
function CreateMessageLabel(messageData)
}

The create message label creates a message label and returns a table of the following format:

{
Frame BaseFrame
void UpdateTextFunction(newMessageObject)
int GetHeightFunction()
void FadeInFunction(duration, CurveUtil)
void FadeOutFunction(duration, CurveUtil)
void UpdateAnimFunction(dtScale, CurveUtil)
}


TLDR:
Cool new chat, post your place ID to get in it your game today!
37 Likes

What’s the point of using ChatService if it’s going to end up placing the components in ServerStorage/etc anyway? All components should stay in ChatService.

4 Likes

This is what happens when I type ‘/?’ i your SciFi chat theme example:

8 Likes

its fixed

2 Likes

It’s similar to existing control/camera/etc scripts. Also there’s some value in having all your chat code in one place.

I agree that it’s a good thing to have the chat code all in one place, but it should stay in one place as well. StarterPlayerScripts contained ROBLOX scripts when it first released. Same story with the character. We’ve been able to plan accordingly because we knew these scripts existed. All of a sudden though, now we’re having foreign objects inserted into our game that with certainty will introduce unexpected behavior.

ROBLOX content should not interfere with our games – the topbar is a good study for why this is necessary. Every time ROBLOX has changed UI in the past, whether it be moving the menu button, chat, etc, it was a nightmare for everyone. The solution to that was to cordon off space for that UI so ROBLOX was able to manipulate the CoreGUI at will while allowing developers to plan around it at the same time, and none of us have had to redesign our layout since due to changes like some of the mobile buttons that were added.

1 Like

28586816

1 Like

The only case this should be an issue in is if games are looping through ServerStorage or ServerScriptService looking for objects that should not be there. This is a pretty small case and keeping everything in Chat service would introduce weird new replication behaviour and not be as easy to understand. Long term it would be nice to have self contained objects that can have both client and server components, but it does not seem like a good idea to have a special case just for chat.

“just for chat”

Client:

  • Leaderboard
  • Backpack
  • Health

Server:

  • Spawning
  • Leaderboard (controlling whether or not certain players appeared, etc)

Of course, none of those are part of this update, but in the future if/when those do get implemented you’re just going to end up causing the same mess all over again. Someone expects x to be in chat but now it’s in y. Or, even worse, chat has its own special container when everything else is grouped into a generic container. This change isn’t very future-proof.

We are not guaranteeing that parts of chat will be copied to ServerStorage/ServerScriptService ect. in the future, that is just how it works right now. Parts of the chat should be overridden in Chat service and we will keep things backwards compatible with that in the future.

This is awesome but I’m praying that the scripts are moved elsewhere to prevent major breaks with the roblox code and regula players code, especially those that use admin scripts and while I’m not entirely sure many will affect it, it’s a better safe than sorry situation. But if there’s any way in the future ChatService could get some love (or make ChatStorage) that would be great and we’d have a greater use out of the service.

My place ID: 127243303

My place ID: 119252166
Test place, so i don’t mess up the main.

Admin commands Test place.
337448601

Test place
538259342

66211953
and
66165758

Looking good. Love the fact that you can scale it, that’s great for social games!

186847702

345405078
and
85697719

1 Like

This is off by default but you can easily turn it on. It is the WindowResizable option in the ChatSettings module.

1 Like

Why is it off by default? Sounds like a useful feature that players would want to have across all games.

The flag will be turned on sometime later today for the ids posted. You’ll know it’s on if you start studio, play solo a game and see chatservice populated with 4 files/folders.

@EchoReaper
Design is not final, but I agree it’s a nice feature (there’s a few other ones too in there) so we’re giving the option to developers.