-
Notifications
You must be signed in to change notification settings - Fork 1
SiegeSmith Effects Lab
Dungeon Siege's spell and ambient visuals are driven by SiegeFX effect scripts — the
stack-based mini-language in [effect_script*] blocks (fireball, zap, healing sparkles,
torch smoke, all of it). The classic workflow was brutal: edit a gas file, repack, relaunch
the game, cast the spell, squint, repeat. The Effects Lab replaces that loop with type →
watch it play.
Open it from the studio shell: World ▸ Open Effects Lab… (non-modal, like the World Builder — keep both open).
| Pane | What it does |
|---|---|
| Script browser (left) | Every stock effect script from the install (~1,000 of them) plus your project scripts. Filter box on top; project scripts sort first and carry a ●. |
| Editor (center) | The script body with syntax colouring (verbs, #HANDLES, $vars, params, comments). Below it: live diagnostics — recompiled on every keystroke. |
| Preview (right) | The live viewport plus the engine filmstrip. |
-
Stock scripts are read-only — they live inside the game's tanks. Select any of them
to study how DS1 built its spells (start with
fireball,zap,heal). - Copy to project clones the selected stock script into your assets folder so you can edit it. Keep the same name and your version overrides the stock effect in maps you package; rename it to make a new effect instead.
- New creates a fresh project script with a commented starter body.
- The assets folder ("project" here means this folder, not a
.ssproj): the first time you click Copy or New, SiegeSmith asks you to pick it — any folder laid out like a tank (art/…,world/…). It's shared with the World Builder and remembered across sessions; scripts save intoworld/global/effects/<name>.gasinside it and bundle into every map you pack.
The preview is not a mock: your script runs through the engine's own effect VM — the same statement dispatch, timing, motion handles and population models the game uses — into a CPU particle viewport. What differs is only the rasterization (soft splats instead of the game's GL billboards).
- ▶ Play / ■ Stop, Loop (one-shot effects replay automatically), and Auto-play on edit — with it on, every keystroke recompiles and replays after a beat.
- The bronze cube is
#SOURCE(the caster); the red cube is#TARGET_KB. The Target slider sets the distance between them — stretch it out to watch projectiles fly. -
Args passes caller arguments (
$1,$2, … in script bodies that take them). - Left-drag orbits, right-drag pans, wheel zooms; the counter line shows live particles, shapes, coroutines and persistent emitters.
Every edit is compiled and checked against what the engine will actually execute:
- ✓ compiles clean — statement and create counts.
-
⚠ create '' — no engine renderer yet — the create kind isn't in the engine's
supported set; it will no-op in-game (the Lab knows the engine's real coverage table,
including verbs like
worldmsgandrandrangethat execute despite being exotic). -
⚠ call '' — script not found — a
calltarget that resolves in neither the stock library nor your project. - The badge above sums it up: engine-covered (green) or how many verbs won't render.
The CPU preview is instant; the filmstrip is exact. Render writes your current buffer to a scratch folder and runs it through the engine's real GL particle system (hidden window, deterministic seed), producing a 9-frame strip of the effect over 1.8 seconds — the same pixels the game would draw. Use it as the final check before shipping.
Project scripts bundle into every map you pack (they ride the assets folder), and the
engine merges a map's world/global/effects over the stock library at load — so:
-
Triggers: any trigger row's
call_sfx_script("your_effect")action fires it in-game. - Emitters: effect-script emitters reference it by name the same way.
- Same-named project scripts override stock ones inside your map only — the original game data is never touched.
- World ▸ Open Effects Lab. Pick
fireball. Watch it fly caster → target. -
Copy to project — first time it asks for your assets folder (pick or create any
folder; it's remembered). Change
flamesize(1.75)toflamesize(4). Watch it fatten live. - Drag the Target slider to 12 m. The projectile flies farther; the impact waits for it.
- Hit Render under Engine filmstrip and compare the engine-true frames.
-
Save, open the World Builder, add a trigger with action
call_sfx_script("fireball")— your version fires in-game.