Skip to content

Instantly share code, notes, and snippets.

@LXGaming
Last active November 15, 2024 00:08
Show Gist options
  • 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.

@LXGaming
Copy link
Author

For Epic Games you might be able to do the following:

  1. Click your profile icon in the top right corner
  2. Click Settings
  3. Scroll down to the Manage Games section, find and click on Frostpunk
  4. Check Additional Command Line Arguments

@Gwaggyo
Copy link

Gwaggyo commented Jan 29, 2022 via email

@LXGaming
Copy link
Author

Good idea, I've add a link to my previous comment into the guide.

@juceza
Copy link

juceza commented Apr 13, 2022

I couldn't make it work. I'm playing frostpunk on Ubuntu using Steam Proton. Do you know if lauch options work when using proton?

@LXGaming
Copy link
Author

@juceza I'm not sure as I don't have any experience with using Steam Proton, Please try setting the launch option to %command% -devconsole and if that doesn't work try PROTON_LOG=1 %command% -devconsole as hopefully the log file may offer some clues as what Proton is doing.

Reference: https://www.protondb.com/help/troubleshooting-faq#how-do-i-create-logs-of-a-game-i-run-with-proton

@juceza
Copy link

juceza commented Apr 14, 2022

With that option I could see the -devconsole on the process explorer as shown in the next image:
image

But in game, when I press tilde it just show a tilde in the bottom-left corner of the screen:
Screenshot from 2022-04-14 08-49-22

In the beginning of the log (is a huge log btw) is printed the following:
image

@LXGaming
Copy link
Author

Ok so the Code rev, Data rev and Build time at the top left of the game only appear when -devconsole is enabled so the launch options are working correcting, It seems to me that something outside the game is maybe capturing the tilde key.

@juceza
Copy link

juceza commented Apr 14, 2022

Hmm ok! I'll look into it and share the answer with you when I have one. Thanks for the help!

@LXGaming
Copy link
Author

Are you using a US Layout keyboard? Make sure the key you are pressing is this character: `

@juceza
Copy link

juceza commented Apr 14, 2022

I'm using PT-BR layout. But with your comment I could make it work
I had to press Shift + ` twice and the console opened

@LXGaming
Copy link
Author

LXGaming commented Apr 14, 2022

Awesome! I have updated the original post to make it clear which key is required to open the console.

@YAMILive
Copy link

YAMILive commented May 5, 2022

How to make Execution Platform have no cooldown? And I didn't find ConsoleOutput.html, the game root directory doesn't have it, how to enable more command functions

@LXGaming
Copy link
Author

LXGaming commented May 5, 2022

@YAMILive Not sure, I've dumped the global Lua functions for you https://gist.github.com/LXGaming/d3c66c1e6dec8a46d78b7248c6c57b88

@YAMILive
Copy link

YAMILive commented May 5, 2022

SetGameTime(Day) No effect, it prompts irreversible

@LXGaming
Copy link
Author

LXGaming commented May 5, 2022

If the current game day is 10 you'll have to run SetGameTime(11) for it to advance to the next day.
Just tested and can confirm that this command works.

@franabad
Copy link

How can I undo what I've done? When I unhide the sites, how can I hide them again? Thanks in advance!

@LXGaming
Copy link
Author

@franabad Unless Unhide sites is a toggle, I don't believe you can re-hide the sites. Creating a new game or loading a older save would be the only solution.

@franabad
Copy link

@LXGaming it is not a toggle. The thing is that I need some survivors to complete the quest in Refugees scenario. I get them all except the one that are hidden, that's why I want to unhide the sites, so I can get the survivors. Once I get them, I would like to hide again but it doesn't seem possible! Do you know other way to complete the quest? I need like 15 people to reach 250! Thanks!

@LXGaming
Copy link
Author

LXGaming commented May 25, 2022

You unlock the sites as the incoming refugee groups arrive, I reached 238 without touching the sites, After visiting the sites I reached 341,
It's possible that Unhide sites is breaking the scenario.

