Don't Starve Together

Don't Starve Together

111 ratings
Console Pro
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
19.350 KB
15 Jun, 2015 @ 3:06pm
6 Oct, 2019 @ 12:34pm
13 Change Notes ( view )

Subscribe to download
Console Pro

Description
More console commands.
It can be used as SERVER mod.

COMMANDS

reboot
reboot() - will reboot the server in 60 seconds (by default).
reboot("Bye all!") - will show message and then reboot server in 60 seconds.
reboot("Bye all!",25) - will show message and then reboot server in 25 seconds.

Periodically it will show message for players: "The server will be rebooted in N seconds."
In interval 15-60 seconds to reboot, it will show message: "Find a safe place."

shutdown
Same as reboot(), but another periodic message ("will be shutdown" insted of "will be rebooted").

d
d(prefab) - will spawn an item. Almost same as c_spawn (short form of DebugSpawn).
But it will spawn items as stacks. Not separate items.
d("fishsticks",20) - will spawn 1 stack of 20 fish sticks instead of 20 stacks (each with 1 fish stck).
You should use only prefabs, not names.
http://dontstarve.wikia.com/wiki/Console/Prefab_List

a
a(message) - will show message to all players. Useful for admins. It's just a short version of c_announce functoin.

ca_all
ca_all() - will count all prefabs and save this info in world.txt (in data folder). Useful only for hosts. Clients also could use it, but they are able to count only nearest prefabs.

rain
Only for hosts.
rain(9000) - will start raining
rain(-9000) - will stop raining

GiveAllRecipes
GiveAllRecipes() - give all recipes to all players.
GiveAllRecipes(3) - give all recipes to player #3
GiveAllRecipes("Peter") - give all recipes to player with nickname "Peter" (or "PETER" or "peter", no difference).
GiveAllRecipes("wilson") - give all recipes to all Wilsons.


DEBUG COMMANDS

show_act
show_act() - useful for modders. It will show in console all actions in the world. Don't play this feature for fun, because it can make your current game session a little bit slower. And you have to reboot server to turn this off. Only for debug purposes.

env
env(4123456789) - will return namespace of specific server mod. Useful for admins and modders.
env("MyMod") - will return namespace of the mod in specific folder.
env() - will return last returned namespace again.

modinfo
modinfo() - same as env(), but will return namespace of modinfo.lua of specific mod.

arr
arr(table) - will save specific table to file in readable format. File /data/log.txt (default folder for opened files).
Sorry, there is only russian hint.
It is very useful to save some huge table, which you want to trace.
arr(ThePlayer) - will save all info about player and it's components.
arr(TheWorld,2) - will save all info from TheWorld table, but not deeper than two steps.

p
p(variable) - same as print(variable). Just short version of common function.

pl
It's just a short version of global variable AllPlayers

del_all
del_all() - will remove ALL prefabs in the world. DON'T USE IT!
del_all("flint") - will remove all "flint" prefabs in the world.
del_all("flint",true) - will remove all "flint" prefabs, but not in pockets of alive players.
del_all("pigman","hp") - will remove all "pigman" prefabs with full health points.
del_all("flint","player") - will remove all "flint" prefabs except prefabs near players. So players won't see the process of removing.
del_all("flint",function() return math.random() < 0.5 end) - will remove 50% of all flint prefabs.

fe
fe - short form of "FindEntity". Useful only for modder to debug their mods.
fe("flint") - will find and return nearest flint prefab. Useful for modders to find bugs.
fe("flint",100) - will find flint prefab in range 100 (default is 50).
fe("flint",1500) - will find a flint in the world.
You should use:
x = fe("flint",1500)
Then you can use variable x in your experiments.

PatchFile
PatchFile(filename,data) - will replace some text in some files. Useful for very very clever admins if they are able to make their own micro mod and use this function.
Example:
PatchFile("scripts/modutil.lua",{
{'\tprint%("Warning: function Recipe in','\t--print("Warning: function Recipe in'},
})

w
Same as TheWorld
For example:
p(w.state.cycles) - will show world days

ww
Same as TheWorld.state
For example:
p(ww.cycles) - will show world days

P.S. Crash is impossible. But some functions may be buggy and won't work. Tell me if something goes wrong.

P.P.S Thanks Degranon for nice icon.
Popular Discussions View All (2)
0
24 Feb, 2017 @ 8:51am
PINNED: Commands
star
0
12 Apr, 2020 @ 12:53am
Команды
Nah i'd win
162 Comments
Eevee 24 Feb, 2019 @ 4:16pm 
open console: ö or ~
SirCobalt 29 Jun, 2018 @ 11:47pm 
how can u open the console?
star  [author] 6 Mar, 2018 @ 12:59am 
I'm not sure. Probably wrong prefab name
Ashivon 5 Mar, 2018 @ 12:01pm 
hey im trying to delete twiggy trees and stumps RemoteCommandInput: "del_all("twiggy",function() return math.random() < 0.5 end)" DELETED 0/14598 PREFABS, what am i doing wrong?
Crosswired :) 23 Jan, 2018 @ 8:42pm 
GiveAllRecipies() does not work
Ronin 1 Nov, 2017 @ 6:06am 
brilliant mod! the ca_all() function really helps an admin to keep their memory down! Thanks!
^Chicken_Point^ 19 Jun, 2017 @ 5:56am 
its awsome:steamhappy:
Cochonnes 1 Jun, 2017 @ 12:29pm 
It wont open up console
Ace Titan 17 May, 2017 @ 5:59pm 
THANK YOU! finally a good map revealer.
The Chaldean Guy 10 May, 2017 @ 1:59pm 
who ever made this mod im sucking them off no homo
:richarddad: