Pikmin 2 waterboxes
waterbox.txt hold x, y and z coordinates that tell the game where to draw a waterbox in 3D space. These files are typically located in
texts.szs archives such as
user/kando/map/*/texts.szs/waterbox.txt. Each body of water is defined to be in the shape of a cuboid.
Each file start with a version number on line 1, commented with
#type, it is unknown how this may affect the parsing of the file or effect on the waterboxes themselves.[unsure].
On line 2, it has a comment of
#CNode as a label of the array that starts on line 3.
Line 3 starts the array with a single bracket, where the first piece of data (line 4) holds the total number of waterbox coordinates it contains.
The array defines the waterbox as two sets of coordinate points with x, y and z positional values stored as floats. The game will draw a waterbox that fills the area between the two points defined. The format of the data that stores these values is
<X1> <Y1> <Z1> <X2> <Y2> <Z2>.
In the vanilla files each waterbox coordinates are commented with an identification number (starts at 0), and the total number of boxes (e.g.
# 2/4). Comments aren't necessary and are never parsed. They are simply just labels to help track and organize data.
This is the file used for the Wistful Wild's water boxes.
|File line||Data||Line explanation|
0 # type
|Version type of waterbox file. Meaning is unknown.[unsure]|
|Comment, presumably the label of the array|
|Start of array|
|First value of the array will always hold the total number of waterboxes.|
-3700.000000 -110.000000 850.000000 -2500.000000 -10.000000 1650.000000 # 0/2
|The set of x, y, and z positional values of the two coordinate points of the first waterbox.|
-2000.000000 -90.000000 50.000000 -1000.000000 10.000000 1450.000000 # 1/2
|Ditto for second waterbox.|
|End of array.|
Notes: While the water will still appear and be animated, if the Y1-Y2 distance (or depth) isn't large enough then it will not behave like water. One would assume the depth must be 100 units, based on the two given examples.