Editing Cave unit generation
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: | ||
− | + | Each cave unit in ''Pikmin 2'' has a SZS file with its settings. Each unit's setting file archive can be found in <code>/user/Mukki/mapunits/arc/*/texts.szs</code>. | |
− | |||
− | |||
− | |||
− | == | + | ==grid.bin== |
− | + | [[Pikmin 2 collision format|Collision file for area models]]. | |
− | == | + | This file is the collision data located where the waterbox and mapcode files are for area maps. Yoshi2's tool [https://github.com/RenolY2/obj2grid|obj2grid] converts any .OBJ to a perfectly working <code>grid.bin</code> and <code>mapcode.bin</code> which will work in-game. |
− | |||
− | |||
− | |||
− | |||
− | This | ||
− | === | + | ==layout.txt== |
− | + | 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. | ||
− | ===[[Cave | + | ===Spawn coordinate=== |
− | + | The first line in the block is the "type". Think of it as a group. 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]]. | |
+ | |||
+ | The second line is the coordinates themselves, in the format <code>X Y Z</code>. | ||
+ | |||
+ | {{todo|Document the third line.}} | ||
+ | |||
+ | The fourth line is the maximum radius in which the enemies can randomly spread out from the initial point. | ||
− | + | 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). | |
− | |||
− | == | + | ==mapcode.bin== |
− | + | {{todo|Document this.}} | |
+ | More Collison. | ||
− | == | + | ==route.txt== |
− | + | Carrying paths. | |
+ | {{todo|Document this.}} | ||
+ | ==waterbox.txt== | ||
+ | Water boxes in the unit. | ||
+ | {{todo|Document this.}} | ||
[[Category:Pikmin 2]] | [[Category:Pikmin 2]] | ||
[[Category:File formats]] | [[Category:File formats]] |