You are viewing a potentially older version of this package. View all versions.
darkharasho-AdminMenu-0.1.10 icon

AdminMenu

In-game admin menu on F1: revive, kill, teleport and edit stats of players, spawn items, chests and resources, god mode, infinite stamina and ammo, super pickaxes.

Date uploaded 4 days ago
Version 0.1.10
Download link darkharasho-AdminMenu-0.1.10.zip
Downloads 82
Dependency string darkharasho-AdminMenu-0.1.10

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

stonewards-admin-menu

A BepInEx plugin for Stonewards that adds an in-game admin/cheat menu, following the same conventions as the author's existing Stonewards mods. The menu is toggled with a hotkey (F1 by default) and presents a polished, aesthetically pleasing UI rather than a bare debug panel. It exposes common admin actions such as resurrecting or killing players, spawning items, god mode, infinite stamina, and a super pickaxe.

Features

  • Players tab — revive, heal, or kill any connected player, teleport to them, or (as host) bring them to you. Health and alive/dead status update live. Stats opens a per-player editor for every stat level-up rings raise, showing each current value and letting you set it. Go to campfire takes you to the level's campfire. As host, Elevate gives another player the admin menu, saved for next time.
  • Items tab — search and browse the item catalog and spawn any item, with an amount next to each one.
  • Resources tab — add meta currency to your save, spawn any kind of treasure chest in front of you, and spawn dug-up resources and scrap.
  • Admins tab — see everyone who can use the admin menu in your games, and revoke anyone you granted it to, online or not.
  • Cheats tab — toggle god mode, infinite stamina, infinite arrows & bombs, quick offer (the whole stack to the forge in one press), a super pickaxe (25x dig strength) and a super speed pickaxe (3x digging speed), and slide the pickaxe's dig size up to a bomb's crater or its reach out to 20 metres.
  • A themed, tabbed panel matching the game's own menus, not a raw debug list.

Opening the menu

Press F1 to open and close the admin menu. Escape also closes it by default (configurable, see below).

Rebinding

Settings are stored in BepInEx/config/com.darkharasho.stonewards.adminmenu.cfg and can be edited by hand or, if darkharasho-ModSettings is installed, from the in-game Mods settings panel:

Section Key Default Description
General Enabled true Allow the admin menu to be opened.
General TrustedAdmins empty Steam IDs, comma-separated, that may use the admin menu in games you host, besides you. Everyone else only gets it as host. The mod author is trusted as well and is not affected by this setting — see Mod author access.
General SavedAdmins empty Admins you granted with Elevate, as id=name. Maintained by the Admins tab — grant and revoke there rather than editing this.
Controls ToggleKey F1 Key that opens and closes the admin menu.
Controls CloseOnEscape true Also close the admin menu with Escape, instead of opening the pause menu.
Cheats GodMode false Keep your health topped up and block incoming damage.
Cheats InfiniteStamina false Never run out of stamina when sprinting, climbing or blocking.
Cheats InfiniteAmmo false Arrows, ballista bolts, bombs and other throwables are never used up. You need at least one to start with.
Cheats SuperPickaxe false Dig with 25x strength, including the heavy dig bonus.
Cheats SuperSpeedPickaxe false Dig 3x faster.
Cheats QuickOffer false Offer the whole stack to the forge in one press, instead of one item at a time. Works on any host.
Cheats PickaxeDigSize 0.35 How big a hole each dig takes out: 0.35 is the normal pickaxe, 1.5 matches a bomb's crater. Only the hole grows — you still get one block's worth of resources per dig. Works on any host.
Cheats PickaxeReach 3 How far the pickaxe reaches, in metres: 3 is normal, up to 20. Applies to hitting props as well as digging, since the game measures both with the same raycast. Works on any host.

Mod author access

The mod author (darkharasho, Steam ID 76561197987892075) is always a trusted admin in any game hosted with this mod installed, and this cannot be turned off in the config. It is not a default value you can clear: the ID is compiled into the plugin and added to the trusted list on every install, on top of whatever TrustedAdmins contains. In practice that means the author can open the admin menu in your session and use everything in it — reviving, healing and killing players, teleporting, spawning items and editing stats.

It works this way because a config default kept getting lost by accident: adding your own friends to TrustedAdmins replaces the value and drops the author with it.

If you don't want that, you have two options, and the plugin logs this grant on startup so it's never a surprise:

  • Don't install the mod, or
  • Build it from source without it. This mod is open source and will stay that way. Remove the OwnerSteamId constant in src/AdminMenu/Plugin.cs (set it to ""), rebuild, and the grant is gone — nothing else depends on it.

Hosts can also grant admin to anyone else themselves, from the menu: see Granting admin below.

Multiplayer notes

The admin menu is host-only. The exceptions are the admins the host granted from the menu, the Steam IDs listed in TrustedAdmins, and the mod author (darkharasho). When the host runs this mod, the host's list decides and is shared with the lobby, and a trusted client's host-only actions (Bring, stat changes) are carried out by the host. When the host doesn't run it, the joining player's own list decides, and only the actions the game already accepts from clients work.

Granting admin

As host you grant admin from the menu itself, rather than by editing Steam IDs into a config file. Each player's row in the Players tab has an Elevate button that gives them the admin menu, and Revoke takes it back. The grant is saved, so somebody you elevated still has the menu the next time you host, until you revoke it. Elevating is offered only for players who have this mod installed, since there would otherwise be no menu to unlock, and the button is hidden entirely when you aren't the host, because only the host's list decides. An elevated player's own menu unlocks within a couple of seconds, once they read the updated lobby data.

The Admins tab lists everyone who can use the menu in your games — the admins you granted, whatever is in TrustedAdmins, and the mod author — and lets you Revoke a granted admin whether or not they are online. That is what the tab is for: Elevate and Revoke on a player's row can only reach players who are in your lobby right now.

There is no confirmation step on Elevate, so a misclick persists until you revoke it; the Admins tab is where you would see and undo that.

TrustedAdmins still works and is the list to edit by hand, for granting admin to somebody who has never been in your lobby. Granted admins are saved separately, in SavedAdmins, so the menu never rewrites what you typed.

Positions are owned by each player's own client, so Go to works for anyone but Bring needs the host, either you or a host running this mod.

Stat changes have to reach both the host and the player they're for, since the host decides health, defense and damage while each player's own game decides movement, digging and attack speed. The admin menu sends them itself, so for full effect both of those need the admin menu installed. As a client you can only edit stats when the host has it. Reading another player's stats needs their own game too: the game syncs only four stat values, so every other number a peer holds for somebody else is that player's base value. The menu asks the player's own game for its values while their Stats panel is open and shows those; for a player without the mod there's nothing to ask, and the panel says so.

Damage in Stonewards is decided on the server, and the game clamps health and marks you dead in the same call — so god mode only really works where it can veto the hit before that happens. As host, it blocks hits outright. As a trusted client on a host running this mod, your game asks the host to hold god mode for you and the host blocks the hits on your behalf, which works the same way.

On a host that doesn't run this mod, god mode is a fallback that heals you back up after each hit, because nothing on your machine can veto damage the host has already applied. That survives ordinary chip damage, but a burst big enough to cover your whole health bar between heals — a volley of strong projectiles, say — still kills you, and nothing installed only on your side can prevent it.

Development

Requires the .NET SDK, Stonewards, and an r2modman profile with BepInExPack 5.4.2305 installed.

  • dotnet build src/AdminMenu/AdminMenu.csproj builds the plugin. src/AdminMenu/AdminMenu.csproj targets netstandard2.1 and resolves its <Reference> items through $(BepInExCorePath) and $(ManagedPath), which default to this machine's game install (GamePath) and r2modman profile (ProfilePath) — override them with -p:GamePath=... -p:ProfilePath=..., or with a gitignored Local.props importing your own GamePath/ProfilePath properties. After a build with the game found, the DLL is copied into the profile's BepInEx/plugins/darkharasho-AdminMenu.
  • When $(ManagedPath)/Assembly-CSharp.dll doesn't exist (no game installed, e.g. in CI), or with -p:UseRefs=true, the build falls back to the reference-only assemblies checked into lib/refs instead of the real game/BepInEx DLLs.
  • lib/refs is generated by scripts/update-refs.sh, which needs the JetBrains.Refasmer.CliTool (dotnet tool install -g JetBrains.Refasmer.CliTool). Rerun it after a game update that changes APIs the mod uses, or when adding a <Reference>.
  • dotnet test tests/AdminMenu.Tests runs the unit tests; the test project never references game or BepInEx assemblies.
  • scripts/package.sh builds Release and writes a Thunderstore zip to dist/. It fails if the versions in thunderstore/manifest.json, Plugin.cs and the .csproj differ, or if CHANGELOG.md has no entry for that version.

