Skip to content

Particle Systems

Particle systems create visual effects like dust, smoke, fire, and weather. They consist of spawner configurations (.particlespawner) that define particle behavior, and system files (.particlesystem) that combine multiple spawners.

  • DirectoryAssets/Server/Particles/
    • DirectoryBlock/
    • DirectoryCombat/
    • DirectoryDeployables/
    • DirectoryDrop/
    • DirectoryExplosion/
    • DirectoryItem/
    • DirectoryMemories/
    • DirectoryNPC/
    • DirectoryProjectile/
    • DirectorySpell/
    • DirectoryStatus_Effect/
    • DirectoryWeapon/
    • DirectoryWeather/
      • DirectoryDust_Sparkles/
      • DirectoryFog/
      • DirectoryRain/
      • DirectorySnow/
    • Dust_Sparkles_Fine.particlespawner
    • Dust_Sparkles_Fine.particlesystem

Particle textures are in Assets/Common/Particles/Textures/.

ExtensionPurpose
.particlespawnerIndividual particle emitter configuration
.particlesystemCombines multiple spawners into one effect
FieldTypeDescription
RenderModestringRendering type (BlendLinear, BlendAdd, Erosion, Distortion)
ParticleobjectParticle appearance configuration
SpawnRateMinMaxParticles per second
ParticleLifeSpanMinMaxParticle duration (seconds)
MaxConcurrentParticlesintMaximum active particles (0 = unlimited)
FieldTypeDescription
EmitOffsetXYZ MinMaxSpawn position offset range
InitialVelocityobjectStarting velocity (Yaw, Pitch, Speed)
ParticleRotateWithSpawnerboolInherit spawner rotation
FieldTypeDescription
ParticleRotationInfluencestringRotation mode (Billboard, None)
LinearFilteringboolSmooth texture filtering
LightInfluencefloatWorld lighting effect (0-1)
FieldTypeDescription
AttractorsarrayForce attractors affecting particles
ParticleCollisionobjectCollision behavior

The Particle object defines appearance:

FieldTypeDescription
TexturestringPath to particle texture
FrameSizeobjectTexture frame dimensions
ScaleRatioConstraintstringAspect ratio (OneToOne, etc.)

The Animation object uses percentage keys (0-100) to animate:

{
"Animation": {
"0": {
"Scale": { "X": { "Min": 0, "Max": 0 }, "Y": { "Min": 0, "Max": 0 } },
"Opacity": 0,
"Color": "#222222",
"Rotation": { "X": { "Min": 0, "Max": 0 }, "Y": { "Min": 0, "Max": 0 }, "Z": { "Min": 0, "Max": 0 } }
},
"50": {
"Scale": { "X": { "Min": 1, "Max": 1 }, "Y": { "Min": 1, "Max": 1 } },
"Opacity": 0.66,
"Color": "#9e9e9e"
},
"100": {
"Scale": { "X": { "Min": 0, "Max": 0 }, "Y": { "Min": 0, "Max": 0 } },
"Opacity": 0,
"Color": "#1a1a1a"
}
}
}
FieldTypeDescription
ScaleXY MinMaxParticle size
OpacityfloatTransparency (0-1)
ColorstringHex color tint
RotationXYZ MinMaxRotation angles
FrameIndexMinMaxTexture frame (for spritesheets)
Dust_Sparkles_Fine.particlespawner
{
"RenderMode": "Erosion",
"EmitOffset": {
"X": { "Min": 2, "Max": 8 },
"Y": { "Min": 2, "Max": 8 },
"Z": { "Min": 2, "Max": 8 }
},
"ParticleRotationInfluence": "Billboard",
"LinearFiltering": true,
"LightInfluence": 1.0,
"MaxConcurrentParticles": 0,
"ParticleLifeSpan": { "Min": 1.5, "Max": 5.0 },
"SpawnRate": { "Min": 4000, "Max": 5000 },
"InitialVelocity": {
"Yaw": { "Min": 90, "Max": 180 },
"Pitch": { "Min": 0, "Max": 80 },
"Speed": { "Min": 0.015, "Max": 0.02 }
},
"Attractors": [
{
"Position": { "X": 0, "Y": 0, "Z": 0 },
"RadialAxis": { "X": 1, "Y": 1, "Z": 0 },
"Radius": 0,
"RadialAcceleration": -0.036,
"RadialTangentAcceleration": 0,
"LinearAcceleration": { "X": 0, "Y": 0, "Z": 0 }
}
],
"Particle": {
"Texture": "Particles/Textures/Weather/Dust.png",
"FrameSize": { "Width": 32, "Height": 32 },
"ScaleRatioConstraint": "OneToOne",
"Animation": {
"0": {
"Scale": { "X": { "Min": 0, "Max": 0 } },
"Opacity": 0,
"Color": "#222222"
},
"50": {
"Scale": { "X": { "Min": 1, "Max": 1 } },
"Opacity": 0.66,
"Color": "#9e9e9e"
},
"100": {
"Scale": { "X": { "Min": 0, "Max": 0 } },
"Opacity": 0,
"Color": "#1a1a1a"
}
},
"InitialAnimationFrame": {
"Rotation": {
"X": { "Min": 0, "Max": 360 },
"Z": { "Min": 0, "Max": 360 }
},
"Scale": { "X": { "Min": 0.02, "Max": 0.04 } },
"Opacity": 1
}
}
}

