Difference between revisions of "Cave generation parameters"

From Pikmin Technical Knowledge Base
Jump to navigation Jump to search
 
(36 intermediate revisions by 9 users not shown)
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>. All comments (Japanese or English statements followed by a <code>#</code>) are unnecessary and deleting them will save file space.
  
All comments (Japanese or English statements followed by a <code>#</code>) are unnecessary and deleting them will save file space.
+
To avoid any issues when reading or writing these files, use [https://notepad-plus-plus.org/download/v7.5.6.html Notepad++].
  
==Header==
+
== Concepts ==
Each file starts with a simple block titled <code>CaveInfo</code>. It contains only one parameter, <code>{c000}</code>, which takes two values, a <code>4</code> and the number of sublevels in the cave.
+
It is important to know these basic concepts.
  
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 object-related block in a sublevel has a series of data on what objects to spawn, and how. In this page, each of these data is called an '''entry'''. Each entry merely contains information about ''how'' to spawn an object, it does not actually reflect a specific object. For instance, there could be an entry for a Dwarf Bulborb that fall from the sky carrying the Essence of Desire, but the game could spawn 10 Dwarf Bulborbs from this entry &ndash; in this case all ten would fall from the sky and carry the Essence of Desire.
  
==Sublevel==
+
Each entry can belong to one of the following categories, which affect many things, some of which are detailed in this table:
Each sublevel starts with a block commented with <code>FloorInfo</code>, where the sublevel's data is, and then four blocks that determine what objects to spawn. The process is explained in the sections for these blocks, but the general algorithm is also explained '''[[Cave spawning|here]]'''.
 
  
The comment for the first sublevel's <code>FloorInfo</code> block has a number to the left of it; this is the [[#Header|total number of sublevels]]).
+
{| class="wikitable sortable"
 +
! Category || Block || Kind of object || Locations || Min. amount? || Used for filler? || Other notes
 +
|-
 +
! Main
 +
| [[#TekiInfo|TekiInfo]]
 +
| Anything but treasures and gates
 +
| "Room" cave units
 +
| Yes
 +
| Until the limit in [[#FloorInfo|parameter <code>{f002}</code>]]
 +
| [[#Spawn type|Spawn type]] is 0, 1, 5, or 8
 +
|-
 +
! Decorative
 +
| [[#TekiInfo|TekiInfo]]
 +
| Anything but treasures and gates
 +
| "Room" cave units
 +
| Yes
 +
| No
 +
| [[#Spawn type|Spawn type]] is 6
 +
|-
 +
! Treasure
 +
| [[#ItemInfo|ItemInfo]]
 +
| Treasures only
 +
| "Room" cave units or those with "item" in the name
 +
| Yes
 +
| Until the limit in [[#FloorInfo|parameter <code>{f003}</code>]]
 +
|
 +
|-
 +
! Gate
 +
| [[#GateInfo|GateInfo]]
 +
| Gates only
 +
| Seams between units
 +
| No
 +
| Until the limit in [[#FloorInfo|parameter <code>{f004}</code>]]
 +
|-
 +
! Dead end
 +
| [[#CapInfo|CapInfo]]
 +
| Anything but gates
 +
| "Dead end" cave units with "item" in the name
 +
| Yes
 +
| Until it runs out of dead ends
 +
|
 +
|}
  
===Object categories===
+
These categories are not recognized by the game, and their names are merely guidelines. This is because you can have fully-functional enemies in the "decorative" category, and you can have cosmetic plants in the "main" category, for instance. What is important is understanding that the game reads and controls object entries differently depending on a lot of factors, and this categorization is just a simple way of explaining everything.
Before you continue, it is important to know that objects can belong to one of five categories:
 
  
# '''"Main"'''
+
While this page explains how the text file works, it will not explain how spawning works. For that, there is the '''[[cave spawning]]''' article. You don't need to read the whole thing, but for context for this article, you should at least read the [[Cave spawning#Summary|summary]].
#* Are defined in [[#TekiInfo|TekiInfo]].
 
#* Are not treasures.
 
#* Are not gates.
 
#* Appear inside "room" units.
 
#* Their "[[#Type|type]]" is not "6".
 
# '''"Decorative"'''
 
#* Same rules as the "main" category, except...
 
#* Their "[[#Type|type]]" is "6".
 
# '''Dead end'''
 
#* Are defined in [[#CapInfo|CapInfo]].
 
#* Are not gates.
 
#* Appear inside "dead end" units.
 
# '''Treasure'''
 
#* Are defined in [[#ItemInfo|ItemInfo]].
 
#* Are exclusively treasures.
 
# '''Gate'''
 
#* Are defined in [[#GateInfo|GateInfo]].
 
#* Are exclusively gates.
 
  
These category names are not laws, just guidelines. This is because you can have fully-functional enemies in the "decorative" category, and you can have cosmetic plants in the "main" category, for instance. What is important is understanding that the game reads objects in different categories differently, and also controls them differently.
+
== Format ==
 +
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. With Notepad++, you can check if the encoding is right in the bottom right.
  
===FloorInfo===
+
Each file starts with the header, [[#CaveInfo|CaveInfo]]. Afterwards comes the data for each sublevel. Each sublevel consists of five consecutive blocks of information: [[#FloorInfo|FloorInfo]], [[#TekiInfo|TekiInfo]], [[#ItemInfo|ItemInfo]], [[#GateInfo|GateInfo]], and [[#CapInfo|CapInfo]].
This block has a large number of parameters that determine how the sublevel works. All content in these parameters consist of two words. The first word is a number, <code>4</code> for numbers and <code>-1</code> for strings. The second word is the actual value of the parameter - the one you can modify.
 
  
{{todo|Figure out what happens if you change {f000} and {f001}.}}
+
When this page refers to "parameters", it means something along the lines of <code>{f000} 4 0</code>. The first word is the parameter's name. The second word is the type: <code>4</code> for numbers and <code>-1</code> for strings. The third word is the parameter's value &ndash; the one you can modify.
 +
 
 +
=== CaveInfo ===
 +
The header block is usually commented with <code>CaveInfo</code>. It contains only one parameter, <code>{c000}</code>, which controls 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.
 +
 
 +
=== FloorInfo ===
 +
Each sublevel starts with a block typically commented with <code>FloorInfo</code>. It has a large number of parameters that determine how the sublevel works. The following table lists what parameters exist, what they do, and what comments (in Japanese) usually follow the value.
 +
 
 +
{{todo|Figure out what happens if you change {f000} and {f001}. Also specify what happens if {f003}/{f004} are set to 0.}}
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
Line 51: Line 82:
 
| <code>{f001}</code> || Same as above. Comment translates to "floor end". Seems to duplicate the floor and replace future sublevels. For example, if you are on sublevel 1 ({f000} is set to 0) when {f001} is set to 2, sublevels 2 and 3 will be the exact same as the first sublevel. The other sublevels will be untouched.  || 階おわり
 
| <code>{f001}</code> || Same as above. Comment translates to "floor end". Seems to duplicate the floor and replace future sublevels. For example, if you are on sublevel 1 ({f000} is set to 0) when {f001} is set to 2, sublevels 2 and 3 will be the exact same as the first sublevel. The other sublevels will be untouched.  || 階おわり
 
|-
 
|-
| <code>{f002}</code> || Ideal maximum number of objects in the "main" [[#Object categories|category]]. See [[#Amount]] for more details. If this is set to 0, absolutely no objects of the "main" category will spawn. || 敵最大数
+
| <code>{f002}</code> || Ideal maximum number of objects in the main [[#Concepts|category]]. See [[#Amount|here]] and [[#Weight|here]] for more details. If this is set to 0, absolutely no objects of the main category will spawn. || 敵最大数
 
|-
 
|-
| <code>{f003}</code> || Ideal maximum number of objects in the treasure [[#Object categories|category]]. || アイテム最大数
+
| <code>{f003}</code> || Same as <code>{f002}</code> but for objects in the treasure [[#Concepts|category]]. It does not count treasures inside enemies. || アイテム最大数
 
|-
 
|-
| <code>{f004}</code> || Ideal maximum number of objects in the gate [[#Object categories|category]]. || ゲート最大数
+
| <code>{f004}</code> || Same as <code>{f002}</code> but for objects in the gate [[#Concepts|category]]. || ゲート最大数
 
|-
 
|-
 
| <code>{f005}</code> || Number of "room" cave units. || ルーム数
 
| <code>{f005}</code> || Number of "room" cave units. || ルーム数
 
|-
 
|-
| <code>{f006}</code> || Ratio that controls how many corridors there are compared to rooms. || ルートの割合
+
| <code>{f006}</code> || Corridor probability. If this number is higher, the game will spawn more corridors relative to the number of rooms. || ルートの割合
 
|-
 
|-
 
| <code>{f007}</code> || 1 if this floor has a geyser, 0 otherwise. || 帰還噴水(1=あり)
 
| <code>{f007}</code> || 1 if this floor has a geyser, 0 otherwise. || 帰還噴水(1=あり)
 
|-
 
|-
| <code>{f008}</code> || [[Cave unit list file]] name. || 使用ユニット
+
| <code>{f008}</code> || [[Cave unit definition file]] name. || 使用ユニット
 
|-
 
|-
 
| <code>{f009}</code> || Lighting definition file name. || 使用ライト
 
| <code>{f009}</code> || Lighting definition file name. || 使用ライト
 
|-
 
|-
| <code>{f00A}</code> || Skybox. Valid values are: <code>none</code>, <code>f010</code>, <code>vrbox</code> (they all mean none), <code>ice</code> (ice cavern), <code>test</code> (cavern), <code>build</code> (steel), <code>hiroba</code> (garden), <code>flooring</code> (wooden floor), <code>tatami</code> (carpet). || VRBOX
+
| <code>{f00A}</code> || Skybox. Existing skyboxes are: <code>ice</code> (ice cavern), <code>test</code> (cavern), <code>build</code> (steel), <code>hiroba</code> (garden), <code>flooring</code> (wooden floor), <code>tatami</code> (carpet). If an invalid name is used, then there will be no skybox. || VRBOX
 
|-
 
|-
 
| <code>{f010}</code> || 1 if the next sublevel hole is clogged, 0 otherwise. || 階段を壊す岩で隠す(0=オフ 1=オン)
 
| <code>{f010}</code> || 1 if the next sublevel hole is clogged, 0 otherwise. || 階段を壊す岩で隠す(0=オフ 1=オン)
 
|-
 
|-
| <code>{f011}</code> || {{unsure|Unknown.}} Comment translates to "α attribute". || α属性
+
| <code>{f011}</code> || Echo strength; 0 for longest echo, used in soil/remaining themes, 1 is normally used for metal, 2 is used for concrete, 3 is used for tile, 4 is used for garden, and 5 is an almost unnoticeable echo, used for toy themes. || α属性
 
|-
 
|-
| <code>{f012}</code> || Music type. 0 for normal, 1 to mute (until a boss), 2 to use rest sublevel music || β属性
+
| <code>{f012}</code> || Music type; 0 for normal, 1 to mute (until a boss), 2 to use rest sublevel music || β属性
 
|-
 
|-
 
| <code>{f013}</code> || 1 if sublevel has an invisible solid plane of ground, generally used for the <code>hiroba</code>, <code>flooring</code> and <code>tatami</code> skyboxes. If 0, Pikmin can fall off the edge to their deaths. || 隠し床
 
| <code>{f013}</code> || 1 if sublevel has an invisible solid plane of ground, generally used for the <code>hiroba</code>, <code>flooring</code> and <code>tatami</code> skyboxes. If 0, Pikmin can fall off the edge to their deaths. || 隠し床
 
|-
 
|-
| <code>{f014}</code> || Maximum number of dead ends. || キャップ最大数
+
| <code>{f014}</code> || Dead end probability (0-100). E.g. if this value is 50, open doors will be set to dead ends with 50% probability. || キャップ最大数
 
|-
 
|-
| <code>{f015}</code> || {{unsure|Sublevel format version?}} || Version
+
| <code>{f015}</code> || File format version; 1 is normal, 0 will ignore all dead end spawns ([[#CapInfo|CapInfo]]) || Version
 
|-
 
|-
 
| <code>{f016}</code> || {{unsure|Time until the Waterwraith appears. || BlackManTimer
 
| <code>{f016}</code> || {{unsure|Time until the Waterwraith appears. || BlackManTimer
Line 86: Line 117:
 
|}
 
|}
  
===TekiInfo===
+
=== TekiInfo ===
<code>TekiInfo</code> determines the [[#Object categories|"main"]] objects and the [[#Object categories|"decorative"]] objects to spawn on the sublevel.
+
<code>TekiInfo</code> determines the [[#Concepts|main category]] objects and the [[#Concepts|decorative category]] objects to spawn on the sublevel. It also controls what sort of spawn points they appear in, if they fall from the sky or not, if they are carrying a treasure inside, and more. Gates and treasures cannot be specified here (other than the treasures that are [[#Carrying|carried]] by enemies). The game will spawn the minimum amounts specified in these entries and then, in the case of main category objects, keep filling randomly until the limit in [[#FloorInfo|parameter <code>{f002}</code>]]. These objects only appear in "room" cave units.
 +
 
 +
The first number in the block is the total of [[#Entry|entries]]. It is usually commented with <code>num</code>. Each entry consists of two lines:
 +
 
 +
# The first line in an entry starts with the object's [[#Fall method|fall method]], the object's [[#Class|class]], what treasure it is [[#Carrying|carrying]], then a space, then the [[#Amount|amount]] to spawn, and/or its [[#Weight|random filling weight]]. Note that entries of the decorative category do not have a random filling weight. It is typically commented with the word "weight".
 +
# The second line of each entry is the [[#Spawn type|spawn type]]. It is typically commented with the word "type".
 +
 
 +
=== ItemInfo ===
 +
<code>ItemInfo</code> controls what [[#Concepts|treasure category]] objects spawn. The game will spawn the minimum amounts for these treasures, and then will keep filling randomly until it reaches the limit defined in [[#FloorInfo|parameter <code>{f003}</code>]]. Treasures inside enemies aren't included here, nor are they counted for the limit. Instead, they are defined in the [[#Carrying|carrying]] data of objects in [[#TekiInfo|TekiInfo]] or [[#CapInfo|CapInfo]]. Only treasures can be specified in this block &ndash; if you try to spawn something here that is not a treasure, the game will crash. These objects only appear in "room" cave units, or any unit that has "item" in the name.
 +
 
 +
The first number in the block is the total of [[#Entry|entries]]. It is usually commented with <code>num</code>. Each entry consists of one line:
 +
 
 +
# This line contains the object's [[#Class|class]], then a space, then the [[#Amount|amount]] to spawn, and/or its [[#Weight|random filling weight]]. It is typically commented with the word "weight".
 +
 
 +
=== GateInfo ===
 +
{{todo|Confirm the claim that the weight only uses the last digit.}}
 +
<code>GateInfo</code> controls what [[#Concepts|gate category]] objects will appear. Each individual gate on a sublevel is randomly colored, and always appears in seams. The game will spawn the number of gates defined in [[#FloorInfo|parameter <code>{f004}</code>]]. These objects appear in the seams between two cave units.
 +
 
 +
The first number in the block is the total of [[#Entry|entries]]. It is usually commented with <code>num</code>. Each entry consists of two lines:
 +
 
 +
# The first line is the gate's HP. This line starts with any word (although the word <code>gate</code> is what's used in the vanilla game), and after a space, the amount of hit points it has, with decimal places (e.g. <code>1000.000000</code>). It is typically commented with the word "life".
 +
# The second line contains the object's [[#Weight|random filling weight]]. Only the last digit is read by the game, though. If the weight number is 0, the game will not spawn any gate from this entry, of course. It is typically commented with the word "weight".
 +
 
 +
=== CapInfo ===
 +
<code>CapInfo</code> determines what [[#Concepts|dead end category]] objects to spawn. It works similarly to the [[#TekiInfo|<code>TekiInfo</code> block]], though with some differences:
 +
* While in the <code>TekiInfo</code> block the locations of objects spawned is determined by the spawn type, that is not the case here. These objects only spawn in "dead end" cave units with "item" in the name.
 +
* Objects spawned with this block do not count for any limit (e.g. [[#FloorInfo|parameter <code>{f003}</code>]]).
 +
* Treasures can also be specified in this block.
 +
 
 +
The first number in the block is the total of [[#Entry|entries]]. It is usually commented with <code>num</code>. Each entry consists of three lines:
 +
 
 +
# The first line is presumably, the type of dead end this spawn applies to. It always has the value <code>0</code> in the vanilla game. It is typically commented with the word "captype".
 +
# The second line in an entry starts with the object's [[#Fall method|fall method]], the object's [[#Class|class]], what treasure it is [[#Carrying|carrying]], then a space, then the [[#Amount|amount]] to spawn, and/or its [[#Weight|random filling weight]]. It is typically commented with the word "weight".
 +
# The third line of each entry is the "type". 0 makes it so two objects spawn in the same spot, while 1 allows only one object. It is typically commented with the word "type".
  
The first number in the block is the total of entries. It is commented with <code>num</code>. Each entry consists of two lines. The first line in an entry determines how it spawns, the object's class, what treasure it has inside, how many to spawn, and/or how likely this object is to be used to fill the free "main" object slots. The second line of each entry is the "type" of the object.
+
== Entry ==
 +
Depending on its [[#Concepts|category]], an entry can have or not have certain information.
  
To note is that if something is wrong with the object's spawn data, the game will probably break down, but it might also trigger an error handler. If it does, the object is turned into a fully-functional Common Glowcap. Typing an invalid class name will trigger the error handler.
+
To note is that if something is wrong with the entry's data, the game will probably break down when trying to spawn an item of said entry, but it might also trigger an error handler. If it does, the object will be turned into a fully-functional Common Glowcap. Typing an invalid class name will trigger the error handler.
  
====Class====
+
=== Class ===
The first word in the first line of each entry contains the object class (fire geyser, Red Bulborb, clover, etc.), using its internal name (case insensitive). Treasures will not work; use the [[#ItemInfo|<code>ItemInfo</code> block]] for that.
+
[[#Concepts|Categories]]: main, decorative, treasure, dead end.
  
If it is an enemy and is carrying something inside it, the internal name of that object's class is also included in that word, in lowercase, after an underscore (e.g. <code>Chappy_key</code> for a Red Bulborb carrying The Key). In this case, the name of the enemy itself is no longer case insensitive and must be written in CamelCase, although exact casing depends on the object.
+
This is the class of object to spawn (e.g. fire geyser, Red Bulborb, clover, etc.). The name typed here must match the [[Pikmin 2 identifiers|internal name]]. (e.g. <code>MaroFrog</code> for a Wollywog.) For main, decorative, and dead end category objects, this name is normally not case-sensitive, but if it's an enemy [[#Carrying|carrying]] something, then it becomes case-sensitive. For treasure category objects, the name must be all lowercase.
  
====Spawn method====
+
=== Carrying ===
Some objects spawn from the sky, like Volatile Dweevils that only appear when you get close to their spawn position. To get an object to do this, write a dollar sign and/or a number before the name of the object, without a space in between. Example: <code>$4BombOtakara</code>. You have to write a specific thing to get a specific behavior, and if you write an invalid one, the game crashes:
+
[[#Concepts|Categories]]: main, decorative, dead end.
 +
 
 +
An entry can specify if an enemy is meant to carry a treasure inside it. If it is, then after the [[#Class|class]] name there should be an underscore, and then afterwards, in all lowercase, the [[Pikmin 2 identifiers|internal name]] of said treasure. (e.g. <code>Chappy_key</code> for a Red Bulborb carrying The Key.) Note that for entries regarding enemies that are carrying something, the class name becomes case-sensitive.
 +
 
 +
Note that just because an underscore exists doesn't mean for sure that one object is carrying another. If the game sees the name <code>Wakame_s</code>, it isn't going to think that it's an object <code>Wakame</code> carrying an object <code>s</code>, but rather that it is a small shoot. Also note that treasures specified here do not count towards the limit in [[#FloorInfo|parameter <code>{f003}</code>]].
 +
 
 +
=== Fall method ===
 +
[[#Concepts|Categories]]: main, decorative, dead end.
 +
 
 +
Some objects spawn in the sky and then fall, like Volatile Dweevils that only appear when you get close to their spawn position. To get an object to do this, write a dollar sign and/or a number, before the [[#Class|class]] of the entry, without a space in between. (e.g. <code>$4BombOtakara</code> for a Volatile Dweevil that spawns when Pikmin are carrying nearby). You have to write a specific thing to get a specific behavior, and if you write an invalid one, the game crashes:
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
! Code || Effect || Notes
 
! Code || Effect || Notes
 
|-
 
|-
| <code>$</code> || Always fall if a Pikmin or leader is nearby. ||  
+
| (Nothing) || Spawns normally. ||
 +
|-
 +
| <code>$</code> || Falls, if a Pikmin or leader is nearby. ||  
 
|-
 
|-
 
| <code>$0</code> || Triggers the Common Glowcap error handler. || '''Unused'''.
 
| <code>$0</code> || Triggers the Common Glowcap error handler. || '''Unused'''.
 
|-
 
|-
| <code>$1</code> || {{unsure|Unknown.}} ||  
+
| <code>$1</code> || Identical to <code>$</code>. ||  
 
|-
 
|-
| <code>$2</code> || Only fall if a Pikmin is nearby, leaders are ignored. ||  
+
| <code>$2</code> || Falls, if a Pikmin is nearby. Leaders are ignored. ||  
 
|-
 
|-
| <code>$3</code> || Only fall if a leader is nearby, Pikmin are ignored. || '''Unused'''.
+
| <code>$3</code> || Falls, if a leader is nearby. Pikmin are ignored. || '''Unused'''.
 
|-
 
|-
| <code>$4</code> || Only fall if Pikmin are carrying nearby. ||  
+
| <code>$4</code> || Falls, if Pikmin are carrying nearby. ||  
 
|-
 
|-
| <code>$5</code> || Only fall if a Purple causes an earthquake nearby. ||  
+
| <code>$5</code> || Falls, if a Purple Pikmin causes an earthquake nearby. ||  
 
|}
 
|}
  
{{todo|Confirm that "no bosses are changed" claim, since I'm very sure I got a Pileated Snagret to fall from the sky once.}}
+
Not all objects support this feature. The objects that don't support the feature completely ignore whatever fall method is written and spawn normally. Other objects support it, but have some interesting behavior. Here is a list of all possibilities:
Not all objects support this feature. The objects that don't support the feature completely ignore the $ sign and spawn normally. No bosses or plants (besides Candypop Buds) are changed.
 
  
Here is a list of all other known objects and whether or not they are capable of using this behavior.
+
{| class="wikitable mw-collapsible mw-collapsed"
 
+
! Objects || Result
{| class="wikitable sortable"
 
! Enemy || Supported || Notes
 
 
|-
 
|-
| Anode Beetle || Yes ||
+
|  
 +
* All bosses
 +
* All plants (besides Candypop Buds)
 +
* Antenna Beetle
 +
* Armored Cannon Beetle Larva (buried version)
 +
* Breadbug
 +
* Cloaking Burrow-nit
 +
* Creeping Chrysanthemum
 +
* Doodlebug
 +
* Electrical wire
 +
* Female Sheargrub
 +
* Fire geyser
 +
* Gas pipe
 +
* Hermit Crawmad
 +
* Honeywisp
 +
* Iridescent Flint Beetle
 +
* Iridescent Glint Beetle
 +
* Male Sheargrub
 +
* Mamuta
 +
* Mitite
 +
* Ravenous Whiskerpillar
 +
* Shearwig
 +
* Skitter Leaf
 +
* Toady Bloyster
 +
* Unmarked Spectralids
 +
* Waterwraith rollers (unused)
 +
| Not supported
 
|-
 
|-
| Anode Dweevil || Yes ||
+
|  
 +
* Bumbling Snitchbug
 +
* Careening Dirigibug
 +
* Greater Spotted Jellyfloat
 +
* Lesser Spotted Jellyfloat
 +
* Puffy Blowhog
 +
* Swooping Snitchbug
 +
* Withering Blowhog
 +
| Supported, floats down from the sky
 
|-
 
|-
| Antenna Beetle || No ||
+
|  
 +
* Bomb Rocks &ndash; Will immediately ignite upon hitting the ground.
 +
* Bulborb Larva &ndash; Uses a unique falling animation, the same animation that's used when it is born from the Empress Bulblax.
 +
* Egg &ndash; Breaks upon hitting the ground.
 +
* Falling boulder &ndash; Falling boulders sort of float in place for a bit, then fall down at a much quicker speed than normal. If multiple boulders spawn inside of each other, they will bounce off of each other at an angle when they are triggered by the player.
 +
* Lithopod boulder (unused) &ndash; The trail particles of the boulder will remain stationary in the air until the rolling boulder is triggered by the player.
 +
* All Sleeping Bulborbs &ndash; Will immediately wake up and attack any nearby targets upon hitting the ground, regardless if anything was touching them before. Seen prominently in the Challenge level "Cave Of Pain."
 +
* Spotty Bulbears &ndash; Dwarf Bulbears will still detect them and wander to their position even if they haven't fallen yet. Very useful for detecting where they're gonna fall. It is only seen once in the entire game on a single sublevel in the Dream Den.
 +
| Supported, special behavior
 
|-
 
|-
| Armored Cannon Beetle Larva (Buried) || No ||
+
|  
|-
+
* Everything else
| Armored Cannon Beetle Larva (Free) || Yes ||
+
| Supported, falls normally
|-
 
| Bomb-rock || Yes ||
 
|-
 
| Breadbug || No ||
 
|-
 
| Bulbmin || Yes ||
 
|-
 
| Bulborb Larva || Yes || Uses a unique falling animation, the same animation thats used when they are born from the Empress Bulblax.
 
|-
 
| Bumbling Snitchbug || Yes || Floats down from the sky.
 
|-
 
| Careening Dirigibug || Yes || Floats down from the sky.
 
|-
 
| Caustic Dweevil || Yes ||
 
|-
 
| Cloaking Burrow-nit || No ||
 
|-
 
| Creeping Chrysanthemum || No ||
 
|-
 
| Crimson Candypop Bud || Yes ||
 
|-
 
| Decorated Cannon Beetle || Yes ||
 
|-
 
| Doodlebug || No ||
 
|-
 
| Dwarf Bulbear || Yes ||
 
|-
 
| Dwarf Orange Bulborb || Yes ||
 
|-
 
| Dwarf Red Bulborb || Yes ||
 
|-
 
| Egg || Yes  || Breaks upon hitting the ground.
 
|-
 
| Electrical Wire || No ||  
 
|-
 
| Falling Boulder || Yes || Falling boulders sort of float in place for a bit, then fall down at a much quicker speed than normal. If multiple boulders spawn inside of each other, they will bounce off of each other at an angle when they are triggered by the player.
 
|-
 
| Female Sheargrub || No  ||
 
|-
 
| Fiery Blowhog || Yes  ||
 
|-
 
| Fiery Bulblax || Yes  ||
 
|-
 
| Fiery Dweevil || Yes  ||
 
|-
 
| Fire Geyser || No  ||
 
|-
 
| Foxtail || No  ||
 
|-
 
| Gas Pipe || No  ||
 
|-
 
| Gatling Groink (Both variants) || Yes  ||
 
|-
 
| Golden Candypop Bud || Yes  ||
 
|-
 
| Greater Spotted Jellyfloat || Yes  || Floats down from the sky.
 
|-
 
| Hairy Bulborb || Yes  ||
 
|-
 
| Hermit Crawmad || No ||
 
|-
 
| Honeywisp || No  ||
 
|-
 
| Iridescent Flint Beetle || No  ||
 
|-
 
| Iridescent Glint Beetle || No  ||
 
|-
 
| Ivory Candypop Bud || Yes  ||
 
|-
 
| Lapis Lazuli Candypop Bud || Yes  ||
 
|-
 
| Lesser Spotted Jellyfloat || Yes  || Floats down from the sky
 
|-
 
| Lithopod Boulder (Unused) || Yes  || The trail particles of the boulder will remain stationary in the air until the rolling boulder is triggered by the player.
 
|-
 
| Male Sheargrub || No  ||
 
|-
 
| Mamuta || No  ||
 
|-
 
| Mitite || No  ||
 
|-
 
| Munge Dweevil || Yes  ||
 
|-
 
| Orange Bulborb || Yes  ||
 
|-
 
| Puffy Blowhog || Yes  || Floats down from the sky.
 
|-
 
| Queen Candypop Bud || Yes  ||
 
|-
 
| Ravenous Whiskerpillar || No  ||
 
|-
 
| Red Bulborb || Yes  ||
 
|-
 
| Shearwig || No  ||
 
|-
 
| Skitter Leaf || No  ||
 
|-
 
| Snow Bulborb || Yes  ||
 
|-
 
| Spotty Bulbear || Yes  ||
 
|-
 
| Swooping Snitchbug || Yes  || Floats down from the sky.
 
|-
 
| Toady Bloyster || No  ||
 
|-
 
| Unmarked Spectralids || No  ||
 
|-
 
| Violet Candypop Bud || Yes  ||
 
|-
 
| Volatile Dweevil || Yes  ||
 
|-
 
| Water Dumple || Yes  ||
 
|-
 
| Waterwraith Rollers (Unused) || No  ||
 
|-
 
| Watery Blowhog || Yes  ||
 
|-
 
| Withering Blowhog || Yes  || Floats down from the sky.
 
|-
 
| Wogpole || Yes  ||
 
|-
 
| Wollywog || Yes  ||
 
|-
 
| Yellow Wollywog || Yes  ||
 
 
|}
 
|}
  
====Amount====
+
=== Amount ===
====="Main" category objects=====
+
[[#Concepts|Categories]]: main, decorative, treasure, dead end.
The second word in the first line of each entry is a number, where the last digit is the [[Cave spawning#Weighted distribution|filler distribution weight]] and the other digits are the minimum amount to spawn. This line is commented with <code>weight</code>. If there is only one digit, it indicates the filler distribution weight, and the minimum amount is set to 0.
+
 
 +
Some entries can specify that the sublevel must spawn at least a minimum amount of objects from that entry. The game can possibly [[#Weight|spawn more randomly]] afterwards, but at least the minimum amount will be met (under ideal circumstances anyway). Note that while there are sublevel [[#FloorInfo|parameters]] that control the maximum number of main, treasure, or gate objects, they will not be taken into account when spawning these minimum amounts.
  
The game will spawn the enemies requested in the "minimum amount" fields (provided there is enough physical space in the sublevel). After the game is done spawning all of these, provided that the enemy total isn't equal to or over <code>{f002}</code> yet, it will then try to fill in the remaining slots with any enemies that have a non-zero filler distribution weight, as explained [[Cave spawning#Weighted distribution|here]]. If there are no enemies to pick for the filler distribution, then the game simply doesn't spawn any fillers.
+
In an entry, the amount comes after the [[#Class|class]] (and [[#Carrying|carry]]), with a space in between. Whatever number is written here is the minimum amount. 0 can be used to specify that there is no minimum amount, and that this entry should only be used for random filler. The filler weight, described [[#Weight|here]], is another number that goes attached to this one. If the filler weight is present, then the amount number can be absent; in this case the game will assume it is 0. Note that while gate category entries need the minimum amount, the game will not actually do anything with that amount.
  
Note that when trying to spawn an enemy, if there are no more vacant slots of the specified type, the game will not spawn that enemy, but will still add 1 to the counter of enemies currently in the sublevel. This means that if you have a cave with just one room, that has 4 spawn locations for type 0 and 4 for type 1, you specify 10 as the maximum of enemies ({f002}), and specify 8 Wogpoles of type 0, and then a Dwarf Red Bulborb with a filler distribution weight and type 1, the game will try to spawn the 8 mandatory Wogpoles, only spawn 4 because there are no more vacant slots, and will still count the other 4 as if they exist. This means it will only pick 2 Dwarf Red Bulborbs to reach the maximum in {f002}.
+
=== Weight ===
 +
[[#Concepts|Categories]]: main, treasure, gate, dead end.
  
{{credits|Jimble, [[User:Espyo|Espyo]]}}
+
When the game wants to fill in the sublevel with some randomly-picked objects, it checks the relevant entries to figure out which ones it can pick, and with what chances, as detailed [[Cave spawning#Weighted distribution|here]]. It eventually stops spawning, and the exact conditions depend the [[#Concepts|category]] of the entry. Note that for many reasons, explained in the [[cave spawning]] article, objects may fail to appear, so the sublevel will contain fewer objects of a given category than the sublevel [[#FloorInfo|parameter]] for that limit specifies.
  
====="Decorative" category objects=====
+
In an entry, the random filling weight comes directly after the [[#Amount|amount]], without even a space in between. The weight is only one digit, meaning it can only go from 0 to 9. If it is 0, the game will not use this entry for random filling. Note that if only one digit is present, then it refers to the weight, and the game assumes the minimum amount is 0. Also note that entries of the decorative category do not have weight.
The second word in the first line of each entry is a number, which indicates the exact number of objects of that type to spawn. There are no limits to the number of objects of this type to spawn, except for the amount of spawning locations available in the sublevel's generated layout, and there is no random distribution either.
 
  
 
{{credits|Jimble, [[User:Espyo|Espyo]]}}
 
{{credits|Jimble, [[User:Espyo|Espyo]]}}
  
====Type====
+
=== Spawn type ===
This number controls what type of object this is (more or less), and where it spawns. The number ranges from 0 to 8, and most also correspond to a group of spawn coordinates. When spawning an instance of this object, the game picks a random coordinate from the group, if applicable.
+
[[#Concepts|Categories]]: main, decorative.
 +
 
 +
This number controls what type of spawning logic to use, where it spawns, and to a lesser degree, what category of object this is. The number ranges from 0 to 8, and most of these also correspond to a group of spawn coordinates. When spawning an instance of this object, the game picks a random coordinate from the group, if applicable. Note that certain entry categories can only use certain numbers.
  
The type is defined in the second line of each entry, and is commented with <code>type</code>. The following table lists the possible numbers, and the comments on the various [[Cave unit definition file|unit layout files]] (in <code>/user/Mukki/mapunits/arc/*/texts.szs/layout.txt</code>) are also included due to them helping understand what each number means. Also note that objects in some categories cannot use some numbers, and that objects in the treasure and gate categories cannot specify a type.
+
The following table lists the possible numbers, and the comments on the various [[Cave unit definition file|unit layout files]] (in <code>/user/Mukki/mapunits/arc/*/texts.szs/layout.txt</code>) are also included due to them helping understand what each number means.
  
 
{| class="wikitable"
 
{| class="wikitable"
! rowspan="2" | Group || rowspan="2" | Content || rowspan="2" | <code>layout.txt</code> comment || rowspan="2" | Notes || colspan="4" | Category availability
+
! rowspan="2" | Group || rowspan="2" | Content || rowspan="2" | <code>layout.txt</code> comment || rowspan="2" | Notes || colspan="2" | Category availability
 
|-
 
|-
! "Main" || "Decorative" || Dead end
+
! Main || Decorative
 
|-
 
|-
| 0 || Enemy Group A || <code>Teki A</code> || || style="background-color: #aca;" | Yes || style="background-color: #caa;" | No || style="background-color: #aca;" | Yes
+
| 0 || "Easy" enemy group || <code>Teki A</code> || Commonly used for easier enemies. Objects using this spawn type can spawn multiple in the same spot. (Depends on the spawn point's minimum and maximum amount.) || style="background-color: #aca;" | Yes || style="background-color: #caa;" | No
 
|-
 
|-
| 1 || Enemy Group B || <code>Teki B</code> || || style="background-color: #aca;" | Yes || style="background-color: #caa;" | No || style="background-color: #aca;" | Yes
+
| 1 || "Hard" enemy group || <code>Teki B</code> || Commonly used for harder enemies. || style="background-color: #aca;" | Yes || style="background-color: #caa;" | No
 
|-
 
|-
| 2 || Treasure || <code>Item</code> || Not used by any object in the canon game. In a cave unit, it marks the location of objects defined in [[#CapInfo|CapInfo]]. || style="background-color: #caa;" | No || style="background-color: #caa;" | No || style="background-color: #aca;" | Yes
+
| 2 || Treasure || <code>Item</code> || Not used directly by any object in the vanilla game. In a cave unit, it marks the location of objects from the treasure category. || style="background-color: #caa;" | No || style="background-color: #caa;" | No
 
|-
 
|-
| 3 || {{unsure|Unknown}} || || There is no object or cave unit that uses this number. || style="background-color: #caa;" | No || style="background-color: #caa;" | No || style="background-color: #caa;" | No
+
| 3 || {{unsure|Unknown}} || || There is no object or cave unit that uses this number. || style="background-color: #caa;" | No || style="background-color: #caa;" | No
 
|-
 
|-
| 4 || Hole/Geyser || <code>FixObj</code> || Objects can't use this number. In a cave unit, it marks a viable location for the next hole/geyser in a room, if dead ends are not present in the sublevel. || style="background-color: #caa;" | No || style="background-color: #caa;" | No || style="background-color: #caa;" | No
+
| 4 || Hole/Geyser || <code>FixObj</code> || Objects can't use this number. In a cave unit, it marks a viable location for the next sublevel hole/geyser in a room, if dead ends are not present in the sublevel. || style="background-color: #caa;" | No || style="background-color: #caa;" | No
 
|-
 
|-
| 5 || Seams || || Commonly used for hazards such as fire geysers, electrical wires and gas pipes. These spots are located in the seams between two connecting cave units. || style="background-color: #aca;" | Yes || style="background-color: #caa;" | No || style="background-color: #aca;" | Yes
+
| 5 || Seams || || Commonly used for hazards such as fire geysers, electrical wires and gas pipes. These spots are located in the seams between two connected cave units. || style="background-color: #aca;" | Yes || style="background-color: #caa;" | No
 
|-
 
|-
| 6 || Plant || <code>Plant</code> || Commonly used by decorative plants. || style="background-color: #caa;" | Yes || style="background-color: #aca;" | Yes || style="background-color: #aca;" | Yes
+
| 6 || Plant || <code>Plant</code> || Commonly used by decorative plants. Though other entities can use it just fine as well. || style="background-color: #caa;" | No || style="background-color: #aca;" | Yes
 
|-
 
|-
| 7 || Leader spawn || <code>Start</code> || Objects can't use this number. In a cave unit, it marks a possible player starting spot in the sublevel. The Y coordinate is ignored; it snaps to the ground. || style="background-color: #caa;" | No || style="background-color: #caa;" | No || style="background-color: #caa;" | No
+
| 7 || Leader spawn || <code>Start</code> || Objects can't use this number. In a cave unit, it marks a possible player starting spot in the sublevel. The Y coordinate is ignored; it snaps to the ground. || style="background-color: #caa;" | No || style="background-color: #caa;" | No
 
|-
 
|-
| 8 || Enemy Group C || <code>Teki F</code> || Commonly used for boss locations, or the location of tower Gatling Groinks/buried Armored Cannon Beetle Larvae. Most rooms do not have coordinates for this. || style="background-color: #aca;" | Yes || style="background-color: #caa;" | No || style="background-color: #aca;" | Yes
+
| 8 || "Special" enemy group || <code>Teki F</code> || Commonly used for boss locations, or the location of tower Gatling Groinks/buried Armored Cannon Beetle Larvae. Most rooms do not have coordinates for this. || style="background-color: #aca;" | Yes || style="background-color: #caa;" | No
 
|}
 
|}
 
====Example====
 
<pre>
 
{f002} 4 5 # 敵最大数
 
 
(...)
 
 
# TekiInfo
 
{
 
2 # num
 
$Tadpole 23 # weight
 
0 # type
 
Sokkuri_bane 9 # weight
 
1 # type
 
}
 
</pre>
 
 
Assuming there's enough space in the sublevel, this would make the game spawn 2 Wogpoles, that only pop up from the sky when you get close. Then, it spawns 3 randomly picked enemies, with each enemy having a 3/12 chance of being a Wogpole (like the aforementioned ones, these spawn from the sky), and a 9/12 chance of being a Skitter Leaf that is carrying a Coiled Launcher. Any Wogpole in this sublevel will spawn in the set of coordinates that belong to group 0, whereas any Skitter Leaf will spawn on the coordinates of group 1.
 
 
===ItemInfo===
 
The next block is titled <code>ItemInfo</code>. It controls how treasures spawn. Treasures inside enemies aren't included here, but are instead defined in [[#TekiInfo|TekiInfo]] or [[#CapInfo|CapInfo]]'s objects.
 
 
The first number in the block is the total of entries. It is titled <code>num</code>. Each entry consists of one line. This line contains the internal name of the treasure, in all lowercase, and then after a space, the amount to spawn. This amount uses the same scheme as the [[#Amount|<code>TekiInfo</code> block]], except when deciding the random spawn distribution, the limit is decided by <code>{f003}</code> instead. If you try to spawn something here that is not a treasure, the game will crash.
 
 
====Example====
 
<pre>
 
{f003} 4 4
 
 
(...)
 
 
# ItemInfo
 
{
 
3
 
key 10
 
gold_medal 12
 
saru_head 04
 
}
 
</pre>
 
 
The game will spawn one ''The Key'' and one ''Lustrous Element'', the next two treasures (because <code>{f003}</code> is set to <code>4</code>), will have a 2/6 chance of being a ''Lustrous Element'', and a 4/6 chance of being a ''Colossal Fossil''.
 
 
===GateInfo===
 
<code>GateInfo</code> controls what gates will appear. Each individual gate on a sublevel is randomly colored. The game will spawn the number of gates defined in <code>{f004}</code>, but will stop spawning them if there isn't enough room.
 
 
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 is the gate's HP. It is titled with <code>life</code>. This line starts with any word (although the word <code>gate</code> is what's used in the vanilla game), and after a space, the amount of hit points it has, with decimal places (e.g. <code>1000.000000</code>).
 
# The second line is the [[Cave spawning#Weighted distribution|spawn distribution weight]]. {{unsure|Only the last digit of this number is used.}} If the number is 0, this type of gate will not spawn at all, of course.
 
 
====Example====
 
<pre>
 
 
{f004} 4 2
 
 
(...)
 
 
# GateInfo
 
{
 
2
 
gate 4000.000000
 
1
 
gate 2500.000000
 
1
 
}
 
</pre>
 
 
This will spawn two different types of gates of random colours in random locations. The total number of gates appearing in the level is dependent on the value set in <code>{f004}</code>, which in this case is <code>2</code> so only two gates will spawn.
 
 
===CapInfo===
 
<code>CapInfo</code> determines what objects to spawn in dead ends.
 
 
The first number in the block is the total number of entries. It is titled <code>num</code>. Each entry consists of three lines.
 
 
The logic is the exact same as spawning objects in the [[#TekiInfo|<code>TekiInfo</code> block]], except for the following things:
 
# Each entry is defined by three lines. There is an extra line before the usual <code>weight</code> and <code>type</code> lines, which determines, presumably, the type of dead end this spawn applies to. It is titled <code>captype</code>, and always has the value <code>0</code>.
 
# Objects spawned here appear in dead ends, not in the locations determined by the "type".
 
# Enemies spawned with this block do not count for any limit (e.g. <code>{f002}</code>).
 
# Treasures can also be specified here.
 
 
====Example====
 
<pre>
 
# CapInfo
 
{
 
1
 
0
 
$2Egg 10
 
1
 
0
 
WhitePom 10
 
1
 
}
 
</pre>
 
 
This will spawn an egg that will fall down when a Pikmin gets close, and a Ivory Candypop Bud, both in random dead-ends.
 
  
 
[[Category:Pikmin 2]]
 
[[Category:Pikmin 2]]
 
[[Category:File formats]]
 
[[Category:File formats]]

Latest revision as of 19:00, 23 August 2024

In Pikmin 2, the files that define a cave's settings can be found in /user/Mukki/mapunits/caveinfo. For instance, the Emergence Cave uses tutorial_1.txt. All comments (Japanese or English statements followed by a #) are unnecessary and deleting them will save file space.

To avoid any issues when reading or writing these files, use Notepad++.

Concepts[edit]

It is important to know these basic concepts.

Each object-related block in a sublevel has a series of data on what objects to spawn, and how. In this page, each of these data is called an entry. Each entry merely contains information about how to spawn an object, it does not actually reflect a specific object. For instance, there could be an entry for a Dwarf Bulborb that fall from the sky carrying the Essence of Desire, but the game could spawn 10 Dwarf Bulborbs from this entry – in this case all ten would fall from the sky and carry the Essence of Desire.

Each entry can belong to one of the following categories, which affect many things, some of which are detailed in this table:

Category Block Kind of object Locations Min. amount? Used for filler? Other notes
Main TekiInfo Anything but treasures and gates "Room" cave units Yes Until the limit in parameter {f002} Spawn type is 0, 1, 5, or 8
Decorative TekiInfo Anything but treasures and gates "Room" cave units Yes No Spawn type is 6
Treasure ItemInfo Treasures only "Room" cave units or those with "item" in the name Yes Until the limit in parameter {f003}
Gate GateInfo Gates only Seams between units No Until the limit in parameter {f004}
Dead end CapInfo Anything but gates "Dead end" cave units with "item" in the name Yes Until it runs out of dead ends

These categories are not recognized by the game, and their names are merely guidelines. This is because you can have fully-functional enemies in the "decorative" category, and you can have cosmetic plants in the "main" category, for instance. What is important is understanding that the game reads and controls object entries differently depending on a lot of factors, and this categorization is just a simple way of explaining everything.

While this page explains how the text file works, it will not explain how spawning works. For that, there is the cave spawning article. You don't need to read the whole thing, but for context for this article, you should at least read the summary.

Format[edit]

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. With Notepad++, you can check if the encoding is right in the bottom right.

Each file starts with the header, CaveInfo. Afterwards comes the data for each sublevel. Each sublevel consists of five consecutive blocks of information: FloorInfo, TekiInfo, ItemInfo, GateInfo, and CapInfo.

When this page refers to "parameters", it means something along the lines of {f000} 4 0. The first word is the parameter's name. The second word is the type: 4 for numbers and -1 for strings. The third word is the parameter's value – the one you can modify.

CaveInfo[edit]

The header block is usually commented with CaveInfo. It contains only one parameter, {c000}, which controls 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.

FloorInfo[edit]

Each sublevel starts with a block typically commented with FloorInfo. It has a large number of parameters that determine how the sublevel works. The following table lists what parameters exist, what they do, and what comments (in Japanese) usually follow the value.


To do: Figure out what happens if you change {f000} and {f001}. Also specify what happens if {f003}/{f004} are set to 0.

Parameter Description Japanese comment
{f000} The sublevel number this sublevel belongs to, minus 1. For example, if this floor is sublevel 1, the value is 0. Comment translates to "floor introduction". Seems to crash the game if lower than the current sublevel. 階はじめ
{f001} Same as above. Comment translates to "floor end". Seems to duplicate the floor and replace future sublevels. For example, if you are on sublevel 1 ({f000} is set to 0) when {f001} is set to 2, sublevels 2 and 3 will be the exact same as the first sublevel. The other sublevels will be untouched. 階おわり
{f002} Ideal maximum number of objects in the main category. See here and here for more details. If this is set to 0, absolutely no objects of the main category will spawn. 敵最大数
{f003} Same as {f002} but for objects in the treasure category. It does not count treasures inside enemies. アイテム最大数
{f004} Same as {f002} but for objects in the gate category. ゲート最大数
{f005} Number of "room" cave units. ルーム数
{f006} Corridor probability. If this number is higher, the game will spawn more corridors relative to the number of rooms. ルートの割合
{f007} 1 if this floor has a geyser, 0 otherwise. 帰還噴水(1=あり)
{f008} Cave unit definition file name. 使用ユニット
{f009} Lighting definition file name. 使用ライト
{f00A} Skybox. Existing skyboxes are: ice (ice cavern), test (cavern), build (steel), hiroba (garden), flooring (wooden floor), tatami (carpet). If an invalid name is used, then there will be no skybox. VRBOX
{f010} 1 if the next sublevel hole is clogged, 0 otherwise. 階段を壊す岩で隠す(0=オフ 1=オン)
{f011} Echo strength; 0 for longest echo, used in soil/remaining themes, 1 is normally used for metal, 2 is used for concrete, 3 is used for tile, 4 is used for garden, and 5 is an almost unnoticeable echo, used for toy themes. α属性
{f012} Music type; 0 for normal, 1 to mute (until a boss), 2 to use rest sublevel music β属性
{f013} 1 if sublevel has an invisible solid plane of ground, generally used for the hiroba, flooring and tatami skyboxes. If 0, Pikmin can fall off the edge to their deaths. 隠し床
{f014} Dead end probability (0-100). E.g. if this value is 50, open doors will be set to dead ends with 50% probability. キャップ最大数
{f015} File format version; 1 is normal, 0 will ignore all dead end spawns (CapInfo) Version
{f016} Time until the Waterwraith appears. BlackManTimer
{f017} 0 is normal, anything else makes it spawn two (connected) seesaw blocks randomly in the level. May spawn the leaders and Pikmin inside one. Unused. 沈む壁

TekiInfo[edit]

TekiInfo determines the main category objects and the decorative category objects to spawn on the sublevel. It also controls what sort of spawn points they appear in, if they fall from the sky or not, if they are carrying a treasure inside, and more. Gates and treasures cannot be specified here (other than the treasures that are carried by enemies). The game will spawn the minimum amounts specified in these entries and then, in the case of main category objects, keep filling randomly until the limit in parameter {f002}. These objects only appear in "room" cave units.

The first number in the block is the total of entries. It is usually commented with num. Each entry consists of two lines:

  1. The first line in an entry starts with the object's fall method, the object's class, what treasure it is carrying, then a space, then the amount to spawn, and/or its random filling weight. Note that entries of the decorative category do not have a random filling weight. It is typically commented with the word "weight".
  2. The second line of each entry is the spawn type. It is typically commented with the word "type".

ItemInfo[edit]

ItemInfo controls what treasure category objects spawn. The game will spawn the minimum amounts for these treasures, and then will keep filling randomly until it reaches the limit defined in parameter {f003}. Treasures inside enemies aren't included here, nor are they counted for the limit. Instead, they are defined in the carrying data of objects in TekiInfo or CapInfo. Only treasures can be specified in this block – if you try to spawn something here that is not a treasure, the game will crash. These objects only appear in "room" cave units, or any unit that has "item" in the name.

The first number in the block is the total of entries. It is usually commented with num. Each entry consists of one line:

  1. This line contains the object's class, then a space, then the amount to spawn, and/or its random filling weight. It is typically commented with the word "weight".

GateInfo[edit]

To do: Confirm the claim that the weight only uses the last digit.

GateInfo controls what gate category objects will appear. Each individual gate on a sublevel is randomly colored, and always appears in seams. The game will spawn the number of gates defined in parameter {f004}. These objects appear in the seams between two cave units.

The first number in the block is the total of entries. It is usually commented with num. Each entry consists of two lines:

  1. The first line is the gate's HP. This line starts with any word (although the word gate is what's used in the vanilla game), and after a space, the amount of hit points it has, with decimal places (e.g. 1000.000000). It is typically commented with the word "life".
  2. The second line contains the object's random filling weight. Only the last digit is read by the game, though. If the weight number is 0, the game will not spawn any gate from this entry, of course. It is typically commented with the word "weight".

CapInfo[edit]

CapInfo determines what dead end category objects to spawn. It works similarly to the TekiInfo block, though with some differences:

  • While in the TekiInfo block the locations of objects spawned is determined by the spawn type, that is not the case here. These objects only spawn in "dead end" cave units with "item" in the name.
  • Objects spawned with this block do not count for any limit (e.g. parameter {f003}).
  • Treasures can also be specified in this block.

The first number in the block is the total of entries. It is usually commented with num. Each entry consists of three lines:

  1. The first line is presumably, the type of dead end this spawn applies to. It always has the value 0 in the vanilla game. It is typically commented with the word "captype".
  2. The second line in an entry starts with the object's fall method, the object's class, what treasure it is carrying, then a space, then the amount to spawn, and/or its random filling weight. It is typically commented with the word "weight".
  3. The third line of each entry is the "type". 0 makes it so two objects spawn in the same spot, while 1 allows only one object. It is typically commented with the word "type".

Entry[edit]

Depending on its category, an entry can have or not have certain information.

To note is that if something is wrong with the entry's data, the game will probably break down when trying to spawn an item of said entry, but it might also trigger an error handler. If it does, the object will be turned into a fully-functional Common Glowcap. Typing an invalid class name will trigger the error handler.

Class[edit]

Categories: main, decorative, treasure, dead end.

This is the class of object to spawn (e.g. fire geyser, Red Bulborb, clover, etc.). The name typed here must match the internal name. (e.g. MaroFrog for a Wollywog.) For main, decorative, and dead end category objects, this name is normally not case-sensitive, but if it's an enemy carrying something, then it becomes case-sensitive. For treasure category objects, the name must be all lowercase.

Carrying[edit]

Categories: main, decorative, dead end.

An entry can specify if an enemy is meant to carry a treasure inside it. If it is, then after the class name there should be an underscore, and then afterwards, in all lowercase, the internal name of said treasure. (e.g. Chappy_key for a Red Bulborb carrying The Key.) Note that for entries regarding enemies that are carrying something, the class name becomes case-sensitive.

Note that just because an underscore exists doesn't mean for sure that one object is carrying another. If the game sees the name Wakame_s, it isn't going to think that it's an object Wakame carrying an object s, but rather that it is a small shoot. Also note that treasures specified here do not count towards the limit in parameter {f003}.

Fall method[edit]

Categories: main, decorative, dead end.

Some objects spawn in the sky and then fall, like Volatile Dweevils that only appear when you get close to their spawn position. To get an object to do this, write a dollar sign and/or a number, before the class of the entry, without a space in between. (e.g. $4BombOtakara for a Volatile Dweevil that spawns when Pikmin are carrying nearby). You have to write a specific thing to get a specific behavior, and if you write an invalid one, the game crashes:

Code Effect Notes
(Nothing) Spawns normally.
$ Falls, if a Pikmin or leader is nearby.
$0 Triggers the Common Glowcap error handler. Unused.
$1 Identical to $.
$2 Falls, if a Pikmin is nearby. Leaders are ignored.
$3 Falls, if a leader is nearby. Pikmin are ignored. Unused.
$4 Falls, if Pikmin are carrying nearby.
$5 Falls, if a Purple Pikmin causes an earthquake nearby.

Not all objects support this feature. The objects that don't support the feature completely ignore whatever fall method is written and spawn normally. Other objects support it, but have some interesting behavior. Here is a list of all possibilities:

Objects Result
  • All bosses
  • All plants (besides Candypop Buds)
  • Antenna Beetle
  • Armored Cannon Beetle Larva (buried version)
  • Breadbug
  • Cloaking Burrow-nit
  • Creeping Chrysanthemum
  • Doodlebug
  • Electrical wire
  • Female Sheargrub
  • Fire geyser
  • Gas pipe
  • Hermit Crawmad
  • Honeywisp
  • Iridescent Flint Beetle
  • Iridescent Glint Beetle
  • Male Sheargrub
  • Mamuta
  • Mitite
  • Ravenous Whiskerpillar
  • Shearwig
  • Skitter Leaf
  • Toady Bloyster
  • Unmarked Spectralids
  • Waterwraith rollers (unused)
Not supported
  • Bumbling Snitchbug
  • Careening Dirigibug
  • Greater Spotted Jellyfloat
  • Lesser Spotted Jellyfloat
  • Puffy Blowhog
  • Swooping Snitchbug
  • Withering Blowhog
Supported, floats down from the sky
  • Bomb Rocks – Will immediately ignite upon hitting the ground.
  • Bulborb Larva – Uses a unique falling animation, the same animation that's used when it is born from the Empress Bulblax.
  • Egg – Breaks upon hitting the ground.
  • Falling boulder – Falling boulders sort of float in place for a bit, then fall down at a much quicker speed than normal. If multiple boulders spawn inside of each other, they will bounce off of each other at an angle when they are triggered by the player.
  • Lithopod boulder (unused) – The trail particles of the boulder will remain stationary in the air until the rolling boulder is triggered by the player.
  • All Sleeping Bulborbs – Will immediately wake up and attack any nearby targets upon hitting the ground, regardless if anything was touching them before. Seen prominently in the Challenge level "Cave Of Pain."
  • Spotty Bulbears – Dwarf Bulbears will still detect them and wander to their position even if they haven't fallen yet. Very useful for detecting where they're gonna fall. It is only seen once in the entire game on a single sublevel in the Dream Den.
Supported, special behavior
  • Everything else
Supported, falls normally

Amount[edit]

Categories: main, decorative, treasure, dead end.

Some entries can specify that the sublevel must spawn at least a minimum amount of objects from that entry. The game can possibly spawn more randomly afterwards, but at least the minimum amount will be met (under ideal circumstances anyway). Note that while there are sublevel parameters that control the maximum number of main, treasure, or gate objects, they will not be taken into account when spawning these minimum amounts.

In an entry, the amount comes after the class (and carry), with a space in between. Whatever number is written here is the minimum amount. 0 can be used to specify that there is no minimum amount, and that this entry should only be used for random filler. The filler weight, described here, is another number that goes attached to this one. If the filler weight is present, then the amount number can be absent; in this case the game will assume it is 0. Note that while gate category entries need the minimum amount, the game will not actually do anything with that amount.

Weight[edit]

Categories: main, treasure, gate, dead end.

When the game wants to fill in the sublevel with some randomly-picked objects, it checks the relevant entries to figure out which ones it can pick, and with what chances, as detailed here. It eventually stops spawning, and the exact conditions depend the category of the entry. Note that for many reasons, explained in the cave spawning article, objects may fail to appear, so the sublevel will contain fewer objects of a given category than the sublevel parameter for that limit specifies.

In an entry, the random filling weight comes directly after the amount, without even a space in between. The weight is only one digit, meaning it can only go from 0 to 9. If it is 0, the game will not use this entry for random filling. Note that if only one digit is present, then it refers to the weight, and the game assumes the minimum amount is 0. Also note that entries of the decorative category do not have weight.

Credits: Jimble, Espyo

Spawn type[edit]

Categories: main, decorative.

This number controls what type of spawning logic to use, where it spawns, and to a lesser degree, what category of object this is. The number ranges from 0 to 8, and most of these also correspond to a group of spawn coordinates. When spawning an instance of this object, the game picks a random coordinate from the group, if applicable. Note that certain entry categories can only use certain numbers.

The following table lists the possible numbers, and the comments on the various unit layout files (in /user/Mukki/mapunits/arc/*/texts.szs/layout.txt) are also included due to them helping understand what each number means.

Group Content layout.txt comment Notes Category availability
Main Decorative
0 "Easy" enemy group Teki A Commonly used for easier enemies. Objects using this spawn type can spawn multiple in the same spot. (Depends on the spawn point's minimum and maximum amount.) Yes No
1 "Hard" enemy group Teki B Commonly used for harder enemies. Yes No
2 Treasure Item Not used directly by any object in the vanilla game. In a cave unit, it marks the location of objects from the treasure category. No No
3 Unknown[unsure] There is no object or cave unit that uses this number. No No
4 Hole/Geyser FixObj Objects can't use this number. In a cave unit, it marks a viable location for the next sublevel hole/geyser in a room, if dead ends are not present in the sublevel. No No
5 Seams Commonly used for hazards such as fire geysers, electrical wires and gas pipes. These spots are located in the seams between two connected cave units. Yes No
6 Plant Plant Commonly used by decorative plants. Though other entities can use it just fine as well. No Yes
7 Leader spawn Start Objects can't use this number. In a cave unit, it marks a possible player starting spot in the sublevel. The Y coordinate is ignored; it snaps to the ground. No No
8 "Special" enemy group Teki F Commonly used for boss locations, or the location of tower Gatling Groinks/buried Armored Cannon Beetle Larvae. Most rooms do not have coordinates for this. Yes No