You are on page 1of 1

GAMES MOVIES TV VIDEO WIKIS Search START A WIKI

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

DON'T STARVE DLC DON'T STARVE TOGETHER COMMUNITY EXPLORE DISCUSS

in: Gameplay, Articles using instructional language, Articles using improper tone

Console/Commands VIEW SOURCE COMMENTS (545) SHARE


< Console

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

Simple commands Birds


Циклоп-олень 1 • 19 hours ago
Spawn prefab

c_spawn("prefab", amount) Popular Pages

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)

Apply a scenario script to the selection and run it.


Sanity
Health

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)

Does the same before but for Don't Starve Together.

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()

Hide or show (after hiding) the full HUD of the game.

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)

Change the Maximum Health of your Characters

Maximum sanity

GetPlayer().components.sanity:SetMax(value)

Change the Maximum Sanity of your Characters

Maximum hunger

GetPlayer().components.hunger:SetMax(value)

Change the Maximum Hunger of your Characters

Pause hunger

GetPlayer().components.hunger:Pause(true)

Your Characters won't starve anymore.

Werebeaver

GetPlayer().components.beaverness:SetPercent(1)

Turn Woodie into the Werebeaver.

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()

After pressing enter, it deletes the item under your mouse


Remove all of one prefab

c_removeall("prefab")

Count prefabs

c_countprefabs("prefab")

Count all prefabs

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()

Reset the clock back to day 1

GetClock():Reset()

Skips the current day.


Skip more days

c_skipdays(x)

Skips x days.

WARNING: Too big values may freeze the game. (Depending on computer speed)

Skip time units and update

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)

Sets amount of segments. Errors if adds up to over 16. Example:

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()

Skips the current phase.


Start Summer

GetSeasonManager():StartSummer()

Start summer
Start Winter

GetSeasonManager():StartWinter()

Start winter

Start Autumn

GetSeasonManager():StartAutumn()

Start autumn

Start Spring

GetSeasonManager():StartSpring()

Start spring

Start Mild Season

GetSeasonManager():StartMild()

Start mild season

Start Hurricane Season

GetSeasonManager():StartWet()

Start hurricane season

Start Monsoon Season

GetSeasonManager():StartGreen()

Start monsoon season

Start Dry Season

GetSeasonManager():StartDry()

Start dry season

Start Temperate Season

GetSeasonManager():StartTemperate()

Start Temperate season

Start Humid Season

GetSeasonManager():StartHumid()

Start Humid season

Start Lush Season

GetSeasonManager():StartLush()

Start Lush season

Start Aporkalypse

GetSeasonManager():StartAporkalypse()
GetAporkalypse():BeginAporkalypse()

Start Aporkalypse

Stop Aporkalypse

GetAporkalypse():EndAporkalypse()

Stop Aporkalypse

Start Pig Fiesta

GetAporkalypse():BeginFiesta()

Start Pig Fiesta

Stop Pig Fiesta

GetAporkalypse():EndFiesta()

Stop Pig Fiesta


Start Rain

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.

Unlock Maxwell (character)

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.

Unlock Everything (Currently all characters)

Profile:UnlockEverything()

Miscellaneous Commands
Clear the morgue

ErasePersistentString("morgue")

Clears the morgue. Requires closing and reopening the game for changes to be seen.

Re-lock any unlockable character

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

Community content is available under CC-BY-SA unless otherwise noted.

Add a comment about Console/Commands

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

A Fandom user · 5/23/2021

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?

A Fandom user · 6/18/2021

I want to know how to do it, i want to delete the pond on the path

Write a reply

Walani Laet · 5/17/2021

Inspiration meter of Wigfrid commands pls!!!!!!!!

Write a reply

YaBoyo · 5/14/2021

Wish console had this lmao

Write a reply

A Fandom user · 3/20/2021

I can only use the godmode cheat, when I try any of the others it just says nil value

A Fandom user · 4/26/2021

You need to type RunScript("consolecommands") before you type any command

Write a reply

A Fandom user · 3/20/2021

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

A Fandom user · 6/23/2021

You do keep the quotes

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

A Fandom user · 2/16/2021

Cant find the setting.ini

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.

A Fandom user · 4/24/2021

You dont even need mods for that

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

A Fandom user · 1/23/2021

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

A Fandom user · 1/23/2021

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

Is there a command to extinguish fires?

I recently made a mistake of ignoring possible thunder

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

Oh right i could give myself an ice staff, thank you.

Write a reply

GameProPie · 1/1/2021

So what the hell is c_supergodmode?

A Fandom user · 1/3/2021

Full life, sanity and hunger

Write a reply

Icantfeelmyface31 · 11/27/2020

How exactly do you activate them? cause they aren't working for me.

A Fandom user · 12/12/2020

Did you change the settings in the folder??

Icantfeelmyface31 · 12/14/2020

Yes

Write a reply

A Fandom user · 11/22/2020

it is possible to include winter on a map generated without winter ?

Write a reply

A Fandom user · 11/6/2020

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

A Fandom user · 10/14/2020

moood mood mood mood mood mood mood

Write a reply

A Fandom user · 9/1/2020

none of those work for me. it keeps saying "attempt to call a nil value" what am I doing wrong?

A Fandom user · 9/8/2020

you have to be in a game, not the title screen

A Fandom user · 11/8/2020

How do I spawn things?

Write a reply

A Fandom user · 8/28/2020

unlocking all the characters command isn't working

A Fandom user · 10/3/2020

try taking out the question mark at the beginning, worked for me.

Write a reply

A Fandom user · 7/21/2020

how do i change or set my temperature?

A Fandom user · 2/21/2021

Idk sorry

A Fandom user · 2/21/2021

You could eat chilly and ice with the c_give (" ", )

Write a reply

A Fandom user · 6/28/2020

How can I spawn a can of silly string in shipwrecked

Another nile · 7/9/2020

c_give("trinket_giftshop_4")
you need hamlet though

A Fandom user · 11/26/2020

You mother fucker

A Fandom user · 1/19/2021

No...
Its ~c_give(ballsinyourmouth)

A Fandom user · 2/21/2021

Please be kind to each other

Write a reply

LOAD MORE COMMENTS

EXPLORE PROPERTIES OVERVIEW COMMUNITY FANDOM APPS

Fandom About Community Central Take your favorite fandoms with


you and never miss a beat.
Gamepedia Careers Support
D&D Beyond Press Help
Cortex RPG Contact
Muthead Terms of Use ADVERTISE
Futhead Privacy Policy Media Kit
Fanatical Global Sitemap Contact
Local Sitemap
FOLLOW US

D&D Beyond

Don't Starve Wiki is a FANDOM Games Community.

VIEW MOBILE SITE

You might also like