New chat filter method FilterStringForBroadcastAsync live!

New chat method FilterStringForBroadcastAsync(message, playerFrom) available now!

This method is meant to be used for chat messages that aren’t directed at any particular user, and so is much stricter than the FilterStringAsync. Some possible use cases:

  • Cross server shouts like in Miner’s Haven
  • “Dark Souls” style player messages for later players to read
  • Message walls or user-created signs with text

(PS. FilterStringForPlayerAsync has been deprecated as well :slight_smile: )


This sounds useful. I’m wondering if you have also thought about a method where we pass an array of players/userIds and get an array/table of filtered strings back (i.e. keys are userIds/Player objects, values are strings). That would be helpful for custom chats so that we don’t have to manually loop over all players ourselves.

1 Like

You could get that same functionality with a lua helper method (with that exact table format you mentioned) and if you’re using FilterStringAsync it should be at “optimal” performance.

So because of that, we’ll try to keep our API as small as possible.

We’ll also be looking into ways to improve our chat UI and functionality soon. :alien:

When you say it is much stricter then FilterStringAsync, do you mean it’s going to end up like “#### the ######## ####” like under 13s would see?


Use FilterStringAsync (which is a bit more work, unfortunately) if you want to avoid that.

1 Like

What’s the catch with the player still being a required argument? Does it track player input for moderation purposes to an extent?

Yeah. There’s tracking for moderation history and other more serious things.

Does it by any chance handle text patterns, like some form of threatening?

Bonus question: FilterStringAsync(msg, same_player, same_player) filters according to the users age, or does it go for under 13 filtering by default?

It will filter the string in the same way as if you were to filter a message between 2 separate players with the same age settings. If the player is 13-, it will filter according to 13-, otherwise it will filter according to 13+.

1 Like

So if I do FilterStringForBroadcastAsync(Profanity/Racism, Player_I_Dislike) that would show up on their moderation history?

I think they would still need to get reported, no?
And if they do, mods could quickly check the game’s source to see if it uses it properly.
(or ask someone who can to validate it once)

At least, that’s what I hope is happening, else framing would be very easy…

I want to point out that your players will not see excessive hashtags if devs use this function. They will only see hashtags for the few topics that are filtered more harshly, such as personal info, and dating.

@pauljkl No, that would not work. There are already things in place to prevent things like that.


Just to add on, we know there are a few problems with the current chat filter and are doing our best to work them out.

1 Like