Skip to content

Message file

Thosea edited this page Jul 2, 2024 · 4 revisions

Messages file

Unlike the config file, there is no GUI for this, so all modifications must be made in the file. The messages file is located in the safechat folder under <minecraft dir>/config/robloxsafechat/messages.json.

Let's take a look at an example message config:

Example messages file
{
  "type": "group",
  "array": [
    {
      "type": "chat",
      "chat": "This is in the root group!"
    },
    {
      "type": "group",
      "name": "Here's a group!",
      "array": [
        {
          "type": "chat",
          "chat": "This is inside the above group!"
        }
      ]
    },
    {
      "type": "group",
      "name": "Here's another group!",
      "array": [
        {
          "type": "group",
          "name": "This group is inside the above group!",
          "array": [
            {
              "type": "chat",
              "chat": "This chat is inside of a group which is inside of the root group!"
            }
          ]
        }
      ]
    }
  ]
}

This absolute mess results in this layout:

Let's break it down. A chat/text element is defined like this:

{
  "type": "chat",
  "chat": "Your chat text goes here!"
}

And a group is defined like this:

{
  "type": "group",
  "name": "Group name goes here!",
  "array": [
    (group elements go here, chats or even other groups...)
  ]
}

(Note that name is not required or read for the root group which is defined at the top of the messages file and contains all messages and groups in the first layer.)

Now that you know that, understanding the example messages file shown at the beginning is pretty easy.
First, we define a chat:

{
  "type": "chat",
  "chat": "This is in the root group!"
}

next, we define a group with a single chat:

{
  "type": "group",
  "name": "Here's a group!",
  "array": [
    {
      "type": "chat",
      "chat": "This is inside the above group!"
    }
  ]
}

and finally, we define a group that contains a group which has a single chat:

{
  "type": "group",
  "name": "Here's another group!",
  "array": [
    {
      "type": "group",
      "name": "This group is inside the above group!",
      "array": [
        {
          "type": "chat",
          "chat": "This chat is inside of a group which is inside of the root group!"
        }
      ]
    }
  ]
}

And now that you know how to use the message file, customize it however you want, medium, rare, or well done.

Clone this wiki locally