(This article is one of a series of commentary articles)
First article: Introduction Previous article: 6. Add Recipes Next article: 8. Addition and generation of ore
So far, I've touched on item-related items broadly and shallowly, but now I'll change my mind a little and add advancements. It's like a so-called trophy with a tree structure like this.
Adding progress is ** relatively easy ** and is managed on a json basis in 1.14.4.
\src\main\resources
├ assets
└ data
└ example_mod
├ advancements
│ └ root.json
├ loot_tables
└ recipes
Create a \ src \ main \ resources \ data \ example_mod \ advancements
folder and place it in this folder.
First of all, we need one progress that is the root of the tree, so we will make this.
Reference Since it is detailed on the page, let's write while referring to this.
root.json
{
"display": {
"icon": {
"item": "example_mod:example_ingot"
},
"title": {
"translate": "advancements.root.title"
},
"description": {
"translate": "advancements.root.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/block/stone.png "
},
"criteria": {
"get_example_ingot": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "example_mod:example_ingot"
}
]
}
}
}
}
This is an example of the progress achieved when you get ʻexample_ingot. Again, the [Reference](https://w.atwiki.jp/minecraft/pages/1548.html#id_6d2dca49) page has a sufficient explanation, so please check that for details. I will explain a part of it.
frameis the frame specification for the progress tile. Let's set an appropriate one from three, challenge, goal, and task. Default task.
show_toast ʻannounce_to_chat
gives true / false for" whether to send a message in the upper right corner when achieved "and" whether to send a message in the chat field ", respectively. Default true.
hidden
is written as" Whether to display the tab until one is achieved "..., but even if false is specified, it is ** not displayed for some reason **, so I'm not sure. Default false.
criteria
is a term that defines the conditions for progress. Use an arbitrary unique name as the tag name (get_example_ingot
part), describe various triggers in trigger
, and describe detailed conditions corresponding to the triggers in conditions
.
Add the title and description translate
to the lang file.
en_us.json
{
"advancements.root.title": "Example Title",
"advancements.root.description": "Example description."
}
ja_jp.json
{
"advancements.root.title": "Example title",
"advancements.root.description": "An example description."
}
You can add progress like this.
Let's look at another example.
obtail_armor.json
{
"parent": "example_mod:root",
"display": {
"icon": {
"item": "example_mod:example_chestplate"
},
"title": {
"translate": "advancements.obtain_armor.title"
},
"description": {
"translate": "advancements.obtain_armor.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"example_helmet": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "example_mod:example_helmet"
}
]
}
},
"example_chestplate": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "example_mod:example_chestplate"
}
]
}
},
"example_leggings": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "example_mod:example_leggings"
}
]
}
},
"example_boots": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "example_mod:example_boots"
}
]
}
}
},
"requirements": [
[
"example_helmet",
"example_chestplate",
"example_leggings",
"example_boots"
]
],
"rewards": {
"experience": 100
}
}
An example of the progress achieved by obtaining one of the armor.
Of particular note is the increase in the elements of parent
that were not mentioned in the previous section. You can make it a child element by specifying ʻexample_mod: rootdefined earlier here. In progress, the parent is not a prerequisite for the child (achievable in any order), but when the parent is achieved, everything up to the child's child (that is, up to 2 steps ahead) will be displayed (reverse) If you achieve a child in, the parent to the root will be displayed by the shortest route). Also, one parent can have multiple children. The other difference is that there are multiple
criteria elements and there are more
requirements
rewards. As in this example, multiple elements of
criteria can be described, and
requirementsdescribes how to make an achievement judgment using these.
[A, B]indicates A or B, and
[A], [B]indicates A and B. You can set a reward for achieving progress in
reward`. Experience points are given here, but recipes can be released, items can be given, and arbitrary functions can be executed.
I have acquired experience points properly.
Progress is a good way to tell how you can enjoy your mods, so make good use of them.
Before 1.12, there was a difference in achievements rather than progress, so be careful not to confuse them when looking for information.
Progress --Minecraft Japan Wiki [8/4 update] --at wiki