Systems combine multiple spawners:

Dust_Sparkles_Fine.particlesystem
{
"Spawners": [
{
"SpawnerId": "Dust_Sparkles_Fine",
"FixedRotation": true,
"WaveDelay": { "Min": 4, "Max": 36 }
},
{ "SpawnerId": "Dust_Sparkles_Fine" },
{ "SpawnerId": "Dust_Sparkles_Fine" }
],
"CullDistance": 30
}
FieldTypeDescription
SpawnersarrayList of spawner references
CullDistancefloatDistance to stop rendering
FieldTypeDescription
SpawnerIdstringSpawner file name (without extension)
FixedRotationboolLock rotation
WaveDelayMinMaxDelay between spawn waves

Located in Combat/:

  • Impact effects
  • Hit sparks
  • Blood effects

Located in Weapon/:

  • Swing trails
  • Charge effects
  • Special attack visuals

Located in Weather/:

CategoryEffects
Rain/Raindrops, splashes
Snow/Snowflakes, blizzard
Fog/Fog banks
Dust_Sparkles/Floating dust, flies

Located in Block/:

  • Break particles
  • Placement effects
  • Interaction particles
{
"BlockType": {
"BlockParticleSetId": "Stone",
"Particles": [
{
"SystemId": "Candle_Fire",
"Color": "#ffcd10",
"TargetNodeName": "Flame-Emitter",
"Scale": 0.75
}
]
}
}
{
"DamageEffects": {
"WorldParticles": [
{ "SystemId": "Impact_Blade_01" }
]
}
}

Attractors apply forces to particles:

FieldTypeDescription
PositionXYZAttractor center
RadialAxisXYZAxis for radial forces
RadiusfloatEffect radius
RadialAccelerationfloatInward/outward force
RadialTangentAccelerationfloatSwirl force
LinearAccelerationXYZDirectional force (gravity)
ModeDescription
BlendLinearStandard linear blending (default)
BlendAddAdditive blending for light emission effects like fire and sparks
ErosionErosion-based dissolve effect
DistortionScreen-space distortion for heat haze and refraction effects
MyPlugin_CustomEffect.particlespawner
{
"RenderMode": "BlendAdd",
"EmitOffset": {
"X": { "Min": -0.5, "Max": 0.5 },
"Y": { "Min": 0, "Max": 1 },
"Z": { "Min": -0.5, "Max": 0.5 }
},
"ParticleRotationInfluence": "Billboard",
"ParticleLifeSpan": { "Min": 0.5, "Max": 1.5 },
"SpawnRate": { "Min": 10, "Max": 20 },
"InitialVelocity": {
"Yaw": { "Min": 0, "Max": 360 },
"Pitch": { "Min": 60, "Max": 90 },
"Speed": { "Min": 1, "Max": 2 }
},
"Particle": {
"Texture": "MyPlugin/Particles/Glow.png",
"FrameSize": { "Width": 32, "Height": 32 },
"Animation": {
"0": { "Scale": { "X": { "Min": 0.5, "Max": 0.5 } }, "Opacity": 1 },
"100": { "Scale": { "X": { "Min": 0, "Max": 0 } }, "Opacity": 0 }
}
}
}