Better Spawner
- This page is incomplete.
The Better Spawner is an new entity spawning system introduced in Pixelmon 6.0.0. It is capable of handling item, Pixelmon NPC, and Pokémon spawning, but programmatically can be expanded to handle any kind of entity. All information on what entities spawn and where is backed by JSON files. These can be modified from, by default, pixelmon/spawning/default/
if the Pixelmon Config has useExternalJSONs
enabled. The directory the external JSONs will load from can be modified in the Pixelmon Config.
The central idea of the Better Spawning system revolves around SpawnSet
s and SpawnInfo
s.
A SpawnInfo
represents the smallest component of spawning and is in essence information about a possible thing to spawn. As an example, there may be none or one or more SpawnInfo
s that will spawn an Abra, each with a different rarity. One might make one SpawnInfo
which is far rarer than the others, and spawns Abra at a much higher level. The possible properties of a SpawnInfo
are as follows.
Property label | Type of value | Description |
---|---|---|
"typeID"
|
"pokemon" or "npc" or "item"
|
The type of SpawnInfo this is. Sidemods may add more types, in which case the number of possible values would increase.
|
"condition"
|
A Better_Spawner/Spawn_Condition. | The condition for the spawn location to fulfill that will allow the entity to spawn. |
"anticondition"
|
An optional Better_Spawner/Spawn_Condition. | The anti-condition for the spawn location which must fail to allow the entity to spawn. |
"requiredSpace"
|
Optional positive integer, including 0. | The necessary radius of the location for this entity to spawn. Defaults to 1, minimum is 0. The radius is calculated based off how much of the surrounding area is free of colliding blocks. In the case of Pokémon spawning, leaving out this field will use a number based off the Pokémon's size. |
"stringLocationTypes"
|
List of any number of location types inside quotes. | The possible locations the entity may spawn. A location only needs to satisfy one of these to spawn, and in the case of Pokémon spawning, the AI of the Pokémon may depend on the location. |
"rarity"
|
Decimal number greater than or equal to zero. | The level of commonness for the entity. The higher this number is, the more frequently this entity will spawn. This is not a percentage and doesn't follow any rules. If all SpawnInfo tripled their rarities, nothing would change. With the default SpawnSet s, 0.5 is extremely rare, and 300 is extremely common. Having a rarity of zero will prevent it from spawning.
|
Specific types of SpawnInfo
s have extra properties.
For "typeID" = "pokemon"
:
Property label | Type of value | Description |
---|---|---|
"spec"
|
A Pokémon Spec in its JSON form. | The Pokémon Spec representation of the Pokémon to spawn. This might just contain the name, or any other of the options. |
"minLevel"
|
Positive integer. | The lowest level the Pokémon may spawn at. This option is ignored if the Pokémon Spec option specifies the level. |
"maxLevel"
|
Positive integer. | The highest level the Pokémon may spawn at. This option is ignored if the Pokémon Spec option specifies the level. |
"spawnSpecificShinyRate"
|
Optional positive integer, including 0. | The shiny rate denominator specific to this spawn. For example, if one desired a 1% chance of a shiny for a spawn, this field would be 100 to represent a 1/100 chance.
|
For "typeID" = "npc"
:
Property label | Type of value | Description |
---|---|---|
"npcType"
|
Any of the following: "Trainer" ,"ChattingNPC" ,"Relearner" ,"Tutor" ,"Trader" ,"Shopkeeper" ,"NurseJoy" .
|
The type of NPC to spawn. The properties of the NPC will be generated automatically. |
- NPC spawning is likely to change to support much more specific properties.
For "typeID" = "item"
:
Property label | Type of value | Description |
---|---|---|
"itemID"
|
Item ID, e.g. "minecraft:string" , "pixelmon:rare_candy" .
|
The ID of the item to spawn. |
"minQuantity"
|
Positive integer. | The smallest number of the item to spawn. If the same as maxQuantity, it will always spawn this amount. |
"maxQuantity"
|
Positive integer. | The smallest number of the item to spawn. If the same as minQuantity, it will always spawn this amount. |
"meta"
|
An optional integer | The meta value of the item. This is used to differentiate, for example, andesite and granite from simple stone. |
"nbt"
|
An optional NBT tag compound in JSON form. | Any NBT data for the item stack. This might contain display name, lore, enchantments, etc. |
A SpawnSet
is a grouping of one or more SpawnInfo
s along with a small number of properties.