Skip to main content

Creating NPCs

webapp_banner.jpg

Configuration settings

isEnabled

Sets if an NPC is enabled.

KeyValuesDefault
isEnabledBooleantrue
Example
isEnabled: true

name

Sets the display name of an NPC. Supports Color Codes and translation keys for multi-language servers.

KeyValuesDefault
nameStringnone
Example
name: "&aEnn Peecee"

create_npc_name.jpg


scale

Sets the scale (size) of the NPC.

KeyValuesDefault
scaleMultiplier1.0

When scaling, 1.0 represents the default size. To make the entity larger, increase the value (e.g., 1.2). To make the entity smaller, decrease the value (e.g., 0.8).

Example
scale: 1.2

role

Sets the role of the NPC, under the name. Only visual. Supports Color Codes and translation keys for multi-language servers.

KeyValuesDefault
roleStringnone
Example
role: "&c<Red Fellow>"

create_npc_role.jpg


profession

Sets the profession of the NPC, which sets its skin when not using a disguise.

KeyValuesDefault
professionProfessionNITWIT
Example
profession: NITWIT

create_npc_profession.jpg


greetings

Sets the list of greeting the NPC says when a player approaches. Supports translation keys for multi-language servers.

KeyValuesDefault
greetingsString Listnone
Example
greetings:
- Hi there!
- Good day.

create_npc_greetings.jpg


dialog

Sets the dialog the NPC will say while a player is nearby (In case of the DIALOG interactionType, this would be the dialog). Supports translation keys for multi-language servers.

KeyValuesDefault
dialogString Listnone
Example
dialog:
- I like apples!
- Sure is hot.

create_npc_dialog.jpg


farewell

Sets the farewell message of the NPC. Supports translation keys for multi-language servers.

KeyValuesDefault
farewellString Listnone
Example
farewell: 
- Until next time!
- Bye!

create_npc_farewell.jpg


canTalk

Sets if the NPC can talk.

KeyValuesDefault
canTalkBooleantrue
Example
canTalk: true

activationRadius

Sets the radius at which an NPC can detect a player approaching.

KeyValuesDefault
activationRadiusDouble3.0
Example
activationRadius: 3.0

interactionType

Sets the type of interaction the NPC will do.

KeyValuesDefault
interactionTypeSpecial [1]none
Example
interactionType: TELEPORT_BACK

noPreviousLocationMessage

When a Teleporter NPC has no previous location it can teleport a player to, it will display this message. Accepts Color Codes and translation keys for multi-language servers.

KeyValuesDefault
noPreviousLocationMessageStringnone
Example
noPreviousLocationMessage: '&8[EliteMobs] &cCouldn''t send you back to your previous location - no previous location found!'

create_npc_noteleportlocation.jpg


timeout

Sets the amount of time, in minutes, before an NPC vanishes permanently.

KeyValuesDefault
timeoutInteger0 (never)
Example
timeout: 0

questFileName

Sets the quests the NPC gives.

KeyValuesDefault
questFileNameString Listnone
Example
questFileName:
- my_quest_one.yml
- my_quest_two.yml

disguise

Sets the LibsDisguises disguise the NPC has.

KeyValuesDefault
disguiseLibsDisguises formatnone
Example
disguise: SKELETON

create_npc_disguise.jpg


customDisguiseData

Sets the data for a custom LibsDisguises disguise.

KeyValuesDefault
customDisguiseDataLibsDisguises formatnone
Example
disguise: custom:my_cool_disguise_name
customDisguiseData: player my_cool_disguise_name setskin {"id":"364acb6d-9050-46f7-b5fb-f8c3fd83a6fc","name":"Unknown","properties":[{"name":"textures","value":"ewogICJ0aW1lc3RhbXAiIDogMTYxMTk4ODA4Nzc1NSwKICAicHJvZmlsZUlkIiA6ICJkZGVkNTZlMWVmOGI0MGZlOGFkMTYyOTIwZjdhZWNkYSIsCiAgInByb2ZpbGVOYW1lIiA6ICJEaXNjb3JkQXBwIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzliYmVkODQzNWY4YmYyNzhhZmUyNmU2NGZkOTI2YjhiMzc3MzJkODhlMzM0ODk3ZGJkNTI3ZDU2ZmY5MTk5MGUiCiAgICB9CiAgfQp9","signature":"ujLq1joYVktuQAp1xpFKlxQFUVinSePiDBiVCAxxix/mA5vP86i/eAOfb1mtGjaAZ6sO0l2olbzvycnGXNBtbAxgqprguROXY4tpWiePVTDmy3iD4GdOCxHAkYLoyMV5qTT4SNsldUFFuND8GSEgbNMltKDLmhNKwzm08iCigPfpeuYpwljgJPxu6ka54PKNaQu4doI0ZDZXKqq4hPhR3Bs2Sz9MI0SmdmQWwcCzUz3DFdVno27fmQ6LwqmT+eSoOv0EttVG/XMaTYQ5lhBY61mqf6WlJyYVUSfjJk1AbYsctu7dWM+sbY8jFq5ljvXJGGr5TyKi+fs8vHy06Z2go20QgTYOw+caFxFijAS6fgm3oY57VEO/+/9OLHdD+Z9BrWqQWcIIrVeIfxjue/yt4pyeVv9jX59hjNFjhcPEwotkxJ+vZ96WlTLWDG4BiqauDr2VeGyLlVaygO9ZU0wwsN65iSh91GI3tMIA5wbDR0Hts/9ABvt9eafHbowS+4SZXN0i9mYnKg7op1eiB8nMEAGsPJg3DwsmUrh3ACAapQ6eYHiJpo59RXDqKlRcXwo7wsEFp//5LgQWbPj0NP3nxnywdpozqSAeq6236qlhE9BT9eiyJ41V9sMelYFEWMlUAltR40NdbIrHB0J3nmfuLJz44/sTwWf6P1khOy//XX0="}],"legacy":false}

