Rewards & reward tables

A reward is an object with a type field. Scripta 1.0.0 ships eleven types — ten that grant something, plus an explicit no-op placeholder for padding weighted tables.

Reward types

Quick reference. Every field not marked optional is required.

TypeFieldsWhat happens
item item (req)
amount = 1
Gives items. Overflow that does not fit in your inventory is dropped at your feet, never voided. Valid range 1–9999.
xp amount = 1 Gives XP points. Range 1–1000000.
xp_levels levels = 1 Gives XP levels directly. Range 1–1000.
command command (req) Runs a console command with you as the source — so /say, /give and /effect all work. Max 1024 characters.
advancement id (req) Awards the advancement, satisfying every criterion.
toast message (req) Shows a client-side toast notification. Max 100 characters.
choice options = []
table = ""
count = 1
Interactive. The player picks from a picker screen. Never granted automatically.
random table (req) Rolls one entry from a weighted reward table.
all_table table (req) Grants every entry in a table. Weights ignored.
loot_crate table (req) Gives a physical Loot Crate item. The player right-clicks it to roll. Table must be crate-enabled.
empty — Grants nothing. Exists so a table can have a "no prize" chance.
experience is a legacy alias Old files using {"type": "experience", "amount": 5} still load — they are treated as xp.

Examples

"rewards": [
  { "type": "item", "item": "minecraft:diamond", "amount": 3 },
  { "type": "xp", "amount": 100 },
  { "type": "xp_levels", "levels": 2 },
  { "type": "command", "command": "give @s minecraft:diamond 1" },
  { "type": "advancement", "id": "minecraft:story/root" },
  { "type": "toast", "message": "Well done, adventurer!" }
]

Weighted reward tables

A reward table is a weighted pool. Reference it from a random, all_table, loot_crate or choice reward by its id.

FieldTypeRequiredDefault
idstringYes—
namestringNo"" (falls back to id)
entriesarrayNo[]
entries[].rewardrewardYes—
entries[].weightdoubleNo1.0
crate.enabledboolNotrue if crate is present, else false
crate.namestringNo""
{
  "id": "starter_loot",
  "name": "Starter Loot",
  "entries": [
    { "reward": { "type": "item", "item": "minecraft:bread", "amount": 3 }, "weight": 40 },
    { "reward": { "type": "item", "item": "minecraft:iron_ingot", "amount": 1 }, "weight": 25 },
    { "reward": { "type": "item", "item": "minecraft:diamond", "amount": 1 }, "weight": 5 },
    { "reward": { "type": "empty" }, "weight": 30 }
  ],
  "crate": { "enabled": true, "name": "Starter Crate" }
}

How weights work

Weights are relative probabilities, not percentages, and do not have to total 100. In the table above the four entries have weights 40 / 25 / 5 / 30, totalling 100, so they roll at 40% / 25% / 5% / 30%. Double every weight and the odds stay identical.

Tables are not datapack-loaded Unlike quests and categories, reward tables are not read from data/ folders and /reload will not pick up a hand-written table file. They live in the editor store — see Files & storage. Create them in the web or in-game editor.

Loot crates

A loot_crate reward gives the player a real Loot Crate item instead of rolling immediately. Which table it holds is stored on the item itself.

  1. Enable crate on the table you want to hand out.
  2. Give the crate via { "type": "loot_crate", "table": "<id>" }.
  3. The player right-clicks the crate to roll it once.
{ "type": "loot_crate", "table": "starter_loot" }
Using the crate name Crate messages use the table's top-level name field (falling back to its id). The crate.name field is stored but not used for messages.

Choice rewards in depth

A choice reward is the one interactive type: it is never auto-granted, even when auto_claim is true. The player opens a picker and selects an option (or several, up to count).

Inline options

{
  "type": "choice",
  "count": 1,
  "options": [
    { "type": "item", "item": "minecraft:golden_apple", "amount": 1 },
    { "type": "item", "item": "minecraft:diamond", "amount": 2 }
  ]
}

From a table

Point table at a reward table instead and its entries become the options. empty entries are filtered out, and weights are ignored — the player chooses deliberately rather than gambling.

{ "type": "choice", "table": "starter_loot", "count": 2 }
No choices inside tables A choice reward cannot live inside a reward table. The editor refuses to save it and the in-game claim path reports “A choice reward inside a table must be claimed from a quest directly.” Put choices on quests.

Reward presets

Presets are reusable reward bundles you can insert into any quest with one click. Three ship built in and cannot be deleted or overwritten:

PresetContents
Starter Kit 5 bread, 5 XP
Monster Hunter 10 XP, 2 iron ingots
Treasure 1 golden apple, give @s minecraft:diamond 1

Your own presets are managed in the Reward presets panel of either editor. Names must be 1–48 characters and cannot reuse a built-in name.

Validation rules

Editors validate rewards before saving and reject out-of-range values rather than letting them reach the game. Key limits:

RuleLimit
Item amount1–9999
XP amount1–1000000
XP levels1–1000
Command length1–1024 characters
Toast length1–100 characters
Choice optionsAt least 2 inline options, or a table with entries
Choice count1–64
Reward nesting depthMax 3 in tables

A loot_crate reward must point at a table with crate.enabled set to true, otherwise it is rejected.

Unknown & legacy rewards

Scripta is deliberately tolerant so a quest written for a newer version does not break an older server: