Spawning
spawner, wave_spawner, npc — place entities in the world with respawn, tags, equipment, and Cobblemon integration.
Encounter elements are the building blocks of every encounter. Each element has a unique type key and its own set of configuration options, signals it emits, and signals (or wiring actions) it consumes.
This page catalogs all 27 built-in types. For the lifecycle, signal bus model, phase logic, and editor workflow, see the Encounters architecture page.
27 built-in typesSpawning
spawner, wave_spawner, npc — place entities in the world with respawn, tags, equipment, and Cobblemon integration.
Logic & Flow
timer, delay, counter, condition_gate, sequence, randomizer, objective, trigger — the control-flow toolbox.
Interaction
interactable, dialogue, checkpoint, elevator, launch_pad, teleporter, barrier — player-facing mechanics.
Presentation
camera, hologram, item_display, screen_effect, soundscape, effect_zone, structure, platform, script — visuals, audio, and scripting.
Every element entry is a JSON object with a shared set of top-level fields that apply to all 27 types:
| Field | Type | Default | Purpose |
|---|---|---|---|
id | String | "" | Unique element ID inside its encounter. Used for signal addressing (id:signal_name). |
type | String | "spawner" | One of the 27 registered type keys (case-sensitive). |
position | {x,y,z} | null | Absolute world position. Overrides offset. |
offset | {x,y,z} | null | Offset from the encounter anchor when no position is set. |
radius | Double | 5.0 | Default sphere radius if no explicit shape is provided. |
shape | Object | null | Optional shape override — sphere, cylinder, box, etc. |
rotation | Float | 0 | Rotation in degrees. Used for entity facing and block offset rotation. |
config | Object | {} | Per-type configuration. Each element type defines its own keys. |
signals | SignalWiring[] | [] | Outgoing signal wirings — see the Encounters page. |
active_in_phases | String[] | null | Phase whitelist. If set, the element is only active in these phases. |
initially_active | Boolean | true | Whether the element activates on encounter start. |
script | String | null | Molang script source (used by the script element type). |
visibility | String | "all" | Per-player visibility tier — all, eligible, party, none. |
visuals | Object | null | Optional { structure, blocks } for fake-block rendering. |
Elements share a custom-data map — a per-element key/value bag that handlers and signal wirings can read and write at runtime.
Elements that put entities into the world.
Spawns and manages a configurable number of vanilla entities, Cobblemon Pokemon, or Cobblemon NPCs at the element position.
| Key | Type | Default | Purpose |
|---|---|---|---|
entity_type | String | "minecraft:zombie" | Entity ID. Prefixes cobblemon:pokemon / cobblemon:npc switch to Pokemon / NPC spawning. |
count | Int | 1 | Number of entities to spawn. |
tags | String[] | [] | Tags applied to spawned entities (used by Objective tracking). |
spread_radius | Double | 15.0 | Random offset radius around the center. |
nbt | String | null | NBT compound applied to vanilla entities. |
properties | String | null | Cobblemon Pokemon properties string. |
npc_preset | String | null | Cobblemon NPC preset ID. |
custom_name / name_visible | String / Boolean | null / false | Display name override. |
equipment | Object | null | {mainhand, offhand, head, chest, legs, feet} item map. |
effects | Array | null | [{effect, duration, amplifier}] mob effects. |
respawn_delay | Int | 0 | Respawn killed entities after this tick delay. |
max_alive | Int | 0 | Cap on concurrent live entities (0 = no cap). |
spawn_table | String | "" | Spawn table blueprint ID. When set, ignores entity_type / count. |
Emits: spawned, entity_killed, all_dead, battle_won, battle_lost, battle_fled
{ "id": "zombie_wave", "type": "spawner", "config": { "entity_type": "minecraft:zombie", "count": 5, "tags": ["wave_1"], "respawn_delay": 100, "equipment": { "mainhand": "minecraft:iron_sword" } }}Multi-wave entity spawner with configurable intermission delays and per-wave entity definitions. State machine: waiting → active → intermission → ... → complete.
| Key | Type | Default | Purpose |
|---|---|---|---|
waves | JSON array (string) | "" | Each wave is {entity_type, count, spread, nbt?, npc_preset?, properties?, spawn_table?}. |
intermission_ticks | Int | 60 | Ticks between waves. |
auto_start | Boolean | true | Start the first wave on activate. |
Emits: wave_started, wave_cleared, all_waves_complete, entity_killed
Wiring actions: start_wave
{ "id": "arena_waves", "type": "wave_spawner", "config": { "intermission_ticks": 100, "waves": "[{\"entity_type\":\"minecraft:zombie\",\"count\":5,\"spread\":8.0},{\"entity_type\":\"minecraft:skeleton\",\"count\":3},{\"spawn_table\":\"boss_wave\"}]" }}A wave with a spawn_table field rolls from the table instead of inline entity_type / count.
Spawns a single Cobblemon NPC from a preset with respawn, custom names, paths, and dialogue support.
| Key | Type | Default | Purpose |
|---|---|---|---|
npc_preset | String | required | Cobblemon NPC preset ID. |
custom_name / name_visible | String / Boolean | "" / true | Display name override. |
path_id | String | "" | Journey path ID — auto-starts walking on spawn. |
respawn_delay | Int | 0 | Respawn after death if > 0. |
dialogue | String | "" | Cobblemon dialogue ID (priority 3). |
dialogue_blueprint | String | "" | Encounter dialogue blueprint ID (priority 2). |
Emits: spawned, despawned, interacted, battle_started, battle_won, battle_lost, battle_fled
Wiring actions: set_dialogue, walk_path, stop_walking
Dialogue priority: wiring-set > blueprint > config string.
The control-flow toolbox. These elements do the work of tying other elements together without placing anything visible.
Countdown timer with threshold signals and pause / resume / start support via signal listeners.
| Key | Type | Default | Purpose |
|---|---|---|---|
auto_start | Boolean | true | Start on activate. |
duration | Int | 200 | Total duration (ticks). |
mode | String | "countdown" | "countdown" emits completed + expired when elapsed >= duration. |
signals_at | String (CSV ints) | "" | Tick values at which to emit a threshold signal. |
Emits: started, tick, completed, expired, paused, resumed, threshold
Consumes: <id>:pause, <id>:resume, <id>:start
{ "id": "boss_timer", "type": "timer", "config": { "duration": 6000, "mode": "countdown", "signals_at": "3000,5400,5700,5880" }}Buffers a signal and re-emits an output signal after a tick delay. Supports multiple in-flight delays simultaneously.
| Key | Type | Default | Purpose |
|---|---|---|---|
input_signal | String | "" | Signal name to listen for (subscribed as *:input_signal). |
delay_ticks | Int | 20 | Delay before re-emit. |
output_signal | String | "delayed" | Signal name emitted after the delay. |
Emits: received, delayed
Numeric accumulator with threshold signals and optional data store sync.
| Key | Type | Default | Purpose |
|---|---|---|---|
initial_value | Double | 0.0 | Starting value (also the reset target). |
increment_amount | Double | 1.0 | Default delta for increment_on / decrement_on. |
increment_on | String | "" | Signal pattern that triggers an increment. |
decrement_on | String | "" | Signal pattern that triggers a decrement. |
reset_on | String | "" | Signal pattern that resets. |
thresholds | String | "" | Pipe-separated value:signal pairs (e.g. `“10:halfway |
store_key | String | "" | If set, syncs the value to the encounter data store. |
Emits: changed (with value / previous), plus per-threshold custom signals
Wiring actions: increment, decrement, reset, set
Boolean evaluator that listens for a list of named condition signals and emits satisfied / unsatisfied based on logic mode.
| Key | Type | Default | Purpose |
|---|---|---|---|
conditions | String[] | [] | Signal patterns to watch. Each match adds the pattern to the “met” set. |
mode | String | "and" | One of and, or, not, xor. |
latch | Boolean | false | Once satisfied, stays satisfied. |
output_signal | String | "" | Optional extra signal emitted alongside satisfied. |
Emits: satisfied, unsatisfied, plus output_signal
{ "id": "all_levers_pulled", "type": "condition_gate", "config": { "conditions": ["lever_a:activated", "lever_b:activated", "lever_c:activated"], "mode": "and", "latch": true, "output_signal": "puzzle_solved" }}Tracks ordered signal completion. Listens for a list of signals that must arrive in order (or any order if strict_order=false).
| Key | Type | Default | Purpose |
|---|---|---|---|
steps | String[] | [] | Signal patterns expected in order. |
strict_order | Boolean | true | Out-of-order signals count as failure. |
reset_on_fail | Boolean | false | Reset current_step to 0 on out-of-order. |
Emits: step_completed, sequence_complete, sequence_failed, sequence_reset
Weighted random outcome picker. Listens for a trigger signal, then emits one of N outcome signals plus a generic rolled signal.
| Key | Type | Default | Purpose |
|---|---|---|---|
trigger_on | String | "" | Signal pattern that triggers a roll. |
outcomes | String (JSON) | "" | [{signal, label?, weight}]. Weight defaults to 1. |
Emits: rolled (with outcome + label), plus each chosen outcome’s signal name
Wiring actions: roll
{ "id": "loot_picker", "type": "randomizer", "config": { "trigger_on": "boss:defeated", "outcomes": "[{\"signal\":\"common_drop\",\"weight\":70},{\"signal\":\"rare_drop\",\"weight\":30}]" }}Tracks progress toward a typed goal and emits complete + optional reward distribution.
| Key | Type | Default | Purpose |
|---|---|---|---|
objective_type | String | "kill_all" | kill_all, kill_count, survive_duration, protect_entity, capture_zone, interact, collect, custom. |
target | String (number) | "1" | Target value. |
tag | String | "" | Entity tag for kill_all / kill_count / protect_entity. |
zone_id | String | "" | Zone ID for capture_zone. |
reward_pack | String | "" | Reward pack blueprint distributed to all players on completion. |
description | String | "" | Dashboard / UI hint. |
required | Boolean | true | Gates phase on_all_objectives_complete transitions. |
Emits: complete, progress_changed
Player-presence sensor that emits enter / exit / all-inside signals.
| Key | Type | Default | Purpose |
|---|---|---|---|
one_shot | Boolean | false | Stop firing after the first activation. |
player_count_threshold | Int | 1 | Player count required to fire activated. |
require_all | Boolean | false | Require all encounter players inside before firing all_inside. |
Emits: player_entered, player_exited, activated, deactivated, all_inside, tick_inside
Player-facing elements — things players click, stand on, walk through, or get teleported by.
General-purpose interactive entity with multiple interaction types, multi-stage progression, hold-to-interact, visual states, and command pool execution.
| Key | Type | Default | Purpose |
|---|---|---|---|
interaction_type | String | "custom" | One of npc, pickup, button, custom. |
npc_preset | String | "" | Cobblemon NPC preset (type=npc). |
dialogue | String | "" | Cobblemon dialogue ID. |
item / item_blueprint | String | "" | Item for pickup. |
custom_name / name_visible | String / Boolean | "" / true | Entity display name. |
one_time | Boolean | false | Only one interaction allowed across all players. |
cooldown | Int (ticks) | 0 | Per-player cooldown. |
condition | Molang | "" | Required predicate; failing players see unavailable_text. |
unavailable_text | String | "" | Message sent when condition fails. |
stages | String (JSON) | "" | Multi-stage progression spec. |
hold_duration | Int | 0 | If > 0, hold-to-interact mode. |
visual_states | String (JSON) | "" | Map of state name to {custom_name?, glow?} overrides. |
command_pool | String | "" | Command pool blueprint run after each interaction. |
Emits: interacted, collected, dialogue_complete, battle_won/lost/fled, stage_advanced, stage_blocked, hold_started/completed/cancelled, visual_state_changed
Wiring actions: set_visual_state, set_stage, reset_stages
{ "id": "ancient_lever", "type": "interactable", "config": { "interaction_type": "button", "custom_name": "<gold>Ancient Lever", "hold_duration": 40, "one_time": true }}Plays per-player dialogue using either simple mode (chat / title / actionbar) or Cobblemon’s Dialogue API. Optionally reads from a dialogue blueprint.
| Key | Type | Default | Purpose |
|---|---|---|---|
dialogue_blueprint | String | "" | Reference to a dialogue blueprint ID (takes priority). |
dialogue_mode | String | "simple" | "simple" or "cobblemon". |
auto_play | Boolean | false | Start dialogue on activate. |
lines | String (JSON) | "" | Simple-mode line array: [{text, speaker?, delay, mode}]. |
pages | String (JSON) | "" | Cobblemon-mode page definitions. |
escape_action | String | "" | Molang run when a player escapes. |
Emits: started, line_played, completed, page_opened, option_selected, text_entered, escaped
Wiring actions: play, stop, skip, set_page
Saves player position / health when entered or interacted with, then restores them on death.
| Key | Type | Default | Purpose |
|---|---|---|---|
auto_save | Boolean | true | Auto-save when a player enters the shape. |
restore_on_death | Boolean | true | Teleport dying players back to their last save. |
restore_health | Boolean | true | Reset health to the saved value on restore. |
Emits: saved, restored
Convenience element that spawns a clickable interactable, opens a floor-selection GUI, then emits floor_selected so a wired Platform can go_to_point for that index.
| Key | Type | Default | Purpose |
|---|---|---|---|
floors | JSON array | [] | Array of {name, index} objects. |
platform_id | String | "" | ID of the platform this elevator controls (informational). |
custom_name | String | "Elevator" | GUI title and entity nameplate. |
Emits: floor_selected (with {index, floor}), interacted
{ "id": "elevator_main", "type": "elevator", "config": { "platform_id": "elevator_platform", "custom_name": "Tower Lift", "floors": [ { "name": "Lobby", "index": 0 }, { "name": "Floor 5", "index": 1 }, { "name": "Roof", "index": 2 } ] }, "signals": [ { "on": "elevator_main:floor_selected", "action": "go_to_point", "target": "elevator_platform" } ]}Applies a velocity vector to players who enter.
| Key | Type | Default | Purpose |
|---|---|---|---|
velocity | String (CSV) | "0,1,0" | Velocity components vx,vy,vz. |
add_to_existing | Boolean | false | Add to current delta movement instead of replacing. |
one_shot | Boolean | false | Each player can only launch once. |
cooldown | Int | 0 | Per-player cooldown ticks. |
sound | String | "" | Optional sound event. |
Emits: launched
Teleports players to another element or fixed coordinates. Supports enter-trigger or signal-trigger modes.
| Key | Type | Default | Purpose |
|---|---|---|---|
trigger_mode | String | "enter" | enter (auto) or signal (waits for <id>:teleport). |
delay_ticks | Int | 0 | Delay before executing. |
target_element | String | "" | Element ID whose position to teleport to (priority). |
target_position | String (CSV) | "" | Fixed coordinates x,y,z. |
sound | String | "" | Sound event played at the teleporting player. |
Emits: teleported
Places fake / invisible blocks (default minecraft:barrier) at the element position. Auto-generates a filled box from shape_size if no manual blocks map is supplied.
| Key | Type | Default | Purpose |
|---|---|---|---|
blocks | Object | auto-gen | Map of "x,y,z" relative offsets to block ID. |
shape_size | String (CSV dx,dy,dz) | "" | Triggers auto-generation. |
block_type | String | "minecraft:barrier" | Block ID for auto-generated cells. |
Emits: activated, collision
Visuals, audio, structure, scripting, and platform movement.
Plays a cinematic camera sequence. Supports a Ceremony cutscene path or manual waypoint interpolation with easing.
| Key | Type | Default | Purpose |
|---|---|---|---|
freeze_player | Boolean | true | Locks players during the manual-mode sequence. |
camera_path | String | "" | Ceremony cutscene ID (preferred for long sequences). |
camera_points | String[] | [] | Manual waypoints: "x,y,z,yaw,pitch,duration" per entry. |
return_on_complete | Boolean | true | End the camera and unfreeze when the sequence finishes. |
target_players | Boolean | false | Auto-start when a player enters the element shape. |
easing | String | "linear" | One of linear, ease_in, ease_out, ease_in_out. |
Emits: started, point_reached, completed
Consumes: <id>:start
Prefer camera_path (Ceremony) for long cinematics. Manual mode teleports the player every tick while interpolating — use it for short sequences only.
Per-player text display entity rendered via packet-based fake entities. Supports placeholders, billboards, and live updates.
| Key | Type | Default | Purpose |
|---|---|---|---|
lines | String[] | [] | Text lines, joined with newlines. Resolved through placeholder substitution. |
update_interval | Int | 20 | Ticks between refreshes (0 disables). |
billboard | String | "center" | center / fixed / vertical / horizontal. |
background_color | String | "40000000" | ARGB hex (no 0x prefix). |
see_through | Boolean | false | Sets the see-through flag. |
scale | Double | 1.0 | Uniform scale. |
line_width | Int | 200 | Max text width in pixels. |
Emits: spawned
Hologram entities are packet-only fake entities — they never exist server-side after spawn.
Spawns a real Display.ItemDisplay entity. Supports spinning, bobbing, scaling, glow, and custom model data.
| Key | Type | Default | Purpose |
|---|---|---|---|
item | String | "minecraft:diamond" | Item ID. |
glow | Boolean | false | Glow tag on spawn. |
scale | Double | 1.0 | Uniform scale. |
custom_model_data | Int | 0 | Sets custom model data if > 0. |
spin_speed | Double | 0.0 | Y-axis rotation per tick. |
bob_amplitude | Double | 0.0 | Sinusoidal vertical bob. |
Emits: spawned
Client-side title / subtitle / actionbar / fade / shake overlays.
| Key | Type | Default | Purpose |
|---|---|---|---|
effect_type | String | "title" | title, subtitle, actionbar, fade_black, fade_white, shake. |
text | String | "" | Text to display (MiniMessage). |
fade_in / duration / fade_out | Int | 10 / 40 / 10 | Title timing. |
intensity | Double | 0.05 | Shake intensity. |
auto_trigger | Boolean | varies | Trigger without external signal. |
Emits: started, completed
Consumes: <id>:trigger
Ambient sound / music element with one-shot, looping, ambient, and spatial modes.
| Key | Type | Default | Purpose |
|---|---|---|---|
sound | String | "" | Sound resource ID. |
sound_pack | String | "" | Blueprint sound pack (weighted random). |
volume / pitch | Double | 1.0 | Sound params. |
mode | String | "oneshot" | oneshot, loop, ambient, spatial. |
loop_interval | Int | 100 | Interval between plays in loop mode. |
min_interval / max_interval | Int | 60 / 200 | ambient mode range. |
auto_play | Boolean | true | Play on activate. |
Emits: played
Wiring actions: play, stop
Periodic area effect emitter. Modes: particles, sound, potion.
| Key | Type | Default | Purpose |
|---|---|---|---|
effect_type | String | "particles" | particles / sound / potion. |
interval | Int | 20 | Ticks between continuous emissions. |
continuous | Boolean | true | Fire on interval vs. per-player on enter. |
particle | String | "" | Particle resource ID. |
particle_count | Int | 10 | Count per emission. |
sound / sound_pack | String | "" | Sound ID or blueprint pack. |
volume / pitch | Double | 1.0 | Sound params. |
potion_effect | String | "" | Mob effect ID. |
potion_duration / potion_amplifier | Int | 100 / 0 | Potion params. |
Emits: player_entered, player_exited
Dedicated element for placing structured fake blocks. Block placement is performed by the fake-block layer; the handler tracks state and emits break / interact signals.
| Key | Type | Default | Purpose |
|---|---|---|---|
structure | String | null | Resource location of an .nbt structure file. |
blocks | Object | null | Manual block list ("x,y,z" to block ID). |
breakable | Boolean | false | Gates block-break events. |
interactable | Boolean | false | Gates block-interact events. |
replace_on_break | String | null | Block rendered in place of broken cells. |
Emits: block_broken, block_interacted, all_blocks_broken
Moving block platform that follows a multi-point path. Auto-generates a flat slab if no manual blocks are supplied.
| Key | Type | Default | Purpose |
|---|---|---|---|
blocks | Object | auto-gen | Manual "x,y,z" to block ID map. |
block_type | String | "minecraft:stone_bricks" | Auto-gen block. |
platform_size_x / platform_size_z | Int | 3 / 3 | Auto-gen slab size. |
path | String[] | [] | Each entry "x,y,z" (relative). Needs >= 2 points. |
loop | String | "none" | none / loop / ping_pong. none waits for go_to_point. |
speed | Double | 0.05 | Progress fraction per tick per segment. |
pause_at_points | Int | 0 | Pause duration at non-target waypoints. |
Emits: point_reached, loop_complete, started, arrived
Wiring actions: go_to_point (consumes index from wiring data or signal data)
Minimal element that runs the definition’s top-level script field on activate. Use to invoke Molang from signal wiring without needing a physical entity.
No config fields. Reads definition.script (top-level, not under config).
Emits: activated
{ "id": "intro_script", "type": "script", "script": "p.send_message('Welcome'); q.complete_task('intro');"}Signals shared across multiple elements. Reuse these names in wirings without surprise.
| Signal | Emitted by | Meaning |
|---|---|---|
activated / deactivated | Barrier, Condition Gate, Script, Trigger | State entered / left active |
started / completed | Camera, Dialogue, Platform, Screen Effect, Timer | Process began / finished |
spawned / despawned | NPC, Spawner, Hologram, Item Display | Entity / display created / removed |
interacted | Elevator, Interactable, NPC | Player right-clicked the element entity |
entity_killed / all_dead | Spawner, Wave Spawner | Tracked entity died / all tracked dead |
all_waves_complete | Wave Spawner | Final wave cleared |
battle_won / battle_lost / battle_fled | Spawner, Wave Spawner, NPC, Interactable | Battle outcome |
player_entered / player_exited | Effect Zone, Trigger | Shape proximity changes |
progress_changed / complete | Objective | Objective progress |
changed | Counter | Counter value changed |
rolled | Randomizer | A roll occurred |
played | Soundscape | A sound was played |
teleported / launched | Teleporter / Launch Pad | Player moved |
saved / restored | Checkpoint | Checkpoint state changed |
arrived / point_reached / loop_complete | Platform | Platform navigation |
floor_selected | Elevator | GUI floor selection |
step_completed / sequence_complete / sequence_failed / sequence_reset | Sequence | Sequence events |
received / delayed | Delay | Buffered signal received vs. released |
satisfied / unsatisfied | Condition Gate | Boolean evaluation |
threshold / tick / expired / paused / resumed | Timer | Time-based events |
tick_inside / all_inside | Trigger | Presence events |
block_broken / block_interacted / all_blocks_broken | Structure | Fake-block events |
hold_started / hold_completed / hold_cancelled | Interactable | Hold-to-interact lifecycle |
stage_advanced / stage_blocked | Interactable | Multi-stage lifecycle |
visual_state_changed | Interactable | After set_visual_state |
collected | Interactable | Pickup interaction |
dialogue_complete | Interactable | Cobblemon dialogue closed |
line_played / page_opened / option_selected / text_entered / escaped | Dialogue | Dialogue runtime events |