Coming soon toSteam
Modding docsAPI 1

Example mod · theonaris.examples.effects-lab 1.0.0

Effects Lab

A test bench for particles, sounds, music, camera shake and video. Press F6 in game to open it. It changes nothing for other players, so it works on any server.

Download Effects Lab (3.2 MB)
Install: put the .zip (or the unpacked folder) in your mods folder: in the game, Mods → Open folder. Then start the game and allow the permissions.
Runs on client
Multiplayer local
Size 3.2 MB
Permissions ui input world audio video camera

A test bench for everything a mod can make you see and hear: particle effects, sound effects, positioned sound, music with fades, camera shake and zoom, and video. Press F6 in game.

It is a personal mod ("network": "local"). It is never sent to other players, never required from them, and works on any server.

You will learnWhere
Effect presets and every option: colour, size, count, rate, custom textureeffects.burst, effects.start
An effect that follows a moving objectEffect:follow, timer.every(0, …)
Plain and positioned soundsaudio.play with and without position
Music: loop, fade in, fade out, live volumeaudio.music, Sound:fadeOut, Sound.volume
Camera shake and field of viewcamera.shake, camera.zoom
Video on an interface elementvideo.onElement, Video:stop
A tabbed window that frees the mouse cursorTabView in .uxml, cursor.free
Filling a dropdown from codeUiElement:set("choices", …)
Features that depend on an optional filemod.exists
Personal mods"side": "client", "network": "local"

Try it

  1. Install and start the game, and allow the permissions.
  2. Load any map and press F6.
  3. Particles: choose a preset and colour and press Burst. Orbiting fountain starts an effect that follows a moving glowing ball.
  4. Sound: tick Play 25 m in front of me and turn your head to hear the direction change.
  5. Video: tick Play video/demo.mp4.

Notes

Files

mod.json
scripts/client.lua
ui/lab.uxml, ui/lab.uss
sounds/laser.wav, explosion.wav, coin.wav, alarm.wav, powerup.wav
music/lab-loop.wav
textures/star.png          custom particle
video/demo.mp4             4-second demo clip with soundtrack

All files

FileSize
mod.json753 B
music/lab-loop.wav1.4 MB
README.md3 KB
scripts/client.lua6 KB
sounds/alarm.wav276 KB
sounds/coin.wav86 KB
sounds/explosion.wav379 KB
sounds/laser.wav60 KB
sounds/powerup.wav155 KB
textures/star.png1 KB
ui/lab.uss2 KB
ui/lab.uxml3 KB
video/demo.mp4860 KB