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 "Shopkeeper"

From Pixelmon Wiki
(Fixed broken youtube link)
 
(25 intermediate revisions by 7 users not shown)
Line 11: Line 11:
 
Regardless of type, all main shopkeepers sell [[Poké Balls]], [[Great Balls]], and [[Ultra Balls]]. Some types of main shopkeepers will also sell a reduced selection of items that they do not specialize in.
 
Regardless of type, all main shopkeepers sell [[Poké Balls]], [[Great Balls]], and [[Ultra Balls]]. Some types of main shopkeepers will also sell a reduced selection of items that they do not specialize in.
 
===Secondary shopkeepers===
 
===Secondary shopkeepers===
Secondary shopkeepers specialize in a single type of Pixelmon [[item]] and do not sell any  other items unrelated to this specialty. There are two types of secondary shopkeepers.
+
Secondary shopkeepers specialize in a single type of Pixelmon [[item]] and do not sell any  other items unrelated to this specialty. There are three types of secondary shopkeepers.
 
#[[TMs]]
 
#[[TMs]]
 
#[[Mail]]
 
#[[Mail]]
Buying from the mail shopkeeper is the only way to obtain mail legitimately.
+
#[[Curry|Curry Ingredients]]
 +
 
 +
===Spawn shopkeepers===
 +
