Difference between revisions of "Cave unit definition file"
(Undo: That makes no sense.) |
(→Unit) |
||
Line 6: | Line 6: | ||
==Unit== | ==Unit== | ||
− | + | {| class="wikitable sortable" | |
+ | |- | ||
+ | ! Line || Example || Description || Comment | ||
+ | |- | ||
+ | | 1 || <code>{</code> || Open unit entry || No comment | ||
+ | |- | ||
+ | | 2 || <code>1</code> || Version || <code>version</code> | ||
+ | |- | ||
+ | | 3 || <code>room_ike1_2_tsuchi</code> || Folder name of the unit to spawn || <code>foldername</code> | ||
+ | |- | ||
+ | | 4 || <code>7 6</code> || Width (7) and height (6) of the unit that's spawning (line 3); defines how many cave grid cells this unit || <code>dX/dZ ; cell size</code> | ||
+ | |- | ||
+ | | 5 || <code>1</code> || Room type: 0=dead end, 1=room, 2=hallway || <code>room type</code> | ||
+ | |- | ||
+ | | 6 || <code>0 1</code> || The unit's flags; {{unknown}} || <code>room Flags</code> | ||
+ | |- | ||
+ | | 7 || <code>2</code> || The number of doors (exits) the unit has || <code>num doors</code> | ||
+ | |} | ||
− | + | From this point onwards, before ending the unit entry, there are four lines for each door sub-entry. | |
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | ! Line || Example || Description || Comment | ||
+ | |- | ||
+ | | 1 || <code>0</code> || Door index || <code>index</code> | ||
+ | |- | ||
+ | | 2 || <code>0 0 0</code> || Direction, offset, and wpindex {{unsure}} || <code>dir/offs/wpindex</code> | ||
+ | |- | ||
+ | | 3 || <code>1</code> || The number of doors this can link to || <code>door links</code> | ||
+ | |} | ||
− | + | From this point onwards, before ending the door sub-entry, there is one line for each door link. | |
− | + | {| class="wikitable sortable" | |
− | + | |- | |
− | + | ! Line || Example || Description || Comment | |
− | + | |- | |
− | + | | 1 || <code>1258.716064 0 1</code> || Distance, door ID, and tekiflag || <code>dist/door-id/tekiflag</code> | |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{todo|Offs and wp index need to be documented}} | {{todo|Offs and wp index need to be documented}} |
Revision as of 12:06, 15 April 2019
In Pikmin 2, each sublevel points to a cave unit definition 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. This file just tells the generator how each cave unit attaches with one another. In other words, this file specifies all the rooms to spawn in a sublevel, depending on that sublevel's room count ({f005}
).
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
Line | Example | Description | Comment |
---|---|---|---|
1 | { |
Open unit entry | No comment |
2 | 1 |
Version | version
|
3 | room_ike1_2_tsuchi |
Folder name of the unit to spawn | foldername
|
4 | 7 6 |
Width (7) and height (6) of the unit that's spawning (line 3); defines how many cave grid cells this unit | dX/dZ ; cell size
|
5 | 1 |
Room type: 0=dead end, 1=room, 2=hallway | room type
|
6 | 0 1 |
The unit's flags; Unknown[unsure] | room Flags
|
7 | 2 |
The number of doors (exits) the unit has | num doors
|
From this point onwards, before ending the unit entry, there are four lines for each door sub-entry.
Line | Example | Description | Comment |
---|---|---|---|
1 | 0 |
Door index | index
|
2 | 0 0 0 |
Direction, offset, and wpindex Unknown[unsure] | dir/offs/wpindex
|
3 | 1 |
The number of doors this can link to | door links
|
From this point onwards, before ending the door sub-entry, there is one line for each door link.
Line | Example | Description | Comment |
---|---|---|---|
1 | 1258.716064 0 1 |
Distance, door ID, and tekiflag | dist/door-id/tekiflag
|
To do: Offs and wp index need to be documented
Line 3: The number of door links. For example, 2 # door links
.
Line 4(+): Ddst/door-id/tekiflag; there are as many lines for these three numbers as there are door links (specified in line 3). For example, 849.951904 1 1 # dist/door-id/tekiflag
.