← ClaudeAtlas

stalker-soc-lualisted

Write and debug Lua scripts for S.T.A.L.K.E.R. Shadow of Chernobyl (X-Ray 1.0, retail 1.0006) - actor binder hooks, story state (pstor/info portions), HUD news and PDA map marks, spawning/releasing objects, navigation, time skips, effects, and the engine's many silent traps (uncatchable luabind errors, swallowed binder errors, delta setters, crashes in inventory callbacks). Use for any .script work in a SoC mod, or when a SoC script silently does nothing, hangs or crashes the game.
webpnk/stalker-soc-skills · ★ 0 · AI & Automation · score 67
Install: claude install-skill webpnk/stalker-soc-skills
# SoC Lua scripting Read `reference\gotchas.md` before writing non-trivial code - every entry there cost a debugging session. `reference\patterns.md` has copy-ready snippets (spawn, release, inventory, time skip, effects, sounds, conditions for logic). The authoritative API list is `unpacked\scripts\lua_help.script` (grep it for a class or function before assuming it exists). ## Framework templates (`templates\scripts\`, `__PREFIX__` -> your prefix) Installed into `src\mod\scripts\` by `stalker-soc-project-setup`: | File | Role | |---|---| | `<p>_main.script` | entry points called from `bind_stalker.script`: `on_actor_spawn`, `on_actor_update`, `on_item_take/drop`, `on_take_from_box`; each hook wrapped in `pcall` and reported via `moddev.out` | | `<p>_story.script` | persistent key/value (`get/set` over actor pstor), info portions (`has/give/take`), stage, `on_new_game` | | `<p>_hud.script` | `news(string_id, ...)` with automatic splitting (HUD drops lines > ~100 chars), `news_later`, `mark/unmark` PDA map spots | | `<p>_nav.script` | `point_near(x, z)` -> pos, lv, gv for `alife():create`; `spawn_near` | | `<p>_props.script` | binder pinning physics of script-spawned static props | The bind_stalker hooks themselves are patches in `src\tools\overrides.ps1`. ## Rules of thumb - **Environment:** Lua 5.1 + luabind. No `io`, `os.*` mostly absent, `log()`/`printf` are no-ops. Output = `moddev.out()` (console trick). Test by running code in the live game with `game.ps1 cm