Holiday Season Claim free $10 Credit On Your Next Server

The Forest Console Commands and How to Use them

Last Update 2024-12-15 12:51:21

Console Commands

This page contains all of the console commands available in the game. 

 

To activate the use of console commands, you need to type developermodeon in the main title screen to activate the developer console. There is no notification that the mode has been activated. Though, you can press F1 to see if it is working.

Note: Always make sure your server has the “In-Game Console” option set to ON and restart the game to take the change into effect. All The Forest servers are created with the setting OFF by default. If it's set to OFF, console will appear on the main menu but not in-game.

Popular Commands

These commands are the most common and used by players. They are easy to use and straight forward (they can also be found in their categories below):

CodeDescription

buildermode on
buildermode off

on - Turns on buildhack, turns on godmode, turns off survival mode, adds all items (not story items), and turns enemies off.

cavelight on
cavelight off

Increases the light while in a cave. Basically daylight inside the caves.

faststart on
faststart off

Skips the plane crash

godmode on
godmode off

No damage, unlimited stamina, fullness, water, energy etc. You cannot die

buildhack on
buildhack off

Allows building like Creative Mode. Unlimited resources and building super fast

cancelallghosts

REMOVES every blueprints that has been placed, will be very loud if you have a lot!

buildallghosts

BUILDS every blueprints that has been placed, will be very loud if you have a lot!

addallitems

Add all items, except story items. Use twice to fill inventory storage bags such as stick bags etc.

addallstoryitems

Adds all story items, such as keycards

itemhack on
itemhack off

Never run out of items, must have the item in the first place

survival on
survival off

No need to eat, drink etc.

save

Saves the game, no matter where you are in the world

speedyrun on
speedyrun off

Fast run, Be careful not to kill yourself, you get a lot of air time. This can be buggy, if turned off you may not be able to run. Try crouching, sprinting, jumping etc. to reset it.

invisible on
invisible off

Makes it so you can walk/run underwater like its air, disables swimming effects water lighting texture effects and washing of blood, paint & mud. (has no effect on rain it still washes you as normal)

killallenemies

Kills all cannibals and mutants in the game, they will respawn though

enemies on
enemies off

Turns enemies on or off, cannibals and mutants

additem 77

Adds a live rabbit to the players hand. Can be placed inside a rabbit cage

terrainrender on
terrainrender off

Turns on terrain
Turns off terrain, can still be walked on

lightingtimeofdayoverride noon

Sets game lighting to noon until turned off

forcerain heavy

Changes weather to heavy rain, useful for filling up water collectors

forcerain sunny

Changes weather to sunny, useful for stopping bad weather

cutdowntrees 10

10 will cut down 10 trees, choose any number

cutdowntrees 100%

100% will cut down all trees, choose any percentage

cutgrass 10

Cut grass in a 10 radius around player, choose any number. Can take a long time to load if large sizes are chosen

Indicators

These commands indicate information to the player that they may find useful:

CodeDescription

findpassenger

See passengers on how to use this

devicedebuginformation on
devicedebuginformation off

Shows you statistics about your device.

toggleCullingGrid on
toggleCullingGrid off
toggleCullingGrid toggle

Still investigating.

runMacro

Still investigating.

help

Lists all commands. Can be difficult to locate them, use the ~ key or F2

clear

Clears the console, helps clean it up so you can see what its doing

showgamestats

Shows stats of your current game, these include all of the following: Days, trees cut down, enemies killed, rabbits killed, deer killed, turtles killed, birds killed, cooked food, burnt food, cancelled structures, built structures, destroyed structures, repaired structures, edible items used, items crafted, upgrades added, arrows fired, lit arrows, lit weapons, burnt enemies, exploded enemies, opened suitcase, passengers found, story elements, and infections

toggleplaystats

 

achievementloglevel none
achievementloglevel log
achievementloglevel error
achievementloglevel all

none - By default it is set as off/none
log - Logs achievement progression, won't list errors
error - Lists errors, not progression
all - Logs achievement progress plus lists errors

pmactivestatelabels on
pmactivestatelabels off

