Cave: Difference between revisions

124 bytes added ,  4 years ago
→‎Generation: Provided a better example.
(→‎Generation: Linked to a list of known failed spawn cases, for important objects.)
(→‎Generation: Provided a better example.)
Line 112: Line 112:
Each sublevel's configuration also has information about what objects to spawn. After generating the layout, the game decides how many objects of each type it wants to spawn, and starts picking spawn positions from the cave units in this sublevel, to find appropriate locations to place the objects in. If some objects have a minimum mandatory amount, the game starts by spawning those. Then it must fill the rest of the sublevel (up to a limit written in the configuration) with objects picked from a random list.
Each sublevel's configuration also has information about what objects to spawn. After generating the layout, the game decides how many objects of each type it wants to spawn, and starts picking spawn positions from the cave units in this sublevel, to find appropriate locations to place the objects in. If some objects have a minimum mandatory amount, the game starts by spawning those. Then it must fill the rest of the sublevel (up to a limit written in the configuration) with objects picked from a random list.


Because the sublevel generation doesn't use many fixed numbers, and instead opts to use statistics and probabilities to generate nice sublevels, the game can sometimes create a sublevel where non-mandatory objects ''can'' spawn, but do not. Worse still, it can create a sublevel that physically cannot accommodate some of the intended cave units or objects. For example: if a sublevel is meant to use a specific room with 4 plant spawn points, and is meant to spawn 10 Figworts (that only appear in rooms), the game can generate a sublevel with 3 rooms, and place all 10 Figworts about. But in a different attempt, the game could generate a sublevel with two rooms only, and so it can only spawn 8 of the 10 intended Figworts. This happens often with decorative objects, but can, in rare cases, [[Mistake#Missing sublevel objects|happen with important objects]]. Players should be wary about this possibility, and if they find an important item is missing, they can reset the console and try for another sublevel layout.
Because the sublevel generation doesn't use many fixed numbers, and instead opts to use statistics and probabilities to generate nice sublevels, the game can sometimes create a sublevel where non-mandatory objects ''can'' spawn, but do not. Worse still, it can create a sublevel that physically cannot accommodate some of the intended cave units or objects. For example: [[Frontier Cavern]] sublevel 4 wants to spawn a Violet Candypop Bud. One generated sublevel has 4 dead ends, so both treasures, the hole, and the Violet Candypop Bud appear in dead ends. But in a different attempt, the game generates a sublevel with 3 dead ends – only the treasures and hole will have a spot, and the Violet Candypop Bud will not show up. This happens often with decorative objects, but can, in rare cases, [[Mistake#Missing sublevel objects|happen with important objects]]. Players should be wary about this possibility, and if they find an important item is missing, they can reset the console and try for another sublevel layout.


Scenarios that can make an object not appear include:{{cite web|https://pikmintkb.com/wiki/Cave_spawning|Cave spawning|Pikmin Technical Knowledge Base|retrieved={{date|25|October|2019}}}}
Scenarios that can make an object not appear include:{{cite web|https://pikmintkb.com/wiki/Cave_spawning|Cave spawning|Pikmin Technical Knowledge Base|retrieved={{date|25|October|2019}}}}
* There aren't enough cave units of a given type to fit all objects that want to go in these units.
* The picked spawn points generated random amounts that were too low, and the sublevel ran out of unused spawn points for an object.
* The picked spawn points generated random amounts that were too low, and the sublevel ran out of unused spawn points for an object.
* The object would appear too close to the Research Pod.
* The object would appear too close to the Research Pod, geyser, or hole.
* The object spawns [[out of bounds]] (spawn points randomly offset the spawned objects by an amount).
* The object spawns [[out of bounds]] (spawn points randomly offset the spawned objects by an amount).


Note that treasures in story mode can fail to appear because they have already been collected, and Candypop Buds can fail to appear if the player has too many Pikmin, as explained [[Candypop family#Maximum Pikmin requirement|here]].
Note that treasures in story mode can fail to appear because they have already been collected, and Candypop Buds will fail to appear if the player has too many Pikmin, as explained [[Candypop family#Maximum Pikmin requirement|here]].


==Oddities==
==Oddities==