Join our discord
In partnership with NodeCraft Logo NodeCraft


You are not logged in! Create an account or login to contribute! Log in here!

Quests/Creation

From Pixelmon Wiki
(Redirected from Quests Creation)

This is a step-by-step guide on building your own quests!

Blank Quest

This blank quest has had all details removed. For the purpose of this guide, it will be used as a reference and starting point to building your own quests.

Show


Quest Information

At the top of all quests, there will be five fields which need to be set: weight, abandonable, repeatable, color, and activeStage. The bottom part of the quest file is reserved for the strings set throughout the quest.

Weight

Weight is the relative chance the quest has to be generated by an NPC. It's compared to that of all other possible ones to get the absolute chance.

Abandonable

The abandonable option will determine whether the player can abandon the quest if they do not wish to complete it or save it for later. Can be set to true or false.

Repeatable

The repeatable option will determine whether the quest can be gained and completed again after being finished by the player. Can be set to true or false.

Color

Color allows you to configure what color the icons in the quest log, as well as icons over an NPC's head when DIALOGUE is involved, will be. Utilizes RGB values to determine the final color.

activeStage

The activeStage is used to specify the stage number at which the quest will appear in the player's quest log.

The activeStage will need to be a number which corresponds to one of the stage's numbers (for example, to make a quest to appear in the player's log from the beginning you would use "activeStage": 0).

In quests that use the DIALOGUE objective on the first stage (stage 0) to ask the player if they wish to accept the quest usually will have the activeStage set to the next stage (stage 10). This way the player has to learn about the NPC's need for help before it is marked in their quest log.

For the purposes of this guide, in the Blank Quest above it has been set to 10 as the player will have to accept the quest from an NPC. Feel free to modify this if you are not using an NPC DIALOGUE to start the quest.

Strings

The strings are used to specify names and messages that will appear in the player's quest log. This section is found at the bottom of the Quest file.

As a minimum, quests require the strings name, desc-# (# being a stage number), desc-X, and stage-#-## (# being a stage number). If the quest has multiple stages, there can be additional strings for desc-# and stage-##-# with the appropriate stage number to help direct the player.

String Name Description
name This is the name of the quest which is displayed in the quest log.
desc-# This is the message describing the current quest stage in the player's quest log. # would represent the stage number. For example: Desc-20 would provide the Description for the 20th stage.
desc-X This is the message shown for the quest in the history log after the quest has been completed.
stage-#-## This is a message the player receives in chat when they start the stage directing them what to do. # would represent the stage number whereas the ## would represent the objective ID. For example: stage-10-0 is the 0th objective whereas stage-10-1 is the first objective of the 10th stage.

More information on strings will be found at the end of this guide after you've learned more about the different objectives. But the above are the baseline required strings for any quest to function.

Quest Stages

All quests will have stages, these are what the player will progress through.

stage

The stage is used to specify different parts of the quest and what the player will need to progress through. Stages are given a unique number, these are located by the "stage":.

It is recommended to have the general rule of a quest's first stage being stage 0 ("stage": 0), the next being 10 ("stage": 10), the next being 20 ("stage": 20) and so fourth.

nextStage

The nextStage is used to specify the next stage which will follow after the current one. As previously explained, stages are given unique numbers, located by the "stage":.

If there is a stage after the current one, the "nextStage": would have specified the number of that next stage ("nextStage":10). This number would be next to the "stage": field. If the current stage if the final one, the "nextStage": would have specified "-1":. For example: "nextStage": -1.

icon

