# Missions

RageMode have another built-in system that allows players to complete different types of missions related to this minigame. These missions can be completed by all players individually for a limited time. If players was unable to complete missions new ones will appear.

## Features

* Option to define how many missions a player can have within certain time interval
* Option to define how many missions a player can skip within the specified time interval
* Option to broadcast missions completion on game end to actionbar, titles, bossbar or chat
* Option to claim rewards automatically
* Option to receive extra missions after all main missions completed for a player
* Option to configure reset time interval
* Option to keep remaining missions alive, and these can be completed for x days increased
* Create as many missions as you wish with unique conditions, rewards and text

## Mission types

| Type                                   | Description                               |
| -------------------------------------- | ----------------------------------------- |
| :crossed\_swords:`kill`                | Kill x amount of entities with any weapon |
| :crossed\_swords:`kill_explosion`      | Kill x amount of entities with explosion  |
| :crossed\_swords:`kill_special_zombie` | Kill x amount of special zombies          |
| :headstone:`death_count`               | Death count number                        |
| :medal:`total_damage`                  | Total damage caused                       |
| :trophy:`win_count_in_row`             | Winning count in a row (classic mode)     |
| :astronaut:`be_the_last_player`        | Be the last player in zombie game mode    |
| :first\_place:`win_times`              | The number of victories                   |
| :coin:`earn_points`                    | Earn x amount of points in a game         |
| :video\_game:`play_game_times`         | Play x amount of games                    |
| :crossed\_swords:`kill_streak`         | Cause x amount of kill streak             |
| :game\_die:`play_time_minutes`         | Play x minutes in any game                |

## Configuring

* `quantity` - Defines the missions quantity a player can receive within a certain time interval
  * Players with `ragemode.missions.<amount>` permission can have different amount missions, multiple missions won't be summed
  * Set to `0` so no missions will appear
* `skip-limit` - The amount of missions a player can skip within the specified interval
  * Players with the `ragemode.missions.skip.<amount>` permission can have a specific limit, but multiple permissions will not be summed
  * Set to `0` so players can not skip any missions
* `broadcast-completion-on-game-end` - If enabled completed missions will be broadcast at the end of the game only. Otherwise, completed missions will also be broadcast while a game is running.
* `auto-claim-rewards` - If enabled, rewards will be automatically claimed after the player completes at least 1 mission, so the player will receive them without confirmation. Otherwise, players needs to claim their rewards from the missions GUI menu.
* `extra-missions` - List of extra mission names that players can receive, whenever they completed all main missions first. These extra missions will be lost when new missions would appear.
* `reset`
  * `timestamp-mode` - Mode of timestamp
    * `1` = missions will be reset at the defined time for all players
    * `2` = each player will have new missions at a different login time
  * `interval` - Interval at which missions will be reset, accepted formats:
    * `1d` -> 1 day
    * `3h` -> 3 hours
    * `10m` -> 10 minutes
    * `1d5h` -> 1 days 5 hours
  * `keep-remaining-missions` - Keep remaining missions alive for each player without reset, so players can complete them at any time. If not, these missions will be lost and new ones will appear instead. If enabled, new missions would appear if the player only completed for example 1 out of 3.
  * `forget-remaining-missions-after` - Forget remaining missions after specified x days interval

## Creating missions

Creating missions can be done manually within `player-missions.yml` file. An example showing what options can a mission have (mission named `example` will be ignored):

<details>

<summary>Example mission</summary>

```yml
missions:
  example:
    goal: <gold>Kill <green>10<gold> zombies
    chance-to-appear: 100
    menu-item: missionItem
    completed-menu-item: completedMissionItem
    description:
    - ''
    - '<gray>Conditions:'
    - <white>-<gray> The quest can only be completed in <dark_green>apocalypse</dark_green>
      mode only
    - <white>-<gray> Both special and normal zombies are counted
    - ''
    - '<gold>Rewards:'
    - <white>- <gold>50 points
    - <white>- x1 <light_purple>Regeneration</light_purple> potion effect for 180
      seconds
    - <white>- x1 Unbreakable <aqua>Diamond pickaxe</aqua> with
    - '  <red>efficiency<white> level 2 <blue>enchantment</blue>'
    - ''
    - '<gold>Progression: %progression%'
    - '%progressbar_20_<green>-</green>_<red>-</red>% %percent-completed%%'
    - ''
    - '%reroll_mission_desc%'
    condition: gametype=apocalypse type=kill goal=10
    rewards:
      commands:
      - console:rm points add %player% 50 --no-output
      potion-effects:
      - regeneration amplifier=1 duration=180 particles=true ambient=true icon=true
      items:
      - zombieaxe
      - helm
    progression-actionbar: <red>Progression:<yellow> %old_progression%<gray> -><green> %progression%/%total_goal_number%
      completion-broadcast:
      message: <dark_green>You have completed quest:<reset> %quest_goal%
      actionbar: <aqua>Completed quest:<reset> %quest_goal%
      screen-title:
        fade-in: 0
        stay: 60
        fade-out: 20
        title: '<gold>Completed quest:'
        subtitle: <reset>%quest_goal%
      bossbar:
        color: red
        style: segmented_6
        expire-seconds: 10
        text: <yellow>Completed quest:<reset> %quest_goal%
```

</details>

* `example` - The name of the mission
* `goal` - The short description of this mission that appears in GUI
* `chance-to-appear` - The chance in percent between `0-100` values to appear this mission. Set to `0` so it never appears. Set to `100` so it can appear with higher chance.
* `menu-item` - Menu item that appears in missions GUI. Use item name from [custom-items file](/ragemode-docs/guides/custom-items.md)
* `completed-menu-item` - Completed menu item that appears in missions GUI after the player completed this mission. Use item name from [custom-items file](/ragemode-docs/guides/custom-items.md)
* `description` - The long description of this mission that appears in GUI
  * Placeholders that can be used:
    * `%progression%` - Shows total progression of this mission, even if completed
    * `%percent-completed%` - Shows the percentage of mission completion
    * `%reroll_mission_desc%` - Shows the reroll (skip) mission description
    * `%progressbar_width_progressPart_remainingPart%` - A custom progress bar with unique display config
      * `width` - A width which can range from `1-100`
      * `progressPart` - The text to display as progression part
      * `remainingPart` - The text to display for remaining/uncompleted part
      * example: `%progressbar_20_<green>-</green>_<red>-</red>%`
* `condition` - The conditions that the player must fulfil in order to complete the mission
  * Each logical condition must be separated with a   space inside
  * Each logical condition must be used with `=` equality operator
  * These are the available conditions you can use:
    * `gametype` - `apocalypse` or `classic` for defining game type
    * `type` - [type of mission](#mission-types)
    * `goal` - the goal number value to reach to complete this mission
    * `item` - the [item](/ragemode-docs/guides/game-items.md#basic-weapons) that allows progression
      * these items can be: `combat_axe`, `grenade`, `rage_arrow`, `rage_knife`, `flash`, `pressure_mine`, `barricade`, `fire_arrow`, `glowing_arrow`, `healing_arrow`, `lightning_strike_arrow`, `freeze_ball`, `poisoned_arrow`
    * `time` - time to complete the mission in seconds
    * `attempt` - attempt times this mission can be tried x times
* `rewards` - (Optional) The rewards to perform when a player has completed this mission, these can be:
  * `commands`
    * You can select the executor type which can be `console` as default or `player` (Optional)
      * ```yml
        rewards:
          commands:
          - player:rm points add %player% 10 --no-output
        ```
      * `--no-output` is an extra argument for `points` command
  * `potion-effects`
    * ```yml
      rewards:
        potion-effects:
        - regeneration amplifier=1 duration=180 particles=true ambient=true icon=true
        - luck duration=10
      ```
  * `items` - use [custom item](/ragemode-docs/guides/custom-items.md) name
    * ```yml
      rewards:
        items:
        - customItemName
      ```
  * `progression-actionbar` - (Optional) The actionbar to append on progression change
    * ```yml
      progression-actionbar: <red>Progression:<yellow> %old_progression%<gray> -><green>%progression%/%total_goal_number%
      ```
    * Placeholders that can be used:
      * `%total_goal_number%` - Goal number to reach
      * `%progression%` - Progression number
      * `%old_progression%` - Previous progression number
  * `completion-broadcast` - (Optional) Different types of screen messages to broadcast when a player completes this mission
    * ```yml
      completion-broadcast:
        message: <dark_green>You have completed quest:<reset> %quest_goal%
        actionbar: <aqua>Completed quest:<reset> %quest_goal%
        screen-title:
          fade-in: 0
          stay: 60
          fade-out: 20
          title: '<gold>Completed quest:'
          subtitle: <reset>%quest_goal%
        bossbar:
          color: red
          style: segmented_6
          expire-seconds: 10
          text: <yellow>Completed quest:<reset> %quest_goal%
      ```
      * `message` - A message text that appears in chat
      * `actionbar` - A message text that appears above the [player hotbar](https://minecraft.wiki/w/Action_bar)
      * `screen-title` - Shows a [title and a subtitle](https://minecraft.wiki/w/Commands/title) text on the screen with specific intervals
        * `fade-in` - The time it takes for the title to fade into the screen
        * `stay` - The time it takes for the title to stay on the screen
        * `fade-out` - The time it takes for the title to fade out of the screen
        * `title` - The title to show on the first line of the screen
        * `subtitle` The subtitle to show on the second line of the screen
      * `bossbar` - Shows a [bossbar](https://minecraft.wiki/w/Bossbar) on top of the screen with unique text and bar
        * `color` - The [color](https://jd.papermc.io/paper/org/bukkit/boss/BarColor.html) of the bar
        * `style` - The [style](https://jd.papermc.io/paper/org/bukkit/boss/BarStyle.html) of the bar
        * `expire-seconds` - The seconds of this bossbar to expire and remove
        * `text` - The text to appear on the bossbar
      * You can use these placeholders with texts:
        * `%player%` - for player name
        * `%quest_goal%` - the goal of the quest
        * `%game%` - the game name

***

<details>

<summary>Pre-made missions</summary>

```yml
missions:
  play3minute:
    goal: <red>Play for <green>3<red> minutes in any game
    chance-to-appear: 100
    description:
    - ''
    - '<gold>Rewards:'
    - <white>- <gold>80 points
    - ''
    - '<gray>Conditions:'
    - <white>-<gray> The quest can be completed in any mode
    - ''
    - '<gold>Progression: %progression%'
    - '%progressbar_20_<green>-</green>_<red>-</red>% %percent-completed%%'
    - ''
    - '%reroll_mission_desc%'
    condition: type=play_time_minutes goal=3
    rewards:
      commands:
      - console:rm points add %player% 80 --no-output
  kill10:
    goal: <gold>Kill <green>10<gold> zombies
    chance-to-appear: 100
    description:
    - ''
    - '<gray>Conditions:'
    - <white>-<gray> The quest can only be completed in <dark_green>apocalypse</dark_green> mode only
    - <white>-<gray> Both special and normal zombies are counted
    - ''
    - '<gold>Rewards:'
    - <white>- <gold>50 points
    - <white>- x1 <light_purple>Regeneration</light_purple> potion effect for 180 seconds
    - ''
    - '<gold>Progression: %progression%'
    - '%progressbar_20_<green>-</green>_<red>-</red>% %percent-completed%%'
    - ''
    - '%reroll_mission_desc%'
    condition: gametype=apocalypse type=kill goal=10
    rewards:
      commands:
      - console:rm points add %player% 50 --no-output
      potion-effects:
      - regeneration amplifier=1 duration=180 particles=true ambient=true icon=true
    completion-broadcast:
      message: <dark_green>You have completed quest:<reset> %quest_goal%
      actionbar: <aqua>Completed quest:<reset> %quest_goal%
      screen-title:
        fade-in: 0
        stay: 60
        fade-out: 20
        title: '<gold>Completed quest:'
        subtitle: <reset>%quest_goal%
      bossbar:
        color: red
        style: segmented_6
        expire-seconds: 10
        text: <yellow>Completed quest:<reset> %quest_goal%
  kill100:
    goal: <gold>Kill <green>100<gold> zombies
    chance-to-appear: 20
    description:
    - ''
    - '<gray>Conditions:'
    - <white>-<gray> The quest can only be completed in <dark_green>apocalypse</dark_green> mode only
    - <white>-<gray> Both special and normal zombies are counted
    - ''
    - '<gold>Rewards:'
    - <white>- <gold>500 points
    - <white>- x1 <light_purple>Regeneration</light_purple> potion effect for 360 seconds
    - ''
    - '<gold>Progression: %progression%'
    - '%progressbar_20_<green>-</green>_<red>-</red>% %percent-completed%%'
    - ''
    - '%reroll_mission_desc%'
    condition: gametype=apocalypse type=kill goal=100
    rewards:
      commands:
      - console:rm points add %player% 500 --no-output
      potion-effects:
      - regeneration amplifier=1 duration=360 particles=true ambient=true icon=true
```

</details>

<figure><img src="/files/W9A9q310M83W8upgWeM4" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mdswork.gitbook.io/ragemode-docs/guides/missions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
