Skip to content

Instantly share code, notes, and snippets.

@LXGaming
Last active April 8, 2024 00:45
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LXGaming/f5457fca7a7d10aed672d46b393de311 to your computer and use it in GitHub Desktop.
Save LXGaming/f5457fca7a7d10aed672d46b393de311 to your computer and use it in GitHub Desktop.
Frostpunk Cheat / Developer Mode

Developer Mode

  1. Start the game with -devconsole launch argument (Steam Guide / Epic Games Guide)
  2. Press the Backtick (Grave Accent) to toggle console

Commands

Command Description
SetGameTime(Day) Changes the day
SetResource("Id", Amount) Changes the resource amount. Quotes are required for the resource id
ShowDebugButtonsPanel Cheats / Debugging buttons

Resources

Id Name
Coal Coal
Wood Wood
Steel Steel
Steam Cores Steam Cores
Raw Food Raw Food
Food Rations Food Rations
Bodies Bodies
Wooden Materials Structural Profiles
Steam Tools Steam Exchangers
Steel Plates Steel Composites

Functions

Frostpunk v1.6.1 Dump or run the following (Source):

local a={}function dump(b,c)a[b]=true;local d={}local e=0;for f in pairs(b)do e=e+1;d[e]=f end;table.sort(d)for f,g in ipairs(d)do print(c,g)g=b[g]if type(g)=="table"and not a[g]then dump(g,c.."-")end end end;dump(_G,"-")

Open ConsoleOutput.html located in the root of the game directory to view them all.

@Mr-8k
Copy link

Mr-8k commented Dec 11, 2023

I think something changed between 1.6.1 and 1.6.2. Running the command to dump functions returns an error:
FP error
(there's nothing in the ConsoleOutput.html either)
Only noticed this as another command also seems to have broken, as per this thread InvokeEvent 'xxx' should provide a list but also returns an error. I'm tempted to find a 1.6.1 version and test this for myself.

@LXGaming
Copy link
Author

@Mr-8k Looking at the error the command doesn't look like it was entered correctly, I've been using Logitech G HUB to create a macro which types the command for me with a press of a button, If you don't have Logitech peripherals then something like AutoHotkey may work.

@Mr-8k
Copy link

Mr-8k commented Dec 12, 2023

Funny you should say that, I'm using an AHK script to type the contents of my clipboard. No way I'm entering that manually. Worth noting that frostpunk really loves screwing over all my inputs, logitech macros don't work and neither does something as simple as ctrl+esc to open the windows menu, only alt+tab works.

@LXGaming
Copy link
Author

Make sure you're using SendRaw in AHK so that the {} characters aren't interpreted as keys by AHK

@Mr-8k
Copy link

Mr-8k commented Dec 12, 2023

Much appreciated, my digging can resume.

@LXGaming
Copy link
Author

I've figured out how to load Lua scripts into Frostpunk.

Create the file %APPDATA%\11bitstudios\Frostpunk\script.lua with the following contents:

print("Hello, World!")

Then run gLua:ExecuteFile("script", "project") in the in-game console.

Technicals

When analyzing the ConsoleOutput.html there are several directories getting mounted to what appears to be a virtual filesystem.

  • %APPDATA%: user
  • %APPDATA%\11bitstudios\Frostpunk: project
  • %USERPROFILE%\Pictures\Frostpunk: screens

The ExecuteFile syntax appears to be ExecuteFile(<File Name>, [FileSystem Name]) (<> is required and [] is optional).

@Deanmartain
Copy link

I'm doing the developer mode in frostpunk but when I get the red command panel up and try a code it either says error while using chunks or end of stack level 1 or 2

@LXGaming
Copy link
Author

LXGaming commented Apr 8, 2024

@Deanmartain The commands are case sensitive, please make sure you are entering them correctly, if it's still not working please provide a screenshot of the error.

Example of the commands:
ShowDebugButtonsPanel
SetResource("Coal", 1000)
SetResource("Wooden Materials", 1000)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment