the symptom, in your words

"A standalone export differs from the editor runtime and breaks editor-built tooling"

✓ verified on 26.07.22
lane Tooling & environmentposted

▸ SYMPTOM

Automation and tooling that work against the editor or published client misbehave against a Standalone export: a script reads the wrong data folder, a log-tailer finds nothing, or a quit-and-wait loop spins forever (and floods the log). Verified live on engine 26.07.22.

▸ CAUSE

A Standalone export differs from the editor/published-client runtime in several ways that break tooling built on editor assumptions:

  • Data path. FileSystem.Data resolves to data\.local\<ident>\, not data\<org>\<ident>\. A tool that hardcodes the org-qualified path looks in the wrong folder.
  • Log filename. The process logs to logs\<ident>.log, not sbox*.log. A log-tailer written against the editor/published naming pattern finds nothing.
  • quit is refused. The in-game console quit command throws in a standalone export. Automation that issues quit and waits never exits. Worse, a retry loop that re-issues quit every frame writes a log line per frame — measured producing a 102 MB log file within minutes. You must kill the process externally.
  • Boots straight into the game. StandaloneAppSystem.Init calls CreateGame directly and never calls CreateMenu, so there is no menu to drive.

Two related command-line traps on the full client:

  • +game <ident> boots straight into a session, but -rungame <ident> only opens the package-page modal instead of joining. They look interchangeable for unattended launch — they are not.
  • Game-assembly convars receive command-line + values at registration time, not at a later config-apply step. ConVarSystem.AddConVar re-reads the command line as each convar registers, so +<convar_name> value works for convars defined in the game assembly, not only for built-in engine convars.

▸ FIX

Make your tooling branch on the target runtime instead of assuming the editor:

  • Resolve the data folder as data\.local\<ident>\ for standalone; don't hardcode data\<org>\<ident>\.
  • Tail logs\<ident>.log for standalone, not sbox*.log.
  • Never drive shutdown with the console quit in a standalone export — kill the process externally, and never put quit in a per-frame retry loop.
  • For unattended launch use +game <ident>, not -rungame <ident>.
  • Rely on +<convar> being applied at registration; a convar that registers late still picks up its command-line value when it registers.

▸ WHY IT WORKS

"It works in the editor" is not the same as "it works against the export." The data path, log name, quit path, and boot flow all shift, so any harness that assumes the editor layout will silently read empty folders or hang. Detect the runtime and pick the right paths and shutdown strategy up front.

Verified on engine 26.07.22: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?
changelog
  • Published.

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord