Cast Types
The type field in a skill determines its implementation and runtime behavior. Each type has a fixed set of required parameters in the params block; the init() method throws an error if params is empty. Six types are available: dummy, projectile, laser, impact, auto_cast, and n_cast.
Type selection and params structure
Each type expects specific keys in params. The sections below document every parameter, its type, and default value.
Dummy
Purpose: Inert skill that does not interact with the world. Fires cast-effects and target-effects only. Useful for stat bursts, command execution, or passive triggers.
Minimal params: params must be non-empty; use a placeholder key such as u: u to satisfy this requirement.
Parameter | Type | Default | Description |
|---|---|---|---|
(any key) | Any | — | Required: params must not be empty. A dummy skill ignores its contents. |
Example: stat burst
The dummy type is most useful as a leaf skill triggered by other types (e.g., from a projectile's cast-skill-on-entity).
Projectile
Purpose: Launches one or more projectiles with physics simulation, collision detection, and optional visual display and sound.
Projectiles update their position every update-rate ms, check for hits every hit-update-rate ms, and update their display every display-update-rate ms. On collision (entity hit, block hit, or max-range reached), the skill can trigger downstream skills via cast-skill-on-entity, cast-skill-on-block, or cast-skill-on-miss.
Parameter | Type | Default | Description |
|---|---|---|---|
| Float | — | Speed at which the projectile travels (units/ms). |
| Float | — | Linear drag coefficient applied each tick, slowing the projectile over time. |
| Float | — | Downward acceleration applied each tick (negative y direction). |
| Integer | — | Number of projectiles to launch per activation. |
| Float | 0 | Max horizontal (yaw) angle in degrees for trajectory variation. Set to 360 for full spread. |
| Float | 0 | Max vertical (pitch) angle in degrees for trajectory variation. |
| Float | (none) | If set, overrides the vertical angle of the projectile direction in degrees. |
| Boolean | false | If |
| Float | — | Maximum distance the projectile can travel before disappearing (in blocks). |
| Integer | — | Milliseconds between each position update. Lower values = smoother movement but more CPU. |
| Integer | — | Milliseconds between hit checks. Must be >= |
| Integer | — | Milliseconds between display updates. Must be >= |
| Integer | 0 | Extra sub-steps inserted between the previous and current position on each hit update, for high-speed projectiles (total checks per hit update = this value + 1). Improves hit accuracy at the cost of CPU. |
| Integer | 0 | Milliseconds to delay the first hit check after cast, preventing self-hits. |
| Boolean | false | If |
| Integer | 0 | Number of entities the projectile can pierce through after the first hit before stopping ( |
| SubjectTypes | — | Filter for valid targets (e.g., |
| ConfigurationNode | — | Collision shape for entity hits. See Hitbox Shapes. |
| ConfigurationNode | — | Collision shape for block hits. If unset, |
| SoundConfiguration | (none) | Sound played when the skill is cast. |
| SoundConfiguration | (none) | Sound played while the projectile is in flight. |
| Integer | (none) | Milliseconds between successive travel sound plays. |
| SoundConfiguration | (none) | Sound played on entity or block hit. |
| List[ConfigurationNode] | — | List of visual representations (particles, item displays, etc.). See Displays. |
| List[String] | (empty) | Skill ids to trigger when the projectile hits an entity. |
| List[String] | (empty) | Skill ids to trigger when the projectile hits a block. |
| List[String] | (empty) | Skill ids to trigger when the projectile reaches |
Example: mage projectile
Spread patterns with angular variation
Combine count with horizontal-angular-variation and vertical-angular-variation to produce spread patterns:
This configuration fires 8 projectiles, each rotated 45° in yaw.
Laser
Purpose: Fires an instantaneous beam from the caster's position in a straight line, with no gravity or drag. A special case of projectile that forces fixed physics and timing.
Laser behaves like projectile but forces the following:
drag: always 0gravity: always 0update-rate: always 1 msdisplay-update-rate: always 1 mshit-update-rate: always 2 ms
All projectile parameters are accepted; physics parameters are ignored.
Parameter | Type | Default | Notes |
|---|---|---|---|
(projectile params) | — | — | Laser accepts all projectile keys except |
| Float | — | Beam extension speed (simulates travel distance for hit checking). |
| Float | — | Maximum beam length in blocks. |
| SubjectTypes | — | Target filter. See Targeting. |
| ConfigurationNode | — | Beam collision shape. See Hitbox Shapes. |
| List[String] | (empty) | Skills to trigger when the beam hits an entity. |
| List[String] | (empty) | Skills to trigger when the beam hits a block. |
Example: laser beam
Impact
Purpose: Instantaneous area-of-effect that deals damage, healing, or knockback to all entities within a hitbox at a fixed position. No projectile flight or collision detection.
The impact executes once: it resolves all valid targets within its hitbox, applies effects (damage, heal, knockback), and can chain to downstream skills via cast-skill-on-hit or cast-skill-on-miss.
Parameter | Type | Default | Description |
|---|---|---|---|
| Float | — | Raw damage to apply to hit entities. |
| Float | — | Raw healing to apply to hit entities. |
| Float | — | Knockback strength applied to hit entities (horizontal component). |
| Float | 1.0 | Multiplier for the vertical component of knockback. |
| Boolean | false | If |
| Integer | -1 | Maximum number of entities affected by this impact (-1 for unlimited). |
| Boolean | false | If |
| SubjectTypes | — | Filter for valid targets. See Targeting. |
| ConfigurationNode | — | Collision shape and volume. See Hitbox Shapes. |
| Vector | (0, 0, 0) | Fixed offset in world-space (X = east, Y = up, Z = south). |
| Vector | (0, 0, 0) | Offset relative to the direction vector (X = right, Y = up, Z = forward). |
| Float | (none) | If set, overrides the pitch (vertical angle) of the impact direction. |
| Boolean | false | If |
| SoundConfiguration | (none) | Sound played when impact occurs. |
| List[ConfigurationNode] | — | Visual representations. See Displays. |
| List[String] | (empty) | Skills triggered once the impact resolves, unless the miss branch below was taken. Because of this, if |
| List[String] | (empty) | Skills to trigger instead of |
Example: knight impact
Auto Cast
Purpose: Schedules a sequence of sub-skills to execute on staggered delays (in milliseconds). Useful for multi-hit combos, charge-up sequences, or periodic pulses.
Activation calls update() once, which schedules all sub-skills in elements with their respective delays. The caster's eye location and facing direction are used for each sub-skill cast.
Parameter | Type | Default | Description |
|---|---|---|---|
| List[AutoCastElement] | — | Ordered list of sub-skills and their delays. |
| Integer | 0 | Number of extra full passes through |
AutoCastElement structure:
Field | Type | Default | Description |
|---|---|---|---|
| String | — | Skill id to cast. |
| Integer | 250 | Milliseconds to wait before casting this skill (cumulative from the start of the sequence). |
Example: creeper windup sequence
Note: delays are cumulative. Each element's delay is the wait time from the start of the sequence, not the gap from the previous element.
N Cast
Purpose: Rotates through a sequence of skills on each activation, cycling to the next skill in the list every time the n_cast skill is triggered.
On each activation, the n_cast skill looks up the current rotation index for the caster (tracked per skill-id in NCastSkillCache) and casts skills[index]. The index is incremented and wrapped around. The rotation timeout is configurable.
Parameter | Type | Default | Description |
|---|---|---|---|
| List[String] | — | Ordered list of skill ids to cycle through. |
| Long | 10000 | Milliseconds; if a caster does not activate this n_cast for longer than this duration, the rotation index resets to 0. |
Example: knight combo rotation
Each time knight-attack-1-cast is triggered, it casts the next skill in the sequence: knight-attack-1-1, then knight-attack-1-2, then knight-attack-1-3, then back to knight-attack-1-1. If 4 seconds pass without an activation, the rotation resets.
The placeholder %n-cast-index% is registered in the skill's placeholder container during execution, allowing effects or downstream skills to react to the current rotation state.
Timing and update loops
All millisecond-based timing (update-rate, hit-update-rate, display-update-rate, delays) is executed by the skill shard engine, which processes each shard's update loop independently. Precision depends on server load; all timings are "at least X ms" (may be slightly later under load).
For projectiles: hit-update-rate and display-update-rate cannot be lower than update-rate; setting either lower is logged as a warning.
For hit accuracy at high speeds (low velocity + high max-range), increase hit-update-sub-steps to subdivide each hit check into finer intervals.
Cross-references
Hitbox shapes: Hitbox Shapes — Detailed collision volume configs for
hitbox-paramsDisplays: Displays — Particle and visual effect configurations
Targeting: Targeting — Entity filter syntax for
targetsDeveloper API: Developer API — Java API for custom aim-solving and skill casting