Professional Documents
Culture Documents
In the coming weeks, your wiki will receive FandomDesktop, the new look and feel for Fandom! Read more here.
1,774
Don't Starve Wiki PAGES
ADD NEW PAGE
in: Gameplay, Articles using instructional language, Articles using improper tone
Attention: This page is for console commands from the Base Game (along with
its dlcs). If you are trying to use console commands for Don't Starve Together
then please use this Page.
The Command Console is enabled by default. If for whatever reason it is not, you first need to do some tweaking
in your settings.ini of your save. This can be found in the "donotstarve" folder, located in the following paths :
Windows: %userprofile%\Documents\Klei\DoNotstarve\settings.ini
Mac: <Documents>\Klei\DoNotstarve\settings.ini
Linux: ~/.klei/DoNotStarve/settings.ini
Locate the settings.ini and open it with Notepad and where it says [MISC]ENABLECONSOLE = false and rewrite
it as [MISC]ENABLECONSOLE = true then save the document.
Then to open the console while in game by pressing "~" by default on English keyboards. This can be changed at
any time in the controls menu. Also you can hide the console menu again by pressing Ctrl + L.
You willNewsletter
FandomShop need to run this
Join Fancommand
Lab once to enable console commands: Bingebot: Find a new show to watch in 30 seconds
RunScript("consolecommands")
Note: Like many other command-line interfaced programs, the user can press the upper arrow key to get
access to previously entered commands, with no need to re-type them manually again. However, the player will Recent Wiki Activity
still have to re-enter every command after re-entering a world.
Deerclops
Циклоп-олень 1 • 17 hours ago
Contents [hide]
1 Simple commands Dragonfly
Циклоп-олень 1 • 19 hours ago
2 Player commands
3 World commands Moose/Goose
Циклоп-олень 1 • 19 hours ago
4 Profile Commands
5 Miscellaneous Commands Reanimated Skeleton
Циклоп-олень 1 • 19 hours ago
Improved DebugSpawn("prefab"), spawns amount of selected "prefab" under the mouse cursor.
Give Item Crock Pot
c_give("prefab", amount)
Characters
Spawns amount of selected "prefab" in your inventory. Only works with Backpacks and Items that can be stored
in the inventory.
Scenario (Not tested)
Don't Starve Together
c_doscenario(scenario)
c_sethealth(percent)
Webber
Sets your health to selected percentage. Note: Use fractional numbers 0.90 = 90%.
Sanity
c_setsanity(percent)
Sets your sanity to selected percentage. Note: Use fractional numbers 0.90 = 90%.
Hunger
c_sethunger(percent)
Sets your hunger to selected percentage. Note: Use fractional numbers 0.90 = 90%.
God Mode
c_godmode()
It won't drain Sanity, Hunger or Health when attacked anymore. Note that you will need to turn it off and on again
after passing through a Worm Hole, sleeping, Telepoofing, entering or exiting a cave system, eating mandrakes,
dying/respawning, or using complicated commands too many times. (In the Hamlet DLC, entering/exiting Ancient
Pig Ruins and Cave Clefts will not break it, but being transported by the BFB will.
Set running speed
c_speed(value)
Standard runspeed is 1. 10 makes the player a bit faster and with 40 they can walk through walls and "over"
water.
Set running speed (Don't Starve Together)
c_speedmult(multiplier)
There's some other commands, but they're hard to use and not very useful.
Player commands
Hide and show HUD
GetPlayer().HUD:Hide()
GetPlayer().HUD:Show()
Creative mode
GetPlayer().components.builder:GiveAllRecipes()
You can craft everything for free. This includes items you never crafted before. After switching levels, you will
need to re-enter the command.
Maximum health
GetPlayer().components.health:SetMaxHealth(value)
Maximum sanity
GetPlayer().components.sanity:SetMax(value)
Maximum hunger
GetPlayer().components.hunger:SetMax(value)
Pause hunger
GetPlayer().components.hunger:Pause(true)
Werebeaver
GetPlayer().components.beaverness:SetPercent(1)
World commands
Teleport to Prefab
c_gonext("prefab")
c_warp("prefab")
After pressing enter, it teleports you to the first numerical instance of the named prefab. If multiple iterations of the
prefab exist, a list of the entity numbers will be displayed in the console log, and each subsequent execution of
the same command will transport the player from entity to entity in the order they were generated in the world.
Delete Entity Under Mouse
TheInput:GetWorldEntityUnderMouse():Remove()
c_removeall("prefab")
Count prefabs
c_countprefabs("prefab")
c_countallprefabs("prefab")
Reveal Map
GetWorld().minimap.MiniMap:ShowArea(0,0,0,10000)
c_revealmap()
Note: the map will return to normal after exiting the game or changing maps, but any new areas will remain
explored.
Skip day
GetClock():MakeNextDay()
GetClock():Reset()
c_skipdays(x)
Skips x days.
WARNING: Too big values may freeze the game. (Depending on computer speed)
LongUpdate(X)
Skips X time units and performs the "LongUpdate" function on world objects
Note: There are 30 time units per segment. To skip a whole day one can either use LongUpdate(480) or use
multiplicative values such as LongUpdate(X*16*30) or LongUpdate(X*TUNING.TOTAL_DAY_TIME), with X=days
to skip.
Set segments
Usage:
GetClock():SetSegs(day,dusk,night)
GetClock():SetSegs(14,1,1)
Very long day, very short dusk and night (one segment for dusk and one for night)
Skip phase
GetClock():NextPhase()
GetSeasonManager():StartSummer()
Start summer
Start Winter
GetSeasonManager():StartWinter()
Start winter
Start Autumn
GetSeasonManager():StartAutumn()
Start autumn
Start Spring
GetSeasonManager():StartSpring()
Start spring
GetSeasonManager():StartMild()
GetSeasonManager():StartWet()
GetSeasonManager():StartGreen()
GetSeasonManager():StartDry()
GetSeasonManager():StartTemperate()
GetSeasonManager():StartHumid()
GetSeasonManager():StartLush()
Start Aporkalypse
GetSeasonManager():StartAporkalypse()
GetAporkalypse():BeginAporkalypse()
Start Aporkalypse
Stop Aporkalypse
GetAporkalypse():EndAporkalypse()
Stop Aporkalypse
GetAporkalypse():BeginFiesta()
GetAporkalypse():EndFiesta()
GetSeasonManager():StartPrecip()
Start rain
Stop Rain
GetSeasonManager():StopPrecip()
Stop rain
Do Lightning Strike
GetSeasonManager():DoLightningStrike(Vector3(GetPlayer().Transform:GetWorldPosition()))
Lightning strike on player. Will hit lightning rod instead if there is one near
Do Volcano Eruption
GetVolcanoManager():StartEruption(smokeduration,ashduration,firerainduration,firerockspers
Do a volcano eruption. Note that the fire rain duration is measured in seconds.
Measure Distance
print(math.sqrt(GetPlayer():GetDistanceSqToInst(TheInput:GetWorldEntityUnderMouse())))
Prints the distance between player and object under mouse to the console log (displayed with Ctrl + L by default).
Profile Commands
While profile commands are permanent and do not need to be done each time, they do need to be performed
while in a game. You can unlock multiple characters at a time without requiring the line including the save until
the very last step.
Change Character
GetPlayer().prefab = "character"
Changes the current Character to the one entered in the command (prefab name, i.e. for Maxwell it's waxwell).
It's required to save and quit the game for the change to take effect.
Unlock Willow
Profile:UnlockCharacter("willow")
Profile:Save()
Unlocks Willow. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Wolfgang
Profile:UnlockCharacter("wolfgang")
Profile:Save()
Unlocks Wolfgang. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Wendy
Profile:UnlockCharacter("wendy")
Profile:Save()
Unlocks Wendy. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock WX-78
Profile:UnlockCharacter("wx78")
Profile:Save()
Unlocks WX-78. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Wickerbottom
Profile:UnlockCharacter("wickerbottom")
Profile:Save()
Unlocks Wickerbottom. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Woodie
Profile:UnlockCharacter("woodie")
Profile:Save()
Unlocks Woodie. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Wes
Profile:UnlockCharacter("wes")
Profile:Save()
Unlocks Wes. Does not need to be re-entered after the first time unless you lose your profile settings.
Profile:UnlockCharacter("waxwell")
Profile:Save()
Unlocks Maxwell. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Wigfrid
Profile:UnlockCharacter("wathgrithr")
Profile:Save()
Unlocks Wigfrid. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Webber
Profile:UnlockCharacter("webber")
Profile:Save()
Unlocks Webber. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Walani
Profile:UnlockCharacter("walani")
Profile:Save()
Unlocks Walani. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Warly
Profile:UnlockCharacter("warly")
Profile:Save()
Unlocks Warly. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Wilba
Profile:UnlockCharacter("wilba")
Profile:Save()
Unlocks Wilba. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Wheeler
Profile:UnlockCharacter("wheeler")
Profile:Save()
Unlocks Wheeler. Does not need to be re-entered after the first time unless you lose your profile settings.
Unlock Warbucks
Profile:UnlockCharacter("warbucks")
Profile:Save()
Unlocks Warbucks. Does not need to be re-entered after the first time unless you lose your profile settings.
Profile:UnlockEverything()
Miscellaneous Commands
Clear the morgue
ErasePersistentString("morgue")
Clears the morgue. Requires closing and reopening the game for changes to be seen.
Profile.persistdata.unlocked_characters["character"] = false
Profile:Save()
Re-locks any unlockable character that was entered in the command (prefab name, i.e. for Maxwell it's waxwell).
Re-lock all unlockable characters
ErasePersistentString("profile")
Re-locks all unlockable players, such as Willow, Wes, Webber, Walani, etc. Requires closing and reopening the
game for changes to be seen.
Categories Gameplay Articles using instructional language Articles using improper tone
545 comments
Ketharia · 7/9/2021
I attempted to unlock Wheeler, after typing in the second command it froze so I had to close the game. I
lost a little progress, which I quickly redid. Wheeler did unlock, though.
Write a reply
When I use the delete under mouse command, it doesn't work unless I use only on local. It used to work
before. I used ctrl to use in remote, but it doesn't delete anything. If I delete in Local, it doesn't stick on my
own server. Any suggestions?
I want to know how to do it, i want to delete the pond on the path
Write a reply
Write a reply
YaBoyo · 5/14/2021
Write a reply
I can only use the godmode cheat, when I try any of the others it just says nil value
Write a reply
Can you make this more clear. like do I keep the quotes, and stuff. Can you please make it more clear
because I'm EXTREMELY confused
Write a reply
Lippia · 2/23/2021
Does regular Don't Starve have world seeds (to recreate duplicates of worlds) and if it does how to I find
them? Is there a command for it?
Write a reply
Write a reply
Meljijiji · 2/5/2021
How can I change the World Settings? I want to change the frequency of Crocodogs in DS/SW.
Meljijiji · 4/25/2021
I didn't ask for a mod. I ask for a piece of code to change the frequency on the console.
I can change the frequency of Crocodogs during the World Generation, but it is buggy.
(Edited by Meljijiji)
Write a reply
Does anyone know why I can't use GetClock() function inside consolecommands.lua?
I wrote my own god mode function and while GetPlayer() and GetWorld() works perfectly fine, GetClock() is
crashing my game while during launching the game.
function gm()
GetWorld().minimap.MiniMap:ShowArea(0,0,0,10000)
GetPlayer().components.builder.freebuildmode = true
GetPlayer().components.builder.inst:PushEvent("unlockrecipe")
if c_counttreasures() then
c_givetreasuremaps()
GetPlayer().components.inventory:DropEverything(false,true)
end
c_speed(15)
c_sethunger(1)
c_setsanity(1)
c_sethealth(1)
c_light(1,1,1)
c_godmode()
end
I was editing tabs and mistakenly changed the order of two lines, but its just a detail
if c_counttreasures() then
GetPlayer().components.inventory:DropEverything(false,true)
c_givetreasuremaps()
end
Write a reply
Bamaxdaws · 1/12/2021
Meljijiji · 2/5/2021
In DS, you can use an Ice Staff. In DST, you can either use an Ice Staff or make Water Balloons
and throw them on to the fire.
Bamaxdaws · 2/5/2021
Write a reply
GameProPie · 1/1/2021
Write a reply
Icantfeelmyface31 · 11/27/2020
How exactly do you activate them? cause they aren't working for me.
Icantfeelmyface31 · 12/14/2020
Yes
Write a reply
Write a reply
minimap = TheSim:FindFirstEntityWithTag("minimap")TheWorld.minimap.MiniMap:ShowArea
(0,0,0,10000)for x=-1600,1600,35 dofor y=-1600,1600,35
doThePlayer.player_classified.MapExplorer:RevealArea(x,0,y)endend
Write a reply
Write a reply
none of those work for me. it keeps saying "attempt to call a nil value" what am I doing wrong?
Write a reply
try taking out the question mark at the beginning, worked for me.
Write a reply
Idk sorry
You could eat chilly and ice with the c_give (" ", )
Write a reply
c_give("trinket_giftshop_4")
you need hamlet though
No...
Its ~c_give(ballsinyourmouth)
Write a reply
D&D Beyond