Particles
Particles opens and edits particle effects: the .ptc files that describe the smoke, fire, sparks, dust and explosions the game plays. You use it to study the game's own effects, copy one into your mod, change its emitters and curves, and watch an approximate preview while you do. To browse the game's effects you need the DayZ folder set in Settings; to list your own you need a workspace folder (also in Settings).
The page is marked Preview in the rail. Opening, editing, validating and saving effects work. The preview is an approximation of the engine, and the files this page writes have been checked by its own validation, not in the game: always look at an edited effect in game before you ship it.
The screen
- Header: New (an unsaved effect with one emitter), Open (a
.ptcanywhere on disk), Undo, Redo, Reload, Save as, Save. A "modified" badge shows while there are unsaved edits. - Effect list (left): the Workspace / Game switch, a Rescan button and a filter field. Workspace lists the
.ptcfiles of your workspace folders. Game lists the effects inside the game's PBOs (the archives the game ships its files in), narrowed by the search field. Click a row to open it. - Preview bar (centre, top): Play / Pause, Restart, speed (0.1× to 2×), Loop, Grid, background colour, Frame.
- Preview (centre): the effect playing. Drag orbits, right drag pans, the wheel zooms. When nothing is open it shows what to do; when a file cannot be read it shows the error.
- Status line (under the preview, once an effect is open): where the effect comes from, and a badge with the number of problems. Click the badge to list them; click a problem to select its emitter.
- Emitters (right, top): one row per emitter with its index (
#0,#1...). The buttons above add, duplicate, move and remove an emitter. The eye on a row hides that emitter in the preview only. - Effect keys (right): the two keys of the effect itself,
VelAffectandMinFPS. - Emitter (right): the selected emitter's name, its material with a thumbnail and a Pick button, then its parameters in six groups (Emission, Particle, Motion, Rotation, Sprite animation, Rendering). Hover a parameter name to read what it does.
- Curves (right, bottom): one badge per curve; green means the emitter sets it. The editor below shows the chosen curve as a graph and as a table of keys.
First steps
- Click Game at the top of the effect list.
- Type
smoke_bonfirein the search field and click the row. - Watch it in the preview. Use the speed list and Restart to look closer.
- On the right, read the emitter: its material,
BirthRate,LifeTime,Velocity, and theSizeandAlphacurves. - Click Save as and save it into your mod folder. The file is now yours: the Save button and editing are enabled.
- Change
BirthRateor drag a key of theSizecurve and watch the preview follow.
Take the tour (in the app)
Common tasks
Copy a game effect into your mod
- Switch the list to Game, search, click the effect.
- Click Save as and choose a folder of your mod.
- Switch the list to Workspace and press Rescan if the file does not show yet.
Start a new effect
- Click New: you get one emitter with default values.
- Click Pick in the Material section and choose a particle material (
.emat). - Set the Emission parameters (
ShapeType,BirthRate,MaxNum), thenLifeTimeandVelocity. - Press Ctrl+S: an unsaved effect asks where to save.
Change how particles fade or grow
- Select the emitter.
- In Curves, click
Alpha(opacity) orSize. If it says "Not set", click Add curve. - Double-click the graph to add a key, drag a key to move it, right-click a key to remove it. The table below holds the exact values.
- For a colour curve, use the colour box of each key.
Type exact values
- Click a number field and type. The field keeps what you type; the file gets the parsed number.
- Arrow up / down steps by 0.1 (by 1 for whole numbers); Shift steps ten times more, Alt ten times less.
- The ✕ next to a parameter removes the key so the default applies again.
Fix what the validation reports
- Click the problems badge under the preview.
- Click a line: its emitter is selected, and the parameter or curve at fault is marked in red on the right.
- Correct the value. The count updates as you type.
Rename or reorder emitters
- Type the new name in the Name field and press Enter. Names must be unique.
- Use the arrows above the emitter list to move it. Moving changes its index, which scripts use.
Examples
- Bonfire smoke (in the app): one emitter and four curves (Color, Alpha, RotationSpeed, Size). The shortest effect to read from top to bottom.
- Small camp fire (in the app): six emitters (glow, three flame layers, sparks, smoke). Hide them one by one with the eye to see what each adds; note which ones have
Repeaton. - Landmine explosion (in the app): fourteen emitters with
EffectTime0.1 and noRepeat: a one-shot. Keep Loop on, slow the speed down and press Restart. - Hatchback exhaust (in the app): a single small emitter used for a vehicle.
Examples open from the game, read-only.
Concepts
- Effect file (.ptc): a text file. An
EffectDefholds a list of emitters (Emitors), each anEmitorDefwith a name andKey valuelines. Keys that are absent take a default; the page shows that default greyed in the empty field. - Emitter: one source of particles: where they are born (
ShapeType,ShapeSize,Offset,Angles), how many (BirthRate,MaxNum), how long each lives (LifeTime), how they move (Velocity,ConeAngle,GravityMultiply,AirResistance) and how they are drawn (material,SizeMultiplier,BillboardingType). An effect layers several emitters. - EffectTime and Repeat:
EffectTimeis how long the emitter emits, in seconds. WithRepeatoff the emitter runs once (an explosion); with it on it starts over (a fire). - Curves: a value over time, as keys between 0 and 1.
Color,Alpha,SizeandRotationSpeedrun over one particle's life (0 = birth, 1 = death). The curves ending inMast(AlphaMast,SizeMast,BRateMast,VelocityMast...) run over the emitter'sEffectTimeand apply to all its particles. - Material (.emat): the texture of the particles, its blend mode (additive or alpha blend) and its sprite-sheet grid. A
.ptcrefers to it as{GUID}Graphics/Particles/materials/….emat; the Pick dialog writes that reference for you. - Using an effect from script: the game registers every effect in the class
ParticleList(scripts/3_Game/Particles/ParticleList.c), which turns a file name into an integer id. A mod adds its own withmodded class ParticleList { static const int MY_EFFECT = RegisterParticle("mod_folder/", "my_effect"); }: the folder with forward slashes and a trailing slash, the file name without.ptc. The id is then played withParticle.PlayOnObject(id, object, localPos)orParticle.PlayInWorld(id, position)(ParticleManageroffers the same calls). - Changing an effect at run time:
Particle.SetParameter(emitter, parameter, value)takes the emitter's index (the#shown in the emitter list) and anEmitorParamconstant. The tooltip of a parameter gives its constant when it has one (for exampleBirthRateisEmitorParam.BIRTH_RATE).
Reference: the Particle Editor pages of the Bohemia Interactive community wiki (DayZ Workbench).
Pitfalls
- The preview is not the game. It simulates birth rate, life time, velocity in the cone, gravity, drag, bounces on the ground and the curves. It does not simulate wind, springs or lighting. Check the result in game.
- Game effects are read-only. Save is disabled for them and its tooltip says why; Save as makes your copy. Nothing in the DayZ folder is ever changed.
- Emitter order matters to scripts. Scripts address emitters by index, so moving or removing an emitter changes what a
SetParametercall hits. - A "not found" material. The effect still opens, but the particles have no texture. Pick the material again, or check that the game data is mounted (DayZ folder in Settings).
- Saving may re-indent a hand-written file. When a file is not laid out the way the page writes it, the log says so on opening. The previous version is kept as a backup on every save.
- Someone else changed the file. If the file changed on disk after you opened it, Save stops and offers Reload or Save anyway. Without unsaved edits, the page reloads it by itself.
- Unknown keys are kept. Keys the page does not know are listed under "Other keys" and written back unchanged; they cannot be edited here.
- Leaving the page keeps the open effect, its unsaved edits and its undo history; playback pauses until you come back.
For agents
Tools of dzt that do the same work without the window:
ptc_info: summary of a.ptc(file path or game virtual path): effect keys, and per emitter its name, index, material, shape,MaxNum,BirthRate,LifeTime,EffectTime,Repeat, curves and unknown keys.ptc_validate: the checks of the problems list: structure, emitter names, value types and ranges, curves, and withcheck_materialswhether each material exists in the mounted files.vfs_searchwith"ext":"ptc": find the game's effects by path;vfs_readreturns the text of one.file_read: read a.ptcof a mod as text. A.ptcis plain text, so the usual file-editing tools apply; runptc_validateafterwards.
Files the page reads and writes:
- Reads
.ptcfiles from the workspace folders (found by a scan up to 12 folders deep) and from the game's PBOs; reads.ematmaterials and their textures for the thumbnails and the preview. - Writes only the
.ptcyou save. Each save first copies the previous version toparticle-backups/<file name>/<time>.ptcin the app's configuration folder. - The open file is watched: a change made by another program is reloaded (or announced, if you have unsaved edits).
What the page tells the assistant: the open file (or "game, read-only" / "new effect"), the selected emitter, the number of emitters, a load error if any, whether there are unsaved changes, and the list of validation problems (emitter and message). It offers the action "Check this effect".
Anchors for guided steps: particles-new, particles-open, particles-save-as, particles-save, particles-files, particles-game, particles-preview-bar, particles-preview, particles-problems, particles-inspector, particles-emitters, particles-curves.
See also
- Textures (PAA): look at the sprite sheets the particle materials use.
- Script Editor: register the effect in
ParticleListand play it. - PBO Packer: pack the
.ptcwith your mod. - The Workbench