Zum Hauptinhalt springen

Crate

The Crate Extension allows you to implement highly engaging rewards via mystery boxes or loot crates. It supports both physical world-crates (interactable blocks) and virtual menus, featuring weighted probabilities and visual opening sequences.

  • Features — Weighted loot tables, visual animations, virtual & physical keys, milestone rewards, and world-space opening mini-games.

Opening Mini-Games

Crates can open through a world-space mini-game instead of a plain animation. The reward is drawn server-side before the mini-game starts — the game is pure presentation and grants the already-decided reward exactly once.

  • Cards — A grid of face-down cards; the one the player flips reveals their reward, the rest flip to decoys.

Architecture

Entry Library

Definitions

Core configuration for crates.

Actions

Triggering crate logic.

Artifacts

Data storage.

Quick Start

  • 1. Define — Add definition entries: crate, crate_main_menu. These define the structures, entities, or rules the extension operates on. → crate → crate_main_menu
  • 2. Create Storage — Add artifact entries to persist data: crate_artifact. → crate_artifact
  • 3. Trigger Actions — Use action entries to interact with the extension: open_crate, open_crate_menu. Trigger them from commands, NPCs, events, or other entries. → open_crate → open_crate_menu

Commands

All commands are under the /crate prefix.

CommandDescriptionPermission
/crate menuOpen the global crate browsing menutypewriter.crate.menu
/crate give <crate_id> [amount]Grant virtual keys to a playertypewriter.crate.give
/crate remove <crate_id> [amount]Revoke virtual keys from a playertypewriter.crate.remove

Placeholders

All placeholders use the prefix %typewriter_crate_<crate_id>_%.

PlaceholderDescription
%typewriter_crate_<id>_openings%Total times opened by the player
%typewriter_crate_<id>_keys%Virtual keys held
%typewriter_crate_<id>_milestone%Highest reward milestone reached

Permissions

PermissionDescription
typewriter.crateBase access to crate commands.
typewriter.crate.menuOpen the crate menu.
typewriter.crate.giveGive a crate or key.
typewriter.crate.removeRemove a crate.

Dependencies

ExtensionRequiredUsage
GUI ExtensionRequiredMenu rendering and layout system.
PlaceholderAPIOptionalFor @Placeholder fields.