4 Screenshots

About This File


This mod allows you to instantly send a chat message in just a press of a button.
Press 'Ctrl + Shift + F6' to toggle the mod on or off.

Edit your chat binds via the 'chatbinds.lua' file of this mod.
The file is located in the '...\mods\workshop-921637415' folder.
 

How to make your own chat binds:

Go to your Don't Starve Together game directory. It will usually be at '...\Steam\SteamApps\common\Don't Starve Together'.
If you have gotten the game during Closed Beta or Early-Access, then your game directory will be '...\Steam\SteamApps\common\Don't Starve Together Beta'.

Next, go to the 'mods' folder.

Mu83DMZ.png

Then to the 'workshop-921637415' folder.
1LlsjyO.png

Then open the 'chatbinds.lua' file.
rfdlyqi.png

The file will have placeholder chat binds at first, but you can change, remove, and add your own chat binds.
eBuS9cJ.png

You can go ahead and remove all the placeholder chat binds, but you can keep them if you want.
iGRTgcQ.png

Now, onto making your own chat bind. Here's a template:
t2htrkW.png

{ K, "This is an example of a sentence"
	,"print",
},

 

What this this does is make you send the message 'This is an example of a sentence' whenever you press the 'K' key on your keyboard.

 

Now, let's add a second chat bind:

{ K, "This is an example of a sentence"
	,"print",
},
{ V, "My hunger is <hunger> over <maxhunger>"
	,"print","whisper","shift"
},

What this does is include your current hunger and max hunger in the message. So if you have 90 current hunger and 150 max hunger, then the chat message you will send is 'My hunger is 90 over 150'.

Also, notice that there are two more tags, "whisper" and "shift". The "whisper" tag means that your chat message is only whispered to nearby players instead of everyone on the server.

The "shift" tag means that hotkey to send the message becomes 'Shift + V' instead of just 'V'. If you add a "ctrl" tag too, then the hotkey becomes 'Ctrl + Shift + V'.

 

Now, let's add a third chat bind:

{ K, "This is an example of a sentence"
	,"print",
},
{ V, "My hunger is <hunger> over <maxhunger>"
	,"print","whisper","shift"
},
{ F8, {"I've got heads", "I've got tails", }
	,"print",
},

 

What this does is randomly choose which one of the messages will be sent. Upon pressing the 'F8' key, you have a 50% chance to say 'I've got heads' and a 50% chance to say 'I've got tails'. You can put as much messages as you like and they will all have an equal chance of being picked.

Now, 'chatbinds.lua' should look like this:
wsOoy8Q.png

Hopefully, those examples are good enough of an explanation for how to make your own chat binds. It's very easy as long as you understand what goes where.

A list of available keys is located in the '...\mods\workshop-921637415\keys.lua' file.

 

There are more you can do with this mod though. Here is a list of how you can customise your chat binds:
 

Shortcut

Result

<health>

Your character's current health.

<maxhealth>

Your character's maximum health.

<me>

Your current in-game name.

<hunger>

Your character's current hunger.

<maxhunger>

Your character's maximum hunger..

<sanity>

Your character's current sanity.

<maxsanity>

Your character's maximum sanity.

<wetness>

Your character's current moisture.

<maxwetness>

Your character's maximum moisture.

<temperature>

Your character's current temperature.

<beaverness>

Your character's current beaverness.

<lasttarget>

The name of your most recent combat target.

<direction>

The direction that your camera is facing.

<mouse>

The name of the entity that your mouse is over.

<mouse_distance>

The distance in metres between your character and the entity under your mouse.

<nearestplayer>

The name of the player nearest to your character.

<nearestplayer_distance>

The distance between your character and the nearest player.

<nearestplayer_direction>

The direction of the nearest player from your character.

 

Tag

Effect

"whisper"

The message will be whispered to nearby players instead of being sent to everyone.

"shift"

Requires the 'Shift' key to be held down to send the message.

"ctrl"

Requires the 'Ctrl' key to be held down to send the message.

"ignoreshift"

Sends the message regardless whether the 'Shift' key is down or not.

"ignorectrl"

Sends the message regardless whether the 'Ctrl' key is down or not.

"print"

Also prints the message in your console as you send it to chat.

"private"

The message appears privately on your screen only.

"allownil"

Stops the default behaviour wherein your message does not get sent if one of the shortcuts returns nil.

"nonrandom"

Stops the default behaviour of randomly choosing messages from a table, and chooses each messages in sequence instead.

"nodelay"

Ignores the delay between sending each message. May cause severe connection issues if abused.

"shortdelay"

Shortens the delay between sending each message from one second to half a second.


3 people like this



User Feedback

Well, let's all hope that the average user isn't going to use this to mindlessly spam things.

It's already pretty annoying enough with the status announcement mod.

1 person likes this

Share this comment


Link to comment
Just now, CarlZalph said:

Well, let's all hope that the average user isn't going to use this to mindlessly spam things.

It's already pretty annoying enough with the status announcement mod.

I added a 1-second delay between messages and they only get sent upon release rather than upon press.

But yes, the current in-game chat is still extremely exploitable. It's as easy as taking 20 seconds to type out a console command that lets you lag players out of a server.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now