Spawn shopkeepers randomly spawn throughout the world in certain [[biomes]]. There are no spawn shopkeepers by default, but custom ones can be defined in the NPC JSON files (as detailed [[Shopkeeper#Customization|below]]).
 
==Locations==
 
==Locations==
Shopkeepers are found in [[Poké Marts]], which only spawn within [[towns]]. Each Poké Mart always has one main shopkeeper and one secondary shopkeeper.
+
*Main and secondary shopkeepers are found in [[Poké Marts]], which only spawn within [[towns]]. Each Poké Mart always has one main shopkeeper and one secondary shopkeeper.
 
==Stock==
 
==Stock==
 
Shopkeepers do not always sell the same items. Every ''Minecraft'' day, they refresh their stocks with a new random selection of items from the possible items they can sell. However, shopkeepers will never change their types.
 
Shopkeepers do not always sell the same items. Every ''Minecraft'' day, they refresh their stocks with a new random selection of items from the possible items they can sell. However, shopkeepers will never change their types.
Line 29: Line 32:
 
Shopkeepers may be spawned and edited 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 and edited 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 (such as the items they stock), their JSON files must be edited. In order to access these files, the "useExternalNPCFiles" setting must be enabled in the [[pixelmon.hocon]] file. When Pixelmon is initialized after enabling this setting, a folder named "npcs" will appear in the game directory folder.
+
In order to edit shopkeepers further (such as the items they stock), their JSON files must be edited. In order to access these files, the "useExternalJSONFilesNPCs" setting must be enabled in the [[pixelmon.hocon]] file. When Pixelmon is initialized after enabling this setting, a folder named "pixelmon" will appear in the game directory folder, with an "npcs" folder inside of it.
 
 
Within the "npcs" folder are several JSON files for editing [[NPCs]]. The following files are used to edit shopkeepers:
 
===npcs.json===
 
The "shopKeepers" array can be modified to add new shopkeepers or remove existing ones.
 
===shopItems.json===
 
This is a list of item IDs for items that are possible to buy from or sell to shopkeepers, along with the base buying price and the selling price of the item.
 
 
 
Existing buy and sell prices for items can be modified. Items can also be removed from the list, although removing an item with a buy price also necessitates the removal of the item from all shopkeepers who offer the item in question.
 
  
Additional items can be added to the list, including from vanilla ''Minecraft'' and from other mods. An item only needs to have a buy price if the item can be bought from a shopkeeper; otherwise, it is only necessary to define a sell price. A sample JSON entry for a typical item (a [[Poké Ball]] in this case) is shown below.
+
Within the "npcs" folder are several JSON files for editing shopkeepers. More details about the JSON files can be found [[External JSON files#NPCs|here]].
{
 
      "name": "pixelmon:item.Poke_Ball",
 
      "buy": 200,
 
      "sell": 100
 
}
 
  
Custom names, custom damage values, or NBT tags may be appended to items using the "id", "itemData", and "nbtData" fields respectively. Below is a sample JSON entry that uses all of the fields that can be used in the JSON.
+
===Video tutorial===
{
+
The following is a video tutorial explaining the basics of shopkeeper editing.
    "id": "sprucePlanksLore",
+
<youtube>Ej1pYXEwhOU</youtube>
    "name": "minecraft:planks",
 
    "itemData": 1
 
    "nbtData": "{display:{Lore:[\"Wooden planks\"]}}",
 
    "buy": 5,
 
    "sell": 2
 
  }
 
  
===shopKeepers folder===
+
----
Within this folder are details about all types of shopkeepers. To modify the items sold by the shopkeepers, only the files suffixed with "en_us" should be modified; the other files are for different languages and are only used to change the dialogue and possible names of the shopkeepers.
 
 
 
There are several fields that can be modified within these shopkeeper files. Any additional shopkeepers should follow the format of the existing shopkeeper files.
 
*"data": This defines the spawning type of the shopkeepers; this can be either "PokemartMain" or "PokemartSecond". The "Spawn" shopkeeper is currently not used.
 
*"textures": All possible skins for the shopkeeper are defined in this list. Any existing textures from assets/pixelmon/textures/steve can be used here, and a resource pack may also place skins at this location for custom skins to be used.
 
*"names": This is a list of possible names for the shopkeeper. These names are displayed when talking to the shopkeeper.
 
*"chat": This is a list of possible greetings and parting phrases for the shopkeeper. The messages should be paired together in a single object.
 
*"items": This is a list of the items that can be sold by the shopkeeper.
 
**The "name" field contains the item ID of the item to sell and is the only required field.
 
**The "multi" field is a multiplier that allows the particular shopkeeper type to offer an item for more or less than its base price as defined in the "shopItems.json" file.
 
**The "rarity" field defines the chance (from 0 to 1) of the item appearing in the shopkeeper's stock each day. Leaving out this field causes the item to always appear in the shopkeeper's stock.
 
A sample shopkeeper item (an [[Ultra Ball]] with a price multiplier and a rarity) is shown below.
 
{
 
      "name": "pixelmon:item.Ultra_Ball",
 
      "multi": 1.1,
 
      "rarity": 0.7
 
}
 
  
 
==Skins==
 
==Skins==
 
===Main shopkeepers===
 
===Main shopkeepers===
 
<gallery>
 
<gallery>
ShopkeeperMain1.png
+
ShopkeeperMain1.png|Shop Man
ShopkeeperMain2.png
+
ShopkeeperMain2.png|Shop Man 2
ShopkeeperMain3.png
+
ShopkeeperMain3.png|Shop Man 3
ShopkeeperMain4.png
+
ShopkeeperMain4.png|Shop Man 4
ShopkeeperMain5.png
+
ShopkeeperMain5.png|Shop Man 5
ShopkeeperMain6.png
+
ShopkeeperMain6.png|Shop Lady 3
ShopkeeperMain7.png
+
ShopkeeperMain7.png|Shop Lady 4
 
</gallery>
 
</gallery>
 
===Secondary shopkeepers===
 
===Secondary shopkeepers===
 
<gallery>
 
<gallery>
ShopkeeperSecondary1.png
+
ShopkeeperSecondary1.png|Shop Lady
ShopkeeperSecondary2.png
+
ShopkeeperSecondary2.png|Shop Lady 2
ShopkeeperSecondary3.png
+
ShopkeeperSecondary3.png|Shop Second Man
 
</gallery>
 
</gallery>
 +
===Spawn shopkeepers===
 +
<gallery>
 +
SpawnTrader.png|Spawn Trader
 +
GnomeTrader.png|Gnome Trader
 +
</gallery>
 +
 
==[[Config]] settings==
 
==[[Config]] settings==
 
*"spawnPokeMarts": This setting allows [[Poké Marts]] to spawn in [[towns]]. Disabling this will cause shopkeepers to be unavailable except by spawning them with an [[NPC editor]].
 
*"spawnPokeMarts": This setting allows [[Poké Marts]] to spawn in [[towns]]. Disabling this will cause shopkeepers to be unavailable except by spawning them with an [[NPC editor]].
<!--*"useExternalNPCFiles": This setting allows shopkeeper items and prices to be modified with JSON files in the "npcs" folder.-->
+
*"useExternalNPCFiles": This setting allows shopkeeper items and prices to be modified with JSON files in the "npcs" folder.
 +
==See also==
 +
*[[Shopkeeper/Sell prices]]
 +
*[[Shopkeeper/Stock]]
 +
[[Category:NPCs]]

Latest revision as of 12:54, 22 April 2022

Buying items from a shopkeeper

A shopkeeper is a type of NPC who players can buy Pixelmon items from in exchange for PokéDollars. Players can also sell Pixelmon items to shopkeepers for PokéDollars, although this amount of PokéDollars will always be less than the PokéDollars required to buy the item from the shopkeeper.

Types

There are several types of shopkeepers, each stocking different types of items. These types are split into two main subcategories.

Main shopkeepers

Main shopkeepers sell staple Pixelmon items such as Poké Balls and medicine. There are three types of main shopkeepers, each specializing in different types of items.

  1. Medicine
  2. Poké Balls, drinks (Fresh Water, Soda Pop, etc.)
  3. Battle items (X Attack, X Defense, etc.), herbal medicine (Energy Root, Revival Herb, etc.)

Regardless of type, all main shopkeepers sell Poké Balls, Great Balls, and Ultra Balls. Some types of main shopkeepers will also sell a reduced selection of items that they do not specialize in.

Secondary shopkeepers

Secondary shopkeepers specialize in a single type of Pixelmon item and do not sell any other items unrelated to this specialty. There are three types of secondary shopkeepers.

  1. TMs
  2. Mail
  3. Curry Ingredients

Spawn shopkeepers

Spawn shopkeepers randomly spawn throughout the world in certain biomes. There are no spawn shopkeepers by default, but custom ones can be defined in the NPC JSON files (as detailed below).

Locations

  • Main and secondary shopkeepers are found in Poké Marts, which only spawn within towns. Each Poké Mart always has one main shopkeeper and one secondary shopkeeper.

Stock

Shopkeepers do not always sell the same items. Every Minecraft day, they refresh their stocks with a new random selection of items from the possible items they can sell. However, shopkeepers will never change their types.

Shopkeeper prices are not always the same for an item. The shopkeeper may randomly choose to increase or decrease the price of an item by 10% for the day. Some types of shopkeepers also further reduce or increase the prices of certain items compared to other types of shopkeepers. However, the price of the item will never fall below the amount of PokéDollars gained from selling the item to the shopkeeper.

A list of possible items for each type of shopkeeper can be found here.

Pixelmon items can be sold to shopkeepers regardless of which items they stock. A list of selling prices for items can be found here.

Customization

Editing a shopkeeper with an NPC editor

Shopkeepers may be spawned and edited 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 (such as the items they stock), their JSON files must be edited. In order to access these files, the "useExternalJSONFilesNPCs" setting must be enabled in the pixelmon.hocon file. When Pixelmon is initialized after enabling this setting, a folder named "pixelmon" will appear in the game directory folder, with an "npcs" folder inside of it.

Within the "npcs" folder are several JSON files for editing shopkeepers. More details about the JSON files can be found here.

Video tutorial

The following is a video tutorial explaining the basics of shopkeeper editing.


Skins

Main shopkeepers

Secondary shopkeepers

Spawn shopkeepers

Config settings

  • "spawnPokeMarts": This setting allows Poké Marts to spawn in towns. Disabling this will cause shopkeepers to be unavailable except by spawning them with an NPC editor.
  • "useExternalNPCFiles": This setting allows shopkeeper items and prices to be modified with JSON files in the "npcs" folder.

See also

© 2012 - 2025 Pixelmon Mod