Releases

Pushing a v* tag runs .github/workflows/release.yml. It checks the tag matches thunderstore/manifest.json, runs scripts/package.sh, creates a GitHub release with the zip and that version's changelog entry, and publishes the zip to Thunderstore with scripts/thunderstore-publish.sh (using the THUNDERSTORE_TOKEN repo secret; versions already on Thunderstore are skipped). Bump the version in the manifest, Plugin.cs, the .csproj and CHANGELOG.md first, then git tag vX.Y.Z && git push origin vX.Y.Z.

CHANGELOG

Changelog

0.1.10

  • New cheat: Pickaxe reach, a slider from the pickaxe's normal 3 metres out to 20. The game measures a swing with one raycast that it fixes at 3, so this re-measures it at the distance you choose. That one raycast serves both halves of a swing, which means the reach applies to hitting props and destructibles as well as to digging terrain — there is no separate number to lengthen only one of them. Nothing downstream needed changing: the dig itself already traces 100 metres, and neither endpoint checks how far away you were.
  • New cheat: Pickaxe dig size, a slider from the pickaxe's normal 0.35 up to 1.5 — the radius a bomb clears. The pickaxe and the bomb already dig through the same call and differ only in the size they ask for, so this sets the size your digs send. Only the crater grows: resources still come from the one grid point your swing landed on, because that is all the pickaxe's dig path ever spawns from. Large sizes are a lot of terrain to rebuild per swing, so expect a frame cost, especially alongside the super speed pickaxe.
  • New cheat: Quick offer. Offering at the forge normally places one item per tick of the hold, so emptying a stack of stone means standing there for as many seconds as you have items. With this on, one press sends the whole stack. The count is read from the stack you're actually holding, so the forge is credited exactly what leaves your inventory — no more, no less.
  • Fix: the Stats panel now shows another player's real stat values instead of their base ones. The game syncs only four stat values over the network, so every peer works the rest out from the upgrades it knows about and holds nothing but base numbers for somebody else's player. An admin could set another player's stats correctly — the value sent is a target, and each peer sizes its own modifier to hit it — but the numbers they were reading before they set anything were wrong, which made the panel close to useless for anyone but the host's own player. The menu now asks the player's own client for its values while their Stats panel is open, roughly once a second, and shows those.
  • The host asks too: its copy is no better than a client's for somebody else's player, so opening another player's stats as host was showing base values as well.
  • A player who doesn't have the admin menu has no client to ask, so their panel still shows the stats this peer holds for them and says so. The same note appears for a second or two before the first reply arrives.
  • Only the connection that owns a player may report that player's stats, and the host relays a reply only to admins who asked for it.
  • The gold "changed" highlight still reflects only the stats you changed from this peer, so a stat the host set won't show gold on a client.

0.1.9

  • Admins granted with Elevate are now saved, so somebody you gave the menu to still has it the next time you host. Previously a grant was held in memory and dropped when you left the lobby, which meant re-elevating the same people every session; hand-editing Steam IDs into TrustedAdmins was the only way to make it stick.
  • New Admins tab listing everyone who can use the menu in your games, in the three groups it comes from: granted from the menu, set in TrustedAdmins, and the mod author. Each granted admin has a Revoke button that works whether or not they're online — the reason the tab exists, since Elevate and Revoke on a player's row can only reach players who are in your lobby right now.
  • TrustedAdmins is unchanged and stays the list to edit by hand, for granting admin to somebody who has never been in your lobby. Granted admins are saved separately in SavedAdmins, which the menu maintains.
  • Elevate has no confirmation step, so a misclick now persists until you revoke it. The Admins tab is where you'd see and undo that.

