Cave: Difference between revisions

37 bytes added ,  4 years ago
→‎Generation: Linked to a list of known failed spawn cases, for important objects.
(→‎Generation: Might as well point this out, so players don't think all failed spawns are algorithm flaws.)
(→‎Generation: Linked to a list of known failed spawn cases, for important objects.)
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, 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: 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.


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}}}}