Template:KCL-Flag-Variant type A

From Custom Mario Kart
Jump to navigation Jump to search

Table which explains the structure of a type A variant.

Variant type A is split in 4 bit-groups. The first and last 2 groups are 3 bits each, and the second group is 2 bits.

Group W Group X Group Y Group Z
Amount of bits 3 2 3 3
Function Collision effect Intensity Shadow effect Basic effect

To write this structure down, you can write each group as an octal number, but be aware of the 2-bits group, calculating hex to octal will not work right. A good way to get the right variant in hex is this:

  • write down each group in octal (X can be max. 3)
  • convert each group to binary (X is 2 bits, others 3 bits)
  • write them in the order: wxyz, you'll get www|xx|yyy|zzz in binary, you can convert that number to hex.

Note: hex shows only W right, octal only Y and Z.

So, www in binary controls the collision effect, xx controls intensity, yyy controls shadow effect, and zzz controls the basic effect (such as grass vs. dirt). For example, www represents a binary number of three digits. This 3-digit number controls which effect is used. The same applies to yyy and zzz, except xx can only go up to 3 as there are only 2 binary digits. A complete string of binary numbers (wwwxxyyyzzz in that order) is converted as a whole to hex to get the variant that is entered into the SZS Modifier or CTools.

Another way is using the following formula: Variant (in hexadecimals) = 0x100W+0x40X+0x8Y+Z Of course is this formula basic on the theory stated above.

Functions:

Collision effect:

Bit Effect
0 0 = Not trickable
1 = Trickable
1 0 = Drivable
1 = Not drivable. Forces a player to change direction which makes the player unable to drive on that surface.
2 Value 1 is used for walls that don't make you bounce when colliding on them

Intensity:
Exact values unknown

Shadow effect:
All light effects pertain to the light IDs in posteffect.blight. These colors can be modified by hex editing it in the SZS file (./posteffect/posteffect.blight).

Basic effect:
Different for each basic flag