Insurgency: Sandstorm

Advanced Chat (1.2.1) for Insurgency: Sandstorm

Released (updated ago). Ranked 26 of 664 with 193,884 (128 today) downloads

Published by Destinate (mod ID: 132641)


Note: This is for the server-side only.

This mutator will add custom chat colors and other features to the chat like emojis or icons. The mutator chatbox color will not work with any mod that replaces the widget/HUD. This mutator also has multiple HUDs for the right game mode. If you are playing hardcore game mode, the mutator will be automatically using the hardcore chatbox HUD to keep your hardcore HUD look exactly the same other than the chatbox.
Advanced Chat mutator is compatible with any mod that sends the message to the chatbox as long as they are not changing the HUD. That's mean the chat color and the feature of this mod will work with them.

Gamemode properties command also supports in this mutator regardless if the chatbox color and emoji works or not.

Mutator name:
- AdvancedChat

Supported Mod:
- MOTD (Reworked)

Supported mods are mods that compatible with this mod. It's not a requirement. It's optional to use with this mod.

Default game.ini config:

;No config
;Only chat command configs

Chat Color

There is a limit for chat color. Not all color is provided. I'm planning to make the user able to input their hex color code in it and use it but that will be in the future. To use chat color, you need to have the open bracket with the color name in it and a closing bracket in your chat.
Example: <red>This is red color</> and <blue>this is blue color</>

List of chat color that are available to use:



Emoticon or emoji is auto-replace in the chat with a specific word the moment u send it. For example, if you put the word NWI in the chat. It will be replaced with the NWI icon the moment it sends. It is not case sensitive and it can be disabled in the config if it too annoying. I might add emoji picker in the future.

List of a word that will be replaced into an icon


Chat Commands

To execute a command, your chat must start with ! or /.
Using the ! will send your command to the chat. The / will be silence. Which means your command won't show up in the chat. You can also change these prefix in the config.

The commands that you can use are the gamemode properties that can be executed using rcon. Instead of using rcon, you can execute it in-game. Only the admin can use these commands.
For example, if you put /bAllowFriendlyFire in the chat. It will tell you the current bAllowFriendlyFire value and only the person that executes it can see it.
If you put /bAllowFriendlyFire False then you are changing bAllowFriendlyFire property to False.

Note: Make sure you know what you doing when you changing the value. It can crash the server and the effect will immediately change to the value you put.

The other command that everyone can use is /me. What exactly this command does is just to output your own name with some message. For example, /me is playing insurgency then this will show up your name is playing insurgency in the chat.

If you dislike using the in-game chat command, you can disable them.
This is the default config for the command:

;Enable the usage of chat command. (This chat command usage will send to the chat message)

;The chat command prefix 

;Enable the silence command usage. (This chat command usage will NOT send to the chat message)

;The prefix for silence command chat

Note: If you want to use only the silence command, you can disable the bEnableCommand and keep using the bEnableSilenceCommand

Discord Chat

This is a feature that is optional.
Advanced chat supports discord chat. You will have to create a discord bot yourself using nodejs, python, C/C++, or other programming language you are familiar with.

I have a working version of nodejs on my github:

Follow the readme on the Github on how to set up the bot.

You will ask why do we need advanced chat mod if the bot can just rcon the message? Advanced chat has a way to detect if the rcon message is sending from discord or not just simply search for _DiscordTag_ in the rcon message and it will automatically replace it with a light blue color [Discord] tag in the chat. Without advance chat, the rcon message will look really ugly.

If you are a dev and you are going to make your own discord bot. All you have to do is send a say rcon with _DiscordTag_ in front of it.


say _DiscordTag_<Player name here> : <message here>

You will replace the player's name and the message you want to send in the rcon.

Rcon Say

If you are using rcon say, the "ADMIN:" is removed. So you can put your own in your rcon say.
This was a request by people using sissm.

If you like my mod and you want to support me, you can make a donation in my profile.





























Join the community or sign in with your gaming account to join the conversation:

chaikobar @chaikobar

