Skip to content

Commit 5be05e2

Browse files
committed
update docs
1 parent 59a81be commit 5be05e2

File tree

2 files changed

+189
-120
lines changed

2 files changed

+189
-120
lines changed
Lines changed: 188 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,8 @@
1-
import Tabs from "@theme/Tabs";
2-
import TabItem from "@theme/TabItem";
3-
41
# Achievements
52

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) Hide the achievement from the menu
44-
# hidden: true
45-
46-
# (Optional) Required achievements to access this achievement
47-
# requirements:
48-
# - "miner" # Requires all tiers to be completed
49-
# - "farmer:1" # Requires the first tier to be completed
50-
51-
# (Optional) Additional settings
52-
# settings:
53-
# toast-message:
54-
# icon: ENCHANTED_BOOK
55-
# message: "Custom toast message!"
56-
# type: CHALLENGE
57-
58-
# A list of conditions
59-
# See https://wiki.pixelstudios.dev/epicachievements/configuration/conditions
60-
conditions:
61-
- type: game_modes
62-
game-modes:
63-
- SURVIVAL
64-
- type: items
65-
items:
66-
- ENCHANTED_BOOK
67-
# A list of tiers (at least one tier is required)
68-
tiers:
69-
1:
70-
# Progress required to complete the tier
71-
required-amount: 1
72-
# A list of rewards. See https://wiki.pixelstudios.dev/epicachievements/configuration/rewards
73-
rewards:
74-
- type: points
75-
amount: 5
76-
# More tiers can be added below:
77-
# 2:
78-
# required-amount: 3
79-
# rewards:
80-
# - type: points
81-
# amount: 10
82-
```
83-
</TabItem>
84-
<TabItem value="old" label="v1.0">
3+
<details>
4+
<summary>Version 1.0</summary>
5+
<p>
856
### Interactive setup
867

878
The easiest way to create and edit achievements is by using the in-game editor. <br/>
@@ -102,42 +23,190 @@ The type is automatically determined by the number of tiers.
10223
```yaml title="achievements/survival/achievements.yml"
10324
# Unique identifier. Don't modify it or players will lose their progress!
10425
builder:
105-
# The type of task: See https://wiki.pixelstudios.dev/epicachievements/configuration/tasks
106-
type: PLACE
107-
# The name used in messages and menus
108-
name: "Builder"
109-
# The description of the achievement
110-
description:
111-
- "&fPlace blocks."
112-
# (Optional) Permission required to progress in the achievement
113-
permission: achievements.builder
114-
# Required achievements to progress in this achievement
115-
required-achievements:
116-
- miner
117-
- farmer
118-
# Conditions: See https://wiki.pixelstudios.dev/epicachievements/configuration/conditions
119-
blocks:
120-
- STONE_BRICKS
121-
- BRICKS
122-
worlds:
123-
- world
124-
- resource_world
125-
game-modes:
126-
- SURVIVAL
127-
# A list of tiers. There must be at least one tier
128-
tiers:
129-
1:
130-
# Progress required to complete the tier
131-
required-amount: 10
132-
# Points awarded when completing the tier
133-
points: 25
134-
# A list of rewards. See https://wiki.pixelstudios.dev/epicachievements/configuration/rewards
135-
# Format: REWARD_TYPE:VALUE
136-
rewards:
137-
- "VAULT:100"
138-
- "COMMAND:say {player} has completed the Builder achievement!"
139-
# Other tiers can be added below
26+
# The type of task: See https://wiki.pixelstudios.dev/epicachievements/configuration/tasks
27+
type: PLACE
28+
# The name used in messages and menus
29+
name: "Builder"
30+
# The description of the achievement
31+
description:
32+
- "&fPlace blocks."
33+
# (Optional) Permission required to progress in the achievement
34+
permission: achievements.builder
35+
# Required achievements to progress in this achievement
36+
required-achievements:
37+
- miner
38+
- farmer
39+
# Conditions: See https://wiki.pixelstudios.dev/epicachievements/configuration/conditions
40+
blocks:
41+
- STONE_BRICKS
42+
- BRICKS
43+
worlds:
44+
- world
45+
- resource_world
46+
game-modes:
47+
- SURVIVAL
48+
# A list of tiers. There must be at least one tier
49+
tiers:
50+
1:
51+
# Progress required to complete the tier
52+
required-amount: 10
53+
# Points awarded when completing the tier
54+
points: 25
55+
# A list of rewards. See https://wiki.pixelstudios.dev/epicachievements/configuration/rewards
56+
# Format: REWARD_TYPE:VALUE
57+
rewards:
58+
- "VAULT:100"
59+
- "COMMAND:say {player} has completed the Builder achievement!"
60+
# Other tiers can be added below
14061
```
141-
</TabItem>
142-
</Tabs>
62+
</p>
63+
</details>
64+
65+
:::info
66+
There are two types of achievements:
67+
- `CHALLENGE`: Single tier
68+
- `TIERED`: Multiple tiers
69+
70+
The type is automatically determined by the number of tiers.
71+
:::
72+
73+
:::note
74+
Achievements are located in the `plugins/EpicAchievements/achievements/<category>` folder. <br/>
75+
You can have as many achievement files as you want in a category.
76+
:::
14377

78+
## Required Fields
79+
80+
### `type`
81+
You can find all available task types [here](./tasks).
82+
```yaml
83+
type: FISH
84+
```
85+
86+
### `name`
87+
The achievements's name, displayed in messages and menus.
88+
```yaml
89+
name: "Lucky Catch"
90+
```
91+
92+
### `description`
93+
The achievement's description, displayed in messages and menus.
94+
```yaml
95+
description:
96+
- "&fCatch an enchanted book"
97+
- "&fwhile fishing."
98+
```
99+
100+
### `tiers`
101+
A list of tiers, where each tier is identified by a unique number. <br/>
102+
**At least one tier is required.**
103+
104+
- `required-amount`: The amount of progress required to complete the tier.
105+
- `rewards`: A list of rewards for completing the tier. [Click here](./rewards) for more information.
106+
```yaml
107+
tiers:
108+
1:
109+
required-amount: 1
110+
rewards:
111+
- type: points
112+
amount: 5
113+
2:
114+
required-amount: 5
115+
rewards:
116+
- type: points
117+
amount: 10
118+
```
119+
120+
## Optional Fields
121+
122+
### `weight`
123+
The achievement's weight. Used to determine the default sorting order in menus. <br/>
124+
**Default:** `1`
125+
```yaml
126+
weight: 5
127+
```
128+
129+
### `permission`
130+
A permission required to access the achievement. <br/>
131+
**Default:** `None`
132+
```yaml
133+
permission: "achievements.lucky-catch"
134+
```
135+
136+
### `hidden`
137+
If set to true, the achievement will be hidden from menus and kept *secret*. <br/>
138+
**Default:** `false`
139+
```yaml
140+
hidden: true
141+
```
142+
143+
### `requirements`
144+
Players must complete these achievements before they can access this achievement. <br/>
145+
**Default:** `None` <br/>
146+
147+
Valid formats:
148+
- `<id>` - Requires **all tiers** of the achievement to be completed.
149+
- `<id>:<tier>` - Requires the specified tier of the achievement to be completed.
150+
```yaml
151+
requirements:
152+
- "miner"
153+
- "farmer:3"
154+
```
155+
156+
### `conditions`
157+
A list of conditions that must be met in order to complete the achievement. <br/>
158+
[Click here](./conditions) for more information.
159+
```yaml
160+
conditions:
161+
- type: game_modes
162+
game-modes:
163+
- SURVIVAL
164+
- type: items
165+
items:
166+
- ENCHANTED_BOOK
167+
```
168+
169+
### `settings`
170+
Additional settings for the achievement.
171+
172+
`toast-message`: Overrides the default toast message set in `config.yml`
173+
- `icon`: The icon displayed in the toast.
174+
- `message`: The message displayed in the toast.
175+
- `type`: You can choose between `CHALLENGE`, `TASK` or `GOAL`.
176+
```yaml
177+
settings:
178+
toast-message:
179+
icon: ENCHANTED_BOOK
180+
message: "Custom toast message!"
181+
type: CHALLENGE
182+
```
183+
184+
## Example Configuration
185+
186+
```yaml title="achievements/survival/challenges.yml" showLineNumbers=true"
187+
# Unique identifier. Don't modify it or players will lose their progress!
188+
lucky-catch:
189+
type: FISH
190+
name: "Lucky Catch"
191+
description:
192+
- "&fCatch an enchanted book"
193+
- "&fwhile fishing."
194+
settings:
195+
toast-message:
196+
icon: ENCHANTED_BOOK
197+
message: "Custom toast message!"
198+
type: CHALLENGE
199+
conditions:
200+
- type: game_modes
201+
game-modes:
202+
- SURVIVAL
203+
- type: items
204+
items:
205+
- ENCHANTED_BOOK
206+
tiers:
207+
1:
208+
required-amount: 1
209+
rewards:
210+
- type: points
211+
amount: 5
212+
```

docs/epicachievements/configuration/04-conditions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ conditions:
6161
### Global conditions
6262
Supported by all types of achievements.
6363

64-
| Condition | Description | Examples |
64+
| Condition | Description | Required arguments |
6565
|----------------------|-------------------------------------------------------------------------------------------------------------------|--------------------------|
6666
| `game_modes` | Allowed game modes | `game-modes` |
6767
| `worlds` | Allowed worlds | `worlds` |

0 commit comments

Comments
 (0)