0.1.8

  • Fix: god mode no longer lets a client be killed by a heavy burst of damage, such as a volley of strong projectiles. The game clamps health and sets the death flag in the same server-side call, so a client noticing its health drop and healing back afterwards was always too late — the host had already marked it dead. Anything that covered the whole health bar before the next heal was lethal. A client now tells the host when its god mode is on and the host vetoes the damage itself, before the death check sees it, exactly as it already did for its own player. Trusted admins only, and the host stops protecting a player within a couple of seconds of their admin being revoked.
  • Against a host that doesn't run this mod, nothing can veto damage on your behalf, so god mode there is still the heal-up fallback and a big enough burst still kills. The README and the config description now say so instead of implying it always holds.

0.1.7

  • The mod author is now always a trusted admin on every install, rather than only being the default value of TrustedAdmins. Holding the grant in the config meant it was lost by accident whenever a host added their own friends to the list, since that replaces the value. It is compiled in instead and can't be removed through the config; the README's new Mod author access section says so plainly, the config description repeats it, and the plugin logs it on startup. The mod is open source, so building it without the OwnerSteamId constant removes the grant.
  • New: as host, Elevate on a player's row in the Players tab gives them the admin menu for the rest of the session, and Revoke takes it back. Grants are kept in memory only — never written to your config, and dropped when you leave the lobby. Offered only for players who have the mod installed, and only to the host, since it's the host's list that decides who is trusted. The elevated player's menu unlocks within a couple of seconds.
  • TrustedAdmins now defaults to empty, since the author no longer needs to be listed in it. Existing entries keep working.
  • Fix: the host rewrote its admin list into the Steam lobby on every check, because it compared the published string against one built from a set whose enumeration order isn't stable. The list is sorted now, so it's written only when it actually changes.

0.1.6

  • Fix: teleporting to a player, or bringing one to you, no longer drops anyone through the map when the spot is tight. Both moves aimed at a fixed point 1.5 m from the anchor without checking anything was there; landing inside the level pushes a player's capsule out in whatever direction the overlap resolves, which is often straight down. They now sweep around the anchor for a spot a player actually fits in, and fall back to standing on the anchor rather than out of the world. The campfire teleport's fallback spot was picked the same blind way and is fixed too.

0.1.5

  • Fix: reviving yourself from the menu while dead no longer leaves you unable to move. Closing the menu handed input back to the game's dead state because that's where the menu was opened from; it now picks the state that matches whether you're actually alive, so killing yourself from the menu behaves too.

0.1.4

  • Fix: the item list no longer shows the game's scrap wood pieces (the many "Wood" entries). Spawned into the inventory they couldn't be dropped; the wood they turn into is still listed.

0.1.3

  • Chest buttons on the Resources tab now show their rarity in the name (e.g. "Rare Treasure chest") and are coloured by rarity, so chests that share a name can be told apart.

0.1.2

  • Fix: the super speed pickaxe, and digging, melee attack and magic speeds set in the stats editor, no longer drop back to normal after switching items; the speed is put back whenever it's lost.
  • Fix: stats set in the stats editor now survive a class change instead of silently resetting. They still reset when a new level starts.

0.1.1

  • Fix: reviving a player whose body someone is carrying now drops the body first, instead of leaving it stuck invisible in the carrier's hands.
  • The Bring button's tooltip now says why it's unavailable, and the log notes whether the host runs the admin menu.

0.1.0

First release.

  • Admin menu on F1 (Escape also closes it), themed to match the game's menus.
  • Players tab: revive, heal or kill any player, Go to and Bring (host) teleports, Bring everyone, Go to campfire, and live health/death updates.
  • Players tab: a Stats editor per player that shows and sets any stat level-up rings raise.
  • Items tab: search and spawn any item, with an amount per item; large amounts are split into full stacks.
  • Resources tab: add meta currency, spawn treasure chests, and spawn resources and scrap.
  • Cheats tab: god mode, infinite stamina, infinite arrows & bombs, super pickaxe (25x dig strength) and super speed pickaxe (3x digging speed).
  • Host-only: the menu and its cheats work for the host, plus the Steam IDs in TrustedAdmins (defaults to the mod author). When the host runs the mod, trusted clients' Bring and stat changes go through the host.
  • Fix: as host, a player killed near you and revived out of your view no longer comes back into view as a sliding ragdoll.