Difference between revisions of "KCL flag"

From Custom Mario Kart
Jump to navigation Jump to search
(wtf my bad---- sorry, it was not 001, but 002)
 
(251 intermediate revisions by 38 users not shown)
Line 1: Line 1:
This page describes the '''flags of [[KCL]] files'''.
 
  
 +
== Overview ==
 +
In [[Mario Kart Wii]], collision data is stored as a list of triangles in a [[KCL]] file. Each triangle in the file is associated with a 16-bit KCL flag, which determines the effect that the triangle has on players or items that collide with it. A KCL flag consists of 5 components, each corresponding to a bit group:
  
__TOC__
+
[[File:Kcl-flag-bit-groups.png|600px|frameless|center]]
  
 +
'''Base Type:'''<br>
 +
Ranges in value from 0x00 to 0x1F. This component represents the main effect that the triangle will have, e.g. road, offroad, fall boundary, etc.. Descriptions of each value's effect can be found below.
  
= Mario Kart Wii Collision Flags =
+
'''Variant:'''<br>
In [[Mario Kart Wii]] the collision flag values are normally split. The 5 least significant bits determine the basic type of the flag. The next 11 bits determine the variation upon the type. The list below describes these types and their variants.
+
Ranges in value from 0 to 7. This component determines the variant of the base type. The possible variants of each base type are described below.
==Collision Types (basic type) ==
+
 
 +
'''BLIGHT Index:'''<br>
 +
