Scrap Mechanic Console Commands and Cheat Codes (Complete List)

Scrap Mechanic console commands let you spawn items, give yourself weapons, change player stats, control time, manage raids, teleport, and use developer tools. Console commands are only available after enabling cheats by editing a game file.

How to Enable Console Commands

Before you can use any commands, you need to enable cheats.

  1. Open Steam.
  2. Right-click Scrap Mechanic and select Properties.
  3. Open Local Files and click Browse Local Files.
  4. Go to: Survival > Scripts > Game > SurvivalGame.lua
  5. Open the file with a text editor such as Notepad++.
  6. Find the line that checks survival cheats (usually if g_survival then).
  7. Change it to: if true then
  8. Save the file and restart the game.

You can now enter console commands while playing.

Inventory and Item Commands

Use these commands to quickly obtain weapons, resources, and important items.

  • /ammo [amount] — Give ammo (default: 40)
  • /components [amount] — Give components (default: 10)
  • /glowsticks [amount] — Give glowsticks (default: 10)
  • /spudgun — Give the Spud Gun
  • /gatling — Give the Potato Gatling Gun
  • /shotgun — Give the Fries Shotgun
  • /sunshake — Give 1 Sunshake
  • /baguette — Give 1 Revival Baguette
  • /keycard — Give 1 Keycard
  • /powercore — Give 1 Power Core

Starter Kit Commands

These commands provide useful sets of items for different situations.

  • /starterkit — Spawn a standard starter kit
  • /mechanicstartkit — Spawn the mechanic station starter kit
  • /pipekit — Spawn a pipe kit
  • /foodkit — Spawn a food kit
  • /seedkit — Spawn a seed kit

Player Commands

Control your character’s health, survival stats, and position.

  • /god — Become invulnerable
  • /respawn — Respawn at your last bed or the crash site
  • /die — Kill your character
  • /sethp <value> — Set health
  • /setwater <value> — Set water level
  • /setfood <value> — Set food level
  • /goto <location> — Teleport to a predefined location
  • /tumble — Toggle tumble mode

World and Time Commands

Change the world’s time or reset it.

  • /timeofday <0.0-1.0> — Set the time of day (0.5 = midday)
  • /timeprogress <true/false> — Enable or disable time progression
  • /day — Set daytime and freeze time
  • /recreate — Recreate the world

Spawn Commands

Spawn enemies or resources instantly.

Units

Use /spawn <unit> with one of these:

  • woc
  • tapebot
  • totebot
  • haybot

Harvestables

Use /harvestable <type> with:

  • tree
  • stone

Raid and Enemy Commands

Manage raids and enemy behavior.

  • /ambush — Start a random encounter
  • /raid <hours> — Schedule a raid at your location
  • /stopraid — Cancel incoming raids
  • /disableraids <true/false> — Enable or disable raids
  • /aggroall — Make all hostile enemies target you

Warehouse Commands

Control warehouse interaction restrictions.

  • /encrypt — Restrict interactions in all warehouses
  • /decrypt — Remove warehouse restrictions

Inventory Mode Commands

Switch between inventory limits.

  • /limited — Enable limited inventory
  • /unlimited — Enable unlimited inventory

Blueprint Commands

Save or load blueprints.

  • /export — Export a blueprint to $SURVIVAL_DATA/LocalBlueprints/.blueprint
  • /import — Import a blueprint from $SURVIVAL_DATA/LocalBlueprints/.blueprint

Debug and Developer Commands

These commands are mainly intended for testing and development.

  • /camera — Spawn the SplineCamera tool
  • /cleardebug — Clear debug objects
  • /printglobals — Print all global Lua variables
  • /clearpathnodes — Remove all overworld path nodes
  • /enablepathpotatoes — Create and link path nodes where potatoes hit the overworld

Frequently Asked Questions

Do console commands work by default?

No. You must first enable cheats by editing the SurvivalGame.lua file.

Can I spawn weapons?

Yes. Commands like /spudgun, /gatling, and /shotgun instantly give you the corresponding weapon.

Can I disable raids?

Yes. Use:

/disableraids true

To enable raids again, use:

/disableraids false

How do I become invincible?

Use:

/god

This prevents your mechanic from taking damage.

Can I change the time of day?

Yes. Use:

/timeofday <value>

For example, 0.5 sets the world to around midday. You can also use /day to make it daytime and stop time from progressing.

Share this article
WhatsApp Telegram Messenger
Join community groups
WhatsApp Group Telegram Group