|
|
Line 1: |
Line 1: |
− | Certain aspects of Pixelmon, including [[special drops]], [[NPCs]], and [[structures]], can be edited through [https://www.json.org/ JSON] files. These files can be accessed by enabling the <code>useExternalJSONFiles</code> [[config]] setting and then starting ''Minecraft''. The external JSON files will be created at the path, <code><''Minecraft'' directory>/pixelmon</code>. JSON files can be edited with any plain text editor. | + | Certain aspects of Pixelmon, including [[special drops]], [[NPCs]], and [[structures]], can be edited through [https://www.json.org/ JSON] files. These files can be accessed by enabling the <code>useExternalJSONFiles</code> [[config]] settings and then starting ''Minecraft'', or restarting the server. Enabled external JSON files will show up under a newly-created <code>pixelmon</code> folder in <code>.minecraft</code> or the server root, depending on the side they're being edited on. JSON files can be edited with any decent plain text editor. |
| | | |
− | External JSON files should be edited carefully, and it is highly recommended to have knowledge of the JSON format before editing them. Incorrect editing of external JSON files can result in unexpected behavior when using Pixelmon features that rely on the external JSON files. However, deleting the external JSON folder will cause it to be regenerated with its default contents when ''Minecraft'' is started up again. | + | External JSON files should be edited carefully, as bad edits can potentially result in unexpected behavior from Pixelmon. Certain tools (such as [https://jsonlint.com/ JSONLint]) can be used to verify that files are formatted correctly. If necessary, deleting the external JSON folder and restarting will cause fresh files to be regenerated. |
| | | |
− | After editing external JSON files, they will need to be reloaded in order for the changes to take effect. [[Shopkeeper]] and [[NPC]] files can be reloaded in-game via the <code>/pokereload</code> [[command]]. All external JSON files are reloaded after restarting ''Minecraft''. | + | After editing external JSON files, they will need to be reloaded in order for the changes to take effect. [[Shopkeeper]] and [[NPC]] files can be reloaded in-game via the <code>/pokereload</code> [[command]]. All external JSON files are reloaded after restarting the game or server. |
| | | |
− | When Pixelmon is updated, there may occasionally be changes to the external JSON files. These changes can be tracked in the [https://dev.pixelmonmod.com/language/Pixelmon-Json/tree/master external JSON file repository], and any customizations to the external JSON files can be merged with the default files as needed. Failure to update the external JSON files may cause problems if updates introduce new features that rely on changes to the external JSON files.
| + | The following types of external files can currently be enabled: |
− | | |
− | Examples of how to edit external JSON files can be found on [[External JSON files/Examples|this page]].
| |
− | ==Drops==
| |
− | Drops files are located at <code><''Minecraft'' directory>/pixelmon/drops</code>. They allow modification of regular Pokémon [[drops]], [[boss Pokémon]] drops, and [[special drops]].
| |
− | ===bossdrops.json===
| |
− | This file contains data about [[boss Pokémon]] drops and spawning data for Mega Evolved [[boss Pokémon]].
| |
− | *<code>megaDrops</code>: This array contains [[item IDs]] for the possible drops of uncommon and rare boss Pokémon.
| |
− | *<code>shinyMegaDrops</code>: This array contains [[item IDs]] for the possible drops of legendary and ultimate boss Pokémon.
| |
− | *<code>bosses</code>: This array contains spawning data for Mega Evolved boss Pokémon.
| |
− | **<code>name</code>: The name of a Pokémon with a Mega Evolution.
| |
− | **<code>spawnlocation</code>: The [[spawn location]] where the Mega Evolved boss Pokémon can spawn in.
| |
− | **<code>biomes</code>: Unused.
| |
− | **<code>flying</code>: This object contains data about the flying AI of an air or air persistent Mega Evolved boss Pokémon. These are the same flying parameters found in the [[Database_editing#PIXELMONFLY|Pixelmon database]].
| |
− | **<code>swimming</code>: This object contains data about the flying AI of a water Mega Evolved boss Pokémon. These are the same swimming parameters found in the [[Database_editing#PIXELMONSWIM|Pixelmon database]].
| |
− | ===pokechestdrops.json===
| |
− | This file allows the special drop tables to be modified. The file contains three JSON arrays, <code>tier1</code>, <code>tier2</code>, and <code>tier3</code>. Each array contains the [[item IDs]] of items that can be dropped in each special drop tier.
| |
− | ===pokedrops.json===
| |
− | This file allows regular Pokémon [[drops]] to be edited. It is an array of JSON objects, one for each Pokémon. Pokémon that are not implemented in Pixelmon are also contained in this file, although these entries are currently unused by Pixelmon.
| |
− | *<code>pokemon</code>: The name of the Pokémon whose drops are being defined in the object.
| |
− | All other fields follow a similar format, but allow for multiple drops with different rarities and quantities to be defined. JSON keys are created by combining a drop type and a data type.
| |
− | | |
− | Drop types include:
| |
− | *<code>maindrop</code>: The first item that the Pokémon can drop 100% of the time.
| |
− | *<code>optdrop1</code>: The second item that the Pokémon can drop 100% of the time.
| |
− | *<code>optdrop2</code>: The third item that the Pokémon can drop 100% of the time.
| |
− | *<code>raredrop</code>: An item that the Pokémon can drop 10% of the time.
| |
− | It is not necessary to include all four drop types in a drop entry; Pokémon can have up to four items to drop, but may also drop fewer than four items.
| |
− | | |
− | Data types include:
| |
− | *<code>data</code>: The [[item ID]] of the item to drop.
| |
− | *<code>min</code>: The minimum quantity of the item that the Pokémon can drop. This number can also be 0 for the item to not always be dropped (or to make the drop rarer for <code>raredrop</code>) . If this field is omitted, its default value is 0.
| |
− | *<code>max</code>: The maximum quantity of the item that the Pokémon can drop. If this field is omitted, its default value is 1.
| |
− | Drop quantities are chosen uniformly randomly between <code>min</code> and <code>max</code>, inclusive of both numbers.
| |
− | | |
− | Drop types and data types can be combined into the following JSON keys:
| |
| {|class="wikitable" | | {|class="wikitable" |
− | |
| |
− | !style="text-align:center"|maindrop
| |
− | !style="text-align:center"|optdrop1
| |
− | !style="text-align:center"|optdrop2
| |
− | !style="text-align:center"|raredrop
| |
| |- | | |- |
− | !style="text-align:center"|data
| + | |style="text-align:center"|'''File type''' |
− | |style="text-align:center"|<code>maindropdata</code>
| + | |style="text-align:center"|'''Description''' |
− | |style="text-align:center"|<code>optdrop1data</code>
| |
− | |style="text-align:center"|<code>optdrop2data</code> | |
− | |style="text-align:center"|<code>raredropdata</code> | |
| |- | | |- |
− | !style="text-align:center"|min
| + | |style="text-align:center"|[[Drop JSONs|Drops]] |
− | |style="text-align:center"|<code>maindropmin</code>
| + | |Governs [[drops]] from bosses and wild Pokémon, as well as [[PokéLoot Chest]] loot. |
− | |style="text-align:center"|<code>optdrop1min</code> | |
− | |style="text-align:center"|<code>optdrop2min</code>
| |
− | |style="text-align:center"|<code>raredropmin</code> | |
| |- | | |- |
− | !style="text-align:center"|max
| + | |style="text-align:center"|[[Move JSONs|Moves]] |
− | |style="text-align:center"|<code>maindropmax</code> | + | |Governs stats and rules for battle moves, as well as any graphical effects. |
− | |style="text-align:center"|<code>optdrop1max</code> | + | |- |
− | |style="text-align:center"|<code>optdrop2max</code> | + | |style="text-align:center"|[[NPC JSONs|NPCs]] |
− | |style="text-align:center"|<code>raredropmax</code> | + | |Governs many [[NPCs|Pixelmon NPC]]-related settings, from shop items and possible trades to translations. |
− | |}
| |
− | ==NPCs==
| |
− | [[NPC]] JSON files are located at <code><''Minecraft'' directory>/pixelmon/npcs</code>. It contains files used to define NPC data such as spawning details, dialogue, [[shopkeeper]] [[Shopkeeper/Stock|stock]] and [[Shopkeeper/Sell prices|sell prices]], and [[NPC Trainer]] Pokémon. | |
− | | |
− | NPC JSON files that contain dialogue must have file names suffixed by an underscore and the [https://minecraft.gamepedia.com/Language language code] that correspond to the language that the dialogue is written in. For example, the American English version of the [[Blacksmith]] JSON file is named <code>blacksmith_en_us.json</code>. Server-side information, such as the possible Pokémon an NPC Trainer can have, is always obtained from the American English version of the JSON file. Files in other languages are only used to obtain translation-specific data such as dialogue.
| |
− | ===npcs.json===
| |
− | This JSON file contains data about NPC spawning rarity and which NPC JSON files to read. If a new NPC JSON file is created, the NPC must be added to this file in order for it to be registered by Pixelmon.
| |
− | ====rarities====
| |
− | This array contains the rarities of each type of naturally spawning NPC ([[NPC Trainers]], [[move tutors]], [[move relearners]], [[traders]], and spawn [[shopkeepers]]).
| |
− | *<code>type</code>: The type of NPC to define the rarity of (<code>trainer</code>, <code>tutor</code>, <code>relearner</code>, <code>trader</code>, <code>shopkeeper</code>).
| |
− | *<code>rarity</code>: The relative spawning rarity of the NPC. Spawning rarities are relative between NPC types; if one type of NPC has a rarity of 200 and a second type has a rarity of 100, the first NPC type will spawn twice as often as the second type. An NPC with a rarity of 0 will not spawn naturally.
| |
− | The default NPC Trainer entry is shown below.
| |
− | {
| |
− | "type": "trainer",
| |
− | "rarity": 200
| |
− | }
| |
− | | |
− | ====trainers====
| |
− | This array defines the spawn rarity and textures that an NPC Trainer will use.
| |
− | *<code>name</code>: Corresponds to the <code>trainerType</code> field in the <code>data</code> of the NPC Trainer JSON file.
| |
− | *<code>rarity</code>: The relative rarity of the NPC Trainer compared to other NPC Trainers. If this field is omitted, the NPC Trainer will not spawn naturally and can only be accessed using an NPC editor.
| |
− | *<code>textures</code>: An array of skin textures that the NPC Trainer can use, excluding the ".png" extension. Textures are located at <code>assets/pixelmon/textures/steve</code> in the Pixelmon jar file or a resource pack.
| |
− | The [[Bug Catcher]]'s entry is shown below.
| |
− | {
| |
− | "name": "BugCatcher",
| |
− | "rarity": 20,
| |
− | "textures": [ "bugcatcher1", "bugcatcher2", "bugcatcher3", "bugcatcher4" ]
| |
− | }
| |
− | ====Other arrays====
| |
− | All other arrays in the <code>npcs.json</code> file define the NPC files to register for each type of NPC. The NPC files for each type are found at <code><''Minecraft'' directory>/pixelmon/npcs/<NPC type></code>. The only field of each array object is a <code>name</code> field, which defines the name of the JSON file to register. This name field should not contain the language code or <code>.json</code>.
| |
− | {|class="wikitable sortable"
| |
− | !Array
| |
− | !NPC type
| |
− | !NPC folder
| |
| |- | | |- |
− | |style="text-align:center"|<code>villagers</code>
| + | |style="text-align:center"|[[Rule JSONs|Rules]] |
− | |style="text-align:center"|[[Chatting NPC]] | + | |Governs rulesets and tiers for competitive battling. |
− | |style="text-align:center"|<code>villagers</code> | |
| |- | | |- |
− | |style="text-align:center"|<code>list</code> | + | |style="text-align:center"|[[Spawning JSONs|Spawns]] |
− | |style="text-align:center"|[[NPC Trainer]] | + | |Governs what Pokémon spawn where, when and how. Includes [[fishing]], [[bosses]] and [[Spawner Cave Rock|Cave Rock]]/[[Pixelmon Grass|Grass]] spawns. |
− | |style="text-align:center"|<code>trainers</code> | |
| |- | | |- |
− | |style="text-align:center"|<code>shopKeepers</code>
| + | |style="text-align:center"|[[Stat JSONs|Stats]] |
− | |style="text-align:center"|[[Shopkeeper]] | + | |Governs Pokémon stats, EV yields, [[Evolution|evolutions]], whether they can be mounted, move lists and more. |
− | |style="text-align:center"|<code>shopKeepers</code> | |
| |- | | |- |
− | |style="text-align:center"|<code>gymnpcs</code>
| + | |style="text-align:center"|[[Structure JSONs|Structures]] |
− | |style="text-align:center"|[[Gym]] [[NPC]] | + | |Governs what [[structures]] can spawn, and where. Only affects new chunks. |
− | |style="text-align:center"|<code>gyms</code>
| |
| |} | | |} |
| | | |
− | ===shopItems.json===
| + | When Pixelmon is updated, there may occasionally be changes to the external JSON files. If any are enabled, keep a close eye on the changelogs, and refresh or update files where necessary. Outdated files may cause issues, or contain bugs that have since been fixed. |
− | 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 or removed. If an item has no sell price, the item cannot be sold to a shopkeeper. 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. An item with a sell price will always be able to be sold to all types of shopkeepers; it is not possible to restrict an item to be sellable to only certain shopkeepers.
| |
− | | |
− | 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.
| |
− | {
| |
− | "name": "pixelmon:item.Poke_Ball",
| |
− | "buy": 200,
| |
− | "sell": 100
| |
− | }
| |
− | | |
− | Custom damage values or NBT tags may be appended to items using <code>itemData</code> and <code>nbtData</code> fields respectively. When using these extra fields, an <code>id</code> field is also required in order to refer to the custom item from the shopkeeper JSON files. The format for NBT tags is the same format that can be used in certain commands like <code>/give</code>, and is detailed on [https://minecraft.gamepedia.com/Tutorials/Command_NBT_tags this page]. Note that any <code>"</code> characters will need to be escaped with a <code>\</code>.
| |
− | | |
− | Below is a sample JSON entry that uses all of the fields that can be used in the JSON, creating {{mc|Spruce_wood_planks|spruce wood planks}} (damage value 1) that have the description, "Wooden planks".
| |
− | {
| |
− | "id": "sprucePlanksLore",
| |
− | "name": "minecraft:planks",
| |
− | "itemData": 1,
| |
− | "nbtData": "{display:{Lore:[\"Wooden planks\"]}}",
| |
− | "buy": 5,
| |
− | "sell": 2
| |
− | }
| |
− | More examples of valid shop items can be found on [[External JSON files/Examples|this page]].
| |
− | | |
− | ===Chatting NPCs===
| |
− | [[Chatting NPC]] JSON files are located at <code><''Minecraft'' directory>/pixelmon/npcs/villagers</code>.
| |
− | *<code>skins</code>: An array of <code>filename</code> fields defining all skin textures that the chatting NPC can use. Textures are located at <code>assets/pixelmon/textures/steve</code> in the Pixelmon jar file or a resource pack. The <code>.png</code> extension should be included in the file name.
| |
− | *<code>names</code>: An array of <code>name</code> fields defining the possible names that the chatting NPC can be named. The name is displayed when talking to the chatting NPC.
| |
− | *<code>chat</code>: An array of <code>lines</code> objects defining the lines of dialogue that the chatting NPC will say when talked to. This is split into multiple <code>text</code> fields so that the chatting NPC will say each batch of text one at a time (i.e., the player clicks to continue the dialogue).
| |
− | A chat entry for the Artist chatting NPC is shown below.
| |
− | {
| |
− | "lines": [
| |
− | {
| |
− | "text": "Ah, this town is so inspiring."
| |
− | },
| |
− | {
| |
− | "text": "If only I had my easel with me; my mind is buzzing with artsy thoughts!"
| |
− | }
| |
− | ]
| |
− | }
| |
− | ===NPC Trainers===
| |
− | [[NPC Trainer]] JSON files are located at <code><''Minecraft'' directory>/pixelmon/npcs/trainers</code>. If a new NPC Trainer JSON is added, it will initially only be available through the [[NPC editor]]. By editing the [[Pixelmon database]] (specifically, the <code>[[Database editing#TRAINERTYPES|TRAINERTYPES]]</code> and <code>[[Database editing#TRAINERSPAWNBIOMES|TRAINERSPAWNBIOMES]]</code> tables), it is possible to make user-made NPC Trainers spawn naturally.
| |
− | *<code>data</code>
| |
− | **<code>trainerType</code>: The ID of the NPC Trainer class, used by the "trainers" array in <code>npcs.json</code> to find this NPC Trainer's data.
| |
− | **<code>minLevel</code>: The minimum average level of the NPC Trainer's Pokémon.
| |
− | **<code>maxLevel</code>: The maximum average level of the NPC Trainer's Pokémon.
| |
− | **<code>minPartyPokemon</code>: The minimum number of Pokémon that the NPC Trainer can have.
| |
− | **<code>maxPartyPokemon</code>: The minimum number of Pokémon that the NPC Trainer can have.
| |
− | **<code>winnings</code>: The base amount of [[PokéDollars]] that the NPC Trainer will award to the player upon defeat. This base amount is multiplied by the average level of Pokémon in the NPC Trainer's party (rounded down) to produce a final PokéDollar amount.
| |
− | The [[Blacksmith]]'s data is shown below.
| |
− | "data": {
| |
− | "trainerType": "Blacksmith",
| |
− | "minLevel": 20,
| |
− | "maxLevel": 40,
| |
− | "minPartyPokemon": 1,
| |
− | "maxPartyPokemon": 6,
| |
− | "winnings": 32
| |
− | }
| |
− | *<code>pokemon</code>: A list of "name</code> fields defining which Pokémon species the NPC Trainer can use.
| |
− | *<code>names</code>: A list of "name" fields defining what the NPC Trainer's names can be. This name is used to refer to the NPC Trainer during battle.
| |
− | *<code>chat</code>
| |
− | **<code>opening</code>: The NPC Trainer's dialogue at the start of the battle.
| |
− | **<code>win</code>: The NPC Trainer's dialogue when the NPC Trainer defeats a player.
| |
− | **<code>lose</code>: The NPC Trainer's dialogue when the NPC Trainer is defeated by a player.
| |
− | The Blacksmith's chat data is shown below.
| |
− | {
| |
− | "opening": "My Pokémon are trained hard over the fires of endurance. They are invincible!",
| |
− | "win": "I did warn you! Nice try.",
| |
− | "lose": "Not as invincible as I thought.."
| |
− | }
| |
− | | |
− | ===Shopkeepers===
| |
− | [[Shopkeeper]] JSON files are located at <code><''Minecraft'' directory>/pixelmon/npcs/shopKeepers</code>.
| |
− | *<code>data</code>: This defines the spawning type of the shopkeepers; this can be either <code>PokemartMain</code>, <code>PokemartSecond</code>, or <code>Spawn</code>.
| |
− | *<code>biomes</code>: If the shopkeeper is a spawn shopkeeper, this list defines the [[biomes]] where the shopkeeper can spawn.
| |
− | *<code>textures</code>: 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.
| |
− | *<code>names</code>: This is a list of possible names for the shopkeeper. These names are displayed when talking to the shopkeeper.
| |
− | *<code>chat</code>: This is a list of possible greetings and parting phrases for the shopkeeper. The messages should be paired together in a single object.
| |
− | *<code>items</code>: This is a list of the items that can be sold by the shopkeeper.
| |
− | **The <code>name</code> field contains the item ID of the item to sell and is the only required field. If an item in <code>shopItems.json</code> has an <code>id</code> field defined, this ID is used to refer to that item here; otherwise, the item's <code>name</code> field (the item's internal ''Minecraft'' ID) is used.
| |
− | **The <code>multi</code> 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 <code>shopItems.json</code> file.
| |
− | **The <code>rarity</code> 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.
| |
− | **The <code>variation</code> field determines whether the item may randomly be priced at 10% above or below its usual price. By default, this is enabled.
| |
− | A sample shopkeeper item is shown below. It causes the shopkeeper to have a 70% chance of selling [[Ultra Balls]] that are 10% above the normal price (as defined in <code>shopItems.json</code>) and do not vary in price.
| |
− | {
| |
− | "name": "pixelmon:item.Ultra_Ball",
| |
− | "multi": 1.1,
| |
− | "rarity": 0.7,
| |
− | "variation": false
| |
− | }
| |
− | Another sample shopkeeper item is shown below. It causes the shopkeeper to always sell the custom {{mc|Spruce_wood_planks|spruce wood planks}} item defined [[External JSON files#shopItems.json|above]] with its default base price, sometimes varying at 10% above or below this base price.
| |
− | {
| |
− | "name": "sprucePlanksLore"
| |
− | }
| |
− | More examples of customizing shopkeepers can be found on [[External JSON files/Examples|this page]].
| |
− | | |
− | ===Gym NPCs===
| |
− | [[Gym]] [[NPC]] JSON files are located at <code><''Minecraft'' directory>/pixelmon/npcs/gyms</code>. These files are used for editing flavor aspects of NPCs such as dialogue and skins. Data about the Pokémon used by Gym [[NPC Trainers]] is found in the [[External JSON files#Gym NPC data|structure JSON files]].
| |
− | *<code>npctype</code>: Either <code>trainer</code> or <code>chat</code> for an [[NPC Trainer]] or a [[chatting NPC]].
| |
− | *<code>winnings</code>: The base amount of [[PokéDollars]] that an NPC Trainer will award to the player upon defeat. This base amount is multiplied by the NPC Trainer's level to produce a final PokéDollar amount.
| |
− | *<code>skins</code>: An array of <code>filename</code> fields defining all skin textures that the NPC can use. Textures are located at <code>assets/pixelmon/textures/steve</code> in the Pixelmon jar file or a resource pack. The <code>.png</code> extension should be included in the file name.
| |
− | *<code>names</code>: This is a list of possible names for the NPC. The NPC's name is displayed when interacting with the NPC.
| |
− | *<code>chat</code>: Depending on the NPC's type, the NPC's dialogue is formatted the same as either an [[External JSON files#NPC Trainers|NPC Trainer]] or a [[External JSON files#Chatting NPCs|chatting NPC]].
| |
− | | |
− | ==Structures==
| |
− | [[Structure]] JSON files are located at <code><''Minecraft'' directory>/pixelmon/structures</code>. This folder contains files that define Pixelmon structure aspects such as block composition, spawning details, and [[NPCs]] found inside the structures.
| |
− | ===structures.json===
| |
− | This JSON file contains spawning data for all Pixelmon structures. It is split into three different arrays:
| |
− | *<code>towns</code> contains structures that spawn in [[towns]].
| |
− | *<code>gyms</code> contains [[Gyms]].
| |
− | *<code>standalone</code> contains all other structures that are not Gyms and do not spawn in towns.
| |
− | Each array consists of structures of that array's type. The three different types of structures each have different fields that can be specified.
| |
− | ====towns====
| |
− | *<code>id</code>: The ID of the structure when spawned via the <code>/struc</code> [[command]]
| |
− | *<code>filename</code>: The block snapshot file that defines the structure's block data, relative to <code>pixelmon/structures/towns</code>.
| |
− | *<code>weighting</code>: Used to determine the relative rarity of spawning the structure. A higher weighting makes the structure spawn more commonly.
| |
− | *<code>depth</code>: How far into the ground the structure will spawn at.
| |
− | *<code>maxnum</code>: The maximum amount of structures of this type that can spawn in a town.
| |
− | *<code>npcs</code>: Data about [[NPCs]] that spawn in the structure.
| |
− | **<code>type</code>: The type of NPC to spawn.
| |
− | **<code>data</code>: Additional arguments modifying the NPC, such as <code>Main</code> or <code>Secondary</code> for [[shopkeepers]].
| |
− | **<code>x</code>: The x component of the coordinate where the NPC spawns, relative to the origin of the structure.
| |
− | **<code>y</code>: The y component of the coordinate where the NPC spawns, relative to the origin of the structure.
| |
− | **<code>z</code>: The z component of the coordinate where the NPC spawns, relative to the origin of the structure.
| |
− | The town [[Pokémon Center]] JSON data is shown below as an example.
| |
− | {
| |
− | "id": "towncenter1",
| |
− | "filename": "pokecenter1.snapshot",
| |
− | "weighting": 20,
| |
− | "depth": 2,
| |
− | "maxnum": 1,
| |
− | "npcs": [
| |
− | {
| |
− | "type": "[[NurseJoy]]",
| |
− | "x": 9,
| |
− | "y": 3,
| |
− | "z": 7
| |
− | }
| |
− | ]
| |
− | }
| |
− | | |
− | ====gyms====
| |
− | *<code>id</code>: The ID of the structure when spawned via the <code>/struc</code> [[command]]
| |
− | *<code>filename</code>: The block snapshot file that defines the Gym's block data, relative to <code>pixelmon/structures/gyms</code>.
| |
− | *<code>npcdata</code>: The JSON file that defines the Gym's [[NPC]] spawning data, relative to <code>pixelmon/structures/gyms</code>.
| |
− | *<code>depth</code>: How far into the ground the Gym will spawn at.
| |
− | The [[Grass Gym]] JSON data is shown below as an example.
| |
− | {
| |
− | "id": "grassgym",
| |
− | "filename": "grassgym.snapshot",
| |
− | "npcdata": "grassgym.json",
| |
− | "depth": 8
| |
− | }
| |
− | ====standalone====
| |
− | *<code>id</code>: The ID of the structure when spawned via the <code>/struc</code> [[command]]
| |
− | *<code>filename</code>: The block snapshot file that defines the Gym's block data, relative to <code>pixelmon/structures/standalone</code>.
| |
− | *<code>biomes</code>: The names of [[biomes]] that the structure can spawn in.
| |
− | *<code>rarity</code>: Used to determine the relative rarity of spawning the structure. A higher rarity makes the structure spawn more commonly.
| |
− | *<code>depth</code>: How far into the ground the Gym will spawn at.
| |
− | The [[frozen shrine]] JSON data is shown below as an example.
| |
− | {
| |
− | "id": "iceshrine",
| |
− | "filename": "shrine1.snapshot",
| |
− | "biomes": [ "[[Ice Plains Spikes]]", "[[Ice Plains]]", "[[Ice Mountains]]", "[[Cold Taiga M]]" ],
| |
− | "rarity": 20,
| |
− | "depth": 0
| |
− | }
| |
− | | |
− | ===Block snapshots===
| |
− | Block snapshot (<code>.snapshot</code> files) are used to define the blocks that make up a structure. They can be created and modified using the <code>/psnapshot</code> [[command]].
| |
− | | |
− | {{CommandSyntax}}
| |
− | *<code>/psnapshot read <''file name''></code>: Loads a set of blocks previously saved to a file by /snapshot save.
| |
− | *<code>/psnapshot set</code>: Sets a corner of the area to save at the player's location. If there are already two corners set when this command is used, the corner that was set first will be overwritten by the new corner.
| |
− | *<code>/psnapshot save</code>: Saves the blocks in the area defined by the two previously set corners. Two corners must already be set in order for this command to work. If a set of blocks was already previously saved, it will be overwritten by the newly saved set of blocks.
| |
− | **<code>/psnapshot save <''file name''></code>: Saves the blocks in the area like in /snapshot save. Also saves the blocks to a file (with the given name) in a <code>snapshots</code> folder inside the ''Minecraft'' folder. This file can be read back into ''Minecraft'' with the <code>load</code> argument.
| |
− | *<code>/psnapshot place</code>: Copies the previously saved blocks and places them where the player is located.
| |
− | *<code>/psnapshot convert <file name></code>: Converts a snapshot created in ''Minecraft'' 1.8.9 and below into a snapshot compatible with ''Minecraft'' 1.10.2. This creates a new snapshot file with <code>-converted</code> appended to the original file name.
| |
− | | |
− | ===Gym NPC data===
| |
− | [[NPCs]] inside [[Gyms]] are defined in a JSON file separate from the <code>structures.json</code> file. This JSON file is split into two arrays:
| |
− | *<code>npcs</code> for data about NPCs themselves.
| |
− | *<code>pokemon</code> for data about possible Pokémon that [[NPC Trainers]] within the Gym can use.
| |
− | ====npcs====
| |
− | *<code>name</code>: The ID of the NPC. This leads to the corresponding file at <code>pixelmon/npcs/gyms</code>, which defines most of the data about the NPC such as dialogue and skins.
| |
− | *<code>type</code>: The type of [[NPC]] to spawn.
| |
− | *<code>rotation</code>: The rotation (yaw) of the NPC relative to the Gym's rotation.
| |
− | *<code>x</code>: The x component of the coordinate where the NPC spawns, relative to the origin of the Gym structure.
| |
− | *<code>y</code>: The y component of the coordinate where the NPC spawns, relative to the origin of the Gym structure.
| |
− | *<code>z</code>: The z component of the coordinate where the NPC spawns, relative to the origin of the Gym structure.
| |
− | *<code>drops</code>: If defined on an [[NPC Trainer]], a random [[item]] from this array is awarded to the player after defeating the NPC Trainer in battle. This array uses [[item IDs]] from the <code>shopItems.json</code> file.
| |
− | An entry for one of the [[Grass Gym]]'s [[NPC Trainers]] is shown below.
| |
− | {
| |
− | "name": "grassgymbase",
| |
− | "type": "trainer",
| |
− | "tier": 3,
| |
− | "rotation": 90,
| |
− | "x": 13,
| |
− | "y": 3,
| |
− | "z": 25
| |
− | }
| |
− | | |
− | ====pokemon====
| |
− | *<code>name</code>: The Pokémon's species.
| |
− | *<code>minLevel</code>: The minimum level that the [[NPC Trainer]] can be in order to potentially use this Pokémon.
| |
− | *<code>maxLevel</code>: The maximum level that the [[NPC Trainer]] can be in order to potentially use this Pokémon.
| |
− | *<code>sets</code>: Defines data about the Pokémon moves, [[Abilities]], [[held items]], [[Natures]], and [[EVs]]. It is possible to have multiple sets for a Pokémon.
| |
− | **<code>move<''number''></code>: A move that the Pokémon can have in a certain moveslot. It is possible to define multiple moves for a moveslot; one will be randomly chosen when the Pokémon is used. Omitting a moveslot causes the Pokémon to have no move in the omitted slot. [[Hidden Power]] can be defined to have a specific type (e.g., <code>Hidden Power [[Ice]]</code>), and IVs will automatically be set accordingly if they are not manually defined.
| |
− | **<code>heldItem</code>: Defines possible [[held items]] that the Pokémon can hold. Omitting this field causes the Pokémon to not hold an item.
| |
− | **<code>nature</code>: Defines possible [[Natures]] that the Pokémon can have. Only used by Gym Leaders. Regular Gym Trainers or the omission of the field cause the Pokémon to randomly have any of the 24 Natures.
| |
− | **<code>ev<stat></code>: Defines the number of [[EVs]] that the Pokémon will have for a certain stat. Only used by Gym Leaders. Regular Gym Trainers always have 0 EVs.
| |
− | **<code>iv<stat></code>: Defines the number of IVs that the Pokémon will have for a certain stat. Defaults to 31 for Gym Leaders, and random between 0-31 for regular Gym Trainers.
| |
− | An entry for one of the Pokémon inside the [[Grass Gym]] is shown below.
| |
− | {
| |
− | "name": "[[Servine]]",
| |
− | "minLevel": 17,
| |
− | "maxLevel": 35,
| |
− | "sets": [
| |
− | {
| |
− | "move1": [ "[[Giga Drain]]" ],
| |
− | "move2": [ "[[Reflect]]" ],
| |
− | "move3": [ "[[Light Screen]]" ],
| |
− | "move4": [ "[[Glare]]", "[[Leech Seed]]", "[[Synthesis]]", "[[Toxic]]" ],
| |
− | "heldItem": [ "[[Light Clay|pixelmon:light_clay]]" ],
| |
− | "nature": [ "Bold" ],
| |
− | "evHP": 252,
| |
− | "evDef": 252,
| |
− | "evSpDef": 4
| |
− | },
| |
− | {
| |
− | "minLevel": 31,
| |
− | "move1": [ "[[Leaf Blade]]" ],
| |
− | "move2": [ "[[Coil]]", "[[Swords Dance]]" ],
| |
− | "move3": [ "[[Aqua Tail]]", "[[Iron Tail]]", "[[Return]]" ],
| |
− | "move4": [ "Aqua Tail", "Iron Tail", "Return" ],
| |
− | "ability": [ "Overgrow" ],
| |
− | "heldItem": [ "[[Muscle Band|pixelmon:muscle_band]]", "[[Miracle Seed|pixelmon:miracle_seed]]" ],
| |
− | "nature": [ "Adamant", "Jolly" ],
| |
− | "evAtk": 252,
| |
− | "evSpDef": 4,
| |
− | "evSpeed": 252
| |
− | }
| |
− | ]
| |
− | }
| |