Survivor Sites:

  • Trail Bend: 19
  • Black Spire: 37
  • White Pass: 47

Frostpunk

@franabad
Copy link

Yeah, I know that. The problem is that I have 64 bodies... Thats why I want to unhide the site called Red Flag Camp, so I can get there and take them to my city. It's hidden until you finish the quest. As you can see, I have all the Survivors Sites.
image

@LXGaming
Copy link
Author

Yeah I'm not sure, It seems that it's added in dynamically as you progress through the scenario rather than being hidden, There are cheats in the panel which can make Citizens immortal which might be an alternative solution.

@franabad
Copy link

franabad commented May 25, 2022

@LXGaming Yeah, but those who are dead will remain dead. I really don't wanna start over again because I've tried it like 10 times. I'm playing survivor mode and it's pretty hard. In 10 times, I only had 1 Canning Workshop with food...

@xXGaboXx195
Copy link

Hi, i been trying to make this work but it seems impossible, got the game on Epic and i already added the "-devconsole" command but in the game it doesn't work i have changed my keyboard to US and nothing.
I downloaded the game from internet and i added the command line to the shortcut, but in the game i just got the build and date message and still no console window.

Can you help me?
07ebd64ea3d8dc4f61dfcf4b5b3c4c8b

@pankajbains5
Copy link

@YAMILive Not sure, I've dumped the global Lua functions for you https://gist.github.com/LXGaming/d3c66c1e6dec8a46d78b7248c6c57b88

where to put this function

@HELLOIAMCATBUG
Copy link

How can I make devconsol active but only on the pirated version of the game?

@Zewling
Copy link

Zewling commented Nov 28, 2023

For Epic Games you might be able to do the following:

  1. Click your profile icon in the top right corner
  2. Click Settings
  3. Scroll down to the Manage Games section, find and click on Frostpunk
  4. Check Additional Command Line Arguments

Hello @LXGaming, I would like to ask you for little help here with dev console activation on Epic game launcher. I did as you wrote and wrote -devconsole into empty field under "Additional Command Line Arguments" but without success with summon the comand line. Also I tried to -allowconsole, -console and its different variation.
Please when you have some time have a look onto this. I will very appreciate your help here.

Many thanks in advance.

@Moriac1
Copy link

Moriac1 commented Nov 29, 2023

Hello @LXGaming, thanks for you work and explanations. Do you know how FreeCam command works, or any that involves manipulating the game camera ? Do you know if there is a more complete documentation on how to use each Lua functions they are supposed to ? (i'm getting a ton of error messages, so i guess i'm doing something wrong).

Thanks in advance for your help. Take care !

@LXGaming
Copy link
Author

LXGaming commented Dec 1, 2023

@HELLOIAMCATBUG It's just a program argument, open a terminal in the game folder and run Frostpunk.exe -devconsole.

@Zewling I re-tested Epic Games and it worked fine, double check you're pressing the correct key, if you don't have a US Keyboard layout then I suggest pressing every key and if you have a laptop with a function key try holding it down while pressing the Backtick (Grave Accent) key.

@Moriac1 No sorry, I only ever figured out the Time and Resource commands.

@Moriac1
Copy link

Moriac1 commented Dec 4, 2023

@LXGaming how did you figure out how to use the commands ?

@LXGaming
Copy link
Author

LXGaming commented Dec 5, 2023

@Moriac1 Basically bruteforce and luck, I put the commands in the console, hit enter then looked at the output.

ShowDebugButtonsPanel was easy cause it worked instantly, a giant button panel popped up on the screen.

SetGameTime and SetResource check the input and provide feedback to the console, for example SetResource will respond with "The resource "INPUT" does not exist.", these messages helped with understanding which parameters the command required.

It gets significantly more difficult / impossible when commands provide no feedback, even worse is when the command crashes the game. Part of the issue is wondering if the command you're trying to run has actually been removed from the production build of the game. At that point you'd be better off deciphering the game files and reverse engineering the logic instead of attempting to do it through a limited console.

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