Effects and sounds

"Nobody believes a fire until they can hear it." — Sound Recordist Nils Habbari

/add effect places a particle effect in the world and /add sound places a sound source. Together they turn a static set into a place with life in it.

You need permission bit 25 for every command on this page, and bit 26 for /trace. Servers give it to community admins by default. See permission bits.

Both are invisible until they play. Run /trace effects and /trace sounds while you work.


What it does

An effect is one of the game's .efx particle files: fire, steam, sparks, smoke, dust. Place it and it replays on a timer until you remove it.

A sound is a .wav from the game's assets, played from a point in the world so it gets quieter as you walk away. It can loop forever, fire once, or re-fire on a timer.


Using it

Placing an effect

Aim where you want it and give the path. Paths are relative to the effects folder and the .efx extension is added for you, so env/fire is enough.

Effects loop by default. Add once for a one-shot, which plays and then removes itself.

The argument order shifts when you name a mode. With no once or loop token the coordinates come straight after the path. With one, everything after the path moves one place right. The trailing interval always sits last.

Placing a sound

Sounds are placed at your feet, not at your crosshair. Paths are relative to sound and .wav is added for you, so ambience/fireloop is enough.

3 modes are available:

  • loop plays the sample continuously, which is the default
  • once plays it a single time
  • repeat <ms> re-fires the sample every 250 to 60,000 milliseconds

Only give a sound explicit coordinates directly after a mode token. Coordinates typed without one are ignored, and the sound lands at your feet with no warning.


Commands

Adding an effect

fx is an accepted alias for effect.

Setting the replay rate

Interval is milliseconds between replays, from 16 to 5,000. The default is 100.

The same command sets a repeat-mode sound's re-fire rate, and the accepted range changes to 250 to 60,000 to match.

Swapping an effect

Adding a sound

sounds is an accepted alias for sound.

Removing effects and sounds

/remove sounds all and /remove sounds confirm both clear the lot.


Things to note

  • /add sound foo 100 200 300 places the sound at your feet. Coordinates are only read after an explicit loop, once or repeat <ms> token. Nothing warns you.
  • Every distinct sound path you use is spent for the whole map. The sound table holds 256 entries, shared with everything else the map registers. Removing a placed sound frees the entity but never gives the slot back.
  • A full sound table is a hard stop. You get "Sound table is full. Cannot register a new sound path this map." and no new path works until the map changes.
  • 128 effects is the map-wide cap. The 129th prints "Maximum placed effects reached (128)." and nothing is placed.
  • An effect placed by coordinates sits 24 units lower than you typed. The floor-level rule from models applies to effects too. Crosshair placement does not do this.
  • interval is ignored on a once effect. A one-shot removes itself half a second after it fires.
  • Effect paths reject quotes, colons, semicolons, pipes, backslashes, .. and a leading slash. The path travels to every client on a delimited wire format, and one bad character would corrupt it.

Next