Cave unit generation

From Pikmin Technical Knowledge Base
Jump to: navigation, search

The caves you see in Pikmin 2 are interesting that it takes individual models and stitches them together to create what you see. The information necessary for this is split between two folders.

Arc folder[edit]

In /user/Mukki/mapunits/arc/* it contains two SZS archives which contain the bulk of the data. The arc.szs contains the model data in BMD format as well as its corresponding pause menu map texture as an IA BTI texture. The second archive labeled texts.szs contains it's collision, mapcode, route, and waterbox data. Extracting these archives puts them under the same folder called tmp.If you intend to recompile these folders with changes you've made make sure the split up the files according to which SZS archive contained them.

arc.szs[edit]

BMD model[edit]

BMD models used for caves are particular given that the model typically must be created in chunks that are in 170x170 meters. This consistancy is necessary for the game to be able to correctly place each individual model seamlessly along one another. Some caves may only consist of a single large model. This gives a bit of creative freedom in the sense that the cave will always look the same without the RNG factor of cave generation. Consistant sizes aren't needed here since there is no concern for attaching two models. See here for more information on creating a custom model.

texture.bti[edit]

To do: Create and link a page that details BTI texture formats.

A tiny texture that is used by the game to build the map you see on the pause menu. Each 8x8 pixels represents each 170x170 meters from its corresponding model. It is in an IA compressed BTI format. More information about GameCube's BTI texture formats can be found here.

text.szs[edit]

grid.bin[edit]

This holds the collision data for area models. Yoshi2's tool obj2grid[1] converts any .OBJ to a working grid.bin and mapcode.bin that will work in-game.

mapcode.bin[edit]

Handles extra data assigned to the grid.bin's mesh to change the collision's "slipperiness" and footstep sounds.

layout.txt[edit]

This file controls the spawn coordinates for objects.

route.txt[edit]

Carrying paths plotted in coordinates based off the model.

waterbox.txt[edit]

Water boxes placed as two sets of coordinates to spawn a pool of water.

To do: Create and link a page that details waterbox.txt format.

Units folder[edit]

This folder /user/Mukki/mapunits/units/* holds definitions that tells the game how to correctly position together a group cave units. More information can be found at this page.