Make Map Editor “Interaction” Behaviors Scriptable in the Lua API (for creative play, QoL, servers, and mods)
Posted: Wed Aug 27, 2025 1:56 am
TL;DR
Expose the Map Editor > Interaction behaviors as scriptable, per-player/force/surface flags in the public Lua API. This isn’t only for testing—it enables creative/sandbox play, accessibility/QoL features, server tools and new mod ideas.
Give the map editor abilities without being in it.
What?
Add a small, stable API that mirrors the Editor’s Interaction checkboxes and lets scripts toggle them with clear scope and lifetime:
• Per player / per force / per surface, with optional time-limited activation.
• Read/write access (e.g., player.editor_flags or player:set_editor_flags{...}).
• Optional events for auditing and compatibility (e.g., on_editor_flag_changed).
• Persistence options (session-only vs. saved), plus admin/cheat permissions for safety.
Flags to expose (matching the Editor):
• Instant blueprint building — place entities from blueprints immediately (no ghosts, no cost).
• Instant deconstruction — marked entities are removed instantly (no logistics).
• Instant upgrading — upgrade planner actions apply instantly.
• Instant rail planner — rail paths materialize immediately when planned.
• Fill electric buffers when building entities — new electric entities spawn fully charged.
• Placed corpses never expire — corpses created while active do not age out.
• Ignore tile conditions — bypass ground/tile restrictions when placing entities/tiles.
• Move player to editor location on exit — return player to editor “exit” position when leaving a temporary edit phase.

Why?
• Creative & personal play: frictionless sandboxing, megabase sketching and quick rebuilds.
• Quality of life & accessibility: reduce repetitive actions, enable gentler rules for newcomers or assistive play.
• Server administration: controlled “creative bursts” for admins or events, with auditable toggles and clear scopes.
• Mod interoperability: a common, documented way to do what many “creative” mods simulate today—fewer hacks, fewer conflicts.
• Education & content creation: faster tutorials, classrooms, streams, and reproducible demonstrations.
• Scenario/map variety: new rule sets (puzzle maps, limited-time build phases, event minigames) without forcing Editor mode.
• Determinism & stability: standard events and scopes preserve multiplayer determinism while expanding possibilities.
Expose the Map Editor > Interaction behaviors as scriptable, per-player/force/surface flags in the public Lua API. This isn’t only for testing—it enables creative/sandbox play, accessibility/QoL features, server tools and new mod ideas.
Give the map editor abilities without being in it.
What?
Add a small, stable API that mirrors the Editor’s Interaction checkboxes and lets scripts toggle them with clear scope and lifetime:
• Per player / per force / per surface, with optional time-limited activation.
• Read/write access (e.g., player.editor_flags or player:set_editor_flags{...}).
• Optional events for auditing and compatibility (e.g., on_editor_flag_changed).
• Persistence options (session-only vs. saved), plus admin/cheat permissions for safety.
Flags to expose (matching the Editor):
• Instant blueprint building — place entities from blueprints immediately (no ghosts, no cost).
• Instant deconstruction — marked entities are removed instantly (no logistics).
• Instant upgrading — upgrade planner actions apply instantly.
• Instant rail planner — rail paths materialize immediately when planned.
• Fill electric buffers when building entities — new electric entities spawn fully charged.
• Placed corpses never expire — corpses created while active do not age out.
• Ignore tile conditions — bypass ground/tile restrictions when placing entities/tiles.
• Move player to editor location on exit — return player to editor “exit” position when leaving a temporary edit phase.

Why?
• Creative & personal play: frictionless sandboxing, megabase sketching and quick rebuilds.
• Quality of life & accessibility: reduce repetitive actions, enable gentler rules for newcomers or assistive play.
• Server administration: controlled “creative bursts” for admins or events, with auditable toggles and clear scopes.
• Mod interoperability: a common, documented way to do what many “creative” mods simulate today—fewer hacks, fewer conflicts.
• Education & content creation: faster tutorials, classrooms, streams, and reproducible demonstrations.
• Scenario/map variety: new rule sets (puzzle maps, limited-time build phases, event minigames) without forcing Editor mode.
• Determinism & stability: standard events and scopes preserve multiplayer determinism while expanding possibilities.