In partnership with NodeCraft Logo NodeCraft

From Pixelmon Wiki

Different aspects of the Pixelmon mod can be tweaked through different types of external JSON files. This page covers the structure files, which define what structures may spawn, and how. Individual structure aspects can also be edited, such as block composition, spawning details, and NPCs found inside. Structure JSON files are located at <Minecraft directory>/pixelmon/structures.

Examples of how to edit these files can be found on this page.

structures.json

This JSON file contains spawning data for all Pixelmon structures. It is split into three different arrays:

  • towns contains structures that spawn in towns.
  • gyms contains Gyms.
  • standalone 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

  • id: The ID of the structure when spawned via the /struc command
  • filename: The block snapshot file that defines the structure's block data, relative to pixelmon/structures/towns.
  • weighting: Used to determine the relative rarity of spawning the structure. A higher weighting makes the structure spawn more commonly.
  • depth: How far into the ground the structure will spawn at.
  • maxnum: The maximum amount of structures of this type that can spawn in a town.
  • npcs: Data about NPCs that spawn in the structure.
    • type: The type of NPC to spawn.
    • data: Additional arguments modifying the NPC, such as Main or Secondary for shopkeepers.
    • x: The x component of the coordinate where the NPC spawns, relative to the origin of the structure.
    • y: The y component of the coordinate where the NPC spawns, relative to the origin of the structure.
    • z: 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

  • id: The ID of the structure when spawned via the /struc command
  • filename: The block snapshot file that defines the Gym's block data, relative to pixelmon/structures/gyms.
  • npcdata: The JSON file that defines the Gym's NPC spawning data, relative to pixelmon/structures/gyms.
  • depth: 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

  • id: The ID of the structure when spawned via the /struc command
  • filename: The block snapshot file that defines the Gym's block data, relative to pixelmon/structures/standalone.
  • biomes: The names of biomes that the structure can spawn in.
  • rarity: Used to determine the relative rarity of spawning the structure. A higher rarity makes the structure spawn more commonly.
  • depth: 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 (.snapshot files) are used to define the blocks that make up a structure. They can be created and modified using the /psnapshot command.

Note: Command syntax is displayed in the standard Minecraft command format. An explanation of this format can be found here.

  • /psnapshot read <file name>: Loads a set of blocks previously saved to a file by /snapshot save.
  • /psnapshot set: 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.
  • /psnapshot save: 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.
    • /psnapshot save <file name>: Saves the blocks in the area like in /snapshot save. Also saves the blocks to a file (with the given name) in a snapshots folder inside the Minecraft folder. This file can be read back into Minecraft with the load argument.
  • /psnapshot place: Copies the previously saved blocks and places them where the player is located.
  • /psnapshot convert <file name>: 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 -converted appended to the original file name.

Gym NPC data

NPCs inside Gyms are defined in a JSON file separate from the structures.json file. This JSON file is split into two arrays:

  • npcs for data about NPCs themselves.
  • pokemon for data about possible Pokémon that NPC Trainers within the Gym can use.

npcs

  • name: The ID of the NPC. This leads to the corresponding file at pixelmon/npcs/gyms, which defines most of the data about the NPC such as dialogue and skins.
  • type: The type of NPC to spawn.
  • rotation: The rotation (yaw) of the NPC relative to the Gym's rotation.
  • x: The x component of the coordinate where the NPC spawns, relative to the origin of the Gym structure.
  • y: The y component of the coordinate where the NPC spawns, relative to the origin of the Gym structure.
  • z: The z component of the coordinate where the NPC spawns, relative to the origin of the Gym structure.
  • drops: 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 shopItems.json 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

  • name: The Pokémon's species.
  • minLevel: The minimum level that the NPC Trainer can be in order to potentially use this Pokémon.
  • maxLevel: The maximum level that the NPC Trainer can be in order to potentially use this Pokémon.
  • sets: Defines data about the Pokémon moves, Abilities, held items, Natures, and EVs. It is possible to have multiple sets for a Pokémon.
    • move<number>: 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., Hidden Power Ice), and IVs will automatically be set accordingly if they are not manually defined.
    • heldItem: Defines possible held items that the Pokémon can hold. Omitting this field causes the Pokémon to not hold an item.
    • nature: 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.
    • ev<stat>: 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.
    • iv<stat>: 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": [ "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": [ "pixelmon:muscle_band", "pixelmon:miracle_seed" ],
         "nature": [ "Adamant", "Jolly" ],
         "evAtk": 252,
         "evSpDef": 4,
         "evSpeed": 252
       }
     ]
   }

© 2014 - 2020 Pixelmon Mod