Skip to content

Commit 06124a5

Browse files
committed
EpicAchievements v2.0
1 parent 9f8c296 commit 06124a5

24 files changed

+5311
-2779
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
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+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
# Categories
3+
4+
Achievements are organized into categories. For each category, you can specify the servers where the achievements can be completed.
5+
6+
:::info
7+
The server id is defined in the `config.yml` file:
8+
```yaml title="config.yml"
9+
# The id of the server
10+
server: survival
11+
:::
12+
13+
Below is an example configuration:
14+
15+
```yaml title="categories.yml"
16+
# Unique category identifier
17+
global:
18+
# Category name
19+
name: "Global"
20+
# Category description
21+
description:
22+
- "&7Achievements that can be completed"
23+
- "&7across all servers."
24+
# Servers where the category is enabled
25+
servers:
26+
- ALL
27+
# Item displayed in the main menu
28+
item:
29+
material: COMPASS
30+
slot: 12
31+
# (Optional) Permission required to access the category
32+
# permission: achievements.global
33+
```

docs/epicachievements/configuration/tasks/_category_.json renamed to docs/epicachievements/configuration/03-tasks/_category_.json

File renamed without changes.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
4+
# Advancement Task
5+
6+
This task triggers when a player completes an advancement. <br/>
7+
8+
:::warning
9+
These achievements are limited to only **1** tier.
10+
:::
11+
12+
<Tabs>
13+
<TabItem value="new" label="v2.0" default>
14+
If no namespace is specified, `minecraft` will be used by default. <br/>
15+
You can find a list of valid advancement IDs [here](https://minecraft.fandom.com/wiki/Advancements#List_of_advancements). The ID can be found in the `Resource location` column.
16+
17+
Example configuration:
18+
19+
```yaml title="achievements/survival/challenges.yml" showLineNumbers
20+
birdwatcher:
21+
type: ADVANCEMENT
22+
settings:
23+
# You can also specify a custom namespace
24+
# <namespace>:<resource-location>
25+
advancement: "adventure/spyglass_at_parrot"
26+
name: "Birdwatcher"
27+
description:
28+
- "&fWatch a parrot through a spyglass!"
29+
tiers:
30+
1:
31+
required-amount: 1
32+
rewards:
33+
- type: points
34+
amount: 10
35+
```
36+
</TabItem>
37+
<TabItem value="old" label="v1.0">
38+
It's necessary to set the `advancement` property.
39+
40+
If no namespace is specified, `minecraft` will be used by default. <br/>
41+
You can find a list of valid advancement [here](https://minecraft.fandom.com/wiki/Advancements#List_of_advancements). The ID can be found in the `Resource location` column.
42+
43+
Example configuration:
44+
45+
```yaml title="achievements/survival/achievements.yml"
46+
birdwatcher:
47+
type: ADVANCEMENT
48+
# You can also specify a custom namespace
49+
# <namespace>:<resource-location>
50+
advancement: "adventure/spyglass_at_parrot"
51+
name: "Birdwatcher"
52+
description:
53+
- "&fWatch a parrot through a spyglass!"
54+
tiers:
55+
1:
56+
required-amount: 1
57+
points: 10
58+
```
59+
</TabItem>
60+
</Tabs>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
4+
# Command Task
5+
6+
This task triggers when a player executes a command. <br/>
7+
8+
:::warning
9+
These achievements are limited to only **1** tier.
10+
:::
11+
12+
<Tabs>
13+
<TabItem value="new" label="v2.0" default>
14+
[RegEx](https://regex101.com/) is supported. Example configuration:
15+
16+
```yaml title="achievements/survival/challenges.yml" showLineNumbers
17+
mayor:
18+
type: COMMAND
19+
settings:
20+
# Matches any town name
21+
command: "^town create .+$"
22+
name: "Mayor"
23+
description:
24+
- "&fCreate your own town!"
25+
tiers:
26+
1:
27+
required-amount: 1
28+
rewards:
29+
- type: points
30+
amount: 10
31+
```
32+
</TabItem>
33+
<TabItem value="old" label="v1.0">
34+
It's necessary to set the `command` property. [RegEx](https://regex101.com/) is supported.
35+
36+
Example configuration:
37+
38+
```yaml title="achievements/survival/achievements.yml"
39+
mayor:
40+
type: COMMAND
41+
# Matches any town name
42+
command: "^town create .+$"
43+
name: "Mayor"
44+
description:
45+
- "&fCreate your own town!"
46+
tiers:
47+
1:
48+
required-amount: 1
49+
points: 10
50+
```
51+
</TabItem>
52+
</Tabs>

0 commit comments

Comments
 (0)