Editing Cave generation parameters
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'', the files that define a cave's settings can be found in <code>/user/Mukki/mapunits/caveinfo</code>. For instance, the Emergence Cave uses <code>tutorial_1.txt</code> | + | In ''Pikmin 2'', the files that define a cave's settings can be found in <code>/user/Mukki/mapunits/caveinfo</code>. For instance, the Emergence Cave uses <code>tutorial_1.txt</code>. |
− | + | ==Header== | |
+ | Each file starts with a simple block titled <code>CaveInfo</code>. It contains only one parameter, <code>{c000}</code>, with takes two values, a <code>4</code> and the number of sublevels in the cave. | ||
− | + | After the opening block, there is a lone number. This number is, once again, the number of sublevels in the cave. After this comes a series of blocks, with each group of 5 belonging to a sublevel. | |
− | |||
− | Each | + | ==Sublevel== |
+ | Each sublevel starts with a block titled <code>FloorInfo</code> (the comment for the first sublevel has a number to the left of it; this is the [[#Header|number of sublevels]]). | ||
− | + | ===FloorInfo=== | |
+ | This block has a large number of parameters that determine how the sublevel works. | ||
− | { | + | {{todo|List the parameters.}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ===TekiInfo=== | |
+ | The next block in the sublevel is titled <code>TekiInfo</code>, and determines what enemies to spawn. | ||
− | + | The first number in the block is the total of entries. It is titled <code>num</code>. Each entry consists of two lines. | |
− | + | The first line in an entry determines the enemy's type, what object it has inside, how many to spawn, and how likely this enemy is to be used to fill the enemy slots. The first word contains both the enemy type (using its internal name, starting with an uppercase), and, if the enemy is carrying something inside it, the internal name of the object, after an underscore. The second word is a number, where the last digit is the spawn distribution weight (ranges from 0 to 9, explained [[Cave enemy spawning|here]]) and the other digits are the minimum number to spawn. A distribution weight of 0 means that the game will only spawn the minimum number and no more. This line is commented with <code>weight</code>. | |
− | |||
− | + | The second line of each entry is the "position type". It controls where the enemy spawns. The number ranges from 0 to 8, and it determines which group of spawn coordinates the enemy goes to. This line is commented with <code>type</code>. Although objects belonging to the right groups isn't a hard rule, each group was designed for a type of object. The following was obtained by reading the comments on the various [[Cave unit definition file|unit layout files]], in <code>/user/Mukki/mapunits/arc/*/texts.szs/layout.txt</code>. | |
− | + | {| class="wikitable" | |
− | + | ! Group || Content || Notes || <code>layout.txt</code> comment | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {| class="wikitable | ||
− | |||
− | ! | ||
− | | | ||
− | | <code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | 0 || Enemies, group A || || <code>Teki A</code> |
|- | |- | ||
− | | <code> | + | | 1 || Enemies, group B || || <code>Teki B</code> |
|- | |- | ||
− | | <code> | + | | 2 || Treasures || There is no cave definition file that uses this number. || <code>Item</code> |
|- | |- | ||
− | | | + | | 3 || '''Unused''' || There is no cave definition file or cave unit definition file that uses this number. || |
|- | |- | ||
− | | <code> | + | | 4 || {{unsure|Unknown}} || || <code>FixObj</code> |
|- | |- | ||
− | | | + | | 5 || {{unsure|Unknown}} || Used in some cave definition files, but not used in any cave unit definition file. || |
|- | |- | ||
− | | <code> | + | | 6 || Plants || || <code>Plant</code> |
|- | |- | ||
− | | <code> | + | | 7 || {{unsure|Leader spawn position?}} || || <code>Start</code> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | 8 || Enemies, group C || || <code>Teki F</code> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | | | ||
|} | |} | ||
− | === | + | ===ItemInfo=== |
− | + | The next block is titled <code>ItemInfo</code>. It controls how treasures spawn. Treasures inside enemies aren't included here. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | {{todo|Expand.}} | |
− | + | ===GateInfo=== | |
+ | The next block is titled <code>GateInfo</code> and controls what gates will appear. | ||
− | + | {{todo|Expand.}} | |
− | |||
− | + | ===CapInfo=== | |
+ | The final block in a sublevel is titled <code>CapInfo</code>. It determines what objects to spawn in dead ends. | ||
− | + | {{todo|Expand.}} | |
− | |||
− | {| | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Category:Pikmin 2]] | [[Category:Pikmin 2]] | ||
[[Category:File formats]] | [[Category:File formats]] |