Pikmin 2 area generator file
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. If the file is saved as a UTF-8 text file with the EF BB BF
magic word at the start, the game will not read it correctly, assuming you only have one sublevel. 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>.txt
Contents
Example
# 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 { {_eof} } }
Header
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.
Entity
Underneath that in the brackets is the actual entity; in this case, 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. 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.
There are multiple types of Entities in the Overworld, with differing parameters. These include...
Entity categories
- "{item} {0002}"
- Includes Hocotate Ship, the Onions, Caves, Weight Blocks, Gates, Rock Clogs, Nectar Grass, Necter Pebble, and Bridges
- Some living things as well, like Burgeoning Spirderwort and the Ujadani.
- "{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.
- {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
- {pelt} {0000}
- Are exclusively treasures.