Difference between revisions of "Pikmin 2 area generator file"

From Pikmin Technical Knowledge Base
Jump to navigation Jump to search
Line 1: Line 1:
 
{{note|This page is under construction.}}
 
{{note|This page is under construction.}}
  
An area's generator files can be found in <code>/user/Abe/map/*</code>. Amongst these, the <code>loop</code> and <code>nonloop</code> folders, as well as the <code>defaultgen.txt</code>, <code>initgen.txt</code>, and <code>plantsgen.txt</code> contain data for what objects to spawn in the area, and how.
+
An area's generator files can be found in <code>/user/Abe/map/*</code>. Amongst these, the <code>loop</code> and <code>nonloop</code> folders, as well as the <code>defaultgen.txt</code>, <code>initgen.txt</code>, and <code>plantsgen.txt</code> 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 <code>EF BB BF</code> magic word at the start, the game will not read it correctly, assuming you only have one sublevel. To avoid any issues, use [https://notepad-plus-plus.org/download/v7.5.6.html Notepad++] and check the encoding in the bottom right.
  
 
The <code>loop</code> and <code>nonloop</code> folders have intriguing file-naming formats. They likely mean something, and it's likely related to the days. Possibilities:
 
The <code>loop</code> and <code>nonloop</code> folders have intriguing file-naming formats. They likely mean something, and it's likely related to the days. Possibilities:
Line 38: Line 38:
  
 
==Header==
 
==Header==
Each file starts with a line titled <code># generatorMgr <Generator(Default)></code>. Under this is, <code>{v0.1}</code>, which denotes the format of the file. At the top of the file, under <code>{v0.1}</code>, <code>startPos</code>, and <code>startDir</code> is a number (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.  
+
Each file starts with a line titled <code># generatorMgr <Generator(Default)></code>. Under this is, <code>{v0.1}</code>, which denotes the format of the file. The coordinates next to <code>startPos</code> seem to be useless. Under <code>startDir</code> 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==
 
==Entity==
Underneath that in the brackets is the actual entity; in this case, the Hocotate Ship. The numbers before <code># pos</code> 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.
+
Underneath that in the brackets is the actual entity; in this case, the Hocotate Ship. Everything above <code># pos</code> seems to be debug info for the original programmers with no effect on the entity itself. The numbers next to <code># pos</code> 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 <code># offset</code> 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.
  
 
{{credits| [[User:UnclePaul894|UnclePaul894]]}}
 
{{credits| [[User:UnclePaul894|UnclePaul894]]}}

Revision as of 05:02, 3 June 2019

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&gt.txt
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 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.

Credits: UnclePaul894