Caves are the underground areas in Pikmin 2, of which 14 exist in all. Although there is a large overworld, most treasures are found in these caves, so most of the time playing the game is spent down them. All enemies, including bosses, respawn between visits - the only exceptions to this are Violet Candypop Buds and Ivory Candypop Buds, which, in some caves such as Frontier Cavern and Hole of Beasts, do not appear once the player has 20 or more Purple Pikmin or White Pikmin already.
The time of day does not pass while the player is in a cave, and their floors are generated randomly each time, but follow a specific layout scheme. According to earlier versions of the game, this is because the space-time continuum was warped due to the cave's geomagnetic radiation field. The final version's instruction manual simplifies this and simply calls it "a powerful magnetic field".
Caves are entered though holes. To enter one, the player must press / while near it. If the other leader is alive, it'll instantly join the party, regardless of distance. Any Pikmin under the current leader's control will jump down with them, and any that are idle, working, or on an idle leader's group will return safely to their Onions. Once the player enters a cave, there is no way to increase Pikmin population save for Bulbmin and/or Queen Candypop Buds. It is not possible to enter a cave without Pikmin.
Inside a cave, if both leaders lose all their health or all Pikmin die, the research pod will cancel the expedition, losing the collected treasures in the process, and then bring them to the overworld. A mission can also be aborted manually by using the pause menu.
The other Pikmin games do not have caves like the ones in Pikmin 2, but have underground locations regardless. Pikmin has The Forest Navel, Pikmin 3 has underground sections within its main areas, and Hey! Pikmin has some cave-themed levels.
List of caves
Each cave is divided into several sublevels. Each sublevel consists of a small area, that gets randomly generated every time it is entered, and will usually have at least one treasure and a few enemies. The shortest cave – Emergence Cave – has two sublevels and the longest – Hole of Heroes – has fifteen.
When a cave is entered, the player will land in its first sublevel, and will be able to proceed through that cave's sublevels in order through the use of holes. When, / is pressed near a hole, all Pikmin and live leaders will jump down the hole, landing in the next sublevel. Planted Pikmin will remain in the same sublevel and be lost forever. Some sublevels have geysers that allow the player to safely leave a cave from that sublevel.
Every time a sublevel is entered, the game is saved, so if the player turns the game off and then back on again, they will start in the same sublevel, but it will be generated randomly again.
Sublevels can be roughly categorized into three types:
Normal levels usually have a few harmful enemies, and sometimes don't have any treasure.
Rest levels either lack enemies or only have harmless enemies (exceptions being Doodlebugs and Bulbmin). Rest levels have Pikmin-supporting items, such as nectar, ultra-bitter spray, ultra-spicy spray, or Candypop Buds. These levels usually lack treasures, and feature a special musical ambience. Most rest levels also have a geyser available, so the player can return to the surface if they have a low number of Pikmin.
Boss levels are usually the final level of a cave. The only cave without a boss level is the Emergence Cave, and the one with the most is the Hole of Heroes. They hold one large boss enemy (although in some rare circumstances there may be up to three) and maybe a few normal enemies, and the boss, when defeated, often drops an item which upgrades the leaders' space suits or ship.
To enter a cave, the leaders and Pikmin must dive into a hole. To go from one sublevel to the next, they must also go down a similar hole.
The holes are round, rocky mounds, with a small hole in them. On the cave entrance hole, if the cave has uncollected treasure, wisps of steam will come out, and the screen will become foggy when the hole is approached. Inside a cave, the hole to a next sublevel will always contain steam, but will not fog the screen.
To enter a hole, the player must simply press / when their leader is close to it.
Even though most sublevels are randomly generated, there are consistent themes shared between them. The following is a list of themes used in the game, based on what the units are called in the game's files.
Some caves have a background (also called a "skybox", or "VRBOX", as they're known internally), as a wall and/or bottom way off in the distance. Because they're so far away, it may be hard to see them over the fog and lighting. Designs that are meant to give off the idea that the leaders and Pikmin are enclosed in a burrow do not have a background, but other sublevels normally do. There can be any sort of sublevel theme and background combination.
When a sublevel is entered, the game generates it randomly; it starts by building random terrain, and then populates it with random objects.
A sublevel's terrain is composed of several cave units stitched together. Each unit can be a dead end, a corridor, or a room, and has some spots where objects can spawn; each spot contains data about the amount and type of object that can spawn there. In each sublevel's configuration, there is data about which cave units it is allowed to use, and data about how the dead ends, corridors, and rooms should work in terms of quantities. The game then uses this information to randomly create and connect cave units.
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: 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, 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:
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 here.
Cave entrance leader mixup
When entering the first sublevel of a cave, the game may or may not switch the player's active leader. This does not happen when the player goes from one sublevel to the next, making it mysterious as to why the leader changes seemingly randomly when going to the first sublevel.
In reality, this happens because of a simple glitch. In order to decide what leader to turn active whenever a sublevel is entered (be it the first or not), the game reads a variable in memory. This variable is also saved onto the save game data and loaded from it. It is set whenever the player goes from one sublevel to the next, which explains why, when the next sublevel is loaded, the game selects the correct leader. However, this variable never gets set when the cave itself is entered. This means that when the first sublevel is finished loading, the game reads the variable, and uses an outdated value, last updated when a sublevel hole was entered. This glitch was not fixed for the New Play Control! rerelease.
It can also be noted that Challenge Mode uses a different behavior, without a glitch, and that the default value of the variable is 0, meaning that at the start of the game, before the player goes from one sublevel to the next, the game will make Olimar the active leader when entering a cave.
Hole entrance grunt mixup
When entering a cave or sublevel hole, each leader grunts as he jumps. However, the first leader to jump will always make Olimar's sound effect, and the one behind will always make Louie's, regardless of the existing leaders and their order. The only exception is if the second leader is fallen, at which point only the first leader will grunt, still with Olimar's voice.
Even though the cave and sublevel information is present in human-readable format within the game's files, some of their settings appear to make no sense, as the values in the files don't match up to what happens in-game. The following assumed discrepancies have been noted: