-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-menu-guide.bbcode.txt
More file actions
87 lines (54 loc) · 3.73 KB
/
Copy pathdebug-menu-guide.bbcode.txt
File metadata and controls
87 lines (54 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
[h1]Enabling Sandustry's Hidden Debug Menu[/h1]
Sandustry ships with a full debug menu — cell inspector, lighting overlays, chunk borders, authorization zones and more. It all works. The catch is that the checkbox meant to turn it on lives on an options tab that the game never displays, so there is no way to reach it through the interface.
This guide shows how to switch it on directly. It takes about ten seconds and requires no mods and no file editing.
[h1]Steps[/h1]
[b]1. Open the developer console[/b]
With the game running, press:
[code]Ctrl + Shift + Backspace[/code]
Chromium developer tools will open. Click the [b]Console[/b] tab.
[b]2. Run one line[/b]
Paste this and press Enter:
[code]localStorage.setItem("debug.active", "true")[/code]
Optionally also turn on chunk borders:
[code]localStorage.setItem("debug.drawChunks", "true")[/code]
[b]3. Restart the game[/b]
The flag is only read once, while the game boots. Fully close and reopen Sandustry — reloading a save is not enough.
That's it. The debug panel will be there when you load in.
[h1]Why the menu is hidden[/h1]
The toggle exists as a real, finished UI component. It renders on an options tab with the id [i]debug[/i], and the game's tab list is hardcoded:
[code]["general", "video", "audio", "controls"] (+ "mods" when mods are installed)[/code]
No code path ever adds a debug tab, so the component is unreachable. The localization files even contain a "Debug" tab label that nothing uses.
The flag itself is read straight from browser storage at startup:
[code]const i = localStorage.getItem("debug.active");
if (i !== null) config.debug.active = (i === "true");[/code]
So writing the value by hand does exactly what the missing checkbox would have done. Nothing is being patched or injected.
[h1]What you get[/h1]
[list]
[*][b]Debug panel[/b] with working toggles for:
[list]
[*][b]Cell inspector[/b] — live readout of the cell under your cursor
[*][b]Show lights[/b] — visualises light sources
[*][b]Authorization zones[/b] — draws where building is permitted
[*][b]Show filters[/b] — filter visualisation
[*][b]Don't draw structures[/b] — hides structures to see the material underneath
[/list]
[*][b]Draw chunks[/b] — chunk boundary overlay, useful for understanding how the simulation is split up
[*][b]Debug brush[/b] item in your inventory, with configurable brush size and shape
[*][b]Free camera[/b] behaviour changes on the pause and camera keys
[*][b]Ctrl + Alt + Shift + K[/b] — cycles the interface language, a localisation testing shortcut
[/list]
[h1]Turning it back off[/h1]
Same console, then restart:
[code]localStorage.setItem("debug.active", "false")[/code]
Or remove the keys entirely:
[code]localStorage.removeItem("debug.active")
localStorage.removeItem("debug.drawChunks")[/code]
[h1]Notes and warnings[/h1]
[list]
[*]This is a developer tool that shipped in the build, not a mod and not an exploit. It is not supported by the developers, and there is no promise it will keep working after an update — a patch could rename the key or wire the tab up properly.
[*]The game tracks a [i]cheatsUsed[/i] flag on saves alongside the [i]modsUsed[/i] one. I have not mapped exactly which actions set it, so if you care about a clean save, try this on a copy first.
[*]The debug brush can place material directly into the world. Treat it as a creative tool, and don't be surprised if a save you experimented on no longer reflects a legitimate playthrough.
[*]If the panel does not appear, the usual cause is not restarting the game fully. The value is read once at boot.
[/list]
[h1]Credits[/h1]
Found by digging through the game's bundle while building mods for it. If something here stops matching a newer version of the game, leave a comment and I'll update the guide.