Difference between revisions of "Samosa's Playground"
Lord Samosa (talk | contribs) m |
Lord Samosa (talk | contribs) m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | <seo title="Raid JSONs" metakeywords="Pixelmon Reforged JSONs Datapacks spawns drops moves rules NPCs stats structures shops shopkeepers" metadescription="A guide explaining how to configure Pixelmon's raid file."/> | |
− | == | + | Different aspects of the Pixelmon mod can be tweaked through different types of JSON files via a [[Datapack]]. This page covers the base_allies, spawn files and the raids.json file, which define the NPC allies, what Pokémon can spawn in [[Raid Den|Raid Dens]] in which biome and at what Star level(s) and the loot dropped respectively. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | === | + | ==Loot Tables== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | The <code>raids.json</code> file is where the loot table for raids are defined. As of 9.3.0, raid drops are now defined using [https://minecraft.wiki/w/Loot_table Minecrafts loot table system] and as such the file can be found in the path <code>pixelmon\loot_table\raids.json</code>. Due to this change, a [https://misode.github.io/loot-table/ loot table generator for Vanilla] can be used to generate the raid loot tables technically. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Below is a section of the <code>raids.json</code> file which defines loot available for all type 1-star raids. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | <spoiler text="Show"> |
− | { | + | <div onload="prettyPrint()"> |
− | + | <pre class="prettyprint"> | |
− | + | { | |
− | + | "rolls": { | |
− | + | "min": 1.0, | |
− | + | "max": 5.0, | |
− | + | "type": "minecraft:uniform" | |
− | + | }, | |
− | + | "bonus_rolls": 0.0, | |
− | + | "name": "raid", | |
− | + | "entries": [ | |
− | + | { | |
− | + | "name": "pixelmon:rare_candy", | |
− | + | "weight": 25, | |
− | + | "type": "minecraft:item" | |
− | + | }, | |
− | + | { | |
− | + | "name": "pixelmon:ruby", | |
− | + | "weight": 50, | |
− | + | "type": "minecraft:item" | |
− | + | }, | |
− | + | { | |
− | + | "name": "pixelmon:sapphire", | |
− | + | "weight": 50, | |
− | + | "type": "minecraft:item" | |
− | + | }, | |
− | + | { | |
+ | "name": "minecraft:amethyst_shard", | ||
+ | "weight": 50, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:crystal", | ||
+ | "weight": 50, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:dynamax_candy", | ||
+ | "weight": 100, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:xs_exp_candy", | ||
+ | "weight": 100, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:s_exp_candy", | ||
+ | "weight": 100, | ||
+ | "type": "minecraft:item" | ||
+ | } | ||
+ | ], | ||
+ | "conditions": [ | ||
+ | { | ||
+ | "terms": [ | ||
+ | { | ||
+ | "stars": 1, | ||
+ | "condition": "pixelmon:star_level" | ||
+ | } | ||
+ | ], | ||
+ | "condition": "minecraft:all_of" | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | </pre> | ||
+ | </div> | ||
+ | </spoiler> | ||
− | + | * The <code>rolls</code> part specifies how many rolls will be done of a pool. In each roll of a pool, the pool draws one entry from all its entries. Each roll of a pool is independent. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * The <code>entries</code> part is where items to be added to the loot pool are defined. These are added with a name/value, a weight and a type. An entry can either be a single item or an entire seperate loot tables items which can be seen later in this page. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * The <code>conditions</code> part is where the condition for the loot table is defined, such as the star level needed for the system to pick an item from that loot table which is seen further in the <code>terms</code> section. Furthermore, the last <code>condition</code> section is what defines the typing that is checked in order for this loot table to apply. The above example uses <code>minecraft:all_of</code> which means all types of raids (Bug, Fairy, Psychic etc) will use this loot table. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Below is a section of the <code>raids.json</code> which defines the loot table for 2-star level Grass Raids. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | <spoiler text="Show"> |
− | + | <div onload="prettyPrint()"> | |
− | + | <pre class="prettyprint"> | |
− | + | { | |
− | + | "rolls": { | |
− | + | "min": 1.0, | |
− | + | "max": 5.0, | |
− | + | "type": "minecraft:uniform" | |
− | + | }, | |
− | + | "bonus_rolls": 0.0, | |
− | + | "name": "raid", | |
− | + | "entries": [ | |
− | + | { | |
− | + | "name": "pixelmon:miracle_seed", | |
− | + | "weight": 5, | |
− | + | "type": "minecraft:item" | |
− | + | }, | |
− | + | { | |
− | + | "value": "pixelmon:intermediate/grass", | |
− | + | "weight": 50, | |
+ | "type": "minecraft:loot_table" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:tamato_berry", | ||
+ | "weight": 50, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:aguav_berry", | ||
+ | "weight": 50, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:pomeg_berry", | ||
+ | "weight": 50, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:iapapa_berry", | ||
+ | "weight": 50, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:tiny_mushroom", | ||
+ | "weight": 30, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:big_mushroom", | ||
+ | "weight": 20, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:balm_mushroom", | ||
+ | "weight": 10, | ||
+ | "type": "minecraft:item" | ||
+ | }, | ||
+ | { | ||
+ | "name": "pixelmon:leaf_stone", | ||
+ | "weight": 25, | ||
+ | "type": "minecraft:item" | ||
+ | } | ||
+ | ], | ||
+ | "conditions": [ | ||
+ | { | ||
+ | "terms": [ | ||
+ | { | ||
+ | "stars": 2, | ||
+ | "condition": "pixelmon:star_level" | ||
+ | }, | ||
+ | { | ||
+ | "terms": [ | ||
+ | { | ||
+ | "type": "Grass", | ||
+ | "condition": "pixelmon:secondary_type" | ||
+ | }, | ||
+ | { | ||
+ | "type": "Grass", | ||
+ | "condition": "pixelmon:secondary_type" | ||
+ | } | ||
+ | ], | ||
+ | "condition": "minecraft:any_of" | ||
+ | } | ||
+ | ], | ||
+ | "condition": "minecraft:all_of" | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </pre> | ||
+ | </div> | ||
+ | </spoiler> | ||
− | + | * Notice that one of the entries is an entire loot table for Grass types which is used in other parts of Pixelmon. This has been given a <code>value</code> of <code>pixelmon:intermediate/grass</code> in this file as opposed to the earlier example. This means one of the rolls can pull an item from that loot table. This grass loot table can be found in <code>pixelmon\loot_table_intermediate</code> path. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * This example also uses different conditions as it is specific to 2-star Grass types raids. The <code>terms</code> have been set to include Grass as a <code>pixelmon:secondary_type</code> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | === | + | ==Raid Spawns== |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Raid spawns, as of 9.3.0, are now defined per Pokémon species. These files can be access through the <code>pixelmon\pixelmon\raid\spawn\</code> file path. By default, raid spawns are pulled from the standard Pokémon spawns however these can be edited in any way. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Below is the default spawning JSON for [[Bulbasaur]]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | <pre>{ | |
− | { | + | "spawns": [ |
− | + | { | |
− | + | "spec": "Bulbasaur", | |
− | + | "loot_table": "pixelmon:raid_den/raids", | |
− | + | "stars": { | |
− | + | "type": "minecraft:uniform", | |
− | + | "min_inclusive": 1, | |
+ | "max_inclusive": 2 | ||
+ | }, | ||
+ | "biomes": "#pixelmon:raid/spawn/0001_bulbasaur", | ||
+ | "weight": 1.0 | ||
+ | } | ||
+ | ] | ||
+ | }</pre> | ||
− | + | * The <code>spec</code> field is where the Species is defined along with any additional [[Pokemon spec]] which can be added, such as forms and palettes. | |
− | + | * The <code>loot_table</code> field is what Loot table is to be used for this Pokemon. By default, Bulbasaur will use the standard loot tables in the <code>raids.json</code> file however this can be changed. | |
− | + | * The <code>stars</code> field is | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 22:11, 10 May 2025
Different aspects of the Pixelmon mod can be tweaked through different types of JSON files via a Datapack. This page covers the base_allies, spawn files and the raids.json file, which define the NPC allies, what Pokémon can spawn in Raid Dens in which biome and at what Star level(s) and the loot dropped respectively.
Loot Tables
The raids.json
file is where the loot table for raids are defined. As of 9.3.0, raid drops are now defined using Minecrafts loot table system and as such the file can be found in the path pixelmon\loot_table\raids.json
. Due to this change, a loot table generator for Vanilla can be used to generate the raid loot tables technically.
Below is a section of the raids.json
file which defines loot available for all type 1-star raids.
- The
rolls
part specifies how many rolls will be done of a pool. In each roll of a pool, the pool draws one entry from all its entries. Each roll of a pool is independent.
- The
entries
part is where items to be added to the loot pool are defined. These are added with a name/value, a weight and a type. An entry can either be a single item or an entire seperate loot tables items which can be seen later in this page.
- The
conditions
part is where the condition for the loot table is defined, such as the star level needed for the system to pick an item from that loot table which is seen further in theterms
section. Furthermore, the lastcondition
section is what defines the typing that is checked in order for this loot table to apply. The above example usesminecraft:all_of
which means all types of raids (Bug, Fairy, Psychic etc) will use this loot table.
Below is a section of the raids.json
which defines the loot table for 2-star level Grass Raids.
- Notice that one of the entries is an entire loot table for Grass types which is used in other parts of Pixelmon. This has been given a
value
ofpixelmon:intermediate/grass
in this file as opposed to the earlier example. This means one of the rolls can pull an item from that loot table. This grass loot table can be found inpixelmon\loot_table_intermediate
path.
- This example also uses different conditions as it is specific to 2-star Grass types raids. The
terms
have been set to include Grass as apixelmon:secondary_type
Raid Spawns
Raid spawns, as of 9.3.0, are now defined per Pokémon species. These files can be access through the pixelmon\pixelmon\raid\spawn\
file path. By default, raid spawns are pulled from the standard Pokémon spawns however these can be edited in any way.
Below is the default spawning JSON for Bulbasaur.
{ "spawns": [ { "spec": "Bulbasaur", "loot_table": "pixelmon:raid_den/raids", "stars": { "type": "minecraft:uniform", "min_inclusive": 1, "max_inclusive": 2 }, "biomes": "#pixelmon:raid/spawn/0001_bulbasaur", "weight": 1.0 } ] }
- The
spec
field is where the Species is defined along with any additional Pokemon spec which can be added, such as forms and palettes. - The
loot_table
field is what Loot table is to be used for this Pokemon. By default, Bulbasaur will use the standard loot tables in theraids.json
file however this can be changed. - The
stars
field is