Join our discord
In partnership with NodeCraft Logo NodeCraft


You are not logged in! Create an account or login to contribute! Log in here!

Better Spawner/Spawn Info/Collection

From Pixelmon Wiki

SpawnInfoCollection are a special kind of SpawnInfo that contains a list of other SpawnInfos with their own rarities and/or percentages.

An example of how this might be used can be seen in the default fishing loot spawns. Both water and lava loot are in two collections which have "percentage": 15. Inside of each collection are many more spawns. This means that there is a 15% chance of getting some kind of loot from fishing, and when the game has decided it will spawn loot it will then perform another rarity/percentage selection to decide which member of the collection will spawn. It is possible (though not recommended) to make a collection which has more collections inside of it. For example, inside the water loot collection, there might be a collection for 'rare' loot with a fixed percentage chance.

Note: The "stringLocationTypes" property is needed in every element of the collection, even if it's the same as in the collection's list. Properties such as "condition" do not need repeating (the contents of a collection will spawn only when the conditions of the collection itself succeeded).

These are the properties available when a SpawnInfo has "typeID": "collection":

Property label Type of value Description
"collectionLabel" Text. The text name of this collection when it appears in the /checkspawns command. Pixelmon provides a few translation keys such as "spawning.collections.item" and "spawning.collections.pokemon" which will automatically translate into the appropriate language.
"collection" A list of SpawnInfo. All of the possible things to spawn in this collection, in the exact same format as it would have in a SpawnSet.

Example:

{
    "stringLocationTypes": [
	"Land"
    ],
    "typeID": "collection",
    "condition": {
	"times": [
	    "DAY"
        ]
    },
    "percentage": 5,
    "collectionLabel": "A type of Pichu",
    "collection": [
	{
	    "stringLocationTypes": [
		"Land"
	    ],
	    "spec": {
	        "name": "Pichu",
                "form": 0
	    },
	    "typeID": "pokemon",
	    "rarity": 20
	},
	{
	    "stringLocationTypes": [
		"Land"
	    ],
	    "spec": {
		"name": "Pichu",
		"form": 1
	    },
	    "typeID": "pokemon",
            "rarity": 1
	}
    ]
}

Which would be a collection of Pichu where 1 in 21 is a special form.

© 2012 - 2022 Pixelmon Mod