Scrap Mechanic: How to Enable Cheats — Dev Mode, Console Commands, and File Editing
Scrap Mechanic does not hide its console behind a secret key combination or a buried settings toggle. The developer, Axolot Games, left the entire command system exposed through a single Lua file edit. Change one line in SurvivalGame.lua and the chat window becomes a full cheat terminal — god mode, instant items, spawn commands, raid control, and blueprint imports all become available in Survival Mode.
The catch is that cheats are disabled by default, and the method differs slightly between enabling standard Survival commands and unlocking the deeper -dev launch option commands. This guide covers both activation paths, every verified command by game mode, and why multiplayer sessions require every player to enable cheats individually.
How to Enable Cheats in Survival Mode
The standard method requires editing one line in a Lua script. No third-party tools, no registry edits, no downloads.
- Right-click Scrap Mechanic in the Steam library.
- Select Properties → Installed Files → Browse.
- Navigate to Survival/Scripts/game/.
- Open SurvivalGame.lua in a plain-text editor (Notepad, Notepad++, or VS Code — never Word).
- Find the line that reads if g_survival then.
- Replace it with if true then.
- Save the file and close the editor.
Alternatively, insert g_survivalDev = true at the very top of the file. Both methods achieve the same result: unlocking the full Survival Mode command set.
To disable cheats, reverse the edit — change if true then back to if g_survival then and delete the g_survivalDev line if added. This does not break existing saves.
How to Open the Console
Press Enter during gameplay. A chat input line appears at the bottom of the screen. Type the command starting with / and press Enter again to execute. Press Enter on an empty line to close the console.
Commands are case-sensitive and must include the forward slash prefix. /god works; god without the slash is treated as chat text and does nothing.
Global Commands (All Modes)
These function in Survival, Creative, and Challenge Mode regardless of whether cheats are enabled.
| Command | Syntax | Effect |
|---|---|---|
| /help | /help [(string)command] [(bool)brief] | Lists all available commands. Adding a command name shows usage and description. Adding true or 1 after the name shows usage only. |
| /time | /time | Toggles timestamps in chat messages. |
| /frameratecap | /frameratecap [(float)cap] | Caps the frame rate. 0 removes the cap entirely. |
Survival Mode Commands (Dev Mode Required)
These only function after editing SurvivalGame.lua as described above.
Items and Equipment
| Command | Syntax | Effect |
|---|---|---|
| /ammo | /ammo [(int)quantity] | Gives potato ammo. Default is 50 if no quantity is specified. |
| /spudgun | /spudgun | Gives the Spudgun. |
| /gatling | /gatling | Gives the Potato Gatling Gun. |
| /shotgun | /shotgun | Gives the Fries Shotgun. |
| /sunshake | /sunshake | Gives one Sunshake. |
| /baguette | /baguette | Gives one Revival Baguette. |
| /keycard | /keycard | Gives one Keycard. |
| /powercore | /powercore | Gives one Powercore. |
| /components | /components [(int)quantity] | Gives Component Kits. Default is 10. |
| /glowsticks | /glowsticks [(int)quantity] | Gives Glowsticks. Default is 10. The in-game description incorrectly labels them as components. |
Player State and Environment
| Command | Syntax | Effect |
|---|---|---|
| /god | /god | Toggles god mode. The player takes no damage. |
| /tumble | /tumble [(bool)enable] | Puts the player into or out of ragdoll state. |
| /respawn | /respawn | Respawns at the last bed or the crash site. |
| /die | /die | Kills the player instantly. |
| /sethp | /sethp (number)hp | Sets exact health value. |
| /setwater | /setwater (number)water | Sets exact water value. |
| /setfood | /setfood (number)food | Sets exact food value. |
| /timeofday | /timeofday [(number)timeOfDay] | Sets time as a fraction. 0.5 is midday, 0 is midnight, 1 is next midnight. |
| /timeprogress | /timeprogress [(bool)enabled] | Enables or disables the day-night cycle. |
| /day | /day | Freezes time and sets it to daytime. |
Inventory and Economy
| Command | Syntax | Effect |
|---|---|---|
| /limited | /limited | Switches to standard Survival inventory with limited slots. |
| /unlimited | /unlimited | Switches to Creative-style unlimited inventory containing all Survival items. |
| /encrypt | /encrypt | Restricts interactions in all warehouses. Enables Encryptor usage. |
| /decrypt | /decrypt | Removes warehouse restrictions. Disables Encryptor usage. |
Spawning and World Manipulation
| Command | Syntax | Effect |
|---|---|---|
| /spawn | /spawn [(string)unitName] | Spawns a unit. Valid names: woc, tapebot or tb, redtapebot or rtb, totebot or green or t, totered or red or tr, haybot or h, worm, farmbot or f. Omitting the name spawns the old male player model. |
| /harvestable | /harvestable [(string)harvestableName] | Creates a harvestable. Valid names: tree, stone, soil, fencelong, fenceshort, fencecorner, beehive, cotton. Omitting the name spawns the old male player model. |
| /goto | /goto (string)name | Teleports to predefined positions. Valid names: here, start, hideout. |
| /aggroall | /aggroall | All hostile units become aware of the player's position. |
| /noaggro | /noaggro [(bool)enable] | Toggles whether enemies target the player. |
| /killall | /killall | Kills every spawned unit in the world. |
| /cleardebug | /cleardebug | Clears debug draw objects from the screen. |
| /reloadcell | /reloadcell [(int)x] [(int)y] | Reloads the cell at the player's position or the specified coordinates. |
Starter Kits
| Command | Contents |
|---|---|
| /starterkit | Orange chest with Scrap Gas Engine, Scrap Driver's Seat, Scrap Seat, 4 Scrap Wheels, 6 Bearings, Gas Container, 60 Gasoline, 512 Scrap Wood Blocks, 512 Scrap Metal Blocks, 512 Scrap Stone Blocks. |
| /mechanicstartkit | Black chest with 5 Sunshakes, 512 Scrap Wood Blocks, 256 Scrap Metal Blocks, 20 Glass Blocks, 10 Component Kits, 20 Gasoline, 20 Circuit Boards, 20 Chemicals, 20 Corn, 20 Pigment Flower, 15 Soil Bags, 10 Carrots, 10 Tomatoes, 20 Tomato Seeds, 20 Carrot Seeds, 20 Redbeet Seeds. |
| /pipekit | Blue chest with Vacuum Pump, 10 Vacuum Pipes, 5 Vacuum Pipe Corners. |
| /foodkit | Yellow chest with 10 Bananas, 10 Blueberries, 10 Oranges, 10 Pineapples, 10 Carrots, 10 Redbeets, 10 Tomatoes, 10 Broccoli, 5 Sunshakes, 5 Veggie Burgers, 5 Pizza Burgers, 5 Revival Baguettes, 5 Woc Milk, 5 Woc Steak. |
| /seedkit | Green chest with 20 Banana Seeds, 20 Blueberry Seeds, 20 Orange Seeds, 20 Pineapple Seeds, 20 Carrot Seeds, 20 Redbeet Seeds, 20 Tomato Seeds, 20 Broccoli Seeds, 20 Potato Seeds, 50 Soil Bags. |
| /tutorialstartkit | Starter kit for building a scrap car. |
Raid and Quest Control
| Command | Syntax | Effect |
|---|---|---|
| /raid | /raid (int)level [(int)wave] [(number)hours] | Starts a raid of the specified level at the player's position. |
| /stopraid | /stopraid | Cancels all incoming raids. |
| /disableraids | /disableraids (bool)enabled | Disables raids entirely if set to true. |
| /ambush | /ambush [(number)magnitude] [(int)wave] | Triggers an unused random encounter event. Non-functional in standard gameplay. |
| /activatequest | /activatequest [(string)name] | Activates a quest by name. Omitting the name activates all quests. |
| /completequest | /completequest [(string)name] | Completes a quest by name. Omitting the name completes all quests. |
Blueprints and Camera
| Command | Syntax | Effect |
|---|---|---|
| /export | /export (string)name | Exports the player's current creation to $SURVIVAL_DATA/LocalBlueprints/[name].blueprint. |
| /import | /import (string)name | Imports a blueprint from $SURVIVAL_DATA/LocalBlueprints/[name].blueprint. |
| /camera | /camera | Spawns a SplineCamera tool for cinematic recording. |
Creative Mode Commands
These function in Creative Mode without requiring the SurvivalGame.lua edit.
| Command | Syntax | Effect |
|---|---|---|
| /noaggro | /noaggro [(bool)enable] | Toggles enemy targeting. |
| /noaggrocreations | /noaggrocreations [(bool)enable] | Toggles whether Tapebots shoot at player creations. |
| /popcapsules | /popcapsules [(string)filter] | Opens all capsules. Optional filter: bot or animal. |
| /dropscrap | /dropscrap | Toggles scrap loot from Haybots. |
| /place | /place (string)harvestable | Places a harvestable at the aimed position. Must be on ground. Valid: stone, tree, birch, leafy, spruce, pine. |
| /restrictions | /restrictions [(bool)enable] | Toggles creation restrictions. |
| /allowclear | /allowclear [(bool)enable] | Enables or disables the /clear command. Only the host can run this. |
| /clear | /clear | Removes every shape in the world. Requires /allowclear to be enabled first. |
| /day | /day | Sets time to daytime. |
| /night | /night | Sets time to night. |
Dev Commands (-dev Launch Option Only)
These require launching the game with the -dev parameter. Before version 0.4.0, they were available without this flag.
| Command | Effect |
|---|---|
| /crashthegame | Forces an immediate crash. Used for debugging crash handlers. |
| /listplayers | Lists all connected players in a multiplayer session. |
| /console | Opens the external developer console window. |
How to Launch with -dev
- Right-click Scrap Mechanic in Steam.
- Select Properties → General.
- In Launch Options, type -dev.
- Close the properties window and launch the game.
Multiplayer Requirements
In multiplayer Survival Mode, every connected player must enable cheats in their own SurvivalGame.lua before joining the session. If the host has cheats enabled but a client does not, the client will crash when the host uses a command. All players must make the if true then edit independently. There is no server-side toggle that propagates to clients.
Removed Commands
Several commands were removed in version 0.6.0 and 0.5.0. They no longer function unless the player manually edits Lua files to re-add them:
| Command | Status |
|---|---|
| /recreate | Removed in 0.5.0. Reset the world to its initial state. |
| /enable_lift | Removed in 0.6.0. Toggled lift tool availability. |
| /enable_sledgehammer | Removed in 0.6.0. Toggled sledgehammer availability. |
| /enable_connecttool | Removed in 0.6.0. Toggled connect tool. |
| /enable_painttool | Removed in 0.6.0. Toggled paint tool. |
| /enable_weldtool | Removed in 0.6.0. Toggled weld tool. |
| /enable_handbook | Removed in 0.6.0. Toggled handbook. |
| /enable_spudgun | Removed in 0.6.0. Toggled spudgun. |
| /enable_client_toilet | Removed in 0.6.0. Unknown function. |
| /enable_ammo_consumption | Removed in 0.6.0. Toggled ammo usage. |
| /enable_fuel_consumption | Removed in 0.6.0. Toggled fuel usage. |
Honest Warnings
- Back up SurvivalGame.lua before editing. A corrupted Lua file prevents the game from loading. Copy the original to the Desktop before making changes.
- Word processors corrupt .lua files. Editing in Microsoft Word or WordPad introduces invisible formatting characters that break the Lua parser. Use a plain-text editor only.
- /clear is irreversible. Once /allowclear is enabled and /clear is executed, every shape in the world is deleted. There is no undo. Back up the world save before testing this command.
- /unlimited breaks progression balance. Switching to Creative-style inventory in Survival Mode removes all resource constraints. Quests that expect the player to gather materials become trivial.
- Spawn names are case-sensitive. /spawn woc works; /spawn Woc does not. Omitting the name spawns the old male player model, which is useless.
- Blueprints require exact names. /import mycar looks for mycar.blueprint in the LocalBlueprints folder. Typos fail silently.
Frequently Asked Questions
Do cheats disable achievements?
No. Scrap Mechanic has no anti-cheat layer. Steam achievements unlock normally regardless of console use.
Can cheats be used in multiplayer?
Yes, but every player in the session must enable cheats in their own SurvivalGame.lua. Mismatched settings cause client crashes.
Why does a command do nothing?
Most common causes: missing the / prefix, incorrect capitalization, using a Survival command in Creative without the edit, or attempting a removed command from an older guide.
Does editing SurvivalGame.lua break saves?
No. The file only controls command availability. Reverting the edit disables commands but leaves saves intact.
Can the old male player model be removed after spawning?
The old male player model spawned by omitting a /spawn or /harvestable name is a static object. It can be destroyed with the sledgehammer or by using /killall if it counts as a unit.
Is there a way to spawn specific items not listed?
No. The /spawn and /harvestable commands only accept the documented names. There is no generic item spawn command for arbitrary resources like Circuit Boards or Chemicals — those must be obtained through kits or normal gameplay.
Bottom Line
Scrap Mechanic's cheat system is a single line away. Change if g_survival then to if true then, press Enter, and the chat window becomes a god-mode terminal, a hardware store, and a time machine. The /unlimited command alone removes every inventory constraint in Survival Mode, while /starterkit and its variants hand out pre-packaged resource chests. The only real hazards are /clear wiping the world, multiplayer clients crashing from mismatched settings, and old guides referencing commands that were removed in 0.5.0 and 0.6.0. Back up SurvivalGame.lua, test spawn names on a throwaway world, and remember that /god does not protect against falling into the void.