Shows current behavior of enemies and animals on each one, this may cause major performance issues. Not recommended on 4K resolution as the writing is too difficult to read plus the performance drop is too severe

loaddebugconsolemod

Can be used to add commands to the debug console through a compiled C# dll following a specific scheme (possibly useful for modders)

Difficulty

These commands change the difficulty and game modes.
If you wish to change a creative game into a normal one you will need to type in setgamemode standard, then you will need to select a difficulty.

CodeDescription

setdifficultymode peaceful

Change difficulty to Peaceful Mode

setdifficultymode normal

Change difficulty to Normal Mode

setdifficultymode hard

Change difficulty to Hard Mode

setdifficultymode hardsurvival

Change difficulty to Hard Survival Mode

setgamemode standard

Changes game mode to standard

setgamemode creative

Changes game mode to creative

setgamemode mod

Changes game mode to mod

Time and Lighting

These commands affect the time of day, speed of the game, changing the day, changing the lighting of the day, etc.:

CodeDescription

checkday

Checks time of day, can be useful for multiplayer if joining

advanceday

Skips one day ahead, not much use

setcurrentday 100

Will change day to 100, any number can be used

timescale (number)

Changes the speed of the game, 0 pauses, 1 is normal, 2 is faster, etc. DON'T GO TOO HIGH, STAY BELOW 20 then work your way up

gametimescale #

Change # to a number. Changes the speed of day/night cycle, hunger, energy, thirst etc. Much safer than time scale

timescale 0

This will pause the game, press ESC twice to unpause

lightingtimeofdayoverride off

Turns off this command if it is turned on

lightingtimeofdayoverride HR:MM

Can be used to set anytime you wish, for example, 10:00 will make it 10 in the morning

lightingtimeofdayoverride morning

Sets game lighting to morning until turned off

lightingtimeofdayoverride noon

Sets game lighting to noon until turned off

lightingtimeofdayoverride sunset

Sets game lighting to sunrise until turned off

lightingtimeofdayoverride night

Sets game lighting to night until turned off

Environment

These commands will change weather, terrain, grow gardens, cut down trees, remove grass, etc.:

CodeDescription

allowsunshine
allowsunshine on
allowsunshine off

Can be toggled on and off without typing on or off at the end. Turns sunshine/fog on or off. When this is off, it can greatly increase view distance, though some textures look a bit funny.

terrainrender on
terrainrender off

Turns on terrain
Turns off terrain, can still be walked on

plantallgardens

Plants all gardens, also returns the amount of gardens

growalldirtpiles

Refill dirt piles used for camouflage

cutdowntrees 10

10 will cut down 10 trees, choose any number

cutdowntrees 100%

100% will cut down all trees, choose any percentage

cutgrass 10

Cut grass in a 10 radius around player, choose any number. Can take a long time to load if large sizes are chosen

forcerain light
forcerain 2

Changes weather to light rain

forcerain medium
forcerain 3

Changes weather to moderate rain

forcerain heavy
forcerain 4

Changes weather to heavy rain

forcerain cloud
forcerain 5

Changes weather to cloudy

forcerain sunny
forcerain 6

Changes weather to sunny

setrainbonus 4

Using number 4 helps with filling Water Collectors, requires more testing beyond this

Player

These commands will change stats, appearance and other attributes of the player:

CodeDescription

revealcavemap

Reveals the entire map, for above ground and below ground.

unlimitedHairspray on
unlimitedHairspray off

Never run out of Hairspray fuel.

save

Saves the game, no matter where you are in the world

itemhack on
itemhack off

Never run out of items, must have the item in the first place.

energyhack on
energyhack off

Unlimited energy and stamina

godmode on
godmode off

No damage, unlimited stamina, fullness, water, energy etc.

survival on
survival off

No need to eat, drink etc.

killlocalplayer

Kills player, depending on game state. In multiplayer, you will drop down

killmefast

Permanent Suicide, will require reload

revivelocalplayer

Revives player, might only work in multiplayer

fakehitplayer

Fake hits the player, player is stunted causing the player to 'flinch'

