Difference between revisions of "Cave unit definition file"
(Created page with "In ''Pikmin 2'', each sublevel points to a cave unit list file. These files can be found in <code>/user/Mukki/mapunits/units</code>, and contain a list of units that the game...") |
(→Unit) |
||
Line 17: | Line 17: | ||
The sixth line indicates how many exits this unit has. The lines after this one contain data about each exit. | The sixth line indicates how many exits this unit has. The lines after this one contain data about each exit. | ||
+ | |||
+ | ==== Line 8: <code>dirs/offs/wpindex</code> ==== | ||
+ | This line contains three words, all numbers. | ||
+ | The first number (<code>dirs</code>) is the direction of the room and player. For example, if in the Emergence Cave, the forward facing direction is <code>2</code>, which is the way you face in the level. For all other rooms to connect they must also be <code>2</code>. This value is ''currently'' useless because all rooms must be the same value for them to connect to each other. | ||
===Exits=== | ===Exits=== |
Revision as of 12:55, 23 April 2017
In Pikmin 2, each sublevel points to a cave unit list file. These files can be found in /user/Mukki/mapunits/units
, and contain a list of units that the game is allowed to use to create the cave with.
Header
After a decorated set of comments that say units definition file
comes a line containing the number of units defined in this file. This line is commented with number of units
. Each unit's data is defined inside its own block, and conveniently has a comment before it that mentions its name.
Unit
The first line in the block is the version of the block's data format[unsure].
The second line is the internal name of the unit.
The third line consists of two words, each a number, that define how many cave grid cells this unit takes up. The first word is for the length in X, the second for the length in Z. Basically, this means "this unit is X by Z units big".
The fourth line determines the type of unit this is. 0
is a dead end, 1
is a room, and 2
is a corridor.
The fifth line determines the unit's flags.
To do: Document the unit's flags.
The sixth line indicates how many exits this unit has. The lines after this one contain data about each exit.
Line 8: dirs/offs/wpindex
This line contains three words, all numbers.
The first number (dirs
) is the direction of the room and player. For example, if in the Emergence Cave, the forward facing direction is 2
, which is the way you face in the level. For all other rooms to connect they must also be 2
. This value is currently useless because all rooms must be the same value for them to connect to each other.
Exits
The first line in an exit's data is its index. This starts at 0.
To do: Document the remaining lines.