Ranges in value from 0 to 7. This component is the index of [[BLIGHT (File Format)|posteffect.blight]] that the triangle should use. For drivable surfaces, this refers to the lighting that is applied to any character, vehicle or item that is touching it. For most non-drivable surfaces such as walls, it appears to have no effect. Some variants of [[#Fall Boundary (0x10)|0x10]] and [[#Effect Trigger (0x1A)|0x1A]] repurpose this component to index into the [[KMP]].
 +
 
 +
'''Wheel Depth:'''<br>
 +
Ranges in value from 0 to 3. For drivable surfaces, a higher value will cause the player's wheels to "sink" further into the road. This is used by Nintendo on surfaces such as snow or sand. This likely has other subtle effects on wheel physics; exact details are unknown.
 +
 +
'''Collision effect:'''<br>
 +
This component consists of 3 bits that each have a different effect when set:
 +
 
 +
{| class="wikitable"
 +
|-
 +
! Bit
 +
! Effect
 +
|-
 +
| 0
 +
| Affects drivable surfaces. If set to 1, the surface becomes '''trickable'''. NOTE: For base types that<br>are trickable by default, e.g. boost ramps, this bit should remain as 0 to avoid inconsistent trick types.
 +
|-
 +
| 1
 +
| Affects drivable surfaces. If set to 1, the surface becomes '''reject road''', which forces a player to<br>change direction when attempting to drive on it.
 +
|-
 +
| 2
 +
| Affects walls. If set to 1, the wall becomes a '''soft wall''', also referred to as "barrel roll" collision. This<br>is used by Nintendo on walls below ledges to prevent players from hanging on them.
 +
|}
 +
 
 +
=== Example ===
 +
To manually calculate the KCL flag for '''grass offroad''' (base type = 0x03, variant = 4) that is '''trickable''' (collision effect bit 0 = 1) and uses '''BLIGHT index 3''': First insert the components into the correct bit groups, then convert the resulting binary number to hexadecimal.
 +
 
 +
[[File:Kcl-flags-ex.png|600px|frameless|center]]
 +
 
 +
=== Cheat Sheet ===
 +
This image sums up the base types and variants for finding them more quickly (although it is a bit outdated).
 +
[[File:KCL Cheat Sheet.png|600px|left]]
 +
<br clear=all/>
 +
<br>
 +
 
 +
== Base Types & Variants ==
 +
=== <span id=00>Road (0x00)</span> ===
 +
Default road. The variant controls the terrain type, i.e. the sound effects (SFX) and particles (GFX) generated by driving on it.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Type
+
! Variant
! Variant type
+
! Effect
! What is it?
+
|-
 +
| 0
 +
| Normal road
 +
|-
 +
| 1
 +
| Dirt, GFX on slots [[Slot#7.3|7.3]] and [[Slot#8.3|8.3]]
 
|-
 
|-
|0x00
+
| 2
|A
+
| Dirt, no GFX
|Road
 
 
|-
 
|-
|0x01
+
| 3
|A
+
| Smooth
|Weak off road
 
 
|-
 
|-
|0x02
+
| 4
|A
+
| Wood
|Very weak offroad with a dirt effect
 
 
|-
 
|-
|0x03
+
| 5
|A
+
| Snow with GFX
|Offroad
 
 
|-
 
|-
|0x04
+
| 6
|A
+
| Metal grate
|Heavy offroad with a sand effect
 
 
|-
 
|-
|0x05
+
| 7
|A
+
| Road, but the sound cuts off and returns immediately when triggered
|Off road
+
|}
 +
 
 +
=== <span id=01>Slippery Road 1 (0x01)</span> ===
 +
A type of road that is slippery, but does not slow you down.
 +
{| class="wikitable"
 
|-
 
|-
|0x06
+
! Variant
|unknown
+
! Effect
|Boost
 
 
|-
 
|-
|0x07
+
| 0
|unknown
+
| White sand
|Fast trick
 
 
|-
 
|-
|0x08
+
| 1
|unknown
+
| Dirt<ref name="sliproad1gfxcolorchange" />
|Trick ramp
 
 
|-
 
|-
|0x09
+
| 2
|unknown
+
| Water (unused)
|Out of bounds
 
 
|-
 
|-
|0x0A
+
| 3
|unknown
+
| Snow (unused)
|Solid fall
 
 
|-
 
|-
|0x0B
+
| 4
|B
+
| Grass (unused)
|Shallow Water (weak offroad, like on Shy Guy Beach)
 
 
|-
 
|-
|0x0C
+
| 5
|A-like
+
| Yellow sand
|Wall
 
 
|-
 
|-
|0x0D
+
| 6
|unknown
+
| Sand, no GFX (unused)
|Wall, but makes no sound effect when touched. Sparks still appear.
 
 
|-
 
|-
|0x0E
+
| 7
|unknown
+
| Dirt, no GFX (unused)
|Does nothing
+
|}
 +
<references>
 +
<ref name="sliproad1gfxcolorchange">GFX is a lighter color on slot [[Slot#8.2|8.2]].</ref>
 +
</references>
 +
 
 +
=== <span id=02>Weak Off-road (0x02)</span> ===
 +
A type of road that slows the player down a small amount.
 +
{| class="wikitable"
 
|-
 
|-
|0x0F
+
! Variant
|unknown
+
! Effect
|Normal wall
 
 
|-
 
|-
|0x10
+
| 0
|A-like
+
| Orange sand
|Fall boundary
 
 
|-
 
|-
|0x11
+
| 1
|B
+
| Dirt<ref name="dirtcolorchange" />
|Cannon Activator
 
 
|-
 
|-
|0x12
+
| 2
|unknown
+
| Water
|Does nothing
 
 
|-
 
|-
|0x13
+
| 3
|unknown
+
| Grass, darker GFX
|Half-Pipe blue ramp (like the ones on DK Summit)
 
 
|-
 
|-
|0x14
+
| 4
|unknown
+
| Sand, lighter GFX
|Normal Wall
 
 
|-
 
|-
|0x15
+
| 5
|B
+
| Carpet
|Moving terrain
 
 
|-
 
|-
|0x16
+
| 6
|A
+
| Gravel<ref name="gravelcolorchange" /><ref name="norock" />
|Sticky Road
 
 
|-
 
|-
|0x17
+
| 7
|A
+
| Gravel, different impact SFX<ref name="gravelcolorchange" /><ref name="norock" />
|Road, slightly different than 0x00
+
|}
 +
<references>
 +
<ref name="dirtcolorchange">GFX is red on slot [[Slot#3.4|3.4]].</ref>
 +
<ref name="gravelcolorchange">GFX is orange on slot [[Slot#3.1|3.1]].</ref>
 +
<ref name="norock">GFX does not include the rock particles on slot [[Slot#3.4|3.4]].</ref>
 +
</references>
 +
 
 +
=== <span id=03>Off-road (0x03)</span> ===
 +
A type of road that slows the player down a moderate amount.
 +
{| class="wikitable"
 
|-
 
|-
|0x18
+
! Variant
|unknown
+
! Effect
|Sound Trigger
 
 
|-
 
|-
|0x19
+
| 0
|unknown
+
| Sand<ref name="off-roadcolorchange" />
|Does nothing
 
 
|-
 
|-
|0x1A
+
| 1
|unknown
+
| Dirt
|Does nothing
 
 
|-
 
|-
|0x1B
+
| 2
|unknown
+
| Mud<ref name="off-roadcolorchange" />
|Does nothing
 
 
|-
 
|-
|0x1C
+
| 3
|unknown
+
| Water, no GFX (unused)
|Does nothing
 
 
|-
 
|-
|0x1D
+
| 4
|A
+
| Grass<ref name="off-roadcolorchange" />
|Gravelroad
 
 
|-
 
|-
|0x1E
+
| 5
|unknown
+
| Sand, lighter GFX
|Special Walls
 
 
|-
 
|-
|0x1F
+
| 6
|unknown
+
| Gravel, different impact SFX
|Wall No effects only block player not items!
 
 
|-
 
|-
 +
| 7
 +
| Carpet
 
|}
 
|}
 +
<references>
 +
<ref name="off-roadcolorchange">GFX can be a different color on different [[slot]]s.</ref>
 +
</references>
  
== Variant types ==
+
=== <span id=04>Heavy Off-road (0x04)</span> ===
 +
A type of road that slows the player down a large amount.
 +
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Sand
 +
|-
 +
| 1
 +
| Dirt
 +
|-
 +
| 2
 +
| Mud
 +
|-
 +
| 3
 +
| Flowers
 +
|-
 +
| 4
 +
| Grass
 +
|-
 +
| 5
 +
| Snow
 +
|-
 +
| 6
 +
| Sand
 +
|-
 +
| 7
 +
| Dirt, no GFX
 +
|}
  
Not all variant types are discovered and not of all flags is known which variant it uses. This are the types that are discovered yet:
+
=== <span id=05>Slippery Road 2 (0x05)</span> ===
 +
A type of road that is slippery and slightly slows you down.
 +
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Ice
 +
|-
 +
| 1
 +
| Mud, no GFX (unused)
 +
|-
 +
| 2-5
 +
| Water, no GFX (unused)
 +
|-
 +
| 6-7
 +
| Normal road, different sound (unused)
 +
|}
  
=== Type A ===
+
=== <span id=06>Boost (0x06) [DASH]</span> ===
 +
(Boost Panel) Applies a boost when you drive over it.
 +
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Default
 +
|-
 +
| 1
 +
| If used in course.kcl and {{obj-ref|casino_roulette}} is present, this surface will rotate around it counterclockwise. Used in Chain Chomp Wheel.
 +
|-
 +
| 2-7
 +
| {{Unknown-left|'''Unknown'''. Unused}}
 +
|}
  
{{KCL-Flag-Variant type A}}
+
=== <span id=07>Boost Ramp (0x07) [DASHJ]</span> ===
 +
Applies a boost and is trickable by default. The variant controls the trick animation, and by extension the duration of the trick boost you get upon landing. The duration is listed in frames for karts/bikes. Generally, more flips mean longer airtime and more landing boost time.
 +
Note that you should not use the collision effect "trickable" with this KCL flag, otherwise the trick type will be semi random. Additionally, if used in course.kcl and {{obj-ref|casino_roulette}} is present, this surface will rotate around it counterclockwise.
  
=== Type B ===
+
{| class="wikitable"
 
+
|-
{{KCL-Flag-Variant type B}}
+
! Variant
 
+
! Effect
== Basic Effects (for type A, and type A-like variants) ==
+
! Trick Boost (Karts)
 +
! Trick Boost (Bikes)
 +
|-
 +
| 0
 +
| Double flip trick
 +
| 85 frames
 +
| 95 frames
 +
|-
 +
| 1
 +
| Single flip trick
 +
| 70 frames
 +
| 80 frames
 +
|-
 +
| 2-7
 +
| Stunt trick, unused
 +
| 40 frames
 +
| 45 frames
 +
|}
  
==== Road (0x00) ====
+
=== <span id=08>Jump Pad (0x08)</span> ===
 +
Bounces the player into the air, and locks their speed until they touch the ground. Trickable by default. The variant controls the speed lock and the amount of Y velocity applied (both in units/frame). Values in parentheses are used if the player is in a boost when they touch this surface.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Basic effect (Z, octal)
+
! Variant
! What is it?
+
! Speed Lock
 +
! Y Velocity
 +
! Description
 +
|-
 +
| 0
 +
| 50.0
 +
| 35.0
 +
| Used in <small>GBA</small> Bowser Castle 3
 +
|-
 +
| 1
 +
| 50.0
 +
| 47.0
 +
| Used in <small>SNES</small> Ghost Valley 2
 +
|-
 +
| 2
 +
| 59.0
 +
| 30.0
 +
| Used in <small>GBA</small> Shy Guy Beach
 +
|-
 +
| 3
 +
| 73.0 (100.0)
 +
| 45.0 (70.0)
 +
| Ramps in Mushroom Gorge<ref name="offroadglitch" />
 +
|-
 +
| 4
 +
| 73.0 (100.0)
 +
| 53.0 (65.0)
 +
| Bouncy mushrooms in Mushroom Gorge<ref name="bouncymushroomsfx" />
 +
|-
 +
| 5
 +
| 56.0
 +
| 50.0
 +
| Used in Chain Chomp Wheel
 +
|-
 +
| 6
 +
| 55.0
 +
| 35.0
 +
| Used in <small>DS</small> Yoshi Falls and Funky Stadium
 
|-
 
|-
|0
+
| 7
|Normal Road
+
| 56.0
 +
| 50.0
 +
| Unused, seems to be identical to 5
 +
|}
 +
<references>
 +
<ref name="offroadglitch">This flag causes the [[Off-Road Glitch]].</ref>
 +
<ref name="bouncymushroomsfx">SFX always work on the {{obj-ref|kinoko_bend}} object, but requires slot [[Slot#1.3|1.3]] for the course model KCL.</ref>
 +
</references>
 +
 
 +
=== <span id=09>Item Road (0x09)</span> ===
 +
A type of road that is solid for items only. Items that land on it will despawn after 3 seconds (180 frames). The purpose of the variant is unknown.
 +
{| class="wikitable"
 
|-
 
|-
|1
+
! Variant
|Dirt Road
+
! Effect
 
|-
 
|-
|2
+
| 0
|Sand/Carpet
+
| {{Unknown-left|'''Unknown'''}}
 
|-
 
|-
|3
+
| 1
|Slippery Road
+
| {{Unknown-left|'''Unknown'''}}
 
|-
 
|-
|4
+
| 2
|Wood Road
+
| Used on metal grates
 
|-
 
|-
|5
+
| 3
|Snow Road
+
| {{Unknown-left|'''Unknown'''. Used on wooden paths/grass/mushrooms}}
 
|-
 
|-
|6
+
| 4
|Metal Grid/Chain Link Road
+
| {{Unknown-left|'''Unknown'''. Unused}}
 
|-
 
|-
|7
+
| 5
|Another Normal Road
+
| {{Unknown-left|'''Unknown'''. Used on grass/bushes}}
 
|-
 
|-
 +
| 6-7
 +
| {{Unknown-left|'''Unknown'''. Unused}}
 
|}
 
|}
  
==== Road (0x17) ====
+
=== <span id=0A>Solid Fall (0x0A)</span> ===
 +
A solid surface that counts the player out of bounds. The variant controls the terrain type.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Basic effect (Z, octal)
+
! Variant
! What is it?
+
! Effect
 
|-
 
|-
|0
+
| 0
|Normal road, little bit different than 0x00
+
| Sand
 
|-
 
|-
|1
+
| 1
|Sand
+
| Sand/Underwater
 
|-
 
|-
|2
+
| 2
|Sand sound, with dirt effect
+
| {{Unknown-left|'''Unknown'''}}
 
|-
 
|-
|3
+
| 3
|Glass road
+
| Ice
 
|-
 
|-
|4
+
| 4
|Sand
+
| Dirt
 
|-
 
|-
|5
+
| 5
|Glass road with sound-effect
+
| Grass
 
|-
 
|-
|6
+
| 6
|Sand
+
| Wood
 
|-
 
|-
|7
+
| 7
|Dirt effect with no sound
+
| Dark sand with GFX
 
|}
 
|}
  
==== Road (0x1D) ====
+
=== <span id=0B>Moving Water (0x0B)</span> ===
 +
A type of road that moves the player along a route, used in Koopa Cape and <small>DS</small> Yoshi Falls. It is only active while inside an [[AREA type#AREA type 0x03 (moving road)|AREA type 0x3]]. The exact functionality depends on the variant. For more information, see: [[Moving Terrain#Moving Water (KCL 0x0B)|Moving Terrain]]<br>
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Basic effect (Z, octal)
+
! Variant
! What is it?
+
! Effect
 +
|-
 +
| 0
 +
| Moving water that follows a route, pulling the player downwards.
 +
 
 +
|-
 +
| 1
 +
| Moving water that follows a route and strongly pulls the player downwards, making it hard to drive.
 +
|-
 +
| 2
 +
| Moving water that follows a route from the start of the path to the end of it.
 +
Uses 2 [[AREA type#AREA type 0x03 (moving road)|AREA]] settings:
 +
* Setting 1: Acceleration modifier.
 +
* Setting 2: Moving speed.<ref name="spd" />
 +
|-
 +
| 3
 +
| Moving water that follows a route from the start of the path to the end of it and disables player's acceleration.
 +
Uses 2 [[AREA type#AREA type 0x03 (moving road)|AREA]] settings:
 +
* Setting 1: Current player's speed modifier.<br>eg. value of 100 will keep current player's speed. Values below 100 will slow down player until full stop.
 +
* Setting 2: Moving speed.<ref name="spd" />
 
|-
 
|-
|0
+
| 4
|Gravel
+
| Moving asphalt, unused. Functions the same as variant 0.
 
|-
 
|-
|1
+
| 5
|Dirt effect with no sound
+
| Moving asphalt, unused. Functions the same as variant 0.
 
|-
 
|-
|2
+
| 6
|Normal road (like 0x00)
+
| Moving road, unused. Functions the same as variant 0.
 
|-
 
|-
|3
+
| 7
|Glass road with echo
+
| Moving road, unused. Functions the same as variant 0.
 +
|}
 +
<references>
 +
<ref name="spd">Always overrides route's moving speed setting.</ref>
 +
</references>
 +
'''Route Settings:'''
 +
{| class="wikitable"
 
|-
 
|-
|4
+
! Setting !! Description
|Gravel, different sound
 
 
|-
 
|-
|5
+
| 1 || Moving speed.
|No sound effect
 
 
|-
 
|-
|6
+
| 2 || Value of 1 changes moving water direction 90 degrees to the right.<br>Value of 2 changes moving water direction 90 degrees to the left.
|No sound effect
 
 
|-
 
|-
|7
 
|Normal Gravel
 
 
|}
 
|}
  
==== Sticky Road (0x16) ====
+
=== <span id=0C>Wall (0x0C)</span> ===
 +
Default wall, solid for both players and items. The variant controls the sound played when colliding with it.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Basic effect (Z, octal)
+
! Variant
! What is it?
+
! Effect
 
|-
 
|-
|0
+
| 0
|Wood Road
+
| Normal
 
|-
 
|-
|1
+
| 1
|Sand Road
+
| Rock
 
|-
 
|-
|2
+
| 2
|Gravel
+
| Metal
 
|-
 
|-
|3
+
| 3
|Dirt Road
+
| Wood
 
|-
 
|-
|4
+
| 4
|Sand/Gravel
+
| Ice
 
|-
 
|-
|5
+
| 5
|Slot-bound drift sound effect, normal road.
+
| Bush (with GFX)
 
|-
 
|-
|6
+
| 6
|"Normal Road" Road
+
| Rope
 
|-
 
|-
|7
+
| 7
|_
+
| Rubber
 
|}
 
|}
  
==== Offroad (0x03) ====
+
=== <span id=0D>Invisible Wall (0x0D)</span> ===
 +
A type of wall that is solid for players only, and is typically invisible in-game.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Basic effect (Z, octal)
+
! Variant
! What is it?
+
! Effect
 +
|-
 +
| 0
 +
| No spark and no character wall hit voice
 +
|-
 +
| 1-2
 +
| Spark and character wall hit voice (unused)
 +
|-
 +
| 3-7
 +
| {{Unknown-left|'''Unknown'''. Same as 0? (unused)}}
 +
|}
 +
 
 +
=== <span id=0E>Item Wall (0x0E)</span> ===
 +
A type of wall that is solid for items only. Items that land on it will despawn instantly. The purpose of the variant is unknown.
 +
{| class="wikitable"
 
|-
 
|-
|0
+
! Variant
|Dirt
+
! Effect
 
|-
 
|-
|1
+
| 0
|Acts like Dirt Road
+
| {{Unknown-left|'''Unknown'''}}
 
|-
 
|-
|2
+
| 1
|Mud
+
| {{Unknown-left|'''Unknown'''. Used on rock walls}}
 
|-
 
|-
|3
+
| 2
|Water, a little offroad effect.
+
| {{Unknown-left|'''Unknown'''. Used on metal walls}}
 
|-
 
|-
|4
+
| 3
|Grass
+
| {{Unknown-left|'''Unknown'''}}
 
|-
 
|-
|5
+
| 4
|Sand
+
| {{Unknown-left|'''Unknown'''. Unused}}
 
|-
 
|-
|6
+
| 5
|Sand Water
+
| {{Unknown-left|'''Unknown'''. Used on grass/bushes}}
 
|-
 
|-
|7
+
| 6-7
|Gravel
+
| {{Unknown-left|'''Unknown'''. Unused}}
 
|}
 
|}
  
==== Weak Offoad (0x01) ====
+
=== <span id=0F>Wall 2 (0x0F)</span> ===
 +
Solid for players and items. The difference between this and Wall (0x0C) is unknown.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Basic effect (Z, octal)
+
! Variant
! What is it?
+
! Effect
 
|-
 
|-
|0
+
| 0
|Sand with spike sounds
+
| Normal
 
|-
 
|-
|1
+
| 1
|Sand
+
| Rock
 
|-
 
|-
|2
+
| 2
|unknown
+
| Metal
 
|-
 
|-
|3
+
| 3
|unknown
+
| Wood
 
|-
 
|-
|4
+
| 4
|unknown
+
| Ice
 
|-
 
|-
|5
+
| 5
|Sand
+
| Bush (no GFX, unused)
 
|-
 
|-
|6
+
| 6
|unknown
+
| Rope
 
|-
 
|-
|7
+
| 7
|unknown
+
| Rubber
 
|}
 
|}
  
 +
=== <span id=10>Fall Boundary (0x10)</span> ===
 +
A non-solid barrier that counts the player out of bounds. The variant controls the animation and sounds to play when it is triggered. For variants 1-3, the BLIGHT index is instead used to reference a {{obj-ref|pocha}} object in the KMP, which is used to determine the height of the splash effect. The BLIGHT index should match Setting 1 of the corresponding pocha object.
  
==== Fast Trick (0x07) ====
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Basic effect (Z, octal)
+
! Variant
! What is it? (type of jump)
+
! Effect
 
|-
 
|-
|0
+
| 0
|normal
+
| Air fall
 
|-
 
|-
|1
+
| 1
|unknown (it's in Mdush.kcl)
+
| {{obj-ref|0x7|Water}}
 
|-
 
|-
|2
+
| 2
|unknown
+
| {{obj-ref|0x11|Lava}}
 
|-
 
|-
|3
+
| 3
|unknown
+
| {{obj-ref|0x17 0x7|Icy water}}, (ice on respawn)<ref name="icywaterslot" />
 
|-
 
|-
|4
+
| 4
|unknown
+
| Lava, no GFX
 
|-
 
|-
|5
+
| 5
|a little bit lower (with other jump effects)
+
| {{obj-ref|0x12|Burning air fall}}
 
|-
 
|-
|6
+
| 6
|unknown
+
| Quicksand (used in object {{obj-ref|quicksand}})<ref name="quicksandslot" />
 
|-
 
|-
|7
+
| 7
|unknown
+
| Short fall
 
|}
 
|}
 +
<references>
 +
<ref name="icywaterslot">Requires slot [[Slot#6.1|6.1]].</ref>
 +
<ref name="quicksandslot">In rare cases with complex KCL geometry, this variant can activate, but not cause the player to respawn, resulting in intangibility and no control of the character. If this occurs somewhere on your track, an additional fall boundary may be needed to "catch" the victim and make them respawn.</ref>
 +
</references>
  
 +
=== <span id=11>Cannon Trigger (0x11)</span> ===
 +
Used to implement [[cannon|cannons]]. Upon contact, the player will be launched to a destination [[KMP (File Format) #CNPT|cannon point]]. The variant determines the KMP index of the cannon point to launch to. Subsequently, a track cannot have more than 8 distinct cannons.
 +
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| To point 0
 +
|-
 +
| 1
 +
| To point 1
 +
|-
 +
| 2
 +
| To point 2
 +
|-
 +
| 3
 +
| To point 3 (unused)
 +
|-
 +
| 4
 +
| To point 4 (unused)
 +
|-
 +
| 5
 +
| To point 5 (unused)
 +
|-
 +
| 6
 +
| To point 6 (unused)
 +
|-
 +
| 7
 +
| To point 7 (unused)
 +
|}
  
 +
<span id="type-12">
 +
=== <span id=12>Force Recalculation (0x12)</span> ===
 +
A trigger that forces an enemy/item route recalculation when a player or CPU passes through it. This is typically used in areas where players or CPUs can fall to a different route. It is only active while inside an [[AREA type#AREA type 0x04 (destination point)|AREA type 0x4]]. Variants are never used and likely have no effect.
 +
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Default
 +
|-
 +
| 1-7
 +
| {{Unknown-left|'''Unknown'''. Unused}}
 +
|}
  
==== Fall boundary (0x10) ====
+
=== <span id=13>Half-pipe Ramp (0x13)</span> ===
 +
A special type of ramp that functions like a half-pipe jump. Trickable by default. This type is best used in combination with Invisible Wall (0x0D), although this is not strictly necessary.
 +
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Default
 +
|-
 +
| 1
 +
| Applies a boost, used in Bowser's Castle
 +
|-
 +
| 2-7
 +
| {{Unknown-left|'''Unknown'''. Unused}}
 +
|}
  
Note: this is an A-like variant type kcl.  
+
=== <span id=14>Player-Only Wall (0x14)</span> ===
Probably it's divided in 2 sections of 8 and 3 bits.
+
Allows items to pass through it like Invisible Wall (0x0D), but produces sounds upon collision similar to Wall (0x0C). Used by Nintendo below open ledges to prevent players from hanging on to them.
The 3 bits one is the basic type (column Z)
+
{| class="wikitable"
The 8 bits section defines the index, KMP can also refer to this index. (only for the pocha's)
+
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Normal (unused)
 +
|-
 +
| 1
 +
| Rock (unused)
 +
|-
 +
| 2
 +
| Metal (unused)
 +
|-
 +
| 3
 +
| Wood
 +
|-
 +
| 4
 +
| Ice (unused)
 +
|-
 +
| 5
 +
| Bush (unused)
 +
|-
 +
| 6
 +
| Rope (unused)
 +
|-
 +
| 7
 +
| No SFX/GFX
 +
|}
  
Formula: 0x8Y + Z<br>
+
=== <span id=15>Moving Road (0x15)</span> ===
Y = index<br>
+
A type of road that moves players in a specified direction, used in Toad's Factory and Coconut Mall. Unlike moving water, moving road is '''not''' controlled by routes in the KMP, but rather by specific objects. For more information, see: [[Moving Terrain#Moving Road (KCL 0x15)|Moving Terrain]]
Z = basic type
+
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Moves west with {{obj-ref|BeltCrossing}} and {{obj-ref|escalator}}. The latter only works with {{obj-ref|escalator.kcl}}
 +
|-
 +
| 1
 +
| Moves east with {{obj-ref|BeltCrossing}} and west with {{obj-ref|escalator}}. The latter only works with {{obj-ref|escalator.kcl}}
 +
|-
 +
| 2
 +
| Moves east with {{obj-ref|BeltEasy}}
 +
|-
 +
| 3
 +
| Moves west with {{obj-ref|BeltEasy}}
 +
|-
 +
| 4
 +
| Rotates around {{obj-ref|BeltCurveA}} clockwise
 +
|-
 +
| 5
 +
| Rotates around {{obj-ref|BeltCurveA}} counterclockwise
 +
|-
 +
| 6-7
 +
| {{Unknown-left|'''Unknown'''. Unused}}
 +
|}
  
 +
=== <span id=16>Sticky Road (0x16) [ATTACH]</span> ===
 +
A type of road that attaches players to the road if they are within 200 units of the road with a correction of up to 200 units/frame.
 +
Moving water shares this code internally. The game logic does not care if player is also colliding with a different surface; as long as the player within 200 units of a surface with this attribute, the player's position will be corrected. This effect does not stack; layering on moving water will not make it more intense.
 +
The variant controls the terrain type.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Basic effect (Z, octal)
+
! Variant
! What is it?
+
! Effect
 
|-
 
|-
|0
+
| 0
|Air fall
+
| Wood
 
|-
 
|-
|1
+
| 1
|Water (pocha.brres), Setting 1 refers to the index in KMP.
+
| Gravel, different impact SFX
 
|-
 
|-
|2
+
| 2
|Lava (pochaYogan.brres), Setting 1 refers to the index in KMP.
+
| Carpet
 
|-
 
|-
|3
+
| 3
|Water (used in MT).
+
| Dirt, no GFX
 
|-
 
|-
|4
+
| 4
|Ice Water (pocha.brres, ice.brres on respawn), Setting 1 refers to the index in KMP.
+
| Sand, different impact and drift SFX, no GFX
 
|-
 
|-
|5
+
| 5
|Air Fall but with entry a burning air fall.
+
| Normal road, SFX on slot [[Slot#4.4|4.4]]
 
|-
 
|-
|6
+
| 6
|Quicksand
+
| Normal road
 
|-
 
|-
|7
+
| 7
|
+
| Mud with GFX
 
|}
 
|}
  
== Known Variants ==
+
=== <span id=17>Road 2 (0x17)</span> ===
 +
An alternative to Road (0x00) with different variants.
 +
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Normal road, lower pitch sound
 +
|-
 +
| 1
 +
| Carpet
 +
|-
 +
| 2
 +
| Grass, GFX on [[Slot#8.3|8.3]]
 +
|-
 +
| 3
 +
| Normal road, used on {{obj-ref|0x1fa|green mushrooms}}
 +
|-
 +
| 4
 +
| Grass
 +
|-
 +
| 5
 +
| Glass road with SFX
 +
|-
 +
| 6
 +
| Dirt (unused)
 +
|-
 +
| 7
 +
| Normal road, SFX on slot [[Slot#4.4|4.4]]
 +
|}
  
==== Wall (0x0C) ====
+
=== <span id=18>Sound Trigger (0x18)</span> ===
Similar to A as the last 3 bits are the basic effect and the first 3 bits are the collision effect. Shadow effect and intensity is ignored or unused.
+
A trigger that activates/deactivates sound effects or music channels when the player passes through it. The effects of each variant are different for every track slot and are described below.<br>
 +
<spoiler>
 +
{{Slot-SFX}}
 +
</spoiler><br>
  
 +
=== <span id=19>Weak Wall (0x19)</span> ===
 +
Nintendo uses this type in Wario's Gold Mine and Rainbow Road. It acts as a wall that pushes players away when driving at low speed, but it can easily be trespassed when accelerating. They seem to be originally used below flat road to prevent players from hanging on the edges. Variants are never used and likely have no effect.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! ID
+
! Variant
! What is it?
+
! Effect
 +
|-
 +
| 0
 +
| Default
 +
|-
 +
| 1-7
 +
| {{Unknown-left|'''Unknown'''. Unused}}
 +
|}
 +
 
 +
=== <span id=1A>Effect Trigger (0x1A)</span> ===
 +
A trigger that activates when the player passes through it; it can have several different functions depending on the variant.
 +
{| class="wikitable"
 
|-
 
|-
|000
+
! Variant
|Normal Wall
+
! Effect
 
|-
 
|-
|001
+
| 0
|Rock Wall
+
| Change BLIGHT to specified index. Useful when a lighting change is needed in mid-air.
 
|-
 
|-
|002
+
| 1
|Metal Wall
+
| Change BLIGHT to specified index. (Different from 0?)
 
|-
 
|-
|003
+
| 2
|Guard Rail
+
| Trigger a water splash ({{obj-ref|pocha}}) without respawning the player.<ref name="harmlesssplash1" /><ref name="harmlesssplash2" /> The BLIGHT index references a pocha object in the KMP, which is used to determine the height of the splash effect. The BLIGHT index should match Setting 1 of the corresponding pocha object.
 
|-
 
|-
|004
+
| 3
|Short tree wall sound effect
+
| Activate {{obj-ref|starGate}} object. Used in tournaments only.
 
|-
 
|-
|005
+
| 4
|Tree Wall
+
| Half-pipe cancellation; forces the player out of half-pipe state.
 
|-
 
|-
|006
+
| 5
|Tree Wall without leaf effect
+
| Coin despawner; despawns any coins that touch it. Used in battle mode only.
 
|-
 
|-
|007
+
| 6
|Rubber Wall
+
| {{Unknown-left|'''Unknown'''. Used on top of the chimneys in Delfino Pier. Possibly related to {{obj-ref|truckChimSmkW}}?}}
 
|-
 
|-
|008
+
| 7
|Hollow Wall
+
| {{Unknown-left|'''Unknown'''. Unused}}
 +
|}
 +
<references>
 +
<ref name="harmlesssplash1">Reusable only if a fall boundary is triggered.</ref>
 +
<ref name="harmlesssplash2">On slots T4.2 and B2.5, index 5 is hardcoded to spawn a pochaLeaf or pochaLeafY ({{obj-ref|pochaMori}}) respectively. In all other cases, a pocha is used, even if the linked object is of a different type.</ref>
 +
</references>
 +
 
 +
=== <span id=1B>Item State Modifier (0x1B)</span> ===
 +
Nintendo uses this type only in Toad's Factory. It stops stationary items once leaving the curved conveyor belts. Variants are never used and likely have no effect.
 +
{| class="wikitable"
 
|-
 
|-
|009
+
! Variant
|Wall without being bumped
+
! Effect
 
|-
 
|-
|40x
+
| 0
|The "bump" depends on the angle you hit the wall.
+
| Default
 
|-
 
|-
 +
| 1-7
 +
| {{Unknown-left|'''Unknown'''. Unused}}
 
|}
 
|}
  
==== Wall (0x1E) ====
+
=== <span id=1C>Half-Pipe Invisible Wall (0x1C)</span> ===
Similar to A as the last 3 bits are the basic effect and the first 3 bits are the collision effect. Shadow effect and intensity is ignored or unused.
+
An invisible wall that is only solid for players in the air after a half-pipe jump, used in Bowser's Castle and Funky Stadium. Variants are never used and likely have no effect.
 +
{| class="wikitable"
 +
|-
 +
! Variant
 +
! Effect
 +
|-
 +
| 0
 +
| Default
 +
|-
 +
| 1-7
 +
| {{Unknown-left|'''Unknown'''. Unused}}
 +
|}
  
 +
=== <span id=1D>Rotating Road (0x1D)</span> ===
 +
If {{obj-ref|casino_roulette}} is present, this road slowly rotates around it counterclockwise. Without casino_roulette, it acts like ordinary road. For more information, see: [[Moving Terrain#Rotating Road (KCL 0x1D)|Moving Terrain]]
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! ID
+
! Variant
! What is it?
+
! Effect
 
|-
 
|-
|000
+
| 0
|Spin Out when touched
+
| Carpet, different impact SFX
 
|-
 
|-
|001
+
| 1
|Unknown
+
| Normal road, different sound, different impact SFX (unused)
 
|-
 
|-
|002
+
| 2
|Unknown
+
| Normal road
 
|-
 
|-
|003
+
| 3
|Unknown
+
| Glass road
 
|-
 
|-
|004
+
| 4
|Rainbow Road Sound effect Wall (slot based)
+
| Carpet
 
|-
 
|-
|005
+
| 5
|Wall from Mushrooms
+
| No sound, star crash impact SFX (requires {{obj-ref|starGate}} for SFX) (unused)
 
|-
 
|-
|006
+
| 6
|Unknown
+
| Sand (unused)
 
|-
 
|-
|007
+
| 7
|Unknown
+
| Dirt (unused)
 
|}
 
|}
  
==== Sound Trigger (0x18) Bowser Castle Wii====
+
=== <span id=1E>Special Wall (0x1E)</span> ===
 +
Variants consist of wall types that have special functionality and/or are used in very specific situations.
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! ID
+
! Variant
! What is it?
+
! Effect
 +
|-
 +
| 0
 +
| Cactus. Touching this will cause the player to spin out. Used in Dry Dry Ruins and Thwomp Desert.
 +
|-
 +
| 1
 +
| No SFX/GFX. Used behind the lavafalls in Grumble Volcano.
 +
|-
 +
| 2
 +
| Bouncy wall (unused). Driving into it at slow speed will cause the player to be pushed backwards.
 
|-
 
|-
| 000
+
| 3
| Disable one time use Sound Trigger (like Bowser Howl).
+
| No SFX/GFX. Used for the finish line banners on Wario's Gold Mine and Koopa Cape.
 
|-
 
|-
| 001
+
| 4
| Bowser's Howl + Echo (put 007 at the end of a turn to be able to reuse Bowser Howl!)
+
| Rainbow Road railings. SFX only work on slot [[Slot#4.4|4.4]].
 
|-
 
|-
| 002
+
| 5
| Sound Distortion + Echo.  
+
| The sides and stalk of mushroom pads, used on Mushroom Gorge.
 
|-
 
|-
| 003
+
| 6
| Deactivate above.
+
| Metal SFX. Used for the statue in Luigi Circuit and the top of the underwater section in Koopa Cape.
 
|-
 
|-
| 004
+
| 7
| Add Drums + Echo on music + Koopa ball / koopa figure sound
+
| The sides of the gates from competitions. Requires {{obj-ref|starGate}} object for SFX.
 +
|}
 +
 
 +
=== <span id=1F>Invisible Wall 2 (0x1F)</span> ===
 +
Solid for players only. The difference between this and Invisible Wall (0x0D) is unknown.
 +
{| class="wikitable"
 
|-
 
|-
| 005
+
! Variant
| Unknown or nothing (but tested.)
+
! Effect
 
|-
 
|-
| 006
+
| 0
| Add Drums without Echo
+
| No SFX/GFX
 
|-
 
|-
| 007
+
| 1-7
| Back to normal - Allow reuse for one time use Sound Trigger.
+
| {{Unknown-left|'''Unknown'''. Same as 0? (unused)}}
 
|}
 
|}
Little Info in order to have Twromp effect just disable every sound trigger (put 003 then 007).
 
  
==== Sound Trigger (0x18) Koopa Cape====
+
== Additional Info ==
 +
[[Wiimm]] has made a statistical analysis about the usage of flags in all 32 tracks: [http://szs.wiimm.de/download/kcl/kcl-types.txt kcl-types.txt]
 +
 
 +
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! ID
+
! Type
 
! What is it?
 
! What is it?
 +
! Speed factor<sup>[1]</sup>
 +
! Handling factor<sup>[1]</sup>
 +
|-
 +
|[[#Road (0x00)|0x00]]
 +
|Road
 +
| align=center | 1.0
 +
| align=center | 0.7
 +
|-
 +
|[[#Slippery Road 1 (0x01)|0x01]]
 +
|Slippery Road 1
 +
| align=center | 1.0
 +
| align=center | 0.050 &ndash; 0.105
 +
|-
 +
|[[#Weak Off-road (0x02)|0x02]]
 +
|Weak Off-road
 +
| align=center | 0.550 &ndash; 0.909
 +
| align=center | 0.080 &ndash; 0.157
 +
|-
 +
|[[#Off-road (0x03)|0x03]]
 +
|Off-road
 +
| align=center | 0.325 &ndash; 0.712
 +
| align=center | 0.050 &ndash; 0.105
 +
|-
 +
|[[#Heavy_Off-road_.280x04.29|0x04]]
 +
|Heavy Off-road
 +
| align=center | 0.185 &ndash; 0.422
 +
| align=center | 0.050 &ndash; 0.105
 +
|-
 +
|[[#Slippery Road 2 (0x05)|0x05]]
 +
|Slippery Road 2
 +
| align=center | 0.881 &ndash; 0.999
 +
| align=center | 0.030 &ndash; 0.074
 +
|-
 +
|[[#Boost Panel (0x06)|0x06]]
 +
|Boost Panel
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 000
+
|[[#Boost Ramp (0x07)|0x07]]
| Unknown or nothing (but tested.)
+
|Boost Ramp
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 001
+
|[[#Jump Pad (0x08)|0x08]]
| Unknown or nothing (but tested.)
+
|Jump Pad
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 002
+
|[[#Item Road (0x09)|0x09]]
| Unknown or nothing (but tested.)
+
|Item Road
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 003
+
|[[#Solid Fall (0x0A)|0x0A]]
| Music change (water tunnel music)
+
|Solid Fall
 +
| align=center | 0.1
 +
| align=center | 0.7
 
|-
 
|-
| 004
+
|[[#Moving Water (0x0B)|0x0B]]
| Music Change + Echo + Water Background sound.
+
|Moving Water
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 005
+
|[[#Wall (0x0C)|0x0C]]
| Deactivate all only keep Echo.
+
|Wall
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 006
+
|[[#Invisible Wall (0x0D)|0x0D]]
| Music Change 2
+
|Invisible Wall
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 007
+
|[[#Item Wall (0x0E)|0x0E]]
| Add Echo on every trigger.
+
|Item Wall
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 008
+
|[[#Wall 2 (0x0F)|0x0F]]
| Back To normal.
+
|Wall 2
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 009
+
|[[#Fall Boundary (0x10)|0x10]]
| Unknown or nothing (but tested.)
+
|Fall Boundary
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 00A
+
|[[#Cannon Activator (0x11)|0x11]]
| Unknown or nothing (but tested.)
+
|Cannon Activator
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 00B
+
|[[#Force Recalculation (0x12)|0x12]]
| Unknown or nothing (but tested.)
+
| Force Recalculation
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 00C
+
|[[#Half-pipe Ramp (0x13)|0x13]]
| Music Change (Water Tunnel)
+
|Half-pipe Ramp
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 00D
+
|[[#Player-Only Wall (0x14)|0x14]]
| Music change + echo + water sound.
+
|Player-Only Wall
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 00E
+
|[[#Moving Road (0x15)|0x15]]
| music normal + echo + water sound
+
|Moving Road
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 00F
+
|[[#Sticky/Gravity Road (0x16)|0x16]]
| Back to normal + echo
+
|Sticky/Gravity Road
|}
+
| align=center | 1.0
 
+
| align=center | 0.7
==== Sound Trigger (0x18) Rainbow Road====
 
{| class="wikitable"
 
 
|-
 
|-
! ID
+
|[[#Road 2 (0x17)|0x17]]
! What is it?
+
|Road 2
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 000
+
|[[#Sound Trigger (0x18)|0x18]]
| Turn Off button.
+
|Sound Trigger
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 001
+
|[[#Weak Wall (0x19)|0x19]]
| Gate Sound 1 (Add a turn off button before and after if you use only one gate.
+
|Weak Wall
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 002
+
|[[#Effect Trigger (0x1A)|0x1A]]
| Gate Sound 2
+
|Effect Trigger
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 003
+
|[[#Item State Modifier (0x1B)|0x1B]]
| Gate Sound 3
+
|Item State Modifier
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 004
+
|[[#Half-pipe Invisible Wall (0x1C)|0x1C]]
| Gate Sound 4
+
|Half-pipe Invisible Wall
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 005
+
|[[#Rotating Road (0x1D)|0x1D]]
| Gate Sound 5
+
|Rotating Road
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 006
+
|[[#Special Walls (0x1E)|0x1E]]
| Tunnel Sound (Add a turn off button to stop it)
+
|Special Walls
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|-
 
|-
| 007
+
|[[#Invisible Wall 2 (0x1F)|0x1F]]
| Nothing or unknown.
+
|Invisible Wall 2
 +
| align=center | 1.0
 +
| align=center | 0.7
 
|}
 
|}
<br>
 
Little info about that gate it seem easy but it need little Logic.<br>
 
Here a good example : 000 -> 001 -> 002 -> 003 -> 004 -> 005 -> 000<br>
 
That how original Rainbow Road do , That play all get when you pass them and don't play back until you don't have reach the End point "000"<br>
 
here an idea to make gate every time you pass it : 000 -> 001 -> 000 -> 001 -> ect...<br>
 
Note: 000 -> 002 and 001 -> 001 doesn't play or play it only once.
 
That will play each gate every time you pass it.<br>
 
You will see that really easy , same goes with the tunnel one variant to activate it one to stop it.<br>
 
Good luck :3<br>
 
  
[[category:File Format]]
+
; '''[1]''' &#58; Notes for '''Speed factor'''
 +
* Each vehicle and driver combination has its own basic speed. The '''Speed factor''' is always &le;1.0 and defines the relative KCL type dependent speed.
 +
* The values are calculated after analyzing different [[Mario Kart Wii]] files. The ranges depends on the possible driver and vehicle combinations.
 +
* The different basic speed of the vehicles (75.00 &ndash; 85.07) and the driver modifications of the basic speed (add 0 &ndash; 0.53) are not part of these speed factor calculations.
 +
* Some values are senseless (e.g. walls, fall down, effects), but the values are available in the Mario Kart Wii tables.
 +
 
 +
 
 +
[[Category:File Format/MKW]]

Latest revision as of 16:13, 17 January 2024

Overview

In Mario Kart Wii, collision data is stored as a list of triangles in a KCL file. Each triangle in the file is associated with a 16-bit KCL flag, which determines the effect that the triangle has on players or items that collide with it. A KCL flag consists of 5 components, each corresponding to a bit group:

Kcl-flag-bit-groups.png

Base Type:
Ranges in value from 0x00 to 0x1F. This component represents the main effect that the triangle will have, e.g. road, offroad, fall boundary, etc.. Descriptions of each value's effect can be found below.

Variant:
Ranges in value from 0 to 7. This component determines the variant of the base type. The possible variants of each base type are described below.

BLIGHT Index:
Ranges in value from 0 to 7. This component is the index of posteffect.blight that the triangle should use. For drivable surfaces, this refers to the lighting that is applied to any character, vehicle or item that is touching it. For most non-drivable surfaces such as walls, it appears to have no effect. Some variants of 0x10 and 0x1A repurpose this component to index into the KMP.

Wheel Depth:
Ranges in value from 0 to 3. For drivable surfaces, a higher value will cause the player's wheels to "sink" further into the road. This is used by Nintendo on surfaces such as snow or sand. This likely has other subtle effects on wheel physics; exact details are unknown.

Collision effect:
This component consists of 3 bits that each have a different effect when set:

Bit Effect
0 Affects drivable surfaces. If set to 1, the surface becomes trickable. NOTE: For base types that
are trickable by default, e.g. boost ramps, this bit should remain as 0 to avoid inconsistent trick types.
1 Affects drivable surfaces. If set to 1, the surface becomes reject road, which forces a player to
change direction when attempting to drive on it.
2 Affects walls. If set to 1, the wall becomes a soft wall, also referred to as "barrel roll" collision. This
is used by Nintendo on walls below ledges to prevent players from hanging on them.

Example

To manually calculate the KCL flag for grass offroad (base type = 0x03, variant = 4) that is trickable (collision effect bit 0 = 1) and uses BLIGHT index 3: First insert the components into the correct bit groups, then convert the resulting binary number to hexadecimal.

Kcl-flags-ex.png

Cheat Sheet

This image sums up the base types and variants for finding them more quickly (although it is a bit outdated).

KCL Cheat Sheet.png



Base Types & Variants

Road (0x00)

Default road. The variant controls the terrain type, i.e. the sound effects (SFX) and particles (GFX) generated by driving on it.

Variant Effect
0 Normal road
1 Dirt, GFX on slots 7.3 and 8.3
2 Dirt, no GFX
3 Smooth
4 Wood
5 Snow with GFX
6 Metal grate
7 Road, but the sound cuts off and returns immediately when triggered

Slippery Road 1 (0x01)

A type of road that is slippery, but does not slow you down.

Variant Effect
0 White sand
1 Dirt[1]
2 Water (unused)
3 Snow (unused)
4 Grass (unused)
5 Yellow sand
6 Sand, no GFX (unused)
7 Dirt, no GFX (unused)
  1. GFX is a lighter color on slot 8.2.

Weak Off-road (0x02)

A type of road that slows the player down a small amount.

Variant Effect
0 Orange sand
1 Dirt[1]
2 Water
3 Grass, darker GFX
4 Sand, lighter GFX
5 Carpet
6 Gravel[2][3]
7 Gravel, different impact SFX[2][3]
  1. GFX is red on slot 3.4.
  2. 2.0 2.1 GFX is orange on slot 3.1.
  3. 3.0 3.1 GFX does not include the rock particles on slot 3.4.

Off-road (0x03)

A type of road that slows the player down a moderate amount.

Variant Effect
0 Sand[1]
1 Dirt
2 Mud[1]
3 Water, no GFX (unused)
4 Grass[1]
5 Sand, lighter GFX
6 Gravel, different impact SFX
7 Carpet
  1. 1.0 1.1 1.2 GFX can be a different color on different slots.

Heavy Off-road (0x04)

A type of road that slows the player down a large amount.

Variant Effect
0 Sand
1 Dirt
2 Mud
3 Flowers
4 Grass
5 Snow
6 Sand
7 Dirt, no GFX

Slippery Road 2 (0x05)

A type of road that is slippery and slightly slows you down.

Variant Effect
0 Ice
1 Mud, no GFX (unused)
2-5 Water, no GFX (unused)
6-7 Normal road, different sound (unused)

Boost (0x06) [DASH]

(Boost Panel) Applies a boost when you drive over it.

Variant Effect
0 Default
1 If used in course.kcl and casino_roulette is present, this surface will rotate around it counterclockwise. Used in Chain Chomp Wheel.
2-7 Unknown. Unused

Boost Ramp (0x07) [DASHJ]

Applies a boost and is trickable by default. The variant controls the trick animation, and by extension the duration of the trick boost you get upon landing. The duration is listed in frames for karts/bikes. Generally, more flips mean longer airtime and more landing boost time. Note that you should not use the collision effect "trickable" with this KCL flag, otherwise the trick type will be semi random. Additionally, if used in course.kcl and casino_roulette is present, this surface will rotate around it counterclockwise.

Variant Effect Trick Boost (Karts) Trick Boost (Bikes)
0 Double flip trick 85 frames 95 frames
1 Single flip trick 70 frames 80 frames
2-7 Stunt trick, unused 40 frames 45 frames

Jump Pad (0x08)

Bounces the player into the air, and locks their speed until they touch the ground. Trickable by default. The variant controls the speed lock and the amount of Y velocity applied (both in units/frame). Values in parentheses are used if the player is in a boost when they touch this surface.

Variant Speed Lock Y Velocity Description
0 50.0 35.0 Used in GBA Bowser Castle 3
1 50.0 47.0 Used in SNES Ghost Valley 2
2 59.0 30.0 Used in GBA Shy Guy Beach
3 73.0 (100.0) 45.0 (70.0) Ramps in Mushroom Gorge[1]
4 73.0 (100.0) 53.0 (65.0) Bouncy mushrooms in Mushroom Gorge[2]
5 56.0 50.0 Used in Chain Chomp Wheel
6 55.0 35.0 Used in DS Yoshi Falls and Funky Stadium
7 56.0 50.0 Unused, seems to be identical to 5
  1. This flag causes the Off-Road Glitch.
  2. SFX always work on the kinoko_bend object, but requires slot 1.3 for the course model KCL.

Item Road (0x09)

A type of road that is solid for items only. Items that land on it will despawn after 3 seconds (180 frames). The purpose of the variant is unknown.

Variant Effect
0 Unknown
1 Unknown
2 Used on metal grates
3 Unknown. Used on wooden paths/grass/mushrooms
4 Unknown. Unused
5 Unknown. Used on grass/bushes
6-7 Unknown. Unused

Solid Fall (0x0A)

A solid surface that counts the player out of bounds. The variant controls the terrain type.

Variant Effect
0 Sand
1 Sand/Underwater
2 Unknown
3 Ice
4 Dirt
5 Grass
6 Wood
7 Dark sand with GFX

Moving Water (0x0B)

A type of road that moves the player along a route, used in Koopa Cape and DS Yoshi Falls. It is only active while inside an AREA type 0x3. The exact functionality depends on the variant. For more information, see: Moving Terrain

Variant Effect
0 Moving water that follows a route, pulling the player downwards.
1 Moving water that follows a route and strongly pulls the player downwards, making it hard to drive.
2 Moving water that follows a route from the start of the path to the end of it.

Uses 2 AREA settings:

  • Setting 1: Acceleration modifier.
  • Setting 2: Moving speed.[1]
3 Moving water that follows a route from the start of the path to the end of it and disables player's acceleration.

Uses 2 AREA settings:

  • Setting 1: Current player's speed modifier.
    eg. value of 100 will keep current player's speed. Values below 100 will slow down player until full stop.
  • Setting 2: Moving speed.[1]
4 Moving asphalt, unused. Functions the same as variant 0.
5 Moving asphalt, unused. Functions the same as variant 0.
6 Moving road, unused. Functions the same as variant 0.
7 Moving road, unused. Functions the same as variant 0.
  1. 1.0 1.1 Always overrides route's moving speed setting.

Route Settings:

Setting Description
1 Moving speed.
2 Value of 1 changes moving water direction 90 degrees to the right.
Value of 2 changes moving water direction 90 degrees to the left.

Wall (0x0C)

Default wall, solid for both players and items. The variant controls the sound played when colliding with it.

Variant Effect
0 Normal
1 Rock
2 Metal
3 Wood
4 Ice
5 Bush (with GFX)
6 Rope
7 Rubber

Invisible Wall (0x0D)

A type of wall that is solid for players only, and is typically invisible in-game.

Variant Effect
0 No spark and no character wall hit voice
1-2 Spark and character wall hit voice (unused)
3-7 Unknown. Same as 0? (unused)

Item Wall (0x0E)

A type of wall that is solid for items only. Items that land on it will despawn instantly. The purpose of the variant is unknown.

Variant Effect
0 Unknown
1 Unknown. Used on rock walls
2 Unknown. Used on metal walls
3 Unknown
4 Unknown. Unused
5 Unknown. Used on grass/bushes
6-7 Unknown. Unused

Wall 2 (0x0F)

Solid for players and items. The difference between this and Wall (0x0C) is unknown.

Variant Effect
0 Normal
1 Rock
2 Metal
3 Wood
4 Ice
5 Bush (no GFX, unused)
6 Rope
7 Rubber

Fall Boundary (0x10)

A non-solid barrier that counts the player out of bounds. The variant controls the animation and sounds to play when it is triggered. For variants 1-3, the BLIGHT index is instead used to reference a pocha object in the KMP, which is used to determine the height of the splash effect. The BLIGHT index should match Setting 1 of the corresponding pocha object.

Variant Effect
0 Air fall
1 Water
2 Lava
3 Icy water, (ice on respawn)[1]
4 Lava, no GFX
5 Burning air fall
6 Quicksand (used in object quicksand)[2]
7 Short fall
  1. Requires slot 6.1.
  2. In rare cases with complex KCL geometry, this variant can activate, but not cause the player to respawn, resulting in intangibility and no control of the character. If this occurs somewhere on your track, an additional fall boundary may be needed to "catch" the victim and make them respawn.

Cannon Trigger (0x11)

Used to implement cannons. Upon contact, the player will be launched to a destination cannon point. The variant determines the KMP index of the cannon point to launch to. Subsequently, a track cannot have more than 8 distinct cannons.

Variant Effect
0 To point 0
1 To point 1
2 To point 2
3 To point 3 (unused)
4 To point 4 (unused)
5 To point 5 (unused)
6 To point 6 (unused)
7 To point 7 (unused)

Force Recalculation (0x12)

A trigger that forces an enemy/item route recalculation when a player or CPU passes through it. This is typically used in areas where players or CPUs can fall to a different route. It is only active while inside an AREA type 0x4. Variants are never used and likely have no effect.

Variant Effect
0 Default
1-7 Unknown. Unused

Half-pipe Ramp (0x13)

A special type of ramp that functions like a half-pipe jump. Trickable by default. This type is best used in combination with Invisible Wall (0x0D), although this is not strictly necessary.

Variant Effect
0 Default
1 Applies a boost, used in Bowser's Castle
2-7 Unknown. Unused

Player-Only Wall (0x14)

Allows items to pass through it like Invisible Wall (0x0D), but produces sounds upon collision similar to Wall (0x0C). Used by Nintendo below open ledges to prevent players from hanging on to them.

Variant Effect
0 Normal (unused)
1 Rock (unused)
2 Metal (unused)
3 Wood
4 Ice (unused)
5 Bush (unused)
6 Rope (unused)
7 No SFX/GFX

Moving Road (0x15)

A type of road that moves players in a specified direction, used in Toad's Factory and Coconut Mall. Unlike moving water, moving road is not controlled by routes in the KMP, but rather by specific objects. For more information, see: Moving Terrain

Variant Effect
0 Moves west with BeltCrossing and escalator. The latter only works with escalator.kcl
1 Moves east with BeltCrossing and west with escalator. The latter only works with escalator.kcl
2 Moves east with BeltEasy
3 Moves west with BeltEasy
4 Rotates around BeltCurveA clockwise
5 Rotates around BeltCurveA counterclockwise
6-7 Unknown. Unused

Sticky Road (0x16) [ATTACH]

A type of road that attaches players to the road if they are within 200 units of the road with a correction of up to 200 units/frame. Moving water shares this code internally. The game logic does not care if player is also colliding with a different surface; as long as the player within 200 units of a surface with this attribute, the player's position will be corrected. This effect does not stack; layering on moving water will not make it more intense. The variant controls the terrain type.

Variant Effect
0 Wood
1 Gravel, different impact SFX
2 Carpet
3 Dirt, no GFX
4 Sand, different impact and drift SFX, no GFX
5 Normal road, SFX on slot 4.4
6 Normal road
7 Mud with GFX

Road 2 (0x17)

An alternative to Road (0x00) with different variants.

Variant Effect
0 Normal road, lower pitch sound
1 Carpet
2 Grass, GFX on 8.3
3 Normal road, used on green mushrooms
4 Grass
5 Glass road with SFX
6 Dirt (unused)
7 Normal road, SFX on slot 4.4

Sound Trigger (0x18)

A trigger that activates/deactivates sound effects or music channels when the player passes through it. The effects of each variant are different for every track slot and are described below.
Show text


Weak Wall (0x19)

Nintendo uses this type in Wario's Gold Mine and Rainbow Road. It acts as a wall that pushes players away when driving at low speed, but it can easily be trespassed when accelerating. They seem to be originally used below flat road to prevent players from hanging on the edges. Variants are never used and likely have no effect.

Variant Effect
0 Default
1-7 Unknown. Unused

Effect Trigger (0x1A)

A trigger that activates when the player passes through it; it can have several different functions depending on the variant.

Variant Effect
0 Change BLIGHT to specified index. Useful when a lighting change is needed in mid-air.
1 Change BLIGHT to specified index. (Different from 0?)
2 Trigger a water splash (pocha) without respawning the player.[1][2] The BLIGHT index references a pocha object in the KMP, which is used to determine the height of the splash effect. The BLIGHT index should match Setting 1 of the corresponding pocha object.
3 Activate starGate object. Used in tournaments only.
4 Half-pipe cancellation; forces the player out of half-pipe state.
5 Coin despawner; despawns any coins that touch it. Used in battle mode only.
6 Unknown. Used on top of the chimneys in Delfino Pier. Possibly related to truckChimSmkW?
7 Unknown. Unused
  1. Reusable only if a fall boundary is triggered.
  2. On slots T4.2 and B2.5, index 5 is hardcoded to spawn a pochaLeaf or pochaLeafY (pochaMori) respectively. In all other cases, a pocha is used, even if the linked object is of a different type.

Item State Modifier (0x1B)

Nintendo uses this type only in Toad's Factory. It stops stationary items once leaving the curved conveyor belts. Variants are never used and likely have no effect.

Variant Effect
0 Default
1-7 Unknown. Unused

Half-Pipe Invisible Wall (0x1C)

An invisible wall that is only solid for players in the air after a half-pipe jump, used in Bowser's Castle and Funky Stadium. Variants are never used and likely have no effect.

Variant Effect
0 Default
1-7 Unknown. Unused

Rotating Road (0x1D)

If casino_roulette is present, this road slowly rotates around it counterclockwise. Without casino_roulette, it acts like ordinary road. For more information, see: Moving Terrain

Variant Effect
0 Carpet, different impact SFX
1 Normal road, different sound, different impact SFX (unused)
2 Normal road
3 Glass road
4 Carpet
5 No sound, star crash impact SFX (requires starGate for SFX) (unused)
6 Sand (unused)
7 Dirt (unused)

Special Wall (0x1E)

Variants consist of wall types that have special functionality and/or are used in very specific situations.

Variant Effect
0 Cactus. Touching this will cause the player to spin out. Used in Dry Dry Ruins and Thwomp Desert.
1 No SFX/GFX. Used behind the lavafalls in Grumble Volcano.
2 Bouncy wall (unused). Driving into it at slow speed will cause the player to be pushed backwards.
3 No SFX/GFX. Used for the finish line banners on Wario's Gold Mine and Koopa Cape.
4 Rainbow Road railings. SFX only work on slot 4.4.
5 The sides and stalk of mushroom pads, used on Mushroom Gorge.
6 Metal SFX. Used for the statue in Luigi Circuit and the top of the underwater section in Koopa Cape.
7 The sides of the gates from competitions. Requires starGate object for SFX.

Invisible Wall 2 (0x1F)

Solid for players only. The difference between this and Invisible Wall (0x0D) is unknown.

Variant Effect
0 No SFX/GFX
1-7 Unknown. Same as 0? (unused)

Additional Info

Wiimm has made a statistical analysis about the usage of flags in all 32 tracks: kcl-types.txt


Type What is it? Speed factor[1] Handling factor[1]
0x00 Road 1.0 0.7
0x01 Slippery Road 1 1.0 0.050 – 0.105
0x02 Weak Off-road 0.550 – 0.909 0.080 – 0.157
0x03 Off-road 0.325 – 0.712 0.050 – 0.105
0x04 Heavy Off-road 0.185 – 0.422 0.050 – 0.105
0x05 Slippery Road 2 0.881 – 0.999 0.030 – 0.074
0x06 Boost Panel 1.0 0.7
0x07 Boost Ramp 1.0 0.7
0x08 Jump Pad 1.0 0.7
0x09 Item Road 1.0 0.7
0x0A Solid Fall 0.1 0.7
0x0B Moving Water 1.0 0.7
0x0C Wall 1.0 0.7
0x0D Invisible Wall 1.0 0.7
0x0E Item Wall 1.0 0.7
0x0F Wall 2 1.0 0.7
0x10 Fall Boundary 1.0 0.7
0x11 Cannon Activator 1.0 0.7
0x12 Force Recalculation 1.0 0.7
0x13 Half-pipe Ramp 1.0 0.7
0x14 Player-Only Wall 1.0 0.7
0x15 Moving Road 1.0 0.7
0x16 Sticky/Gravity Road 1.0 0.7
0x17 Road 2 1.0 0.7
0x18 Sound Trigger 1.0 0.7
0x19 Weak Wall 1.0 0.7
0x1A Effect Trigger 1.0 0.7
0x1B Item State Modifier 1.0 0.7
0x1C Half-pipe Invisible Wall 1.0 0.7
0x1D Rotating Road 1.0 0.7
0x1E Special Walls 1.0 0.7
0x1F Invisible Wall 2 1.0 0.7
[1] : Notes for Speed factor
  • Each vehicle and driver combination has its own basic speed. The Speed factor is always ≤1.0 and defines the relative KCL type dependent speed.
  • The values are calculated after analyzing different Mario Kart Wii files. The ranges depends on the possible driver and vehicle combinations.
  • The different basic speed of the vehicles (75.00 – 85.07) and the driver modifications of the basic speed (add 0 – 0.53) are not part of these speed factor calculations.
  • Some values are senseless (e.g. walls, fall down, effects), but the values are available in the Mario Kart Wii tables.