speedyrun on
speedyrun off

Fast run, Be careful not to kill yourself, you get a lot of air time

invisible on
invisible off

Makes it so you can walk/run underwater like its air, disables swimming effects water lighting texture effects and washing of blood, paint & mud. (has no effect on rain it still washes you as normal). This also allows you to move through invisible barricades within the game. For example, at the cliffs at the top end of the map and the edges of the map. Note that you can fall out of the map with this on.

setvariationextra None

Removes jacket if the player was wearing one

setvariationextra Jacket

Adds jacket if the player wasn't wearing one

decaynextmeat

Changes one meat, example: fresh>edible or edible>spoiled

poison

Poison is same as being hit by a poison arrow or a poison upgraded weapon, it causes infection which requires aloe to heal.

hitlocalplayer 50

Player will take 50 damage to 100, 0 - 100 can be used

setstat full

Changes all stats to full, such as health, energy, stamina, etc.

setstat Health 100

Changes health amount to 100, 0 - 100 can be used

setstat Stamina 100

Changes stamina amount to 100, 0 - 100 can be used

setstat Energy 100

Changes energy amount to 100, 0 - 100 can be used

setstat Sanity 100

Changes sanity amount to 100,0 - 100 can be used

setstat Fullness 100

Changes fullness amount to 100, 0 - 100 can be used

setstat BatteryCharge 100

Changes flashlight batteries charge to 100, 0 - 100 can be used. Most likely also affects weapons with flashlights attached

setSkill runTime 100

Sets sprint/run time to 100, this should max out athleticism

setSkill lungTime 100

Sets swim underwater time to 100, this should max out athleticism

setSkill ath 100

Sets athleticism to 99, which is the max

stewcomboverbose on
stewcomboverbose off

Indicates when a successful stew recipe/combination was consumed.

Clothing

These commands change the player's outfit: The console command listclothing will provide a list of all the clothing types in game when you press F2 and hover the mouse over the command.

CodeTypeDescriptionImage

addClothingById 1

HeadBeanie 1 

addClothingById 2

HeadBeanie 2 

addClothingById 3

HeadBeanie 3 

addClothingById 4

PantsDefault 

addClothingById 5

PantsBlack 

addClothingById 6

PantsCamo 

addClothingById 7

PantsKhaki 

addClothingById 8

PantsBeige 

addClothingById 9

Full OutfitBlack Suit

Blacksuit

addClothingById 10

Full HandsDarkgrey 

addClothingById 11

Full HandsGrey 

addClothingById 12

Full HandsGreen 

addClothingById 12

Full HandsShirt Closed 

addClothingById 14

Partial HandsJacket Low 

addClothingById 15

Partial HandsLeather-Jacket 

addClothingById 17

Partial HandsShirt Open 

addClothingById 18

Partial ArmsVest: Darkblue 

addClothingById 19

Partial ArmsVest: Dark Green 

addClothingById 20

Partial ArmsVest: Colorful 

addClothingById 21

ShirtDefault 

addClothingById 22

ShirtCamo 

addClothingById 23

ShirtWolf 

addClothingById 24

ShirtGrey 

addClothingById 25

Full ArmsBotton Up: Blue 

addClothingById 26

Full ArmsBotton Up: White 

addClothingById 27

Full ArmsLong Shirt: Grey 

addClothingById 28

Full ArmsV-Neck: Black 

addClothingById 29

Full OutfitStewardess Dress

Stewardess Dress

addClothingById 30

Full ArmsBathrobe 

addClothingById 31

PantsBathrobe Pants 

addClothingById 32

Full ArmsTennis Outfit

Tennis Outfit

addClothingById 33

Full ArmsPilot Uniform

Pilot Uniform

Animals

For 'spawn' commands, you are able to specify the quantity using the suffix --x (where x is the desired quantity). e.g. spawnanimal lizard --6 will spawn 6 lizards.

CodeDescription

killallanimals

Kills all the animals in the game, they will respawn though

killclosestanimal

Kills closest animal to you

animals on
animals off

Turns animals on or off

birds on
birds off

Turns birds on or off

