Difference between revisions of "AREA type"
Tag: Undo |
|||
(15 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{KMP}} | {{KMP}} | ||
− | |||
− | |||
== Introduction == | == Introduction == | ||
− | |||
The '''[[AREA]] type''' decides the function of the AREA element. There are 10 known types. The type is stored as a single byte at offset 0x01 in the AREA data: | The '''[[AREA]] type''' decides the function of the AREA element. There are 10 known types. The type is stored as a single byte at offset 0x01 in the AREA data: | ||
{{KMP AREA header}} | {{KMP AREA header}} | ||
− | + | For future expansion, if you want to use custom AREA behaviour in your CT distribution with a cheat code (like the [[Conditional Out of Bounds]] patch by [[Riidefi]] and [[kHacker35000vr]] does), please do NOT use the AREA or route settings of an existing AREA type, that'll just cause conflicts. Decide on a new AREA type ID, add it to this wiki page including a description what it'll be used for and how the parameters work, and in your patch, just make that AREA type redirect to the original one you want to mod. That way it's easy to expand without conflicts like [[Talk:Conditional Out of Bounds|this]]. | |
+ | == <span id=00>Camera (0x00)</span> == | ||
Type 0 is found in all tracks and arenas. | Type 0 is found in all tracks and arenas. | ||
The related [[camera]] is enabled, when the player enters this area. This type is used for the finish camera and if waiting for the next online race. | The related [[camera]] is enabled, when the player enters this area. This type is used for the finish camera and if waiting for the next online race. | ||
− | == | + | == <span id=01>Environment Effect (0x01)</span> == |
− | + | With this AREA, you can define an area where {{obj-ref|EnvFire}} and {{obj-ref|EnvSnow}} is not used, and {{obj-ref|EnvKareha}} is used. If setting 1 is set to 1, {{obj-ref|EnvKarehaUp}} is used instead. | |
− | With this AREA, you can define an area where {{obj-ref|EnvFire}} and {{obj-ref|EnvSnow}} is not used, and {{obj-ref|EnvKareha}} is used. If | ||
− | |||
− | |||
Type 1 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T13, T33, T34, T41, T43 and T84. | Type 1 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T13, T33, T34, T41, T43 and T84. | ||
− | == | + | == <span id=02>BFG Entry Swapper (0x02)</span> == |
+ | This type of AREA controls which entry of [[BFG (File Format)|posteffect.bfg]] is used. | ||
− | + | Setting 1 defines the entry which will be used while inside an AREA. Leaving the AREA will return to default entry. | |
− | |||
− | |||
− | |||
− | |||
Type 2 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T23, T32 and T43. | Type 2 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T23, T32 and T43. | ||
− | == | + | == <span id=03>Moving Road (0x03)</span> == |
− | + | Type 3 causes moving road terrain in the [[KCL]] to move, and in [[KCL_flag#Moving Road (0x0B)|some variants]], links them to a route in the KMP which describes the path of the moving road. For more information, see: [[Moving Terrain#Moving Water (KCL 0x0B)|Moving Terrain]]<br> | |
− | Type 3 causes moving road terrain in the [[KCL]] to move, and in [[KCL_flag#Moving Road (0x0B)|some variants]], links them to a route in the KMP which describes the path of the moving road. | ||
Type 3 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T32 and T52. | Type 3 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T32 and T52. | ||
− | == | + | == <span id=04>Destination Point (0x04)</span> == |
− | + | This type of AREA is used as first destination for [[KCL Flag]] »[[KCL Flag#type-12|Force Recalculation]]«. As the CPUs enter the region, they will be redirected. The position and the [[rotation]] vector are used. | |
− | This type of AREA is used as first destination for [[KCL Flag]] »[[KCL Flag#type-12|Force Recalculation]]«. The position and the [[rotation]] vector are used. | ||
Type 4 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T22, T33, T34, T44, T63, A11 and A24. Exact these tracks use also ''Force Recalculation''. | Type 4 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T22, T33, T34, T44, T63, A11 and A24. Exact these tracks use also ''Force Recalculation''. | ||
− | == | + | == <span id=05>Minimap Control (0x05)</span> == |
+ | In the filesystem, type 5 is only used in ''old_mario_gc_b''. It effects settings of the minimap such as culling and whether or not to appear. It is pretty much useless for normal tracks since those settings are also controlled in the [[BRRES]], but it is also used in some tournaments to crop the minimap (if the tournament took place on a specific part, not the whole track), since tournaments cannot deliver a new minimap. | ||
− | + | However, this can be used for [[Mission Mode]] in missions that take place on a specific part of the track. | |
− | == | + | == <span id=06>BBLM Swapper (0x06)</span> == |
+ | This type of AREA controls which [[BBLM (File Format)|BBLM]] file is used. | ||
− | + | Setting 1 controls the index of posteffect.bblm to use, being 0 the default file, 1 posteffect.bblm1 and so on. Setting 2 defines the transition time in frames between the previous BBLM and the new one. | |
Type 6 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T13, T32 and T34. | Type 6 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T13, T32 and T34. | ||
− | == | + | == <span id=07>Flying Boos (0x07)</span> == |
+ | This type of AREA defines an area where Flying Boos ({{obj-ref|b_teresa}}) should appear. | ||
Type 7 is found in the track with [[Filesystem/Race/Course#Files|ID]] T53. | Type 7 is found in the track with [[Filesystem/Race/Course#Files|ID]] T53. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | == <span id=08>Object Grouper (0x08)</span> == |
− | + | This AREA groups [[Objects]] together to work with AREA type 0x09. It uses setting 1 for its group ID. | |
Type 8 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T31, T34, T41 and T43 (same tracks as type 9). | Type 8 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T31, T34, T41 and T43 (same tracks as type 9). | ||
− | == | + | == <span id=09>Group Unloading (0x09)</span> == |
+ | While being in this AREA, objects inside AREA type 0x08 with the same group ID setting 1 get unloaded. | ||
Type 9 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T31, T34, T41 and T43 (same tracks as type 8). | Type 9 is found in the tracks with [[Filesystem/Race/Course#Files|ID]] T31, T34, T41 and T43 (same tracks as type 8). | ||
− | == | + | == <span id=0A>Fall Boundary (0x0A)</span> == |
+ | Type 10 is used by Nintendo for tournaments. It adds new fall boundaries to the game without adding a new KCL file. | ||
− | + | [[Conditional Out of Bounds]] makes use of this type to enable and disable it based on [[checkpoints]]. | |
[[Category:File Format/MKW]] | [[Category:File Format/MKW]] |
Latest revision as of 07:43, 9 January 2023
- File formats
- KMP File Format & Sections
- AREA type
- Cameras
- ENPT Settings
- ITPT Settings
- Item Settings - Item Boxes
- Item Settings - Objects
- Lists
- Tutorials
- KMP Editing
- KMP Editing/Cameras
- Start Position
- Check Point
- Respawn Point
- Cannon
- Presence flags
- Enemy routes in battle arenas
- Testing a Track
- Visual Review with »wkmpt DRAW«
- Tools
Introduction
The AREA type decides the function of the AREA element. There are 10 known types. The type is stored as a single byte at offset 0x01 in the AREA data:
Offset | Type | Description |
---|---|---|
0x00 | Byte | Area shape. 0 = box, 1 = cylinder. |
0x01 | Byte | Area type. Values 0–A. |
0x02 | Byte | Index of CAME if type = 0x00, 0xFF else. |
0x03 | Byte | Priority value. A higher number means a higher priority to choose which area activates if multiple areas are intersected. |
0x04 | Float[3] | A 3D position vector of the area. |
0x10 | Float[3] | A 3D rotation vector of the area's rotation. |
0x1C | Float[3] | A 3D scale vector of the area's scale. |
0x28 | UInt16 | AREA setting 1. Used by AREA type 2, 3, 6, 8 and 9. |
0x2A | UInt16 | AREA setting 2. Used by AREA type 6 and 3. |
0x2C | Byte | Route ID used by AREA type 3. |
0x2D | Byte | Enemy point ID. This value is used by AREA type 4. |
0x2E | UInt16 | Padding? Always 0 in Nintendo tracks. |
For future expansion, if you want to use custom AREA behaviour in your CT distribution with a cheat code (like the Conditional Out of Bounds patch by Riidefi and kHacker35000vr does), please do NOT use the AREA or route settings of an existing AREA type, that'll just cause conflicts. Decide on a new AREA type ID, add it to this wiki page including a description what it'll be used for and how the parameters work, and in your patch, just make that AREA type redirect to the original one you want to mod. That way it's easy to expand without conflicts like this.
Camera (0x00)
Type 0 is found in all tracks and arenas.
The related camera is enabled, when the player enters this area. This type is used for the finish camera and if waiting for the next online race.
Environment Effect (0x01)
With this AREA, you can define an area where EnvFire and EnvSnow is not used, and EnvKareha is used. If setting 1 is set to 1, EnvKarehaUp is used instead.
Type 1 is found in the tracks with ID T13, T33, T34, T41, T43 and T84.
BFG Entry Swapper (0x02)
This type of AREA controls which entry of posteffect.bfg is used.
Setting 1 defines the entry which will be used while inside an AREA. Leaving the AREA will return to default entry.
Type 2 is found in the tracks with ID T23, T32 and T43.
Moving Road (0x03)
Type 3 causes moving road terrain in the KCL to move, and in some variants, links them to a route in the KMP which describes the path of the moving road. For more information, see: Moving Terrain
Type 3 is found in the tracks with ID T32 and T52.
Destination Point (0x04)
This type of AREA is used as first destination for KCL Flag »Force Recalculation«. As the CPUs enter the region, they will be redirected. The position and the rotation vector are used.
Type 4 is found in the tracks with ID T22, T33, T34, T44, T63, A11 and A24. Exact these tracks use also Force Recalculation.
Minimap Control (0x05)
In the filesystem, type 5 is only used in old_mario_gc_b. It effects settings of the minimap such as culling and whether or not to appear. It is pretty much useless for normal tracks since those settings are also controlled in the BRRES, but it is also used in some tournaments to crop the minimap (if the tournament took place on a specific part, not the whole track), since tournaments cannot deliver a new minimap.
However, this can be used for Mission Mode in missions that take place on a specific part of the track.
BBLM Swapper (0x06)
This type of AREA controls which BBLM file is used.
Setting 1 controls the index of posteffect.bblm to use, being 0 the default file, 1 posteffect.bblm1 and so on. Setting 2 defines the transition time in frames between the previous BBLM and the new one.
Type 6 is found in the tracks with ID T13, T32 and T34.
Flying Boos (0x07)
This type of AREA defines an area where Flying Boos (b_teresa) should appear.
Type 7 is found in the track with ID T53.
Object Grouper (0x08)
This AREA groups Objects together to work with AREA type 0x09. It uses setting 1 for its group ID.
Type 8 is found in the tracks with ID T31, T34, T41 and T43 (same tracks as type 9).
Group Unloading (0x09)
While being in this AREA, objects inside AREA type 0x08 with the same group ID setting 1 get unloaded.
Type 9 is found in the tracks with ID T31, T34, T41 and T43 (same tracks as type 8).
Fall Boundary (0x0A)
Type 10 is used by Nintendo for tournaments. It adds new fall boundaries to the game without adding a new KCL file.
Conditional Out of Bounds makes use of this type to enable and disable it based on checkpoints.