Aller au contenu principal

Puzzle

Nine ready-made puzzle mechanics, declared as quest objectives and rendered client-side.

The Puzzle Extension turns a location in your world into a solvable puzzle. Each puzzle is a Typewriter objective: it starts when the player enters its audience, tracks progress per player, and fires triggers on completion, failure or timeout — so a puzzle plugs into a quest exactly like any other objective.

Everything a puzzle draws is client-side: blocks, ghost previews, highlights and laser beams are sent to the player who is solving it. Two players can work on the same lever board without seeing each other's progress, and the real world is never modified.

Key features

  • Nine puzzle types — block pushing, pedestal offerings, memory sequences, lever orders, pattern placement, item frame rotations, combination locks, laser grids and cooperative pressure plates.
  • Per-player, or sharedisShared switches a puzzle from private progress to one board the whole group advances together.
  • Client-side rendering — no world edits, no rollback to write, no interference between players.
  • Full objective lifecycleonStart, onComplete, onFail, onTimeout and onLifespanExpire triggers, plus time limits, attempt limits and fail cooldowns.
  • Chainingpuzzle_chain runs several puzzles in order and fires once the whole sequence is solved.
  • Survives restartspuzzle_artifact persists puzzle state, so a reboot mid-puzzle does not erase progress.
  • Readable statepuzzle_solved_fact and puzzle_active_fact expose progress to the rest of your content.
  • Folia-safe — every world read and write runs on the region that owns the puzzle.

Fields shared by every puzzle

All nine puzzle objectives inherit the same lifecycle fields. Only the puzzle-specific fields are listed on each entry page.

FieldTypeDescription
idStringIdentifier used by chains, facts and the puzzle menu.
factRef<CachableFactEntry>Fact holding the player's progress.
amountVar<Int>Number of completions required.
timeLimitVar<Int>Seconds allowed before onTimeout fires. 0 = no limit.
cooldownOnFailVar<Int>Seconds before the player may try again after a failure.
maxAttemptsVar<Int>Attempts allowed before the puzzle fails. 0 = unlimited.
resetOnWrongVar<Boolean>Whether a wrong step resets progress.
showHintsVar<Boolean>Whether hintMessage is shown while solving.
hintMessageVar<String>Hint text. Supports {progress} and {total}.
completionMessageVar<String>Message sent when the puzzle is solved.
onStartRef<TriggerableEntry>Fired when the puzzle becomes active for the player.
onCompleteRef<TriggerableEntry>Fired when the puzzle is solved.
onFailRef<TriggerableEntry>Fired when the puzzle fails.
onTimeoutRef<TriggerableEntry>Fired when timeLimit elapses.
onLifespanExpireRef<TriggerableEntry>Fired when lifespan elapses.
lifespanVar<Int>Seconds the puzzle stays active. 0 = forever.
isSharedVar<Boolean>true = one shared board; false = per-player progress.
criteriaList<Criteria>Conditions a player must meet for the puzzle to apply.

Entries

Objectives

EntryDescription
puzzle_block_pushPush blocks into their target holes.
puzzle_pedestalOffer the right item on a pedestal.
puzzle_memoryRepeat a highlighted button sequence.
puzzle_lever_orderFlip levers in the correct order.
puzzle_patternReproduce a block pattern on a grid.
puzzle_item_frameRotate item frames to the right angles.
puzzle_combination_lockEnter a digit code in order.
puzzle_laser_gridRoute beams into their receivers.
puzzle_coop_pressureHold pressure plates together.

Triggers

EntryDescription
puzzle_chainRuns several puzzles in order.
puzzle_menuOpens a chat menu listing puzzles.

Artifacts

EntryDescription
puzzle_artifactPersists puzzle state across restarts.

Facts

EntryDescription
puzzle_solved_factWhether a puzzle is solved for the player.
puzzle_active_factWhether a puzzle is currently active for the player.