spawnanimalquiet

Spawns a trapped animal if a Animal Trap is near by

spawnanimal rabbit

Spawn a rabbit

spawnanimal lizard

Spawn a lizard

spawnanimal deer

Spawn a deer

spawnanimal turtle

Spawn a turtle

spawnanimal tortoise

Spawn a tortoise

spawnanimal raccoon

Spawn a raccoon

spawnanimal squirrel

Spawn a squirrel

spawnanimal boar

Spawn a boar

spawnanimal crocodile

Spawns a crocodile

Enemies

These commands are related to enemies, which include cannibals and mutants. spawnenemy and spawnmutant usually do the same thing, however sometimes one won't work, whereas the other will. Try both if it isn't working. Keep in mind, if you are in creative mode or peaceful, you will need to change the game mode as well as the difficulty to be able to spawn enemies.


For 'spawn' commands, you are able to specify the quantity using the suffix --x (where x is the desired quantity). e.g. spawnmutant male --6 will spawn 6 cannibals.

CodeDescription

veganmode on
veganmode off

Enemies will only appear in caves.

resetallenemies

Resets AI, Kill all enemies

enemies on
enemies off

Turns enemies on or off, cannibals and mutants

knockdownclosestenemy

Knock down closest cannibal, may not work on mutants

killclosestenemy

Kills closest enemy to you, cannibal or mutant

killallenemies

Kills all cannibals and mutants in the game, they will respawn though. This does not work on worms, you must use killallworms for them instead

killallworms

Kills all worms in the game. They cannot be killed by using killallenemies command

killendboss

Kills End Boss

astar on
astar off

Turns on or off path finding for enemies, they will walk into water, walls, cliffs etc.

gotoenemy

Teleports player to a random cannibal, this is used by devs for testing enemy AI

spawnregularfamily

Spawns 3-6 Regular Cannibals

spawnpaintedfamily

Spawns 3-6 Painted Cannibals

spawnskinnedfamily

Spawns 3-6 Masked Cannibals

spawnskinnyfamily

Spawns 2-3 Skinny Cannibals

spawnmutant male_skinny

Male Skinny Cannibal

spawnmutant female_skinny

Female Skinny Cannibal

spawnmutant skinny_pale

Skinny Pale Cannibal

spawnmutant male

Male Regular Cannibal

spawnmutant female

Female Regular Cannibal

spawnmutant fireman

Fire Thrower Cannibal

spawnmutant pale

Pale Cannibal

spawnmutant armsy

Armsy

spawnmutant vags

Virginia

spawnmutant baby

Mutant Baby

spawnmutant fat

Cowman

spawnmutant worm

Worm

spawnmutant girl

End Boss

spawnenemy male_skinny

Male Skinny Cannibal

spawnenemy female_skinny

Female Skinny Cannibal

spawnenemy skinny_pale

Skinny Pale Cannibal

spawnenemy male

Male Regular Cannibal

spawnenemy female

Female Regular Cannibal

spawnenemy fireman

Fire Thrower Cannibal

spawnenemy pale

Pale Cannibal

spawnenemy armsy

Armsy

spawnenemy vags

Virginia

spawnenemy baby

Mutant Baby

spawnenemy fat

Cowman

spawnenemy worm

Worm

spawnenemy girl

End Boss

Items

Commands relating to adding, spawning or removing items.

 

CodeDescription

addallitems

Add all items, except story items. Use twice to fill bag storage

removeallitems

Removes all items from the player, including the plane axe.

addallstoryitems

Adds all story items, such as keycards

removeallstoryitems

Removes all story items, such as keycards

spawnallpickups

Spawns all items that can be picked up
For adding, spawning and removing individual items. Here are some examples:
additem 142 - This will add an Old Pot to your inventory
spawnitem 230 - This will spawn the Flintlock Pistol in front of you
removeitem 279 - This will remove the Modern Bow from your inventory, if you have multiple amounts it will remove them all

Important notes:

 

Conclusion

Console commands can help you in many situations like administrating a server for friends or community, aiding a player that had an accident or simply playing around with the limits of the game. Game on!