This value will select which Icon is displayed in the Quest GUI menu & at the bottom right for the objective description. There are a few options that can be selected. This icon will take on the color selected by "color": {"r":#, "g":#, "b":#}

Value Result
EXCLAMATION_MARK Exclamation Mark.png
QUESTION_MARK Question Mark.png
FOUR_POINTED_STAR QuestFour Pointed Star.png
SPEECH_BUBBLE QuestSpeech Bubble.png
GEAR QuestGear.png
POKEBALL QuestPokeball.png
TIMER QuestTimer.png

If an EXCLAMATION_MARK or QUESTION_MARK icon is used on a DIALOGUE stage, the NPC will have the appropriate icon generated above their head in the world.

Objectives and Actions

Objectives are the "requirement" needed to complete,or partially complete, that step for the quest stage.

Objectives will also allow the use of Inserters which will be covered next, that can allow more interactive results with the Player based on use. Whether different quest NPC's, random rewards, randomized counts for progression, there are a variety of options.

Actions will dictate what happens as a result of the Objectives "requirement" being met.

Inserters

Inserters are used to make the quest accessible to players. Inserters should be the first objectives in a stage or towards the beginning of the quest json to ensure they trigger prior to needing to be used. There are three types of inserters: Entity, Pokemon, and Generic.

To utilize the data from the Inserters throughout the quest, you will want to take the [STRING] and wrap it in ?

Entities

Entity inserters are commonly used by the DIALOGUE NPC_TALK, NPC_GIVE, NPC_SHOW, and NPC_RESPOND objectives. If an NPC Inserter is used, you will want to use the ?[STRING]? in place of the [uuid] value for those objectives.

Inserter Arguments [Required] {Optional} Description
NAME_INSERTER [STRING]
[gender]
While not directly related to entity data, it's commonly used for DIALOGUE actions which is an Entity. This Inserter will select a name from a pre-determined list to insert into the [STRING]. Gender is selected by using the values 0 for male, 1 for female, and -1 to use a name from either list.
NPC_SPAWN_INSERTER [STRING]
[chance]
This inserter will attempt to insert on an NPC when that NPC spawns. [chance] is a value from 0.01 to 1.0
NPC_TIMED_INSERTER [STRING]
[chance]
[range]
[time]
{time1}-{time7}
This inserter attempts to Insert on an NPC based on the [chance] which is a value from 0.01 to 1.0, when a player is within [range] blocks of the NPC.
You can set up to 8 different [time] arguments (at least the first is required) in minecraft ticks to specify when the inserter should attempt to insert on the nearby NPCs.

An example of an NPC Timed Inserter would be NPC_TIMED_INSERTER NPC 0.5 50 0 12000. This inserter has a 50% chance for NPCs within 50 blocks of the player to be inserted when the world time is 0 or 12000 (Dawn and Dusk).

If the inserter succeeds, the UUID of the entity is put in to the value NPC. From then, the inserter itself will act like NPC from then on, allowing the use of ?NPC? in DIALOGUE or NPC_RESPOND objectives to call back to the UUID inserted into the NPC string.

Pokémon

Pokémon inserters are used by the Pokémon objectives (POKEMON_CAPTURE, POKEMON_DEFEAT, POKEMON_EVOLVE_POST, POKEMON_EVOLVE_PRE, POKEMON_HAS, POKEMON_HATCH, POKEMON_TRADE_GET and POKEMON_TRADE_GIVE).

Inserter Arguments [Required] {Optional} Description
DEX_VALUES_SPEC_INSERTER [STRING]
[Dex#]
[Nature]
[Growth]
The [Dex#] can be a range x-y or CSV x,y,z. [Nature] and [Growth] can be listed as 'any' or specified via name. This will give an equal chance between all selections and insert the result into the [STRING].
TYPE_VALUES_SPEC_INSERTER [STRING]
[Type]
[Nature]
[Growth]
The [Type] will be a CSV list of different types to be selected x,y,z. [Nature] and [Growth] can be listed as 'any' or specified via name. This will give an equal chance between all selections and insert the result into the [STRING].

An example of a Dex inserter would be DEX_VALUES_SPEC_INSERTER SPEC 1,4,7 Lax,Adamant any. This inserter will choose between Lax or Adamant at random, of any size, then determines which Pokemon via the Dex numbers 1,4,7, then inserts the result into SPEC. An example of a Type inserter would be TYPE_VALUES_SPEC_INSERTER SPEC Fire,Water,Grass any Tiny. This inserter will choose between Fire, Water or Grass at random, and then it looks the Pokémon with the type chosen and Tiny growth size, then inserts the result into SPEC.

These Inserter Strings set by [STRING] can be used in any objective argument listed as [pokémon specs].

Generic

Generic Inserters are a variety of inserters that can be used to modify the data of some Actions like COMMAND, ITEM_GIVE, and others, as well as some objective values.

Inserter Arguments [Required] {Optional} Description Example
BOOLEAN_INSERTER [STRING]
[WeightTrue]
[WeightFalse]
This objective will compare the two numerical weights provided in [WeightTrue] and [WeightFalse] to determine an output of either true or false. The result will then be inserted into [STRING]. BOOLEAN_INSERTER BOOLEAN 1 5
Has a 1 in 6 chance to insert true
and a 5 in 6 chance to insert false.
CONCATENATE_INSERTER [STRING]
[ID1]
[ID2]
{Spacer}
This will take the two values provided by the inputs [ID1] and [ID2], and if applicable the chosen spacer (example _ or -), and inserts the data into [STRING]. CONCATENATE_INSERTER CON ST1 ST2
DECIMAL_INSERTER [STRING]
[values]
The [value] is a decimal range, x.x-y.y. A value between these inputs will be selected randomly, then inserted into[STRING]. DECIMAL_INSERTER DEC 1.0-3.5
INTEGER_INSERTER [STRING]
[values]
The [value] is a whole number ranger or list, either x-y or x;y. This will insert the chosen value into [STRING]. INTEGER_INSERTER INT 0;5;10;15
STRING_INSERTER [STRING]
[values]
The [value] will be a list of strings x;y. This will insert the chosen value into [STRING]. STRING_INSERTER GEM bug;ice;fire;electric;normal

Any quest steps or objectives that require a "count" of something can utilize # in their description strings at the bottom of the quest to keep track of the count as it progresses.

Objectives

Objectives are goals in which the player has to complete to progress.

Objectives follow the format of [objective name] [arguments]. The [objective name] and [arguments] can be found in the table below. Some arguments can be nullified/defaulted by using - in it's place. Some examples will be shown, but note that not every argument will accept -.

Objective Name Arguments [required] {optional} Notes Description Example
ABSOLUTE_POSITION [x1]
{y1}
[z1]
[x2]
{y2}
[z2]
[dimension]
Y values are optional This objective completes once the player is within an area specified by [x1], [z1], [x2] and [z2] in [dimension]. Using - in place of a number for either Y value will create a bedrock to sky boundary ABSOLUTE_POSITION 8412 - 7767 8401 - 7758 3 true
APRICORN_HARVEST [modID:item]
[count]
{meta/damage}
{displayname}
{NBT}
Requires right-click harvesting Apricorns to trigger correctly. This objective completes once the player harvests the Apricorn amount specified by [modID:item] and [count]. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. APRICORN_HARVEST pixelmon:red_apricorn 1 - - - -
BATTLE_MOVE_TARGET {attack,attack,attack,attack}
[count]
{type}
{category}
{result}
{damage}
{fulldamage}
{accuracy}
{soundbasedmove}
{userspec}
{targetspec}
{category}=
physical/special/status
{result}=
proceed/hit/ignore/killed/succeeded
/charging/unable/failed/missed/notarget
{soundbased}=
true/false
set whether a sound-based move is used or not
This objective completes once the target Pokémon of a battle meet the conditions specified by {attack,attack,attack,attack} [count] {type} {category} [result] {damage} {fulldamage} {accuracy} {soundbasedmove} {userspec} {targetspec}. BATTLE_MOVE_TARGET Leech_Seed 1 Grass - hit - - - false - Oddish
BATTLE_MOVE_USER {attack,attack,attack,attack}
[count]
{type}
{category}
{result}
{damage}
{fulldamage}
{accuracy}
{soundbasedmove}
{userspec}
{targetspec}
{category}=
physical/special/status
{result}=
proceed/hit/ignore/killed/succeeded
/charging/unable/failed/missed/notarget
{soundbased}=
true/false
set whether a sound-based move is used or not
This objective completes once the user Pokémon of a battle meet the conditions specified by {attack,attack,attack,attack} [count] {type} {category} [result] {damage} {fulldamage} {accuracy} {soundbasedmove} {userspec} {targetspec}. BATTLE_MOVE_USER Flamethrower 1 Fire - hit - - - false Charmander -
BLOCK_BREAK [modID:block]
[count]
{meta/damage}
{displayname}
{NBT}
None This objective completes once the player breaks the block(s) specified by [modID:block] and [count]. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. BLOCK_BREAK minecraft:stone 10 - - - -
BLOCKER None None This objective can't be completed. It is intended to be used alongside the SET_STAGE objective or other method. If the quest is started by something else (for example, an Instantaneous quest or a plugin), a BLOCKER objective is required in the first stage. BLOCKER
BLOCK_PLACE [modID:block]
[count]
{meta/damage}
{displayname}
{NBT}
None This objective completes once the player places the block(s) specified by [modID:block] and [count]. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. BLOCK_PLACE minecraft:stone 1 - - - -
BLOCK_USE [modID:block]
[count]
{meta/damage}
{displayname}
{NBT}
None This objective completes once the player uses the block(s) specified by [modID:block] and [count]. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. BLOCK_USE minecraft:stone_button 1 - - - -
DATE [start date]
[end date]
Dates are configured in Day/Month format This objective completes when the system is within the dates specified. DATE 5/1 14/1
This objective will complete when the system is between January 5th and January 14th.
DIALOGUE [uuid/inserter]
[name]
[text]
[response]
{response1}-{response7}
You can set up to 8 total responses which will tie into using the NPC_RESPOND/NPC_GIVE/NPC_SHOW objectives.
[text] and [response] options are configured as strings which are then defined down in the "strings": [] section of the quest json.
This objective can't be completed. It causes the the NPC specified by [uuid\inserter] with the specified name string [name] to display the message string specified by [text] DIALOGUE 0eb8e4fa-f8dc-4648-989b-98ac5bd417a3 npcName start startYes startNo
Check out Putting it all together for more explanation on the selected choices.
DIMENSION [dimensionID] None This objective completes once the player is within the dimension specified by [dimensionID]. DIMENSION 1 would be the End dimension.
ENTITY_INTERACT [uuid/class name]
[count]
None This objective completes once the player has interacted an entity specified by [uuid|class name] and [count]. ENTITY_INTERACT Creeper 1
ENTITY_VICINITY [uuid/class name]
[distance]
None This objective completes once the player is within an area specified by [distance] of an entity specified by [uuid|class name]. ENTITY_VICINITY Creeper 10
FLAG [flag name] None This objective completes when the player has the named flag. Typically used in conjunction with a SET_FLAG action. FLAG tutorialcomplete
FOLLOWTHROUGH None None This objective will automatically complete as soon as the stage is reached. FOLLOWTHROUGH
ITEM_CRAFT [modID:item]
[count]
{damage}
{displayname}
{NBT}
Note, the additional options must match the result of the craft. This does not modify the crafting result to give the options listed.
Setting optional values with - should default them to accept "any" value in that field.
This objective completes once the player crafts the item specified by [modID:item] and [count]. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. ITEM_CRAFT minecraft:enchanting_table 1 - Enchanting_Table
ITEM_DROP [modID:item]
[count]
{damage}
{displayname}
{NBT}
Setting optional values with - should default them to accept any value in those fields. This objective completes once the player drops the item specified by [modID:item] and [count]. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. ITEM_DROP minecraft:netherite_axe 1 - Legendary_Axe {display:{Lore:['[{\"text\":\"Don\'t Drop this!\"}]']}}
ITEM_HAS [modID:item]
[count]
{damage}
{displayname}
{NBT}
Setting optional values with - should default them to accept any value in those fields. This objective completes when the player has the item(s) specified by [modid:item] in their inventory. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. ITEM_HAS pixelmon:potion 5
ITEM_HAS_NOT [modID:item]
[count]
{damage}
{displayname}
{NBT}
Setting optional values with - should default them to accept any value in those fields. This objective completes when the player does not have the item(s) specified by [modid:item] in their inventory. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. ITEM_HAS_NOT minecraft:diamond_sword 1 - God_Sword
ITEM_PICKUP [modID:item]
[count]
{damage}
{displayname}
{NBT}
Setting optional values with - should default them to accept any value in those fields. This objective completes once the player picks up the item(s) specified by [modid:item] [count] in their inventory. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. ITEM_PICKUP pixelmon:poke_ball 5 - - {\"PokeBallID\":\"great_ball\"}
ITEM_SMELT [modID:item]
[count]
{damage}
{displayname}
{NBT}
Note, the additional options must match the end result of the craft for this to trigger. This does not modify the result.
The chosen item must be the "finished" result of a smelting operation (iron_ingot not iron_ore).
Setting optional values with - should default them to accept "any" value in that field.
This objective completes once the player smelts the the item specified by [modID:item] and the amount specified by [count]. The optional arguments of {meta/damage}, {displayname}, and {NBT} can also be added. ITEM_SMELT minecraft:iron_ingot 1 - Hardened_Iron -
ITEM_USE [modID:item]
[count]
{damage}
{displayname}
{NBT}
Setting optional values with - should default them to accept any value in those fields. This objective completes once the player uses the item specified by [modID:item] the number of times specified by [count]. ITEM_USE minecraft:enchanting_table 1 - - -
NPC_GIVE [uuid]
[success/failure]
[modID:item]
[count]
{damage}
{displayname}
{NBT}
Setting optional values with - should default them to accept any value in those fields. You will need 2 instances of this objective on your stage, one to handle the success event, and the other to handle the failure event. This event will trigger the success or failure objective based on whether the player interacts with the NPC while holding the item(s) specified by [modID:item] and [count]. This will take the item(s) from the player, and must be an exact match (including count). NPC_GIVE ?NPC? success pixelmon:old_rod 1 - Splintering_Rod -
NPC_GIVE ?NPC? failure pixelmon:old_rod 1 - Splintering_Rod -
NPC_RESPOND [uuid]
{index}
If no Index digit is provided to select the position of the response, it will default to 0 (first response option) This objective is used alongside the DIALOGUE objective. This objective is used is give a response to the NPC specified by [uuid] from the player. The optional argument of {index} is added to specify the position of the reply given. NPC_RESPOND ?NPC? 0
NPC_RESPOND ?NPC? 1
NPC_SHOW [uuid]
[success/failure]
[modID:item]
[count]
{damage}
{displayname}
{NBT}
Setting optional values with - should default them to accept any value in those fields. You will need 2 instances of this objective on your stage, one to handle the success event, and the other to handle the failure event. This event will trigger the success or failure objective based on whether the player interacts with the NPC while holding the item(s) specified by [modID:item] and [count]. This will not take the item(s) from the player, and must be an exact match (including count). NPC_SHOW ?NPC? success pixelmon:eon_ticket 1 - - -
NPC_SHOW ?NPC? failure pixelmon:eon_ticket 1 - - -
NPC_TALK [uuid] Typically used with a DIALOGUE objective. This objective will complete once a player has interacted & seen the DIALOGUE interaction from the NPC. It does not require an option/choice be selected to progress the step. NPC_TALK c28baec2-da17-11ed-afa1-0242ac120002
POKEMON_CAPTURE [pokémon specs]
[count]
None This objective completes once the player captures the Pokémon specified by [pokémon specs] and [count]. POKEMON_CAPTURE yamask_f:galarian 5
POKEMON_DEFEAT [pokémon specs]
[count]
This can be a Wild, Player owned, or NPC owned Pokemon. This objective completes once the player defeats the Pokémon specified by [pokémon specs] and [count]. POKEMON_DEFEAT any 30
POKEMON_DEFEATED_BY [pokémon specs]
[count]
This can be a Wild, Player owned, or NPC owned Pokemon. This objective completes once the player is defeated by the Pokémon specified by [pokémon specs] and [count]. POKEMON_DEFEATED_BY Hitmonlee 1
POKEMON_DEFEAT_NPC [pokémon specs]
[count]
The Pokemon must be owned by an NPC for this trigger to work. This objective completes once the player defeats the Pokémon specified by [pokémon specs] and [count]. POKEMON_DEFEAT_NPC Steelix 1
POKEMON_DEFEAT_PLAYER [pokémon specs]
[count]
The Pokemon must be owned by another Player for this trigger to work. This objective completes once the player defeats the Pokémon specified by [pokémon specs] and [count]. POKEMON_DEFEAT_PLAYER Mewtwo 1
POKEMON_DEFEAT_WILD [pokémon specs]
[count]
This must be a Wild pokemon that doesn't have an owner for this trigger to work. This objective completes once the player defeats the Pokémon specified by [pokémon specs] and [count]. POKEMON_DEFEAT_WILD f:ashen 30
POKEMON_EVOLVE_PRE [pokémon specs]
[count]
None This objective completes once the player evolves the Pokémon specified by [pokémon specs] and [count]. POKEMON_EVOLVE_PRE Charamander 1
This completes before the Pokémon evolves.
POKEMON_EVOLVE_POST [pokémon specs]
[count]
None This objective completes once the players Pokemon evolves into the one specified by [pokémon specs] and [count]. POKEMON_EVOLVE_POST Charmeleon 1
This completes after the Pokémon evolves.
POKEMON_HAS [pokémon specs]
[count]
None This objective completes once the player has the Pokémon specified by [pokémon specs] and matches the amount set by [count]. POKEMON_HAS Golem 1
POKEMON_HATCH [pokémon specs]
[count]
None This objective completes once the player hatches the Pokémon specified by [pokémon specs] and matches the amount set by [count]. POKEMON_HATCH Horsea 4
POKEMON_TRADE_GET [pokémon specs]
[count]
None This objective completes once the player received via a trade the Pokémon specified by [pokémon specs] and [count]. POKEMON_TRADE_GET Onix 1
POKEMON_TRADE_GIVE [pokémon specs]
[count]
None This objective completes once the player gives via a trade the Pokémon specified by [pokémon specs] and [count]. POKEMON_TRADE_GIVE Magikarp 1
QUERY [Questfilename] Queries completion status This objective will trigger if the quest specified by [Questfilename] is complete. QUERY helperquest
RANDOM [Weight]:[ActionID]
[Weight]:[ActionID]
<repeatable>
The <repeatable> is meant to symbollize the ability to have multiple re-uses of the [Weight]:[ActionID] format.
You can use up to 8 [Weight]:[Action]'s on a single RANDOM objective
This objective automatically completes and randomly selects an action specified by [Weight]:[ActionA] and [Weight]:[ActionB]. RANDOM 1:0 99:1
This is a 1% chance to proceed to Action 0, as its a weight of 1 out of the total of 100 (1+ 99).
SERVER_TIME [time]
{range}
[time] and any {range} value set are counted in milliseconds This objective completes once the server/machine has hit a time specified by [time]. The optional arguments of {range} can also be added to specify a time range before and after. SERVER_TIME 12000 -
STRUCTURE [structure name] None This objective completes once the player is within the structure specified by [structure name]. STRUCTURE stronghold
TEST_DATA [ID]
[value]
[mode]
[mode]=
Equality/Equals/GreaterThan/
LessThan/GreaterThanOrEquals/
LessThanOrEquals
This will test data from the [ID] and will compare it to the specified [value]. They will be compared based on the specified [mode] to determine completion or not. TEST_DATA NUM 5 LessThanOrEquals
This will check NUM to see if it is less than or equal to 5.
TILEENTITY_VICINITY [uuid/class name]
[distance]
None This objective completes once the player is within an area specified by [distance] of an tile entity specified by [uuid|class name] and [count]. TILEENTITY_VICINITY TileEntityChest 10
TIMER [time] [time] is calculated in milliseconds. This objective completes after the amount of time set by [time] has passed since the stage containing the objective was reached. TIMER 5000
This will complete after 5 seconds.
TRAINER_DEFEAT [uuid]
[count]
None This objective completes once the player has defeated the trainer specified by [uuid] and [count]. The [uuid] can also be set with - to allow any trainer defeat to count. TRAINER_DEFEAT - 25
TRAINER_DEFEATED_BY [uuid]
[count]
None This objective completes once the player has been defeated by the trainer specified by [uuid] and [count]. The [uuid] can also be set with - to allow any trainer win to count. TRAINER_DEFEATED_BY c28baec2-da17-11ed-afa1-0242ac120002 1
WORLD_TIME [time]
{range}
[time] is calculated in ticks.
{range} is an optional argument that creates a range of time for completion between the two values.
This objective completes once the world has hit a time specified by [time]. The optional arguments of [range] WORLD_TIME 6000 - completes when it is 12:00 noon in the Minecraft world.

actions

Actions are rewards which the player receives once they have completed an objective.

The numerical ID in [ID] [action] {arguments} is used to specify when the action is ran. For example 0 ITEM_GIVE pixelmon:red_apricorn 1. In this example, the executor has been set to ID 0 which means that once the 0th objective of this stage has been completed, this action is performed.

Executor ID's can also use multiple values, in either AND or OR format. For example, 0,1,2 ITEM_GIVE pixelmon:red_apricorn 1 means that either the 0th, 1st OR 2nd objective can be completed in this stage to perform this action. Otherwise the alternative example, +0,1 ITEM_GIVE pixelmon:red_apricorn 1 means that both the 0th AND 1st objectives must be completed to perform this action.

Action Name Arguments [required] {optional} Notes Description Example
ABANDONABLE [true/false] Overwrites the original option set at the top of the quest This action will set whether the quest can be abandoned by the player if set to true, or not if set to false 1 ABANDONABLE false
COMMAND [command] None Runs the command specified by [command] as the console. @p can be used as a placeholder for the player's username. 0 COMMAND /tellraw @a {\"text\":\"@p wants everyone to know, they could eat a whole ?FOOD?\",\"color\":\"red\"}
COMPLETE_QUEST None None Finishes and completes the quest for the player. 0 COMPLETE_QUEST
DIALOGUE [name]
[text]
[response]
[text] and [response] options are still defined down in the "strings": [] section of the quest json. Similar to the objective, but has no UUID to tie it to a specific NPC. Acts more as just a dialogue box for more details after the initial dialogue is served to the player. Pops up a dialogue box with the specified [name] to display the message specified by the [text] string 0 DIALOGUE npcName refused bye
END_DIALOGUE None None This will end the DIALOGUE interaction with an NPC. 2 END_DIALOGUE
FAIL_QUEST None None Stops and fails the quest for the player. 1 FAIL_QUEST
ITEM_GIVE [modID:item]
[count]
{meta/damage}
{displayname}
{lore}
{NBT}
{haseffect}
{flags}
{hideTooltip}
{lore} will allow the use of \n to move text proceeding it to the next line.
{haseffect}=
true/false
{hideTooltip}=
true/false
Gives the player the item specified by [modID:item] and [count]. The optional arguments of {meta/damage}, {displayname}, {lore}, {NBT}, {hasEffect}, {flags}, and {hideTooltip} can also be added. 0 ITEM_GIVE pixelmon:poke_ball 1 - - {\"PokeBallID\":\"master_ball\"}
KEY_ITEM [KeyItem] [KeyItem]=
MegaRing/DynamaxBand
OvalCharm/ShinyCharm
ExpCharm/CatchingCharm
MarkCharm
Provides the player with the item specified by [KeyItem]. 0 KEY_ITEM DynamaxBand
LOCALIZED_MESSAGE [lang.key] Will require the lang.key to be configured in all applicable language files of a resource pack. This works similar to MESSAGE however will provide the message found in the applicable language file the client has selected to use, allowing translated messages. 2LOCALIZED_MESSAGE quest.tutorial.finished
Finds the matching 'quest.tutorial.finished' line in the language file the client is using to feed back the appropriate message.
MESSAGE [message] None Displays the message specified by [message] to the player in their chat. @p can be used as a placeholder for the player's username. MOTD Codes can be inserted before the [message] to give them some color, as well as the use of §. 2 MESSAGE \u00A7eHello @p!
0 MESSAGE §eHello @p!
POKEMON_GIVE [pokémon specs] None Gives the player the Pokémon specified by [Pokémon Spec]. 1 POKEMON_GIVE Dragonite_shiny:true
POKEMON_SPAWN [X]
[Y]
[Z]
[xAlignment]
[yAlignment]
[zAlignment]
[Engage]
[Pokémon Spec]
[Alignment]=
Absolute/Relative/Random
[Engage]=
true/false
Spawns the Pokémon specified by [Pokémon Spec] at the specified coordinates [x], [y], and [z] and will follow the alignment properties set in [xAlignment], [yAlignment], and [zAlignment]. [Engage] will set whether the pokemon is aggressive towards the player and will force start the battle or not. 0 POKEMON_SPAWN 0 100 0 Relative Absolute Relative true Dragonite_growth:microscopic
Spawns the aggressive Pokemon 0 blocks relative to the player horizontally with X & Z, and at Y level 100 since it's absolute.
POTION [potionEffect]
[duration]
[strength]
[ambient]
[particles]
[ambient]=
true/false
[particles]=
true/false
This action will provide the player with the potion effect specified by [potionEffect] for the length in ticks set by [duration]. [strength] will set the potion strength, [ambient] will set whether the particles behave like those of a beacon (more transparent), and [particles] will set whether the particles show at all. 1 POTION swiftness 10000 2 true true
this will give a player the Swiftness 2 Potion effect for 10000 ticks, with ambient particles.
SERVER_COSMETIC [cosmetic] [cosmetic]=
drowned_robe/espeon_scarf/
flareon_scarf/glaceon_scarf/
jolteon_scarf/leafeon_scarf/
sylveon_scarf/umbreon_scarf/
vaporeon_scarf
This action will award the player with the chosen [cosmetic] which they can equip through the Pixelmon option in the Esc Menu. 1 SERVER_COSMETIC umbreon_scarf
SET_FLAG [flagname] None This action will set the flag specified by [flagname] on the character's data. Typically used in conjunction with the FLAG objective. 0 SET_FLAG tutorialcomplete
SET_STAGE [stage number]
{Questfilename}
The optional argument of {Questfilename} will be the main name of the json file, without the .json tag. Using - will default to using the current quest. Sets the player to the stage number specified by [stage number] on the quest optionally specified in {Questfilename}. 2 SET_STAGE 10 -
SOUND [X]
[Y]
[Z]
[alignment]
[soundfile]
[category]
[range]
[pitch]
[alignment]=
Relative/Rotational/
Random/Absolute
[category]=
master/music/record/
weather/block/hostile/
neutral/player/ambient/
voice
[range]=
Integer values
[pitch]=
value between 0.0 and 2.0
Plays the sound specified by [soundfile] at the area specified by [X], [Y], and [Z] based on the [alignment] selected. [category] will determine what volume channel the sound will play through based on minecraft's volume sliders. [range] will specify how far away the sound can be heard from the origin point, where a value of 1 is a 16 block radius. 2 SOUND 10 0 -5 Relative mob.enderdragon.end block 1 0.7
TAKE_KEY_ITEM [KeyItem] List of key items found under KEY_ITEM action. Takes the key item specified by [KeyItem] from the player. 0 TAKE_KEY_ITEM ExpCharm
TAKE_SERVER_COSMETIC [cosmetic] List of cosmetics found under SERVER_COSMETIC action. Takes the cosmetic specified by [cosmetic] from the player. 1 TAKE_SERVER_COSMETIC drowned_robe
TELEPORT [X]
[Y]
[Z]
[yaw]
[pitch]
[dim]
[RelativeX]
[RelativeY]
[RelativeZ]
[RelativeYaw]
[RelativePitch]
[RelativeDim]
The [RelativeX/Y/Z] options are all set to either true or false Teleports the player to the location specified by [X], [Y], and [Z]. [yaw] can be used to specify the direction the player is looking, [pitch] can be used to specify if the player is looking up or down and [dim] can be used to specify the dimension ID. If any of the [Relative] options are set to true, it will use the relative position based on whether it is the X, [Y], [Z], [yaw], [pitch], and/or [dim] relative option. Otherwise using false will set the specific coords mentioned for the teleport. 1 TELEPORT 0 100 0 0 0 0 true true true true true false
UNSET_FLAG [flagname] None This action will remove the flag specified by [flagname] on the character's data. 0 UNSET_FLAG temporaryflag
XP_GIVE {levels}
{amount}
Can use either option or both, however at least one should have a value and the other can be set with - This action will award the player with the amount of {levels} and/or {amount} in Player Experience points (Not Pokemon Experience). 2 XP_GIVE 10 -


Putting it all together

Now it's time to put all the information explained above together into a quest for the mod to understand and provide to the player. Feel free to follow the examples below directly, or change them up to fit your design, as long as they still follow the base guidelines provided above.

DIALOGUE setup

When using dialogue interactions within your quest, this will require strings be setup within the DIALOGUE objective. In the "strings": {} section at the bottom of the quest you will provide the data that these values will reference.

Let's start with setting up a Dialogue to have an NPC request help from a player, where the player can choose to accept or deny the quest. "DIALOGUE c28baec2-da17-11ed-afa1-0242ac120002 npcName start startYes startNo"

We can also use the DIALOGUE action to feed back additional information to the player on the same stage after they make their choice. This way we don't have to use up another stage just to feed another dialogue. If you do have a bit of lore to provide at the start, you can use a combination of objective and action DIALOGUE setups to continually feed information to the player, however we'll keep the examples short and sweet.

Show Example


String Name Description
npcName This string will hold the name of the NPC the player is interacting with, and will be shown at the top left of the Dialogue window.
start This string will hold the bulk message that the NPC has to give the player in the Dialogue box.
startYes This string will hold the text displayed in the first option at the top for the player to select a response.
startNo This string will hold the text displayed in the second option next in line for the player to select a response.

The strings npcName, start, startYes, startNo, etc used above are just examples. You are free to setup your strings however you like, as long as they match between your DIALOGUE objectives/actions and your "strings":{} section.

For example: DIALOGUE NPC npcName dialogue10 replya10 replyb10 to setup Dialogue and two Responses for stage 10 by setting "dialogue10": "", "replya10": "", and "replyb10": "" down in your "strings": {}

If you noticed in the example how we only have 1 SET_STAGE action, this is because we are making it so that if the player says they are busy (triggering the NPC_RESPOND ?NPC? 1), it triggers the Actions with Executor 4, providing the refused text response. We don't set another SET_STAGE here as leaving it open ended will keep it on the same stage, as the quest recognizes the other that can only trigger if the player chooses to accept the quest. This way the player can actually go back to the NPC and talk to them again and choose to accept it.

Defeating Pokemon

For this example, we'll setup a stage that requires the Player to defeat some Pokemon to progress. We will use Inserters to provide some randomized selection so different players will get different results in their quests.

Show Example


Pokemon Inserters will put the selected information into the values listed, which can be referenced in your strings at the bottom of your quest, as well as certain actions.

Value Result
[STRING]_S Species
[STRING]_T Type
[STRING]_N Nature
[STRING]_G Growth

Quest data can be referred to by the MESSAGE action and quest strings using the placeholder ?[STRING]_{option}?. For example: ?POKE_S? would display the Pokémon species generated by the inserter DEX_VALUES_INSERTER DEX 1-151 any any.

The above example also makes use of the ?NAME? value in the MESSAGE assuming the quest also used the NAME_INSERTER like the other example above discussing DIALOGUE setups.

You may also notice this example makes use of the # value to track the count of Pokemon defeated on the applicable stage objective. So if the player is given a value of 12, the description will start by saying "defeat 12". After one of the selected Pokemon are defeated, it will decrease that count to show "defeat 11"

Rewards and Completion

Once you have done the main body of your quest, and the bulk of the mission is done, if you started by having the player interact with an NPC, usually they'll end by following up with that NPC.

Once the player has followed up with the NPC, we can move into a stage that provides the final rewards, whether it be XP, Items, or Pokemon!

Show Example


Similar to above examples, we have reused the ?NAME? value to continue using the NPC's name, and shared the same ?NPC? for the UUID to find the same NPC that we started the quest with.

Along with that, we are using a String inserter, as well as an Integer Inserter to randomize an amount of Diamonds to reward the Player, and also select a randomized Apricorn type and give 10 of that Apricorn to the Player.

Finally, after they've also been given their XP reward, the COMPLETE_QUEST action will trigger and mark the quest complete. This places the quest log into the 'History' section of the quest GUI, and shows the description labeled in "desc-X": "".

If the quest is repeatable, then the inserter on the beginning stage will then start having a chance to insert on another NPC so the player can complete the quest again for further rewards. Here is what the quest should look like as a complete example!

Completed Example


This is just a small sample of what you can do with quests. There are of course many Objectives and Actions above that can be combined and used in multiple ways. Get creative, and of course share your creation with others!

© 2012 - 2024 Pixelmon Mod