Editing Cave unit layout file

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
In ''Pikmin 2'', each cave unit has a <code>layout.txt</code> file, which controls the spawn coordinates for objects and a few other special things. These can be found in <code>/user/Mukki/mapunits/arc/*/arc.szs/tmp/layout.txt</code>.
+
This file controls the spawn coordinates for objects. The second line of the file, which follows the comment <code>BaseGen file</code>, specifies the number of spawn coordinate entries in the list. It is commented with <code>num gens</code> (number of generators).Each entry in the list is inside its own block. The first line in the block is the "type". Think of it as a group.  
  
== Format ==
+
Whenever the game wants to spawn an enemy, it picks a random coordinate from the same group as the enemy is. For instance, static Gatling Groinks should probably belong in a different group from the regular, free-roaming enemies. For a list of group IDs and what they're normally used for (although this is not a hard rule), see [[Cave definition file#Type|here]].
  
=== Header ===
+
The second line is the coordinates themselves, in the format <code>X Y Z</code>.
The first value in the file specifies the number of spawn coordinate entries this cave unit has. In the canon files, it is commented with <code>num gens</code> ("number of generators"), and is on the second line, since the first line has the comment, <code>BaseGen file</code>.
 
  
After the header follows the list of entries.
+
{{todo|Document the third line.}}
  
=== Entry ===
+
The fourth line is the maximum radius in which the enemies can randomly spread out from the initial point.
Each entry in the list is inside its own block, delimited with <code>{</code> and <code>}</code>.
 
  
The first line in the block is the "type of coordinate". Only objects that match this type can spawn here. For a list of type IDs and what they're normally used for (although this is not a hard rule), see [[Cave definition file#Type|here]].
+
The fifth and sixth lines are the lower and upper limits of the random amount. Every time the game picks a spawn coordinate to use, it generates a number between these two limits, inclusive. Then, it spawns that number of enemies in this spot (until it spawns more than it intended to, at least).
 
 
The second line is the coordinates themselves, in the format <code>X Y Z</code>. The coordinates are based on the cave unit, not the world coordinates.
 
 
 
The third line is the angle spawned objects will face, given in degrees.
 
 
 
The fourth line is the maximum radius in which the objects can randomly spread out from the initial point. Whenever an object chooses to spawn here, it randomly spreads out from the exact coordinates, using this information.
 
 
 
The fifth and sixth lines are the lower and upper limits of the random amount, respectively. Every time the game picks a spawn coordinate to use, it generates a number between these two limits, inclusive. Then, it spawns that number of objects in this spot (until it spawns more than it intended to, at least).
 
 
 
[[Category:Pikmin 2]]
 
[[Category:File formats]]
 

Please note that all contributions to Pikmin Technical Knowledge Base are considered to be released under the Creative Commons Attribution-ShareAlike (see Pikmin Technical Knowledge Base:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)