What is the complete list of Don’t Starve item codes? In Don't Starve, you can actually use some command codes to get a lot of functions, but because there are so many codes, many players can't remember them. So let's follow the editor to learn about the full item map of "Don't Starve" Code sharing.
How to open the code desk: upper right of the keyboard (~)
Clear a code group from the screen (Ctrl+L)
GetPlayer().components.builder:GiveAllRecipes() ---------- All items are manufactured directly
GetPlayer().components.hungerause(true) ---------- Hunger value does not decrease
GetPlayer().components.sanity:SetMax(500) ---------- The mental value will not be reduced (use with caution and cannot be canceled)
GetPlayer().components.health:SetMaxHealth(300) ---------- Maximum health
GetPlayer().components.health:SetInvincible(true) ---------- God mode c_godmode() has the same effect
The following is to open the full map. You need to enter 2 commands. You have to press Enter every time to execute:
minimap=TheSim:FindFirstEntityWithTag("minimap")
minimap.MiniMap:ShowArea(0,0,0, 10000)
c_give("Item English name")/DebugSpawn("Item or creature code")
Both can generate items, but the former one is put directly into the backpack, and the latter one appears at the mouse position.
c_sethealth(percentage)
You can set the health value (not the upper limit) to what percentage sanity sets the spirit, and hunger sets the hunger (replace health instead of the entire command)
c_gonext("code")
Teleport you to the location of a nearby code (English name)
TheInput:GetWorldEntityUnderMouse():Remove()
Delete the object at the position of your mouse
GetClock():MakeNextDay()
skip a day
for x = 1, number do GetClock():MakeNextDay() end
Skip that many days
LongUpdate(value)
The clock has 30 units per grid, a full day is 480 units, the value is skip units
GetClock():SetSegs(day, dusk, night)
The clock has a total of 16 grids. The total number of day, dusk and night must be 16. For example: 7 grids during the day, 8 grids at dusk, and 1 grid at night. Then enter GetClock():SetSegs(7,8,1)
GetClock():NextPhase() skips the current time period, such as daytime and dusk
GetSeasonManager():StartSpring()Spring can be replaced by Summer, Autumn or Winter, that is, starting a season GetSeasonManager():StartPrecip() starts raining, and Start is replaced by Stop.
GetSeasonManager():DoLightningStrike(Vector3(GetPlayer().Transform:GetWorldPosition()
Lightning, targets you when there is no lightning rod nearby
GetPlayer().profile:UnlockCharacter("Character Name")
GetPlayer().profile:Save()
To unlock a character, the first code can be reused, but no matter how many characters are unlocked, the second code must be saved.
GetPlayer().profile:UnlockEverything()
Unlock all
ErasePersistentString("morgue")
To clear the death record, you need to restart the game (remember to save the current archive)
Seventy to eighty percent of item codes are the original English names. Search for the English name of the item you are looking for in Don't Starve Wiki (Wikia). For example, to find the code for sand, search for sand to find the sand page. There is a description in the introduction. DebugSpawn, what follows is the code
The Wiki has codes for almost all items, but sometimes it may not keep up when the game is updated.
c_spawn("item", quantity)
Place the specified number of items at the mouse location
c_give("prefab", amount)
Put the specified number of items into the player's body or bag. If there is not enough space, the item will not spawn.
c_sethealth(percent)
c_setsanity(percent)
c_sethunger(percent)
Adjust player status (percent is percentage)
c_godmode()
When attacked, brain damage, hunger and health will not decrease. In God Mode, you cannot use commands to change your state. When you die, you will be resurrected. Enter the command twice to cancel God Mode.
c_supergodmode()
The function is basically the same as above, except that it will fill up your status when setting.
c_speedmult(multiplier)
Set movement speed. When the movement speed is greater than 20, you will learn wall penetration and water floating. (multiplier is a number)
GetPlayer().components.builder:GiveAllRecipes()
You can build everything and no materials are needed.
ThePlayer.components.hunger:Pause(true)
Hunger level will not decrease.
AllPlayers[Number]:PushEvent('death')
Kill the specified player.
AllPlayers[Number]:PushEvent('respawnfromghost')
Resurrect player
c_goto(AllPlayers[number])
Teleport yourself to the specified player.
TheInput:GetWorldEntityUnderMouse():Remove()
Delete the item under the mouse pointer.
minimap = TheSim:FindFirstEntityWithTag("mini­map")
TheWorld.minimap.MiniMap:ShowArea (0,0,0,10000)
View full image
TheWorld:PushEvent("ms_setseason", "summer")
Starting season: summer, winter, autumn, spring.
TheWorld:PushEvent("ms_forceprecipitation")
It started to rain
TheWorld:PushEvent("ms_forceprecipitation", false)
stop raining
c_reset(true/false)
true to save and reload the world; false to reload the current world without saving. If you are a passenger plane, please do not enter this command. If you don't listen, you will be responsible for the consequences.
c_regenerateworld()
Delete the current world and regenerate it.
c_save()
Save progress. When auto-save is turned on, it will be saved automatically every morning. Be careful not to enter this command in succession too quickly. Archives may be corrupted.
c_shutdown(true/false)
Shut down the server. true to save and close the current world; false to close the current world without saving.
c_rollback(x)
Roll back x days x is the number of days you want to roll back. When x is not filled in, it defaults to one day.
TheNet:SetAllowIncomingConnections( true / false )
true allows others to join; false prevents anyone from joining.
c_announce("announcement")
Make an announcement.
c_move(AllPlayers[number])
Wherever you go.