Navigate InfoSuite
Hosted At
Link to Duke4
References - Cstat Flags

Cstat Flags

These are the cstat bitfield values for the three different object types in a map: sprites, walls, and sectors (floors/ceilings). I gathered this information from various sources including the source code documentation as well as the EDukeWiki, then reprocessed it to my liking. Cstat flags determine the way an object is rendered as well as a few special interactive properties. In Mapster32, these values can be edited manually in 2D mode with F8 for walls and sprites, or F7 for sector floors/ceilings. The cstat will be displayed as a decimal (base 10) value in 3D mode, but as a hexadecimal (base 16) value in 2D mode. The value you input in standard decimal will be automatically converted to hexadecimal.



In order to use multiple flag values, they must be added together. The majority of these flags can be automatically assigned with standard keypresses in 3D mode, which are listed if applicable.


SPRITES
Bit Value Description Keypress
0 1 Enable blocking flag. [B]
1 2 Set as semi-transparent. [T]
2 4 Flip sprite around x-axis. [F]
3 8 Flip sprite around y-axis. [F]
4 16 Set as wall-aligned. [R]
5 32 Set as floor-aligned. [R]
6 64 Set as one-sided. [1]
7 128 Set as "true-centered" (as opposed to "foot-centered"). [C]
8 256 Enable hitscan flag. [H]
9 512 Set as transparent (must be combined with cstat value 2). [T]
10-14 1024-16384 *RESERVED* N/A
11 2048 Force sprite to ignore sector shade (this flag only exists in Mapster32). [N]*
15 32768 Enable invisibility flag. This flag can only be disabled via Mapster32's manual sprite editing menu (accessed with F8 in 2D mode). [Apostrophe ( ' ) + I] *



WALLS
Bit Value Description Keypress
0 1 Enable blocking flag. [B]
1 2 Enable "bottom texture swap". This makes the top and bottom half of a wall separately editable. However, they will still share repeat values. [2]
2 4 Align texture to floor (bottom orientation). [O]
3 8 Flip texture around x-axis. [F]
4 16 Set as masked wall. Two-sided masked walls must be manually set on each side (the keypress does this automatically). Use it in conjunction with Shift for a one-sided masked wall. [M]
5 32 Set as 'solid' one-sided masked wall. This differs from Shift + M in that the wall will not be compatible with transparency settings or invisible (pink) pixels. This type of masked wall must be used to make mirrors. [1]
6 64 Enable hitscan flag. [H]
7 128 Set as semi-transparent. The keypress applies itself to both sides. [T]
8 256 Flip texture around y-axis. [F]
9 512 Set as transparent (must be combined with cstat value 128). The keypress applies itself to both sides. [T]
10-15 1024-32768 *RESERVED* N/A

Solid (non-masked) walls have no use for blocking/hitscan flags, and are not compatible with transparency settings for obvious reasons.




SECTORS (FLOORS/CEILINGS)
Bit Value Description Keypress
0 1 Set as parallaxed. [P]
1 2 Floor/Ceiling is sloped. [[ or ]]
2 4 Swap the texture's x and y axes. [F]
3 8 Enable texture expansion (more accurately described as "compression"). [E]
4 16 Flip texture around x-axis. [F]
5 32 Flip texture around y-axis. [F]
6 64 Enable relative alignment. [R]
7-15 128-32768 *RESERVED* N/A
7 128 Masked Floor/Ceiling (unused remnant of the original engine). [T] *
8 256 Translucent Masked Floor/Ceiling (unused remnant of the original engine). [T] *
7+8 384 Reverse Translucent Masked Floor/Ceiling (unused remnant of the original engine). [T] *

Floor and ceiling flag values are treated separately from each other. They also aren't technically "cstat" flags, but they're used in a similar manner.


* Denotes keypresses which are only available in Mapster32.


Return to top