The three tasks
Fetch something, deal with something, carry word somewhere. Deliberately three, and how to name what is wanted so it reaches every mod that has one.
An errand is not a quest and this is not a scripting language. What makes one worth doing is who asks and why, and a system with fifteen kinds of objective in it has usually stopped believing that. So there are three.
The kind is named flat, in the errand's own file, and left out it is bring.
bring
Fetch something and bring it back. The plain one, and the one nine errands in ten should be.
{
"wanted": "#c:stones",
"count": { "min": 24, "max": 40 }
}| Field | Default | Meaning |
|---|---|---|
wanted | required | An item or a #tag. See Naming the goods. |
count | 1 | A figure or a span. |
What the player is carrying is counted by what the thing is and nothing else. A villager asking for eight iron does not inspect it for enchantments, and one who did would turn away perfectly good iron for having a name on it.
The whole amount is counted before a single stack is touched, so a hand-over is all or nothing. A player who dropped a stack while reading the last page keeps everything they still have rather than paying half of it for nothing.
hunt
Deal with something that has been troubling the place. The oldest errand there is, and the one a village has the best reason to ask: nobody in it can fight, the thing in the trees does not care about that, and you are the one passing through with a sword.
{
"task": "rpg_errands:hunt",
"quarry": "#rpg_errands:wolves",
"count": 4
}| Field | Default | Meaning |
|---|---|---|
quarry | required | An entity type or a #tag. |
count | 1 | A figure or a span. |
Kills count only while the promise is being carried. Killing four wolves and then agreeing to deal with the wolves starts from none, which is the honest reading and the only one that does not have players clearing the woods first and collecting afterwards.
One kill answers one promise, even where it would answer two. A wolf is one wolf, and two villagers who both want the wolves seen to are both owed their own.
deliver
Carry word to somebody else, somewhere else. The errand that is about the map: everything else happens within sight of whoever asked, and this one sends you over the hill.
{
"task": "rpg_errands:deliver",
"to": [ "minecraft:mason" ],
"away": 160
}| Field | Default | Meaning |
|---|---|---|
to | [] | Which trades can be told. Empty means any villager will do. |
to_entities | [] | Which kinds of creature can be told, for a mod whose people are not villagers. |
away | 160 | How far from where you agreed the hearer has to be, in blocks. 16 to 4096. |
Nothing is actually carried. No parcel to lose, no stack to drop, nothing to be robbed of. The whole of the errand is the walk, and the person who lights up when you get there is often the first thing telling the player there was another village over the hill.
Whoever you find is the one you were sent to, so long as they are one of the trades named and standing at least away blocks from where the promise was made. Children cannot receive one, and neither can the person who sent you.
Under about a hundred blocks it is not an errand
away is measured from where the player agreed, not from the sender's home. Set too low it is a walk across the same village, and the errand settles itself on the neighbour standing behind you.
Naming nobody at all means any villager will do, which is what "get word to the next village" wants. The thanks, and the favour, go to whoever receives it: the village at the far end warms to you and the one that sent you does not, which is right, since they have not heard yet.
How many: a figure, or a span
Both spellings are the same field, so nothing has to be rewritten to move between them.
"count": 32
"count": { "min": 24, "max": 40 }The figure is drawn once, when the promise is made, and written into the ledger, so however the day turns over afterwards, they hold you to the number they said.
Ceiling of 256. More than a player carries back in one go stops being an errand and becomes a grind, and a village asking for it reads as a quest board rather than as a neighbour.
deliver has no count. One message is one message.
Naming the goods
wanted and quarry are written the way a recipe writes an ingredient: the thing itself, or a tag.
"wanted": "minecraft:emerald"
"wanted": "#c:ingots/copper"
"quarry": "minecraft:zombie"
"quarry": "#rpg_errands:wolves"A tag is what you usually want. An errand about the wolves taking the sheep is an errand about wolves however many mods provide them, and a haul written against #c:ingots/copper is payable in copper rather than in one mod's copper.
Naming a thing that is not installed fails to read and the log says so, with the fix in the message. Naming a tag that nothing fills is fine, and is the point:
A tag nothing fills is never asked for
That is how an errand written for a mod nobody has installed lies dormant instead of sending the player after something that does not exist. Both items and creatures are checked once the world is standing, and everything that can never be asked is named in the log:
26 of 27 errand(s) can be asked for in this world
These errands want something nothing here provides, so they will never be offered: [mypack:brass]Give a tag a name
A tag has no name of its own, so write one, or the player is asked for "Wolves" with a capital W and no thought behind it.
| What | Key |
|---|---|
| An item tag | rpg_dialogue.wanted.<namespace>.<path> |
| A creature tag | rpg_errands.quarry.<namespace>.<path> |
Slashes in the path become dots. Both fall back to the tag's last path segment tidied up, so a missing key is never a missing-key placeholder.
{
"rpg_dialogue.wanted.mypack.hide": "Leather",
"rpg_errands.quarry.mypack.wolves": "wolves"
}The item key is `rpg_dialogue`, not ours
wanted is RPG Dialogue's own type and looks its name up under its own prefix. Put item tag names there; put creature tag names under rpg_errands.quarry.
The name may be narrower than the tag and must never be wider
Asked for "Thirty-two Stone" over a tag holding only cobblestone, a player standing there with a stack of stone watches the game refuse to notice it. Being quietly generous about what counts never turns anybody away; the other way round is a promise the hand-over then breaks.
called, for a haul with no good name
Where neither the item's own name nor the tag's serves, name the haul itself:
{
"wanted": "#rpg_errands:catch",
"count": { "min": 8, "max": 16 },
"called": { "translate": "mypack.errand.nights_catch" }
}It is a full text component, so a translation key is free. It replaces the name everywhere the errand is spoken of.
A fourth kind
task takes a whole namespaced id precisely so that it can be somebody else's. A mod adding a kind gets its own three shared conversations by saying where they live, and nothing here has to know. See For mod developers.
