Pikmin route

From Pikmin Technical Knowledge Base
Revision as of 06:19, 5 April 2018 by Kai (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In Pikmin, carrying paths can be found inside mod files, in /courses/*/*.mod. Although mod files contain the model information, they also have a section at the end in plain text that describes the paths.

Format[edit]

The information is at the end of the mod file, and starts with // Route info file for, followed by the name of the file. Each route's information is contained inside a route block, delimited by curly braces. Some areas have more than one route file, but only one of them usually has content.

A route's information starts with 3 general parameters, one per line. The first one is the id, which is test for the routes that don't go unused.

The next parameter, in the next line, is name, which again, is sample route for routes that don't go unused.

The next one is colour, in the format R G B A. Its purpose is unknown.

After that come the definitions of the waypoints in the route, and after those, the links.

Waypoint[edit]

Each waypoint is defined inside a point block.

The first parameter is index, which is a number that identifies the waypoint. The count starts at 0, and the indexes always match the declaration order. In other words, the 57th waypoint defined will always have index 56.

Next comes the state parameter, whose purpose is unknown. In all used areas, this value is always 1.

Afterwards comes the pos parameter, with the point's coordinates, in the format X Y Z. X represents North/South, Y represents verticality, and Z represents West/East.

The final parameter is width, which indicates the waypoint's diameter. Its purpose is unknown, but the other games in the series have waypoints with diameters as well.

Link[edit]

Each link is defined inside a link block.

It only contains two numbers: one is the numerical ID of the first waypoint, and the other is the numerical ID of the second. This creates a one-way link between waypoint 1 and waypoint 2. If the Pikmin are able to go from 1 to 2 and from 2 to 1, then a link must exist that has the numbers in the opposite order as well.

Example[edit]

Example from The Impact Site. Cut content is displayed as (...).

(...)// Route info file for practice.mod
route {
	id		test
	name	'sample route'
	colour	0 119 255 97

	point {
		index	0
		state	1
		pos	-244.062714 0.000000 1578.180908
		width	74.215790
		}

	point {
		index	1
		state	1
		pos	-346.680359 0.000000 1259.614258
		width	62.411083
		}
(...)
	link { 0 5 }
	link { 0 6 }
	link { 0 27 }
	link { 0 29 }
	link { 1 3 }
	link { 1 11 }
(...)