create_npc_custom_disguise.jpg


customModel

Sets the ModelEngine custom model the NPC will use.

KeyValuesDefault
customModelStringnone
Example
customModel: MY_MODEL_ONE

arena

Sets the filename of the arena the NPC will open a menu for (requires the ARENA_MASTER interactionType).

KeyValuesDefault
arenaFilenamenone
Example
arena: my_arena.yml

command

Sets the command the NPC will run (requires COMMAND interactionType). Commands are executed as console commands, not as the player. Do not include the leading slash (/).

KeyValuesDefault
commandStringnone
Example
command: say Look at me running a command, how cool!

create_npc_command.jpg


spawnLocation

Sets the spawn location of the NPCs. You should set this through the /em spawnnpc <npcfilename.yml> command.

KeyValuesDefault
spawnLocationStringnone
Example
spawnLocation: my_world,10,50,10,0,0

spawnLocations

Sets the spawn locations of the NPCs. You should set this through the /em spawnnpc <npcfilename.yml> command.

KeyValuesDefault
spawnLocationsString Listnone
Example
spawnLocations: 
- my_world,10,50,10,0,0
- my_world,-10,50,-10,0,0

instanced

Sets if the NPC should be instanced (for use in instanced dungeons). When set to true, the NPC is automatically cloned for each dungeon instance, with each clone existing in the corresponding instance world.

KeyValuesDefault
instancedBooleanfalse
Example
instanced: false

NPC Config Example
isEnabled: true
name: "&cRed Rubin"
role: "&a<Generic NPC>"
profession: NITWIT
greetings:
- Hiya!
- Hello!
dialog:
- Great conversation!
- Pleasure talking with you!
farewell:
- Goodbye!
- Laters!
canTalk: true
activationRadius: 4
interactionType: CHAT
timeout: 0
questFileName:
- my_quest.yml #npc interactionType must be set to CUSTOM_QUEST_GIVER
disguise: SKELETON
customDisguiseData: #used when a custom libsdisguise is being set
customModel: MODEL_ONE
arena: my_arena.yml #npc interactionType must be set to ARENA_MASTER
command: /say Hello World! #npc interactionType must be set to COMMAND
spawnLocation: my_world,584,55,127,90,10 #remember that NPCs use pitch and yaw to set where they are looking at. this is also automatically set when running the /em spawnnpc <npcfilename.yml> command, so make sure you pose where you want the NPC to be facing when running the command.

create_npc_npc.jpg


Special [1]

The following is the list of valid NPC interaction types:

TypeDescription
GUILD_GREETEROpen the adventurer's guild menu
CHATRight-clicking cycles through the dialog
CUSTOM_SHOPOpens the custom shop menu
PROCEDURALLY_GENERATED_SHOPOpens the procedurally generated shop
BAROpens the bar menu
ARENAOpens the arena menu
QUEST_GIVEROpens the procedurally generated quests menu
CUSTOM_QUEST_GIVEROpens the quest menu for a specific quest set in questFileName
NONENo interactions
SELLOpens the sell menu
TELEPORT_BACKTeleports players back to the last non-elitemobs world location they were
SCRAPPEROpens the scrap menu
REPAIRMANOpens the repair menu
ENCHANTEROpens the enchant menu
REFINERDEPRECATED - Feature removed, do not use
UNBINDEROpens the unbind menu
ARENA_MASTEROpens the arena menu for the arena set in arenaFilename
COMMANDRuns the command set in command
SCROLL_APPLIERApplies elite item scrolls to items

For more information on what the SCRAPPER and similar interaction types do click here.

NPC Behavior Notes

NPCs have several hardcoded behaviors that cannot be configured:

  • AI Disabled: NPCs cannot move autonomously. They remain at their spawn location.
  • Role Display: The role text is displayed on an invisible armor stand above the NPC at a fixed height.
  • Dialogue Cooldown: NPCs wait 3 seconds between speech events to prevent overlapping messages.
  • Chunk Lifecycle: NPCs despawn when their chunk unloads and respawn when it reloads.