HUD is missing with this mod :( Can you update this? i love the function of this mod but the HUD is important for me :(

(KOR)yeonggille @koryeonggille1

Could anyone can optimize the main.js to new discord.js or some other code? discord relay eats up my CPU performance when turn on the three servers. My CPU is i5 10400 but I cannot stand the thread/core performance leak anymore

DarkGhost7 @darkghost7

linking chat with discord instruction is not so clear
but i did what i could following the instruction
but it's not working... i setup the node and filled in settings in config.json
and ran node and drag&droped; main.js and typed enter
and just says it's error
I don't see why it's not working. please can anyone help??

RoamerLee @roamerlee

With the new discord.js ver.12 update, I needed to change some code in main.js. So, if you guys followed the instruction that Circleus gave yet code seemed not working properly, try replace the code on main.js to this:

`//Load config
var config_data = require('../configs.json');

//Get last line
const fs = require('fs');
const readLastLines = require('read-last-lines');

var Discord = require("discord.js");
var bot = new Discord.Client();

var Rcon = require("rcon"); var rc Rcon(config_data.RconIP, config_data.RconPort, config_data.RconPassword);

//Set your in game chat channel id here
var ChannelID = config_data.discord.ChannelID;

//Your insurgency log path file
var LogFilePath = config_data.LogFilePath;

console.log("[SERVER] Server started");

rconConnection.on('auth', function() {
console.log("[RCON] Authed!");
}).on('response', function(str) {
console.log("[RCON] Response: " + str);
}).on('end', function() {
console.log("[RCON] Socket closed!");
}).on('error', function(err){

//Establish rcon connection

//Discord bot events
//Bot connected to discord and its ready
bot.on('ready', () => {
console.log('[SS-DISCORD] Successfully Loaded');
bot.user.setActivity('ISMC Server', { type: 'WATCHING' });

//Bot reconnecting
bot.on('reconnecting', () => {
console.log('[SS-DISCORD] Reconnecting');

//When a user on discord send a message
bot.on("message", msg => {
if( return;

//Filter out channel so only the channel from ChannelID can send message to in game
if( != ChannelID) return;

var username =;
var message = msg.content;

//Filter out `
if(message.indexOf("`") !== -1)
const send_message = 'An Error Occur`Unable to send that message`';;

//Send an rcon message to game
rconConnection.send('say _DiscordTag_' + username + ' : ' + message);

console.log('[SS-DISCORD] ' + username + ' : ' + message)

//Log the file every time the file change to get the message in game and put it in the discord
var TempLastLine;, { encoding: 'buffer' }, (eventType, filename) => {
if (eventType == 'change') {, 1)
.then((lines) => {
if((TempLastLine != lines) && (lines.includes("]LogChat: Display: ")))
lines = lines.replace(/\n|\r/g, "");
TempLastLine = lines;
lines = lines.substring(lines.indexOf("]LogChat: Display: ") + 19, lines.length);
var chatmessage = lines.substring(lines.indexOf("Chat: ") + 6, lines.length);
lines = lines.substring(0, lines.indexOf("Chat: "))

var steamID;

var TempLine = lines;
var startOfID = TempLine.indexOf("(") + 1;
var EndOfID = TempLine.lastIndexOf(")");
steamID = TempLine.substring(startOfID, EndOfID);

TempLine = TempLine.substring(startOfID, EndOfID+1);

var PlayerName = lines.substring(0, lines.indexOf(steamID)-1);
var ChatType = lines.substring(lines.indexOf(steamID) + steamID.length + 1, lines.length);

const channel = bot.channels.cache.get(ChannelID);
channel.send("**[" + steamID + "] " + PlayerName + " :** " + chatmessage);
else if(ChatType.includes('Team'))
channel.send("**[" + steamID + "](TEAM) " + PlayerName + " :** " + chatmessage);
}).catch((error) => {

//Discord bot token (Require you to create your own discord bot in )

RoamerLee @roamerlee

Also change ChatChannel on configs to ChannelID and insert channel ID on the field. This way, even if you change channel name, it'll still work.

DarkGhost7 @darkghost7

Instruction linking discord part is not clear...
it suddenly mentions other things so i can't understand the instruction
could you help me how to

Alaura @alaura

So i installed this, but does this relay from ingame to discord at all? I've tried using admin say in console and nothing comes out, via rcon to discord, and i have the mod and the bot running.

BengukSquad @benguksquad

helo, i wanna ask. is possible to make a command from discord and w/o knowing in chat screen?
because i tried command and it shown on chat screen but not affected

Chinmay^_^ @chinmay

This works great. But is it possible to add shortcodes for emoji? Obviously typing it completely isn't easy.
Like or ll
ThumbUp or tup
ThumbDown or tdw
Resupply or rs
Supplies or ss
Credit or cr
Also is there any way to add short codes like 11=Breach etc? Thank you!

Nosferatu_UK @nosferatu-uk

***This enquiry is if you use the discord bot github nodejs***

Would it be possible for a better instructional video or readme? as visual explains a thousand words.

I have tried setting up the bot to use the advanced chat in my insurgency server... let me explain so far what i have done.

*Server has the advanced chat running (colours works and bold etc) the mutator is in the start up line of the server.bat AND the log command from the bot installation guide is in the start up line too.

*I have gone to discord and created a bot and gave some permissions from the discord faq tutorial and added it to the permanent discord server.

*I have downloaded and installed the nodejs and I have placed the the script files in a folder called BOT in the directory: C:\Server#01\BOT\

*I have then done npm install in command whilst CD to that directory and it installs:

C:\Server#01\BOT>npm install
npm WARN discord.js@11.6.4 requires a peer of @discordjs/uws@^10.149.0 but none is installed. You must install peer dependencies yourself.
npm WARN discordchat@1.0.0 No repository field.

audited 14 packages in 0.649s
found 0 vulnerabilities
C:\Server#01\BOT>npm start

> discordchat@1.0.0 start C:\Server#01\BOT
> node server/main.js

throw err;

SyntaxError: C:\Server#01\BOT\configs.json: Unexpected token S in JSON at position 234
at parse (<anonymous>)
at Object.Module._extensions..json (internal/modules/cjs/loader.js:1106:22)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:\Server#01\BOT\server\main.js:2:19)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
npm ERR! errno 1
npm ERR! discordchat@1.0.0 start: node server/main.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the discordchat@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Server\AppData\Roaming\npm-cache\_logs\2021-01-01T21_17_54_894Z-debug.log
So far the bot stays offline in the required chat channel (all channels in fact).
The advanced chat works in the Insurgency server.
I have added the connection settings in the config.json before installing the npm package.

the config.json file is:

"RconIP": "2.######.40",
"RconPort": 27017,
"RconPassword": "#######",
"botToken": "Nzk0NjY#####NDE0.X--GPg.cVFM-Xc#######xCnuPDHlI",
"ChatChannel": "server01"
"LogFilePath": "C:\Server#01\steamapps\common\sandstorm_server\Insurgency\Saved\Logs\Insurgency.log"
Any help would be great :)

Nosferatu_UK @nosferatu-uk

Turns out that even though i have it installed in:

The log file path in config.js cannot read \ locations, only /

So the WRONG path i was using:
LogFilePath": "C:\Server#01\steamapps\common\sandstorm_server\Insurgency\Saved\Logs\Insurgency.log"

Should be:

LogFilePath": "../steamapps/common/sandstorm_server/Insurgency/Saved/Logs/Insurgency.log"

The "../” at the start allows the running script to jump back out of my folder from "C:\Server#01\BOT\server" to "C:\Server#01" so it can now continue to search to the correct log file path.

Also the default path is: "sandstorm/Insurgency/Saved/Logs/Insurgency.log"

But if your using the dedicated steamcmd.exe installer for insurgency, then the path is: sandstorm_server/Insurgency/

Helsing-db- @helsing4

Flickering in the overview screen (TAB) when introducing this mutator in the presence of more than four mutators.

Snakeyio @snakeyio

yeh, its the game's UI nothing to do with any modder here. Send this to the customer support at NWI sandstorm.

Helsing-db- @helsing4

Hi! Thanks for the reply. The flickering disappeared with the latest updates. So, seems it had something to do with the mutators but... problem solved. ;-)

Lozza-Redback_Gaming @lozza-redback-admin

Is there a way to combine Bold and Colour

☠theF41_1_3N @thef41-1-3n

Hey, so I've recently been toying with creating a server, so I'm not sure if this is a NWI issue with the new 1.8 update or an issue with your mod, but I'm hoping you might have some more insight.

The colors works on the first map/match when the server starts, but after a map vote or rcon travel the colors no longer appear to work, but the bold text option works, which is why I think it may be this mod having some sort of issue?

M4xx65 @m4xx65

Hi Circleus my Welcome Message does not work in color.
WelcomeMessage=<lightblue>%name% Welcome to KSK server! Enjoy and have fun!
What am I doing wrong

KatanaPL◕_◕ @katanapl

WelcomeMessage=<lightblue>%name%</> Welcome to KSK server! Enjoy and have fun! - Name is light blue rest is normal |
The part at the very end is very important every message has to be like <bold> This text is in bold font </> || <red> This text is red </>

Lozza-Redback_Gaming @lozza-redback-admin

Had to choose between MOTD and Advanced Chat... sadly, I removed MOTD

[NF]Tazzy @nftazzy

I'm guessing The MOTD mod breaks the color side of things for this mutator only shows the code and not the color i have selected