Dayz Particles
ASecurityReference for creating and playing custom DayZ particle effects without Workbench: .ptc and .emat files, .edds sprites, the Particle, ParticleManager and SEffectManager script API, the vanilla particle catalog, contaminated area particle budgets (cfgeffectarea.json) and the DayZ 1.30 changes (dust, vehicle effects, sandstorm, the headless client check). Use when an agent needs to look up a particle format, API call or vanilla effect; the dayz-audio-fx-specialist agent reads it when it writes,...
- 22 stars
- 0 votes
- 0 copies
- 2 views
- Added November 7, 2026
Works with
Security analysis
100/100Pro scans all 6 files and shows the line behind each finding
npx -y skills add DayZ-n-Chill/Agentic-Z --skill dayz-particles --agent claude-codeAre you the author of Dayz Particles?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/dayz-n-chill-dayz-particles)---
name: dayz-particles
description: "Reference for creating and playing custom DayZ particle effects without Workbench: .ptc and .emat files, .edds sprites, the Particle, ParticleManager and SEffectManager script API, the vanilla particle catalog, contaminated area particle budgets (cfgeffectarea.json) and the DayZ 1.30 changes (dust, vehicle effects, sandstorm, the headless client check). Use when an agent needs to look up a particle format, API call or vanilla effect; the dayz-audio-fx-specialist agent reads it when it writes, changes or debugs an effect in a mod. Sound is not covered here; see the audio pack in skills/_shared/audio-fx/."
---
<!-- skill-dir-note -->
> **Path note:** `<skill-dir>` in commands below is the absolute path of this skill's folder. When the agent loads this skill the harness exposes the skill's base directory; substitute it before running. Sibling skills are reached via `<skill-dir>\..\dayz-X\`.
# DayZ particle effects
Follow `skills/_shared/dayz-conventions.md`. This skill is reference only; it runs no scripts, so there is no preflight gate.
## What to read
| Task | Read |
|---|---|
| Write or edit a `.ptc` (emitters, curves, every property) | `references/ptc-format-reference.md` |
| Write or edit an `.emat`, pick a vanilla material or sprite GUID | `references/emat-format-reference.md` |
| Play, stop or tune particles from script | `references/script-api-reference.md` |
| Wire particles into a device (toggle, one-shot, cleanup) | `references/integration-patterns.md` |
| Pick a vanilla particle for a device, tune one at runtime, or bring older device code up to date | `references/device-particle-choices.md` |
| Find a vanilla particle to reuse | `references/vanilla-particle-catalog.md` |
| Build a layered effect (explosion, impact, fireball), pick vanilla materials, use `Mast` curves | `references/layered-effects.md` |
| Check the layout of a `.ptc`, the vanilla emitter shapes, or convert an old `CfgCloudlets` particle | `references/ptc-layout-and-cloudlets.md` |
| Register a mod's own effects, play them, or switch single emitters from script | `references/effects-from-script.md` |
| Size a contaminated area in `cfgeffectarea.json`: emitter budget, the 1,000 cap, the vertical band, safe positions | `references/effect-area-particles.md` |
| Move a mod to DayZ 1.30: the headless client check, `CreateParticleServer`, `SurfaceInfo` particle IDs, `ParticleParamsOverrideData`, vehicle effects | `references/dayz-1-30-particles.md` |
| What 1.30 changed for effect areas, the sandstorm, oil pits and dust kickup, and which `ParticleList` constants it added | `references/dayz-1-30-world-particles.md` |
| See a full `PlayOnObject` example for a custom wreck, checked against the vanilla wrecks | `references/playonobject-client-guard.md` |
## File layers
| Layer | Format | Purpose |
|---|---|---|
| `.ptc` | Plain text | Effect: one `EffectDef` with one or more `EmitorDef` blocks |
| `.emat` | Plain text | Material: texture ref, shader (`Particle` or `ParticleSprite`), blend mode |
| `.edds` | DDS renamed | Billboard sprite texture |
| `.meta` | Plain text | Written by Workbench; not needed at mod runtime for particles (whether the `.meta` of a `.layout` variant is needed is not yet tested) |
Because `.ptc` and `.emat` are plain text, they can be written by hand or generated by a script.
The smallest useful `.ptc`: one `EffectDef` with one emitter. Each `EmitorDef` is its own stream of particles, and a complex effect stacks several (the vanilla small campfire has six: glow, flames, burst, short flames, sparks, smoke).
```
EffectDef {
Emitors {
EmitorDef <name> {
ShapeType Point
MaxNum 10
BirthRate 5
Material "{GUID}path/to/material.emat"
SizeMultiplier 0.5
Velocity 2
LifeTime 1.5
Color {
0 1 0.8 0.3 1 0.7 0.5 0.25
}
Alpha {
0 0 0.2 1 1 0
}
Repeat 1
}
}
}
```
Property groups, all listed in `references/ptc-format-reference.md`:
- Shape and emission: `ShapeType`, `ShapeSize`, `ConeAngle`, `MaxNum`, `BirthRate`, `BirthRateRND`, `Offset`.
- Look: `Material`, `SizeMultiplier`, `SizeRND`, `BillboardingType`, `CenterY`, `StretchMultiplier`.
- Motion: `Velocity`, `VelocityRND`, `AirResistance`, `GravityMultiply`, `Wind`, `Spring`, `Restitution`, `VelAngle`, `VelAffect`.
- Lifetime: `LifeTime`, `LifeTimeRND`, `EffectTime`, `Repeat` (0 plays once and deletes itself, 1 loops until stopped).
- Sprite animation and rotation: `AnimOnce`, `AnimFPS`, `LifetimeByAnim`, `RandomFrame`, `RandomRotDir`, `RotMultiplier`, `RandomAngle`.
- Curves over a particle's life: `Color`, `Alpha`, `Size`, `RotationSpeed`. Curves over the effect time: `ColorMast`, `AlphaMast`, `SizeMast`, `BRateMast`, `VelocityMast`, `AirResistanceMast`.
A particle `.emat` uses one of two shaders, `Particle` (fire, sparks, water, most effects) or `ParticleSprite` (steam, flares, flames, glow billboards). Both shaders take `BlendMode`, `Sort`, `TileU` and `TileV`. Both are in `references/emat-format-reference.md`. Weather `.emat` files with other shaders, such as the sandstorm's `SnowEffect`, are postprocess materials and must not be named by a `.ptc`.
## GUID references
Resources reference each other as `{HEXGUID}relative/path.ext`.
- Mod `.ptc` to vanilla `.emat`, or mod `.emat` to vanilla `.edds`: copy the vanilla GUID plus path, exactly as vanilla files do.
- Mod `.ptc` to mod `.emat`: path only; mod-owned resources resolve by PBO path.
Path-only references resolve: vanilla itself ships one. `P:\graphics\particles\contaminated_area_gas_around_tiny.ptc:13` has `Material "Graphics/Particles/materials/enviroment/water_splash_01_em.emat"` with no GUID, and that effect is registered at `P:\scripts\3_game\particles\particlelist.c:316` and played by the contaminated area (`P:\scripts\4_world\classes\contaminatedarea\effectarea.c:80`). Every texture reference in the vanilla particle materials under `P:\graphics\particles\materials` carries a GUID (other vanilla `.emat` files do not always: `P:\DZ\worlds\sakhal\data\sakhal_sea.emat:4` names its `DeepMap` by path alone), so for vanilla resources copy GUID plus path to match vanilla, and the path alone is a working fallback.
More evidence that the path, not the GUID, is what resolves: vanilla names the material `smoke_anim_02.emat` with two different GUIDs, `{00BEA27443975BEB}` in the bonfire (`P:\graphics\particles\fire_bonfire.ptc:217`) and `{0BEA27443975BE0B}` in the failing hatchback engine (`P:\graphics\particles\hatchback_engine_failing.ptc:11`), and both effects draw their smoke.
## Script API in one screen
- `Particle` (legacy): `Particle.PlayOnObject(id, parent, localPos, localOri, forceWorldRot)`, `Particle.PlayInWorld(id, worldPos)`. Non-looping particles delete themselves.
- `ParticleSource` extends `Particle`: native-backed, auto-destroy flags (`ON_END`, `ON_STOP`, `ALL`, `NONE`), `DisableAutoDestroy()`, `ResetParticle()`.
- `ParticleManager.GetInstance()`: global pool of 10000 `ParticleSource` objects, created only when not on a headless or dedicated server, so it returns null there (`P:\scripts\3_game\particles\particlemanager\particlemanager.c:25` and `:63` to `:65`). Null-check it.
- `SEffectManager.PlayOnObject(effect, parent, pos, ori)` for particle plus sound; clean up only with `SEffectManager.DestroyEffect(effect)`.
- Control: `StopParticle(flags)` fades out by default (`StopParticleFlags.IMMEDIATE` removes at once, `PAUSE` freezes), `SetParameter(emitter, EmitorParam.X, value)` with `-1` for all emitters, `ScaleParticleParamFromOriginal(EmitorParam.SIZE, 0.5)`.
- More instance calls: `PlayParticle(optionalNewId)`, `IsParticlePlaying()`, `RestartParticle()` (reset and play), `SetWiggle(randomAngle, randomInterval)` and `StopWiggle()`. All signatures are in `references/script-api-reference.md`.
- A pool of your own: `ParticleManager.GetInstance()` is the global pool, not the only one allowed. The constructor is public (`P:\scripts\3_game\particles\particlemanager\particlemanager.c:88`) and the vanilla particle tests build their own pool with `new ParticleManager(new ParticleManagerSettings(3000))` (`P:\scripts\3_game\particles\tests\pmtcreationandcleanup.c:50`).
- Server spawned effects: `SEffectManager.CreateParticleServer(pos, EffecterParameters)` (`P:\scripts\3_game\effectmanager.c:586`) creates an effecter entity on the server that shows a particle on every nearby client. Vanilla uses it for tree cutting, fishing, fish traps and, since 1.30, ceiling dust. `PlayOnObject` and `PlayInWorld` stay client only.
- Runtime retune on an effect class (1.30): override `ParticleParamsOverride(ParticleParamsOverrideData)` on an `EffectParticle` subclass (`P:\scripts\3_game\effects\effectparticle.c:619`), as vanilla vehicle dust and wheel contact do. See `references/dayz-1-30-particles.md`.
## Registering custom particles
```
MyMod/
data/particles/mymod_water_spray.ptc
data/particles/materials/mymod_blue_water.emat (optional)
scripts/3_Game/MyMod_ParticleList.c
```
```
modded class ParticleList
{
static const int MYMOD_WATER_SPRAY = RegisterParticle("MyMod/data/particles/", "mymod_water_spray");
};
```
Packing: `/dayz-build-pbo` already packs `.ptc`, `.emat` and `.edds` (its include filter is `skills/dayz-build-pbo/include.lst`), so no change is needed. Only with a custom AddonBuilder setup, add whichever of `*.ptc;*.emat;*.edds` are missing to your existing include filter; do not replace the filter, or other file types such as `.p3d` models are dropped from the PBO.
## Pitfalls
1. Particles are client-only. Guard with a runtime `GetGame().IsHeadlessOrDedicatedServer()` check, as every pattern in `references/integration-patterns.md` does (Pattern A shows it first). It is the same gate vanilla's particle pool uses (`P:\scripts\3_game\particles\particlemanager\particlemanager.c:65`); `IsDedicatedServer()` alone lets the code run on a headless client. The general client-only rule in `skills/_shared/conventions/scripts.md` names `!GetGame().IsDedicatedServer()`; for particles this skill narrows it to `IsHeadlessOrDedicatedServer()`, which includes that check. Vanilla `PowerGeneratorBase` gates its smoke on `IsClient() || !IsMultiplayer()` instead (`P:\scripts\4_world\entities\itembase\powergenerator.c:196`); Pattern D, which follows that class, still uses `IsHeadlessOrDedicatedServer()` so one gate covers every pattern. Do not use `#ifndef SERVER`: testing runs `DayZDiag_x64.exe` for both ends, and a compile-time define does not separate them.
2. Looping particles (`Repeat 1`) never end on their own. Stop them and null the reference; clean up in `EEDelete`, power-off and the destructor.
3. `Stop()` fades out gradually; use `StopParticleFlags.IMMEDIATE` for instant removal.
4. `ObjectDelete(particle)` is valid only for a `ParticleSource` with `DisableAutoDestroy()`.
5. Give `.ptc` files a mod prefix (`mymod_`) so filenames don't collide across mods.
6. `AIR_RESISTANCE` controls how fast smoke rises; use `forceWorldRot = true` for smoke and steam that should always rise straight up.
7. `EffectTime` is the master-curve cycle; `Repeat` loops the whole effect. A one-shot (`Repeat 0`) plays once for `EffectTime`.
8. Clean up an `Effect` started through `SEffectManager` only with `SEffectManager.DestroyEffect()`, never with `delete`.
9. Particles stop being drawn at a distance: about 200 m, an engine limit with no workaround. The figure is an observation in game, not yet checked on `P:\`.
10. A dedicated server check alone is a 1.29 habit. Up to 1.29 vanilla wrecks tested `!g_Game.IsDedicatedServer()` (1.29, not yet checked on `P:\`); since 1.30 most vanilla particle code tests `!g_Game.IsHeadlessOrDedicatedServer()` (`P:\scripts\4_world\entities\building\wrecks\wreck_mi8.c:6`), but the Chinook and Mi-24 wrecks still use the dedicated server check alone (`P:\scripts\4_world\entities\building\wrecks\wreck_chinook.c:6` and `P:\scripts\4_world\entities\building\wrecks\wreck_mi24_tk.c:5`). When updating an older mod, search for the old check around particle code.
11. A valid `cfgeffectarea.json` and a server that boots do not prove a contaminated area shows gas at its edge. Each area is capped at 1,000 emitters; work out the budget first (`references/effect-area-particles.md`).
## Effect areas
Before choosing the radius of a contaminated area in `cfgeffectarea.json`, read `references/effect-area-particles.md`: work out the emitter budget with its formula and keep it under 1,000 with margin, measure the full height range of the ground inside the radius (underground spaces included), and compare every entry of the global `SafePositions` list against every area.
## DayZ 1.30
Full detail, with the vanilla lines: `references/dayz-1-30-particles.md` and `references/dayz-1-30-world-particles.md`. In short:
- The client check for particles is `!g_Game.IsHeadlessOrDedicatedServer()` (most wrecks, `FireplaceBase`, `ParticleManager`).
- Ceiling dust is spawned from the server with `SEffectManager.CreateParticleServer` and a `ParticleEffecterParameters("CeilingDustEffecter", ...)`.
- Vehicle effects are retuned through `ParticleParamsOverrideData.m_FloatModifiers`, owned by `VehicleVFXComponent`.
- Surface particle IDs come from `SurfaceInfo` (`GetStepParticleId`, `GetWheelParticleId`, `GetVehicleDustParticleId`, `GetCeilingDustParticleId`); the `Surface.GetStepsParticleID` and `Surface.GetWheelParticleID` wrappers are obsolete.
- Effect areas tick from `OnCEIterate`, not `OnCEUpdate`, and `SpawnParticles` snaps to `SurfaceRoadY`.
- New `ParticleList` constants: tandoor fire, desert sand and mud brick impacts, `CEILING_WOOD`, building destruction, dust, `OIL_FIRE1` and `OIL_FIRE2`. The weather sandstorm is a `SnowEffect` postprocess `.emat` plus the particle path `Graphics/Particles/sandstorm/sandstorm`.
The table of what breaks in a 1.29 mod and the migration checklist are at the end of that file. The 1.30 signatures are in `references/script-api-reference.md` ("DayZ 1.30: SurfaceInfo, vehicle effects, server spawn").
## On Linux
Everything above is written for Windows and stays valid there. `.ptc` and `.emat` are text files written without Workbench, so nothing in this skill needs Windows. Workbench can be started under Proton with `dayz-proton.sh gui Workbench` (the script is `scripts/tools/dayz-linux/dayz-proton.sh`); whether it runs there and whether its particle editor works is not yet checked. The Proton setup and its limits are in `skills/_shared/linux-proton.md`.
## Building, testing and publishing the mod
This skill ends at the effect files and the script that plays them. For the rest (`config.cpp` and `CfgMods`, `requiredAddons`, packing, a boot on a local server) use `/dayz-build-pbo` and `/dayz-launch-test`, and `skills/dayz-launch-test/references/mod-loop.md` for the whole loop.
Files in this skill
- SKILL.md
- references/emat-format-reference.md
- references/integration-patterns.md
- references/ptc-format-reference.md
- references/script-api-reference.md
- references/vanilla-particle-catalog.md
Attribution
Related skills
View all in content-marketing →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.