Skip to content

Custom Quests

MagmaGuy edited this page Jan 24, 2022 · 12 revisions

Table of contents

Creating Custom Quests

As of EliteMobs 7.3.10, it is possible for admins to create EliteMobs quests. The following is a comprehensive guide on the various features of these quests, as well as a guide on how to create them yourself.

Example Quest

EliteMobs comes prepackaged with a test_quest.yml, which will be analyzed here as a simple quest format to follow.

Custom Quests are in the customquests folder!

test_quest.yml

isEnabled: true
customObjectives:
- KILL_CUSTOM:filename=test_boss.yml:amount=1
customRewards:
- filename=magmaguys_toothpick.yml:amount=1:chance=1
name: Kill the Test Boss
questLore: '&cEnd the test boss'' reign of terror!'

Mandatory configuration fields

Not all configuration fields are mandatory when creating quests, but the following are:

isEnabled

isEnabled: true Sets whether the quest is enabled or not. This allows admins to quickly turn quests off and on.

customObjectives

customObjectives Sets the list of objectives a quest has. Quests should have at least one objective, and have no upper limit. These are added as a String List, which you can read about in the config section of this wiki.

Custom Objectives are constructed using the following format:

  1. - KILL_CUSTOM, - FETCH_ITEM or - DIALOG: Used to set the type of objective this represents. KILL_CUSTOM indicates the quest involves killing a specific Custom Boss, FETCH_ITEM indicates that the quest involves getting a specific Custom Item and DIALOG indicates that the quest involves talking to an NPC.
  2. filename=your_filename_here.yml : Used to set the file name of the Custom Boss or the Custom Item that the player has to kill / obtain.
  3. amount=x : Used to set the amount of Custom Bosses that must be killed or items that must be obtained.
  4. dialog=x : Used to set the dialog of the NPC the player talks to.
  5. name=x: Used to set the name of the quest objective, be it an NPC or a custom item. For visual purposes only.

Please note that every Custom Objective field is separated with a : !

customRewards

customRewards Sets the list of rewards a quest has. Quests should ideally have at least one, though it is not mandatory. 

Custom Rewards are constructed using the following format:

Vanilla Items:

  1. material=X : Sets the material of the item that will be dropped. This requires using the right Spigot API names!
  2. amount=X : Sets the amount of items of this material type to drop
  3. chance=X.Y : Sets the chance of this reward dropping, where 1 = 100% , 0 = 0% and 0.5 = 50%

Custom Items:

  1. filename=X.yml : Sets the filename of the Custom Item that will drop.
  2. amount=X : Sets the amount of items of this material type to drop
  3. chance=X.Y : Sets the chance of this reward dropping, where 1 = 100% , 0 = 0% and 0.5 = 50%

Commands:

  1. command=$player (...) : Sets the command that will run upon quest completion. Uses the placeholder $player which will be replaced of the name of the player that completed the quest.
  2. amount=X : Sets the number of times the command will run
  3. chance=X.Y : Sets the chance of the command running, where 1 = 100% , 0 = 0% and 0.5 = 50%

name

name Sets the name of the quest. This will be used in GUIs such as the quest menu to let players know which quest they're doing.

questLore

questLore sets the lore of the quest that the player will be doing. This will be displayed in menus such as the quest menu and should be used to add flavor to a quest or justify the quest objectives.

Optional configuration fields

questAcceptPermission

questAcceptPermission Sets the permission that a player must have in order to accept a quest. If the player does not have the permission, they will not be able to open the menu associated to this quest.

questLockoutPermission

questLockoutPermission Sets the permission that will be assigned to the player at the end of a quest, which once given will prevent the player from accepting the same quest again similar to how questAcceptPermission works.

questLockoutMinutes

questLockoutMinutes Sets the amount of time, in minutes, before the questLockoutPermission's permission is removed and the player is allowed to once again accept the quest.

temporaryPermissions

temporaryPermissions Sets the list of permissions that the player will be given when accepting the quest, and which will be removed once they complete the quest.

questAcceptDialog

questAcceptDialog Sets the list of chat message which will be posted in the player's chat after they accept the quest.

questCompleteDialog

questCompleteDialog Sets the list of chat messages which will be posted in the player's chat once they complete the quest.

questCompleteCommands

questCompleteCommands Sets the list of commands which will run once the player completes the quest. Accepts the following placeholders: $player (replaced with the player's name), $getX, $getY, $getZ (replaced with the X Y Z coordinates of the player)

turnInNPC

turnInNPC Sets the filename of the NPC where the quest must be turned in. Players will not be able to turn the quest in with the original quest giver, only with the target NPC set here.

questLevel

questLevel = 0 Sets the level of the quest. This changes the level of the loot when it is generated through the limited and scalable loot types. Does not affect fixed items. Does not block players from accepting the quest.

trackable

trackable = true Sets whether a quest can be tracked using the quest tracker.

Clone this wiki locally