πŸ“˜ Quest config

πŸ“œ Static Quest Configuration

Static quests in LiteQuest are defined via a single .json configuration file located in:

plugins/LiteQuest/quests/

Each file contains:

  • Quest display settings (icon, name, description)

  • Conditions (objectives to complete)

  • Rewards (per-player ranking rewards)

  • Start commands (executed when the quest begins)

πŸ“ Example – Miner Quest (Static)

Miner Quest (Static)
{
  "display_item": {
    "material": "IRON_PICKAXE",
    "display_name": "{#8D8D8D}Stone quest!",
    "lore": [
      "{#A3FF86}We need to get stone for our village!"
    ]
  },
  "conditions": [
    {
      "display_tip": "{#8D8D8D}Stone",
      "action": "BREAK",
      "target": "STONE",
      "amount": "100"
    }
  ],
  "reward_config": {
    "rewards": {
      "1-3": [
        "plugin_message {#8D8D8D}Stone quest {#A3FF86}completed!\nΒ§7Reward:\n {#FFFC26}⁑ Money: {#FF9601}500$\n {#A3FF86}⁑ Exp: {#FF9601}250",
        "money add %player_name% 500",
        "experience add %player_name% 250"
      ]
    }
  }
}

πŸ“‚ Configuration

Section
Description

display_item

Defines how the quest appears in menus. LiteItem

conditions

A list of objectives the player must complete.

display_tip

Short description shown in the quest progress.

action

Type of action required (BREAK, KILL, COLLECT, etc.).

target

Minecraft material or entity to interact with.

amount

Quantity required to fulfill the condition.

reward

Defines quest rewards and commands.

start_commands

Commands executed when the quest starts (server-wide or per-player).

rewards

Numbered list of rewards, ranked by contribution (0 = all places, 1 = highest completion, 2 = second place, etc.).


βš™οΈ How Rewards Work

  • Rewards are assigned by position in contribution ranking. Example: The player who completes the largest percentage of the quest objectives gets reward #1, the second-most contributing player gets reward #2, and so on.

  • Each reward set can contain:

    • Chat messages (plugin_message)

    • Economy commands (money add)

    • Experience commands (experience add)

    • Any custom plugin commands


πŸ“’ Notes

  • Global Quests: start_commands can be used to send a server-wide notification when a global quest begins.

  • Completion: In this example, players must break 3 Stone and 3 Andesite to finish the quest.

  • Color Codes: The {#HEXCODE} format is supported for hex colors. Standard Minecraft Β§ color codes can also be used.

⚑ Dynamic Quest Configuration

Dynamic quests in LiteQuest allow variable objectives and scalable rewards based on each player’s performance. Unlike static quests, where objectives are fixed, dynamic quests use randomized target amounts and per-unit rewards.

πŸ“ Example – Miner Quest (Dynamic)

{
  "display_item": {
    "material": "IRON_PICKAXE",
    "display_name": "{#8D8D8D}Stone quest",
    "lore": [
      "{#A3FF86}We need to get stone for our village!"
    ]
  },
  "conditions": [
    {
      "display_tip": "{#8D8D8D}Stone",
      "action": "BREAK",
      "target": "STONE",
      "amount": "100-500",
      "reward_per_unit": {
        "money": 10.0,
        "exp": 5.0
      }
    }
  ],
  "reward_config": {
    "rewards": {
      "0": [
        "plugin_message %quest_name% {#A3FF86}completed!\nΒ§7Reward:\n {#FFFC26}⁑ Money: {#FF9601}%money%\n {#A3FF86}⁑ Exp: {#FF9601}%exp%",
        "money add %player_name% %money%",
        "experience add %player_name% %exp%"
      ]
    }
  }
}

πŸ“‚ Configuration Breakdown

Section
Description

amount

Random range for objective count (e.g., "1-10" β†’ random between 1 and 10).

reward_per_unit

Reward values per unit of the objective completed.


βš™οΈ How Rewards Are Calculated

  1. Determine Objective Amount For each condition, a random number within amount range is chosen. Example: 1-10 β†’ the quest may require 7 Stone this time.

  2. Track Player Progress Every completed unit adds to the player’s reward calculation using reward_per_unit.

  3. Calculate Base Rewards

    Total_Money = Units_Completed Γ— money_per_unit
    Total_Exp   = Units_Completed Γ— exp_per_unit

πŸ“’ Notes

  • Dynamic difficulty makes each quest unique on every run.

  • reward_per_unit as placeholders: %money% and %exp% are automatically replaced in reward_commands with the calculated totals after applying reward_map.

  • Flexible scaling allows easy balancing of rewards for large player groups.

πŸ“₯ Insert Quest Configuration

Insert-type quests in LiteQuest require players to physically provide items through the in-game quest menu. This is useful for quests where players must deliver resources instead of just performing actions like mining or killing.


βš™οΈ How It Works

  • Players open the quest menu with:

    /lquest menu
  • When the quest is active, a special slot appears where required items can be placed.

  • Once the correct amount of items is inserted, the condition is completed.

  • Inserted items are consumed (removed from the player’s inventory).


πŸ“ Example – Iron Ingot Delivery Quest

{
  "display_item": {
    "material": "IRON_PICKAXE",
    "display_name": "{#8D8D8D}Stone quest!",
    "lore": [
      "{#A3FF86}We need to get stone for our village!"
    ]
  },
  "conditions": [
    {
      "display_tip": "{#8D8D8D}Iron ingot",
      "action": "INSERT",
      "target": "IRON_INGOT",
      "amount": "10",
      "insert_item": {
        "material": "IRON_INGOT"
      }
    }
  ],
  "reward_config": {
    "rewards": {
      "0": [
        "plugin_message {#8D8D8D}Stone quest {#A3FF86}completed!\nΒ§7Reward:\n {#FFFC26}⁑ Money: {#FF9601}500$\n {#A3FF86}⁑ Exp: {#FF9601}250",
        "money add %player_name% 500",
        "experience add %player_name% 250"
      ]
    }
  }
}

πŸ”‘ Key Fields

Field
Description

action

Must be "INSERT" to indicate item delivery quests.

target

The material the player must insert (IRON_INGOT).

amount

The total quantity of the item required.

insert_item

Defines the item that must be placed in the menu (supports material, name, lore, etc. if customization needed).


βœ… With this setup, the quest requires the player to insert 10 Iron Ingots via /lquest menu. Once delivered, the player automatically receives the configured rewards.

🎯 Quest Event Actions

Action
Description

BREAK

Block break

PLACE

Block place

SMELT

Furnace smelt

CRAFT

Item craft

KILL

Entity kill

TAME

Entity tame

MILK

Milk entity

SHEAR

Shear entity

BREED

Breed entity

INSERT

Item required

Last updated