|
| 1 | +import Tabs from "@theme/Tabs"; |
| 2 | +import TabItem from "@theme/TabItem"; |
| 3 | + |
| 4 | +# Achievements |
| 5 | + |
| 6 | +:::info |
| 7 | +There are two types of achievements: |
| 8 | +- `CHALLENGE` - Single tier |
| 9 | +- `TIERED` - Multiple tiers |
| 10 | + |
| 11 | +The type is automatically determined by the number of tiers. |
| 12 | +::: |
| 13 | + |
| 14 | +<Tabs> |
| 15 | + <TabItem value="new" label="v2.0" default> |
| 16 | + :::note |
| 17 | + Achievements are located in the `plugins/EpicAchievements/achievements/<category>` folder. <br/> |
| 18 | + You can have as many achievement files as you want in a category. |
| 19 | + ::: |
| 20 | + |
| 21 | + Below is an example of an achievement configuration: |
| 22 | + |
| 23 | + ```yaml title="achievements/survival/challenges.yml" showLineNumbers=true" |
| 24 | + # Unique identifier. Don't modify it or players will lose their progress! |
| 25 | + lucky-catch: |
| 26 | + # The type of task |
| 27 | + # See https://wiki.pixelstudios.dev/epicachievements/configuration/tasks |
| 28 | + type: FISH |
| 29 | + # The achievement's name |
| 30 | + name: "Lucky Catch" |
| 31 | + # The achievement's description |
| 32 | + description: |
| 33 | + - "&fCatch an enchanted book" |
| 34 | + - "&fwhile fishing." |
| 35 | + # (Optional) The achievement's weight |
| 36 | + # This determines the default sorting order in the menu |
| 37 | + # The default weight is 1 |
| 38 | + # weight: 10 |
| 39 | + |
| 40 | + # (Optional) Permission required to access the achievement |
| 41 | + # permission: achievements.lucky-catch |
| 42 | + |
| 43 | + # (Optional) Required achievements to access this achievement |
| 44 | + # requirements: |
| 45 | + # - "miner" # Requires all tiers to be completed |
| 46 | + # - "farmer:1" # Requires the first tier to be completed |
| 47 | + |
| 48 | + # A list of conditions |
| 49 | + # See https://wiki.pixelstudios.dev/epicachievements/configuration/conditions |
| 50 | + conditions: |
| 51 | + - type: game_modes |
| 52 | + game-modes: |
| 53 | + - SURVIVAL |
| 54 | + - type: items |
| 55 | + items: |
| 56 | + - ENCHANTED_BOOK |
| 57 | + # A list of tiers (at least one tier is required) |
| 58 | + tiers: |
| 59 | + 1: |
| 60 | + # Progress required to complete the tier |
| 61 | + required-amount: 1 |
| 62 | + # A list of rewards. See https://wiki.pixelstudios.dev/epicachievements/configuration/rewards |
| 63 | + rewards: |
| 64 | + - type: points |
| 65 | + amount: 5 |
| 66 | + # More tiers can be added below: |
| 67 | + # 2: |
| 68 | + # required-amount: 3 |
| 69 | + # rewards: |
| 70 | + # - type: points |
| 71 | + # amount: 10 |
| 72 | + ``` |
| 73 | + </TabItem> |
| 74 | + <TabItem value="old" label="v1.0"> |
| 75 | + ### Interactive setup |
| 76 | + |
| 77 | + The easiest way to create and edit achievements is by using the in-game editor. <br/> |
| 78 | + > You can access it by typing `/achievements editor`. |
| 79 | + |
| 80 | + ### Manually editing configurations |
| 81 | + |
| 82 | + If you're a more advanced user, you can manually edit the achievements' configurations. |
| 83 | + |
| 84 | + :::note |
| 85 | + Achievements are located in the `plugins/EpicAchievements/achievements/<category>` folder. <br/> |
| 86 | + You can have as many achievement files as you want in a category. <br/> |
| 87 | + By default, the in-game editor will create new achievements in a file named `achievements.yml` if none exists. |
| 88 | + ::: |
| 89 | + |
| 90 | + Below is an example of an achievement configuration: |
| 91 | + |
| 92 | + ```yaml title="achievements/survival/achievements.yml" |
| 93 | + # Unique identifier. Don't modify it or players will lose their progress! |
| 94 | + builder: |
| 95 | + # The type of task: See https://wiki.pixelstudios.dev/epicachievements/configuration/tasks |
| 96 | + type: PLACE |
| 97 | + # The name used in messages and menus |
| 98 | + name: "Builder" |
| 99 | + # The description of the achievement |
| 100 | + description: |
| 101 | + - "&fPlace blocks." |
| 102 | + # (Optional) Permission required to progress in the achievement |
| 103 | + permission: achievements.builder |
| 104 | + # Required achievements to progress in this achievement |
| 105 | + required-achievements: |
| 106 | + - miner |
| 107 | + - farmer |
| 108 | + # Conditions: See https://wiki.pixelstudios.dev/epicachievements/configuration/conditions |
| 109 | + blocks: |
| 110 | + - STONE_BRICKS |
| 111 | + - BRICKS |
| 112 | + worlds: |
| 113 | + - world |
| 114 | + - resource_world |
| 115 | + game-modes: |
| 116 | + - SURVIVAL |
| 117 | + # A list of tiers. There must be at least one tier |
| 118 | + tiers: |
| 119 | + 1: |
| 120 | + # Progress required to complete the tier |
| 121 | + required-amount: 10 |
| 122 | + # Points awarded when completing the tier |
| 123 | + points: 25 |
| 124 | + # A list of rewards. See https://wiki.pixelstudios.dev/epicachievements/configuration/rewards |
| 125 | + # Format: REWARD_TYPE:VALUE |
| 126 | + rewards: |
| 127 | + - "VAULT:100" |
| 128 | + - "COMMAND:say {player} has completed the Builder achievement!" |
| 129 | + # Other tiers can be added below |
| 130 | + ``` |
| 131 | + </TabItem> |
| 132 | +</Tabs> |
| 133 | + |
0 commit comments