Gameplay

Effect Creator

Build visual effects from layers of particles, glows, trails, lights, lightning arcs, rings, sounds and the disc spells' own looks, watch them play live, and use them in designed skills, item affixes and scripts.

The Effect Creator (Gameplay section) makes the visual effects of the mod's gamedata/effects.toml. An effect is a stack of layers: particle emitters, glows, ribbon trails, lights, lightning arcs, expanding rings, sounds and the disc spells' own looks. It plays live in the viewport with the game's own effect player, so what you see is what the game shows.

Effects are used by:

An effect

# gamedata/effects.toml (from the example-designed-skills example)
[effect.ember_trail]             # what follows the Ember Bolt
duration = 1
loop = true                      # runs until the skill stops it (a bolt's flight, a zone, a buff)

[effect.ember_trail.sparks]      # one layer
type = "particles"
order = 0
rate = 120
shape = "sphere"
radius = 4
direction = "back"
speed = 30
angle = 40
inherit = 10                     # % of the bolt's own motion they keep
gravity = -20                    # negative: they float up
size = 4
size_end = 0.5
color = [255, 200, 90, 230]      # 0-255, alpha last
color_end = [200, 40, 0, 0]
life = 0.5
blend = "add"
sprite = "fire_anim"

[effect.ember_trail.heart]
type = "glow"
order = 1
size = 18
color = [255, 150, 60, 190]
pulse = 6

[effect.ember_trail.light]
type = "light"
order = 2
light_radius = 140
color = [255, 140, 60, 255]

An effect is [effect.<name>] with its duration (seconds; for a looping effect, one cycle), loop and scale (multiplies every size, radius, offset and speed). Its layers are [effect.<name>.<layer>], played in order (then by name).

Every layer has:

  • start and length: seconds into the effect it begins, and how long it runs (0: to the effect's end),
  • offset: where it sits from the effect's centre, along its facing (x forward, y left, z up).

Layer types

Type Is
particles An emitter: rate a second and/or a burst, born in a shape (point, sphere, shell, ring, disc, line ahead, cone), flying in a direction (up, out, forward, back, down, along the effect's motion, random) at speed with angle spread and gravity, with sizes and colours over their life, a blend and an atlas sprite. local ones move with the effect.
glow A glow sprite (one of the eight halo pictures), pulsing and spinning
trail A ribbon following the effect as it moves (one of nine textured bands)
light A coloured point light growing or shrinking over the layer, pulsing
arc Lightning arcs from the effect to random points reach away, or to its target (to_target)
ring A ring of glows expanding from radius to radius_end
sound A sound when the layer begins (an fx.lmp entry, or "<lump>/<entry>")
look A disc spell's own visuals: its cast, its bolt in flight, or its ground area (spell, part)

The blends:

Blend Looks like
add Glowing: fire, magic, sparks
alpha Solid: smoke, dust
streak Motion lines
haze Heat shimmer

Every key of every layer, with its default, is in the Skill and effect reference, and the particle sprites by name in its Sprites list.

Effects that fit an area

fit = true makes a particle or ring layer's radii shares of the skill's area (1 = its edge), so one effect serves every radius a zone, an aura or a nova grows to as it ranks up:

[effect.violet_ring]             # a nova's expanding ring
duration = 0.8

[effect.violet_ring.ring]
type = "ring"
count = 28
radius = 0.05
radius_end = 1                   # with fit: the skill's radius
fit = true
size = 16
size_end = 8
color = [200, 150, 255, 200]
color_end = [120, 80, 255, 0]
halo = "halo2"

The built-in library

The port ships effects any mod can use, with no file: fire_burst, fire_trail, frost_burst, frost_trail, spark_burst, lightning_trail, holy_glow, heal_sparkle, poison_cloud, fire_zone, shockwave, arcane_trail, fire_aura, frost_aura, smoke_puff, blood_burst, blink_out, blink_in. The Skill Designer's templates use them.

A mod's effect with a built-in's name replaces that built-in everywhere it is used. Copy into the mod starts from the built-in one, and Revert to built-in takes the mod's version out.

The module

The list shows every effect, built-in and the mod's, with a filter.

  • New...: an empty effect (one particle layer), or a copy of the selected one. The name may use letters, digits, _ and -.
  • Copy into the mod: the selected built-in effect, to change it.
  • Delete (the mod's own) or Revert to built-in (the mod's version of a built-in).

The Effect section has the effect's own keys. Layers lists its layers: Add layer by type, Duplicate, Remove, and the arrows to reorder them. The selected Layer shows every key its type reads, with colour pickers, the atlas sprites by name and the halo pictures, and R to put a key back to its default.

Under them: the Problems the game would log when it loads the effect and As written (effects.toml), with Copy to clipboard.

The preview

It plays live on the game's particle pool as you change it:

Control Does
Still, Flying (a bolt), Circling The effect stands, flies in a line like a bolt (for trails), or circles
Height How high above the ground it stands (Still)
Speed Playback speed, from 0.05× to 2×
Skill's area The radius fit layers fill
Target (arcs to_target, beams) Gives it a target point, for arcs and beams
Replay when it ends Plays it again and again
Replay, Pause, Clear Starts it again, pauses it, clears the particles
Play scale Plays it larger or smaller

Note The preview needs the disc data (the particle textures come from it): see Getting started.

Save (or Save All) writes gamedata/effects.toml.

Examples

example-designed-skills has a looping bolt trail and a ring sized to a nova's radius. See Examples.