|
|
(7 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | * This page is incomplete.
| |
| | | |
| + | The Better Spawner is a new entity spawning system introduced in Pixelmon 6.0.0 and the sole spawning system starting from Pixelmon 6.3.0. It is capable of handling item, Pixelmon NPC, and Pokémon spawning but 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, <code>pixelmon/spawning/</code> if the Pixelmon Config has <code>useExternalJSONFilesSpawning</code> enabled. The directory the external JSONs will load from, and many other performance-related options can be modified in the [[Config|Pixelmon config]]. The default options are recommended for singleplayer as well as multiplayer with fewer than 100 players. |
| | | |
− | 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, <code>pixelmon/spawning/default/</code> if the Pixelmon Config has <code>useExternalJSONs</code> enabled. The directory the external JSONs will load from can be modified in the Pixelmon Config.
| + | Many more options for the Better Spawner exist in the [[Better_Spawner/Config|Better Spawner config]]. |
| | | |
− | The central idea of the Better Spawning system revolves around <code>SpawnSet</code>s and <code>SpawnInfo</code>s.
| + | Important components when modifying how things spawn: |
− | | + | *[[Better_Spawner/Spawn_Set|SpawnSet]] |
− | A <code>SpawnInfo</code> 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 <code>SpawnInfo</code>s that will spawn an Abra, each with a different rarity. One might make one <code>SpawnInfo</code> which is far rarer than the others, and spawns Abra at a much higher level. The possible properties of a <code>SpawnInfo</code> are as follows.
| + | *[[Better_Spawner/Spawn_Info|SpawnInfo]] |
− | | |
− | {|class="wikitable"
| |
− | !Property label
| |
− | !Type of value
| |
− | !Description
| |
− | |-
| |
− | |style="text-align:center"|<code>"typeID"</code>
| |
− | |style="text-align:center"|<code>"pokemon"</code> or <code>"npc"</code> or <code>"item"</code>
| |
− | |style="text-align:center"|The type of <code>SpawnInfo</code> this is. Sidemods may add more types, in which case the number of possible values would increase.
| |
− | |-
| |
− | |style="text-align:center"|<code>"condition"</code>
| |
− | |style="text-align:center"|A [[Better_Spawner/Spawn_Condition]].
| |
− | |style="text-align:center"|The condition for the spawn location to fulfill that will allow the entity to spawn.
| |
− | |-
| |
− | |style="text-align:center"|<code>"anticondition"</code>
| |
− | |style="text-align:center"|An optional [[Better_Spawner/Spawn_Condition]].
| |
− | |style="text-align:center"|The anti-condition for the spawn location which must ''fail'' to allow the entity to spawn. | |
− | |-
| |
− | |style="text-align:center"|<code>"rarity"</code>
| |
− | |style="text-align:center"|Decimal number greater than or equal to zero.
| |
− | |style="text-align:center"|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 <code>SpawnInfo</code> tripled their rarities, nothing would change. With the default <code>SpawnSet</code>s, 0.5 is extremely rare, and 300 is extremely common. Having a rarity of zero will prevent it from spawning.
| |
− | |}
| |
− | | |
− | Specific types of <code>SpawnInfo</code>s have extra properties.
| |
− | | |
− | For <code>"typeID" = "pokemon"</code>:
| |
− | {|class="wikitable"
| |
− | !Property label
| |
− | !Type of value
| |
− | !Description
| |
− | |-
| |
− | |style="text-align:center"|<code>"spec"</code>
| |
− | |style="text-align:center"|A [[Pokémon Spec]] in its JSON form.
| |
− | |style="text-align:center"|The [[Pokémon Spec]] representation of the Pokémon to spawn. This might just contain the name, or any other of the options.
| |
− | |-
| |
− | |style="text-align:center"|<code>"minLevel"</code>
| |
− | |style="text-align:center"|Positive integer.
| |
− | |style="text-align:center"|The lowest level the Pokémon may spawn at. This option is ignored if the [[Pokémon Spec]] option specifies the level.
| |
− | |-
| |
− | |style="text-align:center"|<code>"maxLevel"</code>
| |
− | |style="text-align:center"|Positive integer.
| |
− | |style="text-align:center"|The highest level the Pokémon may spawn at. This option is ignored if the [[Pokémon Spec]] option specifies the level.
| |
− | |}
| |
− | | |
− | For <code>"typeID" = "npc"</code>:
| |
− | {|class="wikitable"
| |
− | !Property label
| |
− | !Type of value
| |
− | !Description
| |
− | |-
| |
− | |style="text-align:center"|<code>"npcType"</code>
| |
− | |style="text-align:center"|Any of the following: <code>"Trainer"</code>,<code>"ChattingNPC"</code>,<code>"Relearner"</code>,<code>"Tutor"</code>,<code>"Trader"</code>,<code>"Shopkeeper"</code>,<code>"NurseJoy"</code>.
| |
− | |style="text-align:center"|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 <code>"typeID" = "item"</code>:
| |
− | {|class="wikitable"
| |
− | !Property label
| |
− | !Type of value
| |
− | !Description
| |
− | |-
| |
− | |style="text-align:center"|<code>"itemID"</code>
| |
− | |style="text-align:center"|Item ID, e.g. <code>"minecraft:string"</code>, <code>"pixelmon:rare_candy"</code>.
| |
− | |style="text-align:center"|The ID of the item to spawn.
| |
− | |-
| |
− | |style="text-align:center"|<code>"minQuantity"</code>
| |
− | |style="text-align:center"|Positive integer.
| |
− | |style="text-align:center"|The smallest number of the item to spawn. If the same as maxQuantity, it will always spawn this amount.
| |
− | |-
| |
− | |style="text-align:center"|<code>"maxQuantity"</code>
| |
− | |style="text-align:center"|Positive integer.
| |
− | |style="text-align:center"|The smallest number of the item to spawn. If the same as minQuantity, it will always spawn this amount.
| |
− | |-
| |
− | |style="text-align:center"|<code>"meta"</code>
| |
− | |style="text-align:center"|An optional integer
| |
− | |style="text-align:center"|The meta value of the item. This is used to differentiate, for example, andesite and granite from simple stone.
| |
− | |-
| |
− | |style="text-align:center"|<code>"nbt"</code>
| |
− | |style="text-align:center"|An optional NBT tag compound in JSON form.
| |
− | |style="text-align:center"|Any NBT data for the item stack. This might contain display name, lore, enchantments, etc.
| |
− | |}
| |
− | | |
− | A <code>SpawnSet</code> is a grouping of one or more <code>SpawnInfo</code>s along with a small number of properties.
| |