Join our discord
In partnership with NodeCraft Logo NodeCraft


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

Difference between revisions of "NPC Editor"

From Pixelmon Wiki
(Linked IVs page)
(Updated the page with 1.20.2 info while preserving the 1.16.5 info)
 
Line 2: Line 2:
 
An NPC editor is an [[item]] that is used to create and edit various types of [[NPCs]]. Its inventory sprite resembles ''Minecraft'''s Steve.
 
An NPC editor is an [[item]] that is used to create and edit various types of [[NPCs]]. Its inventory sprite resembles ''Minecraft'''s Steve.
  
When used on the ground, it will present a choice of which type of NPC to create. When used on an existing NPC (except for a Move Relearner, Nurse, Doctor or Old Fisherman), it will open a GUI where the NPC can be edited or deleted. NPC editors can only be used by players in Creative mode. On a server with a permissions manager, the <code>pixelmon.npceditor.use</code> permission node is required to use an NPC editor.
+
NPC editors can only be used by players in Creative mode.
  
==NPC types==
+
==NPCs in 1.20.2==
===[[NPC Trainer]]===
+
As of 9.2.7, all of the different variants of Pixelmon NPCs have been merged into a single NPC entity <code>pixelmon:npc</code>. Therefore, the separate NPC types such as the NPC Trainer, Shopkeeper, Chatting NPC, etc., are no longer relevant.
 +
 
 +
===Usage===
 +
When used on the ground, the [[NPC Editor]] will present a menu allowing the player to start the creation of a new NPC. When used on an existing NPC, it will open a GUI where the NPC can be edited or deleted. NPCs can be quickly deleted by sneaking and then using the NPC Editor on an NPC. Punching a block with the NPC Editor will open the ''Tracked NPCs'' screen.
 +
 
 +
===Creating an NPC===
 +
A player may create a new NPC by using the [[NPC Editor]] on the ground.
 +
 
 +
Upon doing so, a screen will appear titled ''NPC Creator'' with a subtitle ''Presets''. Below the subtitle is a textbox that allows the player to search among the presets of NPCs available. '''NPC Presets''' are located in the <code>resources/data/pixelmon/pixelmon/npc/preset</code> directory. Selecting a preset will create a new NPC with the appearance, interactions, and properties that is has defined in its .json file. In the top-left corner of the screen, is the ''Clipboard'': a list of NPCs, displayed as the entity's UUID and the entity's name, that have been copied from previously existing NPCs. Selecting an option from the ''Clipboard'' will create a new NPC identical to the selected NPC.
 +
 
 +
===Editing an NPC===
 +
NPCs can be edited by using the [[NPC Editor]] on an already existing NPC entity, which will open a screen with the following tabs, each allowing the user to change different attributes of the NPC:
 +
 
 +
====Utilities====
 +
Here the user can copy the NPC, paste the values of another copied NPC to this one, and adjust the NPC's position in the world.
 +
 
 +
Utility Buttons:
 +
*Copy
 +
*Paste
 +
*TP Here - Teleports the NPC to the user's position.
 +
*TP To - Teleports the user to the NPC's position.
 +
*Center - Positions the NPC in the center of the block it is on.
 +
*Corner - Positions the NPC on the northwest corner of the block it is on.
 +
 
 +
There are additionally text boxes to adjust the NPCs X, Y, and Z coordinates, as well as its Pitch and Yaw. Changes to those values will not take affect until the player clicks the '''Teleport''' button.
 +
 
 +
====Appearance====
 +
*Name
 +
*Display Type
 +
**The <code>pixelmon:player</code> option sets the NPC to use the same model that player entities do.
 +
**The <code>pixelmon:pixelmon</code> option sets the NPC to display as a Pokémon and allows the user to select from more attributes to customize the Pokémon the NPC will appear as.
 +
*Slim - Adjusts how wide the NPCs arms are when it uses a player model.
 +
**<code>Not Slim</code>
 +
**<code>Slim</code>
 +
*Display Type - How the NPCs texture is obtained. This option is not available when the NPC is displayed as a Pokémon.
 +
**The <code>pixelmon:fallback</code> option allows the NPC to use a [[skin that was added by Pixelmon]] or added to the server files.
 +
***Texture - The texture that is to be used.
 +
