Jump to content

Does customcommands.lua still work in 2020? I'm trying to use it on a 2-player LAN-hosted game.


Recommended Posts

Title says most of it. I have customcommands.lua in Documents/Klei/DoNotStarveTogether as directed by (somewhat old) forum discussions I found. I already have a functional adminlist.txt file in my server's cluster folder. The syntax of the functions I wrote is definitely all good because I can use these commands in-game when I add them to the bottom of consolecommands.lua in the game's install directory. However, I figure this won't allow the other player on the server to use these custom commands. I found out about customcommands.lua but those posts are a little on the old side. Is there a new method or file location for this or am I going about this entirely the wrong way? Thanks!

Link to comment
Share on other sites

14 hours ago, cezarica said:

The customcommands.lua needs to be placed inside your Master and Caves folder so the stuff you added in it can be executed while you are above or in caves.

Btw, should post in [Don't Starve Together] Dedicated Server Discussion thread.

Thanks for the help! Last question: Is it a problem that this is a pc-hosted game instead of a dedicated server?

EDIT: Still didn't work. Maybe my syntax works for client commands but not server commands? Here it is:

function heal()
    c_sethunger(1)
    c_setsanity(1)
    c_sethealth(1)
end
function creativemode()
    c_speedmult(2)
    c_freecrafting()
    ThePlayer.components.sanity:SetMax(400)
    ThePlayer.components.hunger:SetMax(400)
    ThePlayer.components.health:SetMaxHealth(400)
end

EDIT 2: When I enter the functions (typing exactly: "creativemode()" or "heal()" I get a 'variable not declared' message in the console

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...