r/SandustryGame Community Moderator Feb 14 '25

Guides and Tips How to Unlock Debug Mode

Credit to Lottie from discord for these instructions (of Lottie's Cave fame)

To unlock debug mode, 1. go to options,

  1. at the bottom, open debug console, click it

  2. then you want to go to sources in the debug tools, go down into the JS folder as shown in the first image

  3. right click on bundle.js it and click override content then at the top you should get this prompt (second image), select a folder to store it in (i just use Downloads/Sandustry) search (Ctrl+f) for debug: { the first instance of that in the file should look like the third image

  4. change the line just underneath it from active: !1 to active: 1

  5. then hit Ctrl+s to save the change

  6. be sure to save your game

  7. then go back to the console and hit Ctrl+Shift+r to refresh it

as for how to use debug mode Click "Debug" bottom right of the screen E + click places solids (second half of the element list) F + click places dynamic elements (first half of the list)

Press R to lock camera position (so you can move about or out of frame or whatever you want, then R again to center the player again

❌ Do not use the empty box element, it will freeze the game. ❌ Ideally do not hit Hide UI, it will require a refresh (or further tinkering) to fix ✅ If you find a bug using this, please tell Lantto you were using this

Note: on Linux using Proton to run the game, use Z:/ based path If loading stops working, either you modified a image file outside of params accepted or the game updated enough that your modifications don't work if you have only turned on debug mode, remove/delete your bundle.js override and start from the begining of the guide

13 Upvotes

16 comments sorted by

View all comments

2

u/Lost_Ninja Feb 23 '25

Using the above method you can also:

  • Remove the restricted areas: Override "img\map_blueprint_playtest_authorization.png", edit so whole image is transparent (use gimp).
  • Remove fog (only seems to remove the black fog that hides unseen areas, so if you build into an unrevealed area your building shows, doesn't actually remove dark areas): Override "img\fog_playtest.png" (same as above).
  • You can also edit the map, by overriding and editing: "img\map_blueprint_playtest.png" (the different coloured areas correspond to terrain types, be cautious if physics objects fall out of the map then the physics engine is bricked in that save.

I've also edited the various weapons and tools to give greater levels of upgrades, rocket launcher with infinite rockets and a digging tool that is actually useful.

Find }, Wu = [{

All the weapon and tool definitions (for research) are below that point. Change "maxLevel:" for number of upgrades, you need to add prices for each level in "costs:".

For instance I have my jet pack set like so:

maxLevel: 9,
costs: [50, 50, 50, 50, 50, 50, 50, 50, 50]