***Fallback Texture - A texture that will be used should the above texture fail.
 +
**The <code>pixelmon:url</code> option and the <code>pixelmon:player_skin_url</code> allows the NPC to use a player skin that can be downloaded from online and provides the two options below.
 +
***Texture URL - A hyperlink to a skin that the NPC should use. The default link provided is http://textures.minecraft.net/texture/f3daeb9dad2cc314980175da9d6e97f7bfe1df20730e02e26eb34dfa110efe40
 +
***Texture Location - A skin that should be on the server, in the even the URL fails. The default value is <code>pixelmon:random/texture_that_will_always_exist</code>
 +
 
 +
====Interactions====
 +
Interactions are a complex system that follow the following format:
 +
# An '''Event''' happens.
 +
# A '''Condition''' is checked.
 +
# If the '''Condition''' above passes, a '''Result''' occurs.
 +
 
 +
Learn more on the [[Interactions]] page.
 +
 
 +
====Entity Properties====
 +
*Child
 +
**<code>Adult</code> sets the NPC to be full height.
 +
**<code>Child</code> sets the NPC to be the same height as a Baby Villager.
 +
**''This property does not apply when the NPC uses a Pokémon's model.''
 +
*Invulnerable
 +
**<code>Vulnerable</code> allows the NPC to be damaged by players.
 +
**<code>Invulnerable</code> prevents the NPC from being damage by players.
 +
*Immovable
 +
**The <code>Moveable</code> allows the NPC to be pushed and knocked around by players, liquids, and other entities.
 +
**The <code>Immoveable</code> keeps the NPC stationed to one spot.
 +
*Nameplate
 +
**The <code>Nameplate</code> option displays the NPCs name above them.
 +
**The <code>No Nameplate</code> option hides the NPCs name.
 +
*Health - The maximum health of the NPC.
 +
*Width - The width of the NPC's hitbox.
 +
*Height - The height of the NPC's hitbox.
 +
*Eye Height - The height from the ground that the NPC views the world from.
 +
 
 +
====Preset====
 +
This tab provides some quick tools for admins to manage '''NPC Presets'''.
 +
 
 +
An text box with a ''Preset'' label as well as 3 buttons provide the following functionality:
 +
*Switch between presets that already exist
 +
*Link an NPC to a preset so that the NPC changes if the preset changes
 +
*Save the current NPC to a new preset.
 +
 
 +
For applying a preset or linking to a preset the text box requires the name of a preset in the following format: <code>namespace:preset_directory\preset_name</code>
 +
 
 +
For example, typing <code>pixelmon:nurse_joy</code> into the text box and selecting the '''Apply Preset''' button will change the current NPC to a Nurse Joy, capable of healing a player's Pokémon if a [[Healer]] machine is nearby.
 +
 
 +
 
 +
==NPCs in 1.16.5==
 +
===NPC types===
 +
====[[NPC Trainer]]====
 
With an NPC editor, NPC Trainers can be customized in the following ways:
 
With an NPC editor, NPC Trainers can be customized in the following ways:
 
*Trainer name
 
*Trainer name
Line 46: Line 130:
 
</gallery>
 
</gallery>
  
===[[Trader]]===
+
====[[Trader]]====
 
[[File:TraderGUI.png|thumb|Editing a [[trader]]]]
 
[[File:TraderGUI.png|thumb|Editing a [[trader]]]]
 
Traders can be customized in the following ways:
 
Traders can be customized in the following ways:
Line 55: Line 139:
 
*Skin
 
*Skin
 
It is also possible to randomize the Pokémon that are offered and requested by the trader.
 
It is also possible to randomize the Pokémon that are offered and requested by the trader.
===[[Chatting NPC]]===
+
====[[Chatting NPC]]====
 
[[File:ChattingGUI.png|thumb|Editing a [[chatting NPC]]]]
 
[[File:ChattingGUI.png|thumb|Editing a [[chatting NPC]]]]
 
A chatting NPC can be customized in the following ways:
 
A chatting NPC can be customized in the following ways:
Line 61: Line 145:
 
*Dialogue (up to four lines)
 
*Dialogue (up to four lines)
 
*Skin
 
*Skin
===[[Move relearner]]===
+
====[[Move relearner]]====
 
Unlike other NPCs, using an NPC editor on a move relearner does not open up an editing GUI. Instead, using an NPC editor on a move relearner is the only way to use a move relearner normally while in Creative mode. Details about how to edit a move relearner's cost can be found on [[Move Relearner|its page]].
 
Unlike other NPCs, using an NPC editor on a move relearner does not open up an editing GUI. Instead, using an NPC editor on a move relearner is the only way to use a move relearner normally while in Creative mode. Details about how to edit a move relearner's cost can be found on [[Move Relearner|its page]].
===[[Move tutor]]===
+
====[[Move tutor]]====
 
[[File:MoveTutorEditor.png|thumb|Editing a [[move tutor]]]]
 
[[File:MoveTutorEditor.png|thumb|Editing a [[move tutor]]]]
 
A move tutor can be customized in the following ways:
 
A move tutor can be customized in the following ways:
Line 69: Line 153:
 
**Costs to teach moves
 
**Costs to teach moves
 
*Skin
 
*Skin
===[[Doctors]]===
+
====[[Doctors]]====
 
Doctors can be spawned with an NPC editor, but they cannot be customized. They can be despawned by left-clicking them with the NPC editor.
 
Doctors can be spawned with an NPC editor, but they cannot be customized. They can be despawned by left-clicking them with the NPC editor.
===[[Shopkeepers]]===
+
====[[Shopkeepers]]====
 
[[File:ShopkeeperEditor.png|thumb|Editing a shopkeeper]]
 
[[File:ShopkeeperEditor.png|thumb|Editing a shopkeeper]]
 
Shopkeepers may be spawned, edited, and despawned with an NPC editor. The shopkeeper type, name, and model can be edited from this interface. The "Refresh Items" button can be used to reload a shopkeeper's stock after changing its type; otherwise, the stock will not change until the beginning of a new ''Minecraft'' day.
 
Shopkeepers may be spawned, edited, and despawned with an NPC editor. The shopkeeper type, name, and model can be edited from this interface. The "Refresh Items" button can be used to reload a shopkeeper's stock after changing its type; otherwise, the stock will not change until the beginning of a new ''Minecraft'' day.
  
 
In order to edit shopkeepers further (e.g., the items they stock), their JSON files must be edited; details about doing this can be found [[Shopkeepers#Customization|here]].
 
In order to edit shopkeepers further (e.g., the items they stock), their JSON files must be edited; details about doing this can be found [[Shopkeepers#Customization|here]].
==Permission nodes==
+
 
*"pixelmon.npceditor.use": Allows a player to use an NPC editor.
+
 
==Skins==
+
===Skins===
 
The skins of Trainers, traders, and tutors can be customized to be multiple built-in skins. External skins can also be used by selecting the "Steve" option, causing a second button to appear with more customization options.
 
The skins of Trainers, traders, and tutors can be customized to be multiple built-in skins. External skins can also be used by selecting the "Steve" option, causing a second button to appear with more customization options.
 
*"Custom Resource Pack" allows a skin to be selected from a currently used resource pack; the skin must be located inside the resource pack at <code>assets/pixelmon/textures/steve</code> and the file name must not contain capitals. ".png" should not be included in this setting unless it's for Chatting NPCs/Quest Givers. It is also possible to access any built-in NPC skin, including those that are not normally used by [[NPC Trainers]].
 
*"Custom Resource Pack" allows a skin to be selected from a currently used resource pack; the skin must be located inside the resource pack at <code>assets/pixelmon/textures/steve</code> and the file name must not contain capitals. ".png" should not be included in this setting unless it's for Chatting NPCs/Quest Givers. It is also possible to access any built-in NPC skin, including those that are not normally used by [[NPC Trainers]].
Line 85: Line 169:
  
 
All of the skins below are labeled by their in-game names, with their file names (used in places such as custom resource pack setting and [[external JSON files]]) in parentheses.
 
All of the skins below are labeled by their in-game names, with their file names (used in places such as custom resource pack setting and [[external JSON files]]) in parentheses.
===Trainers/Traders/Tutors===
+
====Trainers/Traders/Tutors====
 
<gallery>
 
<gallery>
 
SpoiledBrat.png|Spoiled Brat (youngster1)
 
SpoiledBrat.png|Spoiled Brat (youngster1)
Line 134: Line 218:
 
</gallery>
 
</gallery>
  
===Chatting NPCs===
+
====Chatting NPCs====
 
Chatting NPCs have customizable skins, but the possible skins to choose from are different from other NPCs.
 
Chatting NPCs have customizable skins, but the possible skins to choose from are different from other NPCs.
 
<gallery>
 
<gallery>
Line 183: Line 267:
 
</gallery>
 
</gallery>
  
===Shopkeepers===
+
====Shopkeepers====
 
<gallery>
 
<gallery>
 
ShopkeeperMain1.png|Shop Man (shopman)
 
ShopkeeperMain1.png|Shop Man (shopman)
Line 198: Line 282:
 
GnomeTrader.png|Gnome Trader (gnome_trader)
 
GnomeTrader.png|Gnome Trader (gnome_trader)
 
</gallery>
 
</gallery>
===Gym Leaders===
+
====Gym Leaders====
 
Certain [[Gyms]] have Gym Leaders with special skins that are not encountered by default on any other NPCs.
 
Certain [[Gyms]] have Gym Leaders with special skins that are not encountered by default on any other NPCs.
 
<gallery>
 
<gallery>
Line 214: Line 298:
 
WaterLeader2.png|[[Water Gym]] Leader 2 (waterleader2)
 
WaterLeader2.png|[[Water Gym]] Leader 2 (waterleader2)
 
</gallery>
 
</gallery>
===Other===
+
====Other====
 
These skins are not used by any NPCs by default, but are accessible by file name using one of the aforementioned methods.
 
These skins are not used by any NPCs by default, but are accessible by file name using one of the aforementioned methods.
 
<gallery>
 
<gallery>
Line 222: Line 306:
 
FemaleOrnithologist.png|Female Ornithologist (ornithologist_f)
 
FemaleOrnithologist.png|Female Ornithologist (ornithologist_f)
 
</gallery>
 
</gallery>
 +
 +
==Permission nodes==
 +
*"pixelmon.npceditor.use": Allows a player to use an NPC editor.
 +
 +
 
[[Category:Items]]
 
[[Category:Items]]

Latest revision as of 03:33, 25 January 2025

Grid NPC Editor.png

An NPC editor is an item that is used to create and edit various types of NPCs. Its inventory sprite resembles Minecraft's Steve.

NPC editors can only be used by players in Creative mode.

NPCs in 1.20.2

As of 9.2.7, all of the different variants of Pixelmon NPCs have been merged into a single NPC entity pixelmon:npc. Therefore, the separate NPC types such as the NPC Trainer, Shopkeeper, Chatting NPC, etc., are no longer relevant.

Usage

When used on the ground, the NPC Editor will present a menu allowing the player to start the creation of a new NPC. When used on an existing NPC, it will open a GUI where the NPC can be edited or deleted. NPCs can be quickly deleted by sneaking and then using the NPC Editor on an NPC. Punching a block with the NPC Editor will open the Tracked NPCs screen.

Creating an NPC

A player may create a new NPC by using the NPC Editor on the ground.

Upon doing so, a screen will appear titled NPC Creator with a subtitle Presets. Below the subtitle is a textbox that allows the player to search among the presets of NPCs available. NPC Presets are located in the resources/data/pixelmon/pixelmon/npc/preset directory. Selecting a preset will create a new NPC with the appearance, interactions, and properties that is has defined in its .json file. In the top-left corner of the screen, is the Clipboard: a list of NPCs, displayed as the entity's UUID and the entity's name, that have been copied from previously existing NPCs. Selecting an option from the Clipboard will create a new NPC identical to the selected NPC.

Editing an NPC

NPCs can be edited by using the NPC Editor on an already existing NPC entity, which will open a screen with the following tabs, each allowing the user to change different attributes of the NPC:

Utilities

Here the user can copy the NPC, paste the values of another copied NPC to this one, and adjust the NPC's position in the world.

Utility Buttons:

  • Copy
  • Paste
  • TP Here - Teleports the NPC to the user's position.
  • TP To - Teleports the user to the NPC's position.
  • Center - Positions the NPC in the center of the block it is on.
  • Corner - Positions the NPC on the northwest corner of the block it is on.

There are additionally text boxes to adjust the NPCs X, Y, and Z coordinates, as well as its Pitch and Yaw. Changes to those values will not take affect until the player clicks the Teleport button.

Appearance

  • Name
  • Display Type
    • The pixelmon:player option sets the NPC to use the same model that player entities do.
    • The pixelmon:pixelmon option sets the NPC to display as a Pokémon and allows the user to select from more attributes to customize the Pokémon the NPC will appear as.
  • Slim - Adjusts how wide the NPCs arms are when it uses a player model.
    • Not Slim
    • Slim
  • Display Type - How the NPCs texture is obtained. This option is not available when the NPC is displayed as a Pokémon.
    • The pixelmon:fallback option allows the NPC to use a skin that was added by Pixelmon or added to the server files.
      • Texture - The texture that is to be used.
      • Fallback Texture - A texture that will be used should the above texture fail.
    • The pixelmon:url option and the pixelmon:player_skin_url allows the NPC to use a player skin that can be downloaded from online and provides the two options below.

Interactions

Interactions are a complex system that follow the following format:

  1. An Event happens.
  2. A Condition is checked.
  3. If the Condition above passes, a Result occurs.

Learn more on the Interactions page.

Entity Properties

  • Child
    • Adult sets the NPC to be full height.
    • Child sets the NPC to be the same height as a Baby Villager.
    • This property does not apply when the NPC uses a Pokémon's model.
  • Invulnerable
    • Vulnerable allows the NPC to be damaged by players.
    • Invulnerable prevents the NPC from being damage by players.
  • Immovable
    • The Moveable allows the NPC to be pushed and knocked around by players, liquids, and other entities.
    • The Immoveable keeps the NPC stationed to one spot.
  • Nameplate
    • The Nameplate option displays the NPCs name above them.
    • The No Nameplate option hides the NPCs name.
  • Health - The maximum health of the NPC.
  • Width - The width of the NPC's hitbox.
  • Height - The height of the NPC's hitbox.
  • Eye Height - The height from the ground that the NPC views the world from.

Preset

This tab provides some quick tools for admins to manage NPC Presets.

An text box with a Preset label as well as 3 buttons provide the following functionality:

  • Switch between presets that already exist
  • Link an NPC to a preset so that the NPC changes if the preset changes
  • Save the current NPC to a new preset.

For applying a preset or linking to a preset the text box requires the name of a preset in the following format: namespace:preset_directory\preset_name

For example, typing pixelmon:nurse_joy into the text box and selecting the Apply Preset button will change the current NPC to a Nurse Joy, capable of healing a player's Pokémon if a Healer machine is nearby.


NPCs in 1.16.5

NPC types

NPC Trainer

With an NPC editor, NPC Trainers can be customized in the following ways:

  • Trainer name
  • Greeting/win/lose message
  • Party Pokémon (Pokémon, levels, moves, Shininess, gender, nickname, growth, Abilities, Natures, held items, EVs, and IVs. Party can also be reset or randomized)
  • Battle AI mode
    • Default: The Trainer will use the battle AI setting for naturally spawning Trainer's as defined in the "battleAITrainer" config setting.
    • Random: The Trainer will use moves randomly.
    • Aggressive: The Trainer will use the move that deals the most damage to the opponent, avoiding status moves.
    • Tactical: The Trainer will know how to use status moves alongside offensive moves.
    • Advanced: Along with knowing how to use moves like tactical AI, the Trainer will switch out Pokémon if advantageous.
  • Movement AI mode
    • Stand still: The Trainer will not move from its current position. It can be challenged by throwing a Pokémon at it.
    • Still and engage: The Trainer will not move from its current position. It will challenge players that cross its line of sight.
    • Wander: The Trainer will wander around randomly. It can be challenged by throwing a Pokémon at it.
    • Wander and engage: The Trainer will wander around randomly. It will challenge players that cross its line of sight.
  • Boss mode (Level scaling)
    • Not boss: The levels of the Trainer's Pokémon will remain constant and can be specified when editing the Trainer's Pokémon.
    • Equal: The levels of the Trainer's Pokémon will be set to the level of the challenging player's highest leveled Pokémon.
    • Common (Uncoloured boss): The levels of the Trainer's Pokémon will be set to 5 levels above the highest leveled Pokémon in the challenging player's party.
    • Uncommon (Green boss): The levels of the Trainer's Pokémon will be set to 10 levels above the highest leveled Pokémon in the challenging player's party.
    • Rare (Blue boss): The levels of the Trainer's Pokémon will be set to 20 levels above the highest leveled Pokémon in the challenging player's party.
    • Haunted (Lavender Boss): The levels of the Trainer's Pokémon will be set to 25 levels above the highest leveled Pokémon in the challenging player's party.
    • Epic (Purple boss): The levels of the Trainer's Pokémon will be set to 30 levels above the highest leveled Pokémon in the challenging player's party.
    • Legendary (Orange Boss): The levels of the Trainer's Pokémon will be set to 40 levels above the highest leveled Pokémon in the challenging player's party.
    • Ultimate (Cyan Boss): The levels of the Trainer's Pokémon will be set to 50 levels above the highest leveled Pokémon in the challenging player's party.
    • Drowned (Teal Boss): The levels of the Trainer's Pokémon will be set to 75 levels above the highest leveled Pokémon in the challenging player's party.
  • Encounter mode
    • Once: The Trainer will disappear after battling a player.
    • Once per player: Each player can only battle the Trainer once.
    • Once per Minecraft day: Each player can only battle the trainer once every Minecraft day.
    • Once per day: Each player can only battle the Trainer once every real day.
    • Unlimited: The Trainer can be challenged an unlimited number of times by each player.
  • Drops (by name or by item ID)
  • PokéDollar winnings (multiplied by the average level of the Trainer's Pokémon)
  • Trainer type/skin

Trader

Editing a trader

Traders can be customized in the following ways:

  • Requested Pokémon
  • Offered Pokémon
  • Skin

It is also possible to randomize the Pokémon that are offered and requested by the trader.

Chatting NPC

Editing a chatting NPC

A chatting NPC can be customized in the following ways:

  • Name
  • Dialogue (up to four lines)
  • Skin

Move relearner

Unlike other NPCs, using an NPC editor on a move relearner does not open up an editing GUI. Instead, using an NPC editor on a move relearner is the only way to use a move relearner normally while in Creative mode. Details about how to edit a move relearner's cost can be found on its page.

Move tutor

Editing a move tutor

A move tutor can be customized in the following ways:

  • Moves
    • Costs to teach moves
  • Skin

Doctors

Doctors can be spawned with an NPC editor, but they cannot be customized. They can be despawned by left-clicking them with the NPC editor.

Shopkeepers

Editing a shopkeeper

Shopkeepers may be spawned, edited, and despawned with an NPC editor. The shopkeeper type, name, and model can be edited from this interface. The "Refresh Items" button can be used to reload a shopkeeper's stock after changing its type; otherwise, the stock will not change until the beginning of a new Minecraft day.

In order to edit shopkeepers further (e.g., the items they stock), their JSON files must be edited; details about doing this can be found here.


Skins

The skins of Trainers, traders, and tutors can be customized to be multiple built-in skins. External skins can also be used by selecting the "Steve" option, causing a second button to appear with more customization options.

  • "Custom Resource Pack" allows a skin to be selected from a currently used resource pack; the skin must be located inside the resource pack at assets/pixelmon/textures/steve and the file name must not contain capitals. ".png" should not be included in this setting unless it's for Chatting NPCs/Quest Givers. It is also possible to access any built-in NPC skin, including those that are not normally used by NPC Trainers.
  • "Custom Player Name" allows any player's skin to be used as the Trainer's skin. The chosen player does not need to be on the server to use the skin.
  • Pixelmon also includes five default custom skins (prisoner, Santa, Scottish, Steve, suit) that are not attributed to any particular Trainer class.

All of the skins below are labeled by their in-game names, with their file names (used in places such as custom resource pack setting and external JSON files) in parentheses.

Trainers/Traders/Tutors

Chatting NPCs

Chatting NPCs have customizable skins, but the possible skins to choose from are different from other NPCs.

Shopkeepers

Gym Leaders

Certain Gyms have Gym Leaders with special skins that are not encountered by default on any other NPCs.

Other

These skins are not used by any NPCs by default, but are accessible by file name using one of the aforementioned methods.

Permission nodes

  • "pixelmon.npceditor.use": Allows a player to use an NPC editor.

© 2012 - 2025 Pixelmon Mod