Pikmin 2 area generator file

From Pikmin Technical Knowledge Base
Jump to: navigation, search

Editor's note: This page is under construction.

An area's generator files can be found in /user/Abe/map/*. Amongst these, the loop and nonloop folders, as well as the defaultgen.txt, initgen.txt, and plantsgen.txt contain data for what objects to spawn in the area, and how. These text files must be encoded in Shift-JIS, or at least ASCII. To avoid any issues, use Notepad++ and check the encoding in the bottom right.

The loop and nonloop folders have intriguing file-naming formats. They likely mean something, and it's likely related to the days. Possibilities:

  • <starting day>-<ending day>.txt
  • <starting day>-<number of days&gt.txt
# generatorMgr <Generator(Default)>
{v0.1} 	# version
0.000000 0.000000 0.000000 	# startPos
0.000000 	# startDir
34 	# 34 generators
# 宇宙船
	{v0.1} 	# version
	0 	# reserved
	0 	# 復活日数
	137 70 146 136 145 68 0 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 205 	# <宇宙船>
	-331.454987 80.000000 1228.323975 	# pos
	0.000000 0.000000 0.000000 	# offset
	{item} {0002} 	# onyn
		{onyn} 	# item id
		0.000000 -171.524994 0.000000 	# rotation
		{0001} 	# item local version
		4 	# onyon index
		1 	# after boot? true==1
	# gen base


Each file starts with a line titled # generatorMgr <Generator(Default)>. Under this is, {v0.1}, which denotes the format of the file. The coordinates next to startPos seem to be useless. Under startDir is a number (in this case 34, the number after the hashtag does NOT matter, as does anything else after a hashtag). This number must be the same as the number of entities listed in the file, or else the game will crash.


Underneath that in the brackets is the actual entity; in the above example, the Hocotate Ship. Everything above # pos seems to be debug info for the original programmers with no effect on the entity(enemy or object) itself, EXCEPT for # reserved which if set to zero, the object will only ever load once, and # 復活日数 underneath that, which controls how many days it takes to respawn(if set to zero, it will respawn always, even after leaving a cave). The numbers next to # pos are the entity's x, y, and z coordinates. To find a point's coordinates in a level use 3DS Max or Super Mario Sunshine (SMS) Bin Editor. In # offset are more x y z coordinates that will "offset" or move the entity over more by the amount specified. This value is not used in-game and is basically redundant. Under that is the Entity's class, for example {item} {0002}. Further still under that in the brackets is the # item id. Finally, entities have 3 # rotation values, to rotate it a number of degrees on the x, y, or z axis, respectively. To keep an object upright only change the y parameter. Under that lie the Entity's unique parameters. There are multiple types of Entities in the Overworld, with differing parameters. These include...

Entity categories[edit]

  1. "{item} {0002}"
    • Includes Hocotate Ship, the Onions, Caves, Weight Blocks, Paper Bags, Gates, Rock Clogs, Nectar Grass, Nectar Pebble, and Bridges.
    • Some living things as well, like Burgeoning Spirderwort and the Ujadani.
  2. "{piki} {0001}"
    • Includes all five types of Pikmin, spawning any into overworld is possible.
    • Also seems to deal with Submerged Castle's Blues only code.
  3. {teki} {0005}
    • Includes all things in the Piklopedia; that is to say, enemies.
    • An enemy with a treasure in it is part of this group and has a value of that treasure + 768.
  4. {pelt} {0000}
    • Are exclusively treasures.

*Below, an x is used to denote where the variable is to be input in a parameter line.

Item Id Parameters Notes
{onyn} (onion/ship) x # onyon index x # after boot? true==1 Index 4 = Hocotate Ship, Index 2 = Yellow Onion, Index 1 = Red Onion, Index 0 = Blue Onion, 0 after boot = Onion leaves after a day, 1 after boot = Onion stays for good
{piki} (pikmin) {p000} 4 x # 色 {p001} 4 x # 数 {p002} 4 x # 自活(1=yes) {_eof} {p000} 0 = Blue 1 = Red 2 = Yellow 3 = Purple 4 = White, {p001} x = # of Pikmin, {p002} 0 for idle Pikmin, 1 if otherwise The fours are part of the code
{cave} (caves) x.txt units.txt {x_XX} # id (for stages.txt) # FogParm { {fg00} - {fg09} } First is the caveinfo file, second does nothing, next is the stages.txt id, which includes text and hazard warning data. {fg00} through {fg03} deal with fog zone start and end, how fast it starts and how long it lingers, {fg04} through {fg06} are the colors of the fog, and {fg07} through {fg09} deal with the distances the fog spreads out when inside, when it appears, and when it disspates. The fours are part of the code
{teki} (enemies, plants, and hazards) x # teki x # teki_birth_type x # teki_num x.000000 # face direction x # 0:point 1:circle x.000000 # appear radius x.000000 # enemy size x # お宝アイテムコード x # Pellet color x # Pellet size x # Pellet Min x # Pellet Max x.000000 # Pellet Min Has it's own section down below.
{pelt} (treasure) x } under pellet local version The Treasure's ID
{brdg} (stick bridges) x #橋タイプ 0 = short bridge 1 = slope bridge 2 = long bridge
{gate} (bramble gates) x.000000 #ライフ x #Color First parameter is the gate's HP, second is the gate's color. 1 for black, 0 for white
{dgat} (electric gates) x.000000 #ライフ The gate's health. Only comes in one color.
{rock} (spiderwort mold) {0000} # item local version Unknown effect. It is in fact called {rock}.
{barl} (rock clog) {0000} # item local version Unknown effect. Rock clogs really are called {barl}
{plnt} (burgeoning spiderwort) x #実タイプ What kind of berries it grows. 0 for red, 1 for blue, 2 for a mix of both.
{ujms} (ujadani bugs) x #うじゃ王数 Number of bugs in the group.
{weed} (nectar grass/pebble) x #うじゃ王数 x #石か草か x #1 = amount of grass x #2 = 0 for stone, 1 for nectar grass
{dwfl} (weight blocks and paper bags) x #沈み人数 x #type x # 1:seesaw First variable is # of pikmin needed to push it down, second is what it is; 0 for spaced out blocks, 1 for grouped blocks, 2 for paper bag. Last parameter is if it can be pushed up by another block.


Entities in the Teki category have by far the most complex parameters of all types, and thus have their own section.

Parameter Notes
x # teki The Enemy's ID.
x # teki_birth_type Unknown
x # teki_num Number of enemies to spawn, used if # 0:point 1:circle is > 2.
x.000000 # face direction Direction it faces, in degrees.
x # 0:point 1:circle Spawn Type. 0 = At exact Coordinates, 1 = Radius around Coordinates, 2 or more = Multiple
x.000000 # appear radius Radius Area it appears in, if used.
x.000000 # enemy size Unknown
x # お宝アイテムコード Id of treasure to drop, plus 768 or 1024 for Exploration Kit Treasures.
x # Pellet color Color of pellets it drops. 0 = Blue 1 = Red 2 = Yellow 3 = All.
x # Pellet size Size of dropped pellets; 1, 5, 10, or 20.
x # Pellet Min Minimum number of pellets it drops.
x # Pellet Max Maximum number of pellets it can drop.
x.xxxxxx # Pellet Min Different from the first, this controls the percent chance it will drop pellets. 1.0 is 100%
x # pellet type Only used with Pellet Posies.
x # pellet size Size of pellet it bares; only 1, 5, 10, or 20.
x # size Only used with Pellet Posies. Works just like the above # Pellet color.
Credits: UnclePaul894