Skip to content

Hash

Latest release1.0.5
DownloadGitHub · Thunderstore
RequiresMelonLoader 0.7.3, Sideload 1.7.0
APIReference
HelpDiscord · Report a bug

A terminal on the in-game phone. Press the console key and instead of the grey bar you get a prompt that completes commands, shows what they printed, and remembers what you typed last time.

🛟 Need help or found a bug? Get support at support.doodesch.de/hash.

📖 Documentation: docs.doodesch.de/mods/hash/

Dan waiting on the pier at sunset

The vanilla console is one input field. It has no output, no help, and no memory: run give bananas 1 and nothing visibly happens, because the reason is in a log file behind the game.

  • You see what the command said. Output, warnings and errors land in the terminal, coloured.
  • Tab completes. Command words and their arguments - item ids, properties, NPCs, vehicles, weather. Type give fert and it finds long_life_fertilizer; type give fzr and it still does.
  • Every row says where it came from. brickpress Litterally v1.1.0 - so a list of a thousand item ids from six mods reads as six lists.
  • help. The game registers every command with a description and an example each, and shows them to nobody. help lists the common ones plus a map of the topics, help give explains one, help weather searches.
  • # is whatever you are looking at, so you never look an id up. Face someone and setrelationship # 5 maxes them out without knowing they are benji_coleman; setunlocked # unlocks them. give #hand 5 is five more of whatever you are holding, setowned #home buys the property you are standing in, and teleport #it goes to the id in the line that just printed. A # that points at nothing refuses the line instead of guessing.
  • @ is how many you have, and numbers do arithmetic. give #hand @ doubles the stack, give #hand 10-@ tops it up to ten, setquantity @*2 doubles what is in your hand. + - * / and brackets work anywhere a command wants a number; anything the game could already read as a number is passed through untouched.
  • Up walks what you ran before, across sessions. Ctrl+R searches backwards through it.
  • Aliases. alias gk "give ogkush 5".
  • ; and repeat. settime 1200 ; setweather clear, or repeat 5 give ogkush 1.
  • logs shows everything the game and every other mod logs, filtered, without alt-tabbing to a file.
  • copy puts a line on your system clipboard, which is how an item id gets into Discord without being retyped.
  • font switches between the machine’s own monospaced face and the game’s pixel one.

Ordinary commands are untouched. give ogkushseed 5 reaches the game byte for byte, and raw <line> turns the shell off entirely for a command whose arguments contain a ; or a quote.

Sideload is what draws the app, and on a host too old to take the phone out hash refuses to start rather than leaving you with a mod you cannot reach. The console key is the way in; a home-screen icon appears alongside it while the game’s console is switched on, and goes away when it is not.

UserData/MelonPreferences.cfg, section Hash:

  • HijackConsoleKey (default true) - the console key opens hash. Turn it off and the vanilla console bar comes back, for a player who prefers it or a mod that needs it.

Your history and aliases live in UserData/Hash/. Which commands you use most is remembered per save, beside it.

The console is host-only, and the game says so by doing nothing at all when a client presses the key. hash opens anyway and says why - and help, the command reference and the search still work, because looking something up is not the same as running it.

Two things decide whether your commands work in hash, and both are easy to get wrong because the game gives you no warning either way.

Write your answer to Unity’s log, or the terminal shows nothing. hash captures output the way the game’s own console does: ScheduleOne.Console.Log is three lines around UnityEngine.Debug.Log, and hash listens on Application.logMessageReceived. MelonLogger does not go there - it writes to the MelonLoader file log and nowhere else. A command that answers only through LoggerInstance.Msg therefore runs, succeeds, and prints a bare ok into a terminal that never heard it.

UnityEngine.Debug.Log("[YourMod] 3 modules, all healthy."); // reaches hash and the vanilla console
LoggerInstance.Msg("[YourMod] 3 modules, all healthy."); // reaches the log file only

Log both if you want the line in the file too. Keep ordinary diagnostics on MelonLogger alone - the game’s console belongs to what the player asked for.

Declare a prefix command, or nothing can list it. Handling console input with a Harmony prefix on SubmitCommand is the pattern for anything that wants subcommands or arguments the game’s own ConsoleCommand cannot express. It registers nothing: your words run when typed and are invisible to every list, autocomplete and help overlay, hash included, because they only exist as string literals in a switch.

One call each fixes that:

using Hash.Api;
HashCommands.Add("snitch", "profiler: start, stop, top, report", "snitch start");

Compile Hash.Api/HashCommands.cs into your mod - one file, no reference, no hard dependency. Every call is a no-op while hash is absent, and calls made before it loads are replayed once it appears, so load order does not matter. The word goes into the game’s own Console.Commands, so this reaches the vanilla list and any other autocomplete as well, not only hash. It is listing only: your prefix keeps running the command, and the entry never dispatches, so a line cannot run twice.

One trap worth knowing: inside a MelonMod, writing Hash.Api.HashCommands out in full does not compile. MelonBase has a string property called Hash, and the member wins over the namespace. Use using Hash.Api;.

The autocomplete this grew out of started as shreyas1996/Schedule_I_AutocompleteConsoleCommand. The matching, the ranking and the argument tables here are rewritten, but the idea and the first version came from that work.

MIT.