From SRB2 Wiki
Jump to: navigation, search
Test.png This article or section is outdated and has not been updated to reflect the release of SRB2 v2.2.

Please help the Wiki by correcting or removing any misinformation, as well as adding any new information to the page.

This is a comprehensive list of all constants that can be used in SOCs and Lua scripts. Constants are special keywords recognized by SRB2, such as FRACUNIT and TICRATE, which represent a specific, unchangeable integer number. In Lua, these must always be written in the correct case as given in this article (or in linked articles). SOC, however, is case-insensitive and allows all constants to be written in any case whatsoever. Many groups of constants are identifiable by certain prefixes in their names – for example, all primary Object flags have the MF_ prefix, while all secondary Object flags have the MF2_ prefix instead.

NoteIcon.png Note
Due to the sheer number of constants available in SRB2 altogether, not all of them can be listed here. For convenience, this article provides links to other articles on the SRB2 Wiki already covering specific groups of constants, where they may be explained in more detail than this article can give.



Integer type limits (INTn_*/UINTn_*)

Name Hexadecimal Decimal Description
INT8_MIN 0x80 -128 Signed 8-bit integer minimum
INT16_MIN 0x8000 -32768 Signed 16-bit integer minimum
INT32_MIN 0x80000000 -2147483648 Signed 32-bit integer minimum
INT8_MAX 0x7f 127 Signed 8-bit integer maximum
INT16_MAX 0x7fff 32767 Signed 16-bit integer maximum
INT32_MAX 0x7fffffff 2147483647 Signed 32-bit integer maximum
UINT8_MAX 0xff 255 Unsigned 8-bit integer maximum
UINT16_MAX 0xffff 65535 Unsigned 16-bit integer maximum
UINT32_MAX 0xffffffff 42949672951 Unsigned 32-bit integer maximum

1 Outputs as -1 in SOC or Lua

Angles (ANG*/ANGLE_*)

Name Angle (degrees) Hexadecimal Decimal
Actual SOC/Lua
ANG1 0x00B60B61 11930465
ANG2 0x016C16C1 23860929
ANG10 10º 0x071C71C7 119304647
ANG15 15º 0x0AAAAAAB 178956971
ANG20 20º 0x0E38E38E 238609294
ANG30 30º 0x15555555 357913941
ANG60 60º 0x2AAAAAAB 715827883
ANG64h 64.5º 0x2DDDDDDE 769514974
ANG105 105º 0x4AAAAAAB 1252698795
ANG210 210º 0x95555555 2505397589 -1789569707
ANG255 255º 0xB5555555 3042268501 -1252698795
ANG340 340º 0xF1C71C72 4056358002 -238609294
ANG350 350º 0xF8E38E39 4175662649 -119304647
Name Angle (degrees) Hexadecimal Decimal
Actual SOC/Lua
ANGLE_11hh 11.25º 0x08000000 134217728
ANGLE_22h 22.5º 0x10000000 268435456
ANGLE_45 45º 0x20000000 536870912
ANGLE_67h 67.5º 0x30000000 805306368
ANGLE_90 90º 0x40000000 1073741824
ANGLE_112h 112.5º 0x50000000 1342177280
ANGLE_135 135º 0x60000000 1610612736
ANGLE_157h 157.5º 0x70000000 1879048192
ANGLE_180 180º 0x80000000 2147483648 -2147483648
ANGLE_202h 202.5º 0x90000000 2415919104 -1879048192
ANGLE_225 225º 0xA0000000 2684354560 -1610612736
ANGLE_247h 247.5º 0xB0000000 2952790016 -1342177280
ANGLE_270 270º 0xC0000000 3221225472 -1073741824
ANGLE_292h 292.5º 0xD0000000 3489660928 -805306368
ANGLE_315 315º 0xE0000000 3758096384 -536870912
ANGLE_337h 337.5º 0xF0000000 4026531840 -268435456
ANGLE_MAX ~360º 0xFFFFFFFF 4294967295 -1

Miscellaneous constants

Name Value Description
(1<<16, or 65536)
The basic unit of measurement for lengths, speeds, Object scales and sometimes angles. Values for these measurements are interpreted as fixed-point numbers with FRACUNIT as the base unit, i.e., FRACUNIT represents one unit (or in some cases one pixel), 2*FRACUNIT represents 2.0 units, FRACUNIT/2 represents 0.5 units, and so on.
FRACBITS 16 The number of bits to shift up to convert integers to fixed-point numbers in FRACUNIT scale, or the number of bits to shift down for vice versa. This constant is used to define the value of FRACUNIT itself – modifying the value of FRACBITS in the source code would also modify FRACUNIT's value.

Note that bit-shifting an integer by FRACBITS in either direction is equivalent to multiplication or division by FRACUNIT – i.e., x<<FRACBITS is the same as x*FRACUNIT, and x>>FRACBITS is the same as x/FRACUNIT.

TICRATE 35 The number of tics in a second, i.e., anything multiplied by this value is a measurement in seconds.
(or 35)
MUSICRATE 1000 The music playback rate, or the number of milliseconds in a second, i.e., anything multiplied by this value is a measurement in seconds (in the context of music playback). This is intended for use with SOC parameters and Lua functions that change or set positions within music tracks and/or applying fade in/out effects to them.
RING_DIST 512*FRACUNIT The maximum distance that rings can be from players with an Attraction Shield to be attracted to them. This is also used by the homing attack character ability as the maximum distance an enemy, spring or monitor can be to able to home in on it.
PUSHACCEL 2*FRACUNIT The speed at which pushable Objects with MF2_SLIDEPUSH will be pushed.
MODID 18 The executable's Mod ID. In SRB2 v2.2, 18 is the default value for this constant.
MODVERSION 47 The executable's Mod Version. In SRB2 v2.2.6, 47 is the default value for this constant.
CODEBASE 220 The SRB2 version number the executable is based on. In SRB2 v2.2, 220 is the default value for this constant.
VERSION 202 The game's version number.
VERSIONSTRING "v2.2.8" The game's version, as a string.
SUBVERSION 6 The game's sub-version number.
FLOATSPEED FRACUNIT*4 Vertical movement speed for Objects with MF_FLOAT.
MAXSTEPMOVE 24*FRACUNIT The maximum height an Object can step up/down without being blocked by a wall or falling down.
USERANGE 64*FRACUNIT Doom's Use button effect range. Unused in SRB2.
MELEERANGE 64*FRACUNIT Doom's melee attack range. Used in SRB2 by P_CheckMeleeRange and P_SkimCheckMeleeRange.
MISSILERANGE 32*64*FRACUNIT Doom's missile attack range. Used in SRB2 by A_UnidusBall.
ONFLOORZ INT32_MIN Used by the map Thing spawning code to signify that the Thing's Z position is on the sector's floor. This is corrected to the appropriate height in P_SpawnMobj for newly spawned Objects.
ONCEILINGZ INT32_MAX Used by the map Thing spawning code to signify that the Thing's Z position is on the sector's ceiling. This is corrected to the appropriate height in P_SpawnMobj for newly spawned Objects.
INFLIVES 0x7F (or 127) Used by player.lives to indicate that this player has infinite lives.


Object types (MT_*)

Main article: List of Object types

Primary Object flags (MF_*)

Secondary Object flags (MF2_*)

Extra Object flags (MFE_*)

Thing flags (MTF_*)

Main article: Thing > Flags

States (S_*)

Main article: List of states

Sprite prefixes (SPR_*)

Main article: List of sprites

Translucency levels (tr_*/TR_*)

NoteIcon.png Note
The lowercase versions of the tr_ constants are exclusive to Lua; tr_trans10 to tr_trans90 will always be read as the uppercase versions in SOC regardless of case.
Value Name Description
1 tr_trans10 10% translucent (90% opaque)
2 tr_trans20 20% translucent (80% opaque)
3 tr_trans30 30% translucent (70% opaque)
4 tr_trans40 40% translucent (60% opaque)
5 tr_trans50 50% translucent (50% opaque)
6 tr_trans60 60% translucent (40% opaque)
7 tr_trans70 70% translucent (30% opaque)
8 tr_trans80 80% translucent (20% opaque)
9 tr_trans90 90% translucent (10% opaque)
10 NUMTRANSMAPS Number of translucency maps
Value Name Description
65536 TR_TRANS10 tr_trans10 for SOCs (tr_trans10<<FF_TRANSSHIFT)
131072 TR_TRANS20 tr_trans20 for SOCs (tr_trans20<<FF_TRANSSHIFT)
196608 TR_TRANS30 tr_trans30 for SOCs (tr_trans30<<FF_TRANSSHIFT)
262144 TR_TRANS40 tr_trans40 for SOCs (tr_trans40<<FF_TRANSSHIFT)
327680 TR_TRANS50 tr_trans50 for SOCs (tr_trans50<<FF_TRANSSHIFT)
393216 TR_TRANS60 tr_trans60 for SOCs (tr_trans60<<FF_TRANSSHIFT)
458752 TR_TRANS70 tr_trans70 for SOCs (tr_trans70<<FF_TRANSSHIFT)
524288 TR_TRANS80 tr_trans80 for SOCs (tr_trans80<<FF_TRANSSHIFT)
589824 TR_TRANS90 tr_trans90 for SOCs (tr_trans90<<FF_TRANSSHIFT)

Frame settings (FF_*)

See also: State > Attributes
Name Decimal Hexadecimal Description
FF_FRAMEMASK 255 0xFF Frame number mask
FF_SPR2SUPER 128 0x80
FF_SPR2ENDSTATE 4096 0x1000
FF_SPR2MIDSTART 8192 0x2000
FF_TRANSMASK 983040 0xF0000 Translucency mask
FF_TRANSSHIFT 16 0x10 Number of bits to shift up to convert tr_transxx constants to TR_TRANSxx constants
FF_TRANS10 65536 0x10000 Sprite is 10% translucent (90% opaque)
FF_TRANS20 131072 0x20000 Sprite is 20% translucent (80% opaque)
FF_TRANS30 196608 0x30000 Sprite is 30% translucent (70% opaque)
FF_TRANS40 262144 0x40000 Sprite is 40% translucent (60% opaque)
FF_TRANS50 327680 0x50000 Sprite is 50% translucent (50% opaque)
FF_TRANS60 393216 0x60000 Sprite is 60% translucent (40% opaque)
FF_TRANS70 458752 0x70000 Sprite is 70% translucent (30% opaque)
FF_TRANS80 524288 0x80000 Sprite is 80% translucent (20% opaque)
FF_TRANS90 589824 0x90000 Sprite is 90% translucent (10% opaque)
FF_FULLBRIGHT 1048576 0x00100000 Sprite is not affected by lighting
FF_VERTICALFLIP 2097152 0x00200000
FF_PAPERSPRITE 4194304 0x00400000
FF_ANIMATE 16777216 0x01000000 State is animated and cycles through several frames
FF_RANDOMANIM 33554432 0x02000000
FF_GLOBALANIM 67108864 0x04000000

Render flags (RF_*)

NoteIcon.png Note
The constants listed below are only available to use from v2.2.9 onwards.
Decimal Hexadecimal Flag name Description
1 0x0001 RF_HORIZONTALFLIP Flips the sprite horizontally.
2 0x0002 RF_VERTICALFLIP Flips the sprite vertically.
4 0x0004 RF_ABSOLUTEOFFSETS The sprite will use the values of spritexoffset and spriteyoffset absolutely, instead of relatively to the sprite's original offsets.
8 0x0008 RF_FLIPOFFSETS The values of spritexoffset and spriteyoffset will be applied flipped to the sprite's original offsets.
240 0x00F0 RF_SPLATMASK Floor sprite mask
16 0x0010 RF_SLOPESPLAT The floor sprite will be drawn along a slope plane.
32 0x0020 RF_OBJECTSLOPESPLAT The floor sprite will adjust to the slope its Object is standing on.
64 0x0040 RF_NOSPLATBILLBOARD The sprite will face its Object's angle rather than the camera.
128 0x0080 RF_NOSPLATROLLANGLE The Object will use angle sprites instead of a single rotated sprite.
3840 0x0F00 RF_BLENDMASK Blending and lighting mask
256 0x0100 RF_FULLBRIGHT The sprite will always be drawn at full brightness.
512 0x0200 RF_FULLDARK The sprite will be drawn completely dark.
1024 0x0400 RF_NOCOLORMAPS The sprite will not be affected by colormaps.
28672 0x7000 RF_SPRITETYPEMASK Sprite type mask
4096 0x1000 RF_PAPERSPRITE The sprite will be drawn in a vertical plane, also known as a papersprite.
8192 0x2000 RF_FLOORSPRITE The sprite will be drawn in a horizontal plane, also known as a floor sprite, or a "splat".
65536 0x10000 RF_SHADOWDRAW The sprite will be skewed and stretched onto the floor as if it was a projected shadow.
131072 0x20000 RF_SHADOWEFFECT The sprite will be scaled and made transparent as if it was a projected shadow.
197120 0x30200 RF_DROPSHADOW The sprite will fully behave as a projected shadow. Is a combination of RF_SHADOWDRAW, RF_SHADOWEFFECT and RF_FULLDARK.

Blend modes (AST_*)

NoteIcon.png Note
The constants listed below are only available to use from v2.2.9 onwards.
Value Name Description
0 AST_COPY No blending
1 AST_TRANSLUCENT Default translucency effect
2 AST_ADD Additive blend mode
3 AST_SUBTRACT Subtractive blend mode
4 AST_REVERSESUBTRACT Difference blend mode
5 AST_MODULATE Multiply blend mode
6 AST_OVERLAY Overlay blend mode

Sounds (sfx_*)

Main article: List of sounds

Sound flags (SF_*)

Main article: Sound > Attributes

Skin colors (SKINCOLOR_*)

Main article: List of skin colors

Translation colormaps (TC_*)

Value Name Description
-1 TC_DEFAULT Default colormap
-2 TC_BOSS Boss flash colormap
-3 TC_METALSONIC Metal Sonic boss flash colormap
-4 TC_ALLWHITE All-white flash colormap (used by Brak Eggman)
-5 TC_RAINBOW Remaps all colors to a skincolor range
-6 TC_BLINK Remaps all colors to a single color index
-7 TC_DASHMODE For Metal Sonic's dashmode

A_Chase directions (DI_*)

Value Name Description
-1 DI_NODIR No direction
0 DI_EAST East
1 DI_NORTHEAST Northeast
2 DI_NORTH North
3 DI_NORTHWEST Northwest
4 DI_WEST West
5 DI_SOUTHWEST Southwest
6 DI_SOUTH South
7 DI_SOUTHEAST Southeast
8 NUMDIRS Total number of directions

Damage/Death types (DMG_*)

Name Hexadecimal Decimal Description
DMG_WATER 0x01 1 Damage dealt by liquids
DMG_FIRE 0x02 2 Damage dealt by fire objects and sectors
DMG_ELECTRIC 0x03 3 Damage dealt by electricity
DMG_SPIKE 0x04 4 Damage dealt by spikes
DMG_NUKE 0x05 5 Damage dealt by the bomb shield
DMG_INSTAKILL 0x80 128 Death
DMG_DROWNED 0x81 129 Death dealt by drowning (in liquids)
DMG_SPACEDROWN 0x82 130 Death dealt by drowning (in space)
DMG_DEATHPIT 0x83 131 Death dealt by pits
DMG_CRUSHED 0x84 132 Death dealt by being crushed
DMG_SPECTATOR 0x85 133 Death dealt to spectators (Other damage types do not kill spectators)
DMG_CANHURTSELF 0x40 64 Flag - Whether the source is able to damage itself or their team
DMG_DEATHMASK 0x80 128 Flag - Whether this damage type is a death type


Skin flags (SF_*)

Main article: S_SKIN > flags

Character abilities (CA_*/CA2_*)

See also: S_SKIN > ability and S_SKIN > ability2

Player states (PST_*)

Value Name Description
0 PST_LIVE The player is playing
1 PST_DEAD The player is dead and waiting to respawn
2 PST_REBORN The player just respawned after being dead

Skin sounds (SKS*)

See also: S_SKIN > Custom sounds
Value Name Description
0 SKSSPIN sfx_spin replacement sound
1 SKSPUTPUT sfx_putput replacement sound
2 SKSPUDPUD sfx_pudpud replacement sound
3 SKSPLPAN1 sfx_altow1 replacement sound
4 SKSPLPAN2 sfx_altow2 replacement sound
5 SKSPLPAN3 sfx_altow3 replacement sound
6 SKSPLPAN4 sfx_altow4 replacement sound
7 SKSPLDET1 sfx_altdi1 replacement sound
8 SKSPLDET2 sfx_altdi2 replacement sound
9 SKSPLDET3 sfx_altdi3 replacement sound
10 SKSPLDET4 sfx_altdi4 replacement sound
11 SKSPLVCT1 sfx_victr1 replacement sound
12 SKSPLVCT2 sfx_victr2 replacement sound
13 SKSPLVCT3 sfx_victr3 replacement sound
14 SKSPLVCT4 sfx_victr4 replacement sound
15 SKSTHOK sfx_thok replacement sound
16 SKSSPNDSH sfx_spndsh replacement sound
17 SKSZOOM sfx_zoom replacement sound
18 SKSSKID sfx_skid replacement sound
19 SKSGASP sfx_gasp replacement sound
20 SKSJUMP sfx_jump replacement sound

Internal player flags (PF_*)

Decimal Hexadecimal Flag name Description
1 0x1 PF_FLIPCAM Enables third-person camera flipping in reverse gravity (controlled by the console variable flipcam).
2 0x2 PF_ANALOGMODE The player is using analog control.
4 0x4 PF_DIRECTIONCHAR The player has the Character Angle option set to "Movement".
8 0x8 PF_AUTOBRAKE The player has Automatic Braking enabled.
16 0x10 PF_GODMODE The player is invincible to everything, including instant kill hazards like bottomless pits and crushers (controlled by the console command god).
32 0x20 PF_NOCLIP Turns off the player's collision, allowing them to walk through solid walls, as well as immediately move on top of raised ground regardless of height (controlled by the console command noclip).
64 0x40 PF_INVIS Prevents enemies and bosses from noticing the player, except after the player has attacked them (controlled by the console command notarget).
128 0x80 PF_ATTACKDOWN The Ring Toss control button was pressed the previous tic.
256 0x100 PF_SPINDOWN The Spin control button was pressed the previous tic.
512 0x200 PF_JUMPDOWN The Jump control button was pressed the previous tic.
1024 0x400 PF_WPNDOWN The Next Weapon or Prev Weapon control buttons were pressed the previous tic.
2048 0x800 PF_STASIS The player is not allowed to move, except for jumping. This flag can be given if the player has a value set for pw_nocontrol, or the player has PF_GLIDING and is skidding; otherwise, the flag will automatically be removed the following tic.
4096 0x1000 PF_JUMPSTASIS The player is not allowed to jump. This flag can be given if the 16th bit (1<<15) of pw_nocontrol is set, or the player has PF_GLIDING and is skidding; otherwise, the flag will automatically be removed the following tic.
6144 0x1800 PF_FULLSTASIS The player is not allowed to move or jump (PF_STASIS and PF_JUMPSTASIS combined). This flag can be given if the player has a value set for pw_nocontrol, or the player has PF_GLIDING and is skidding; otherwise, the flag will automatically be removed the following tic.
8192 0x2000 PF_APPLYAUTOBRAKE The player is slowing down due to automatic braking.
16384 0x4000 PF_STARTJUMP The player has started a jump and not yet cut their upwards momentum in half by releasing the jump button.
32768 0x8000 PF_JUMPED The player has just jumped.
65536 0x10000 PF_NOJUMPDAMAGE The player's jump will not damage enemies.
131072 0x20000 PF_SPINNING The player is spinning.
262144 0x40000 PF_STARTDASH The player is charging up their spindash.
524288 0x80000 PF_THOKKED The player has used their character's ability.
1048576‬ 0x100000 PF_SHIELDABILITY The player has used their Shield ability.
2097152 0x200000 PF_GLIDING The player is gliding.
4194304 0x400000 PF_BOUNCING The player is tail-bouncing.
8388608 0x800000 PF_SLIDING The player is in a slide, e.g., Deep Sea Zone's waterslides.
16777216 0x1000000 PF_TRANSFERTOCLOSEST NiGHTS Super Sonic is being transferred to the next axis.
33554432 0x2000000 PF_DRILLING NiGHTS Super Sonic is drilling.
67108864 0x4000000 PF_GAMETYPEOVER The player has received a Time Over in Race mode, or is has been tagged in Hide & Seek mode.
134217728 0x8000000 PF_TAGIT The player is "it" in Tag mode.
268435456 0x10000000 PF_FORCESTRAFE Forces the turn left/right controls to become strafing controls. Reserved for Lua scripting purposes.
536870912 0x20000000 PF_CANCARRY The player can carry another player as Tails with their flight.
1073741824 0x40000000 PF_FINISHED The player has finished the level. Separate from exiting, as its for cases where players can move around while waiting for others to finish the level.

Player animations (PA_*)

Value Name Description Equivalent states
0 PA_ETC Animations that do not fit into the below All states not listed below
1 PA_IDLE Idle animations (standing, waiting)
2 PA_EDGE Edge teetering animation
3 PA_WALK Walking animations
4 PA_RUN Running animations
5 PA_DASH Dash Mode animation
6 PA_PAIN Pain animations
7 PA_ROLL Rolling animations
8 PA_JUMP Jumping animation
9 PA_SPRING Spring up animation
10 PA_FALL Falling animations
11 PA_ABILITY Character-specific main ability animations
12 PA_ABILITY2 Character-specific secondary ability animations
13 PA_RIDE Riding/carried animation

Shield types (SH_*)

Main article: A_CustomPower
See also: Shields

Carry types (CR_*)

Main article: A_CustomPower

Player powers (pw_*)

Main article: A_CustomPower

Emerald flags (EMERALDn)

Button flags (BT_*)

See also: Controls > Configurable controls
Decimal Hexadecimal Flag name Description
15 0x0F BT_WEAPONMASK Weapon slot buttons. When checking (player.cmd.buttons & BT_WEAPONMASK), returns the value of the weapon slot button pressed, from 1 to 7.
16 0x10 BT_WEAPONNEXT Next Weapon
32 0x20 BT_WEAPONPREV Previous Weapon
64 0x40 BT_ATTACK Ring Toss
128 0x80 BT_SPIN Spin
256 0x100 BT_CAMLEFT Rotate Camera L
512 0x200 BT_CAMRIGHT Rotate Camera R
1024 0x400 BT_TOSSFLAG Toss Flag
2048 0x800 BT_JUMP Jump
4096 0x1000 BT_FIRENORMAL Ring Toss Normal
8196 0x2000 BT_CUSTOM1 Custom Action 1
16384 0x4000 BT_CUSTOM2 Custom Action 2
32768 0x8000 BT_CUSTOM3 Custom Action 3

Current weapon (WEP_*)

Value Name Description
1 WEP_AUTO Automatic Ring
2 WEP_BOUNCE Bounce Ring
3 WEP_SCATTER Scatter Ring
4 WEP_GRENADE Grenade Ring
5 WEP_EXPLODE Explosion Ring
6 WEP_RAIL Rail Ring
7 NUM_WEAPONS Total number of weapons

Ring weapon flags (RW_*)

Value Flag name Description
1 RW_AUTO Automatic Ring
2 RW_BOUNCE Bounce Ring
4 RW_SCATTER Scatter Ring
8 RW_GRENADE Grenade Ring
16 RW_EXPLODE Explosion Ring
32 RW_RAIL Rail Ring

P_FlashPal palettes (PAL_*)

Main article: Palette > PLAYPAL

Gotflag flags (GF_*)

Value Name Description
1 GF_REDFLAG Player is carrying the red CTF flag
2 GF_BLUEFLAG Player is carrying the blue CTF flag


TypeOfLevel flags (TOL_*)

See also: Level header > TypeOfLevel
Decimal Hexadecimal Flag name Description
1 0x01 TOL_SP Single Player
2 0x02 TOL_COOP Co-op
4 0x04 TOL_COMPETITION Competition
8 0x08 TOL_RACE Race
16 0x10 TOL_MATCH Match
32 0x20 TOL_TAG Tag
64 0x40 TOL_CTF Capture the Flag
128 0x80 TOL_CUSTOM Custom (Lua-scripted, etc.)
256 0x100 TOL_2D 2D
512 0x200 TOL_MARIO Mario
1024 0x400 TOL_NIGHTS NiGHTS
2048 0x800 TOL_ERZ3 ERZ3
4096 0x1000 TOL_XMAS Christmas NiGHTS

Gametypes (GT_*)

Value Name Description
0 GT_COOP Single Player/Co-op
1 GT_COMPETITION Competition
2 GT_RACE Race
3 GT_MATCH Match
5 GT_TAG Tag
7 GT_CTF Capture the Flag

Marathon Mode flags (MA_*)

ToDoIcon.png To do
Value Name Description
1 MA_RUNNING In action
2 MA_INIT Initialization
4 MA_NOCUTSCENES No cutscenes
8 MA_INGAME Timer ignores loads

Weather types (PRECIP_*)

See also: Level header > Weather

Level flags (LF_*)

See also: Level header > LevelFlags

Menu flags (LF2_*)

See also: Level header > MenuFlags

NiGHTS grades (GRADE_*)

See also: Level header > GradesX
Value Name Description
0 GRADE_F F grade
1 GRADE_E E grade
2 GRADE_D D grade
3 GRADE_C C grade
4 GRADE_B B grade
5 GRADE_A A grade
6 GRADE_S Rainbow A grade

Linedef flags (ML_*)

Main article: Linedef > Flags

Reserved linedef tags (LE_*)

See also: Reserved tags

FOF flags (FF_*)

Main article: Linedef type 259

Slope flags (SL_*)

Value Name Description
1 SL_NOPHYSICS Slope physics are disabled for this slope.
2 SL_DYNAMIC Slope is dynamic and can be moved during level runtime.


Emblem flags (GE_*/ME_*)

See also: Custom unlockables and emblems
Value Name Description

Music slots (mus_*)

Main article: List of music

Jingle types (JT_*)

Value Name Description
0 JT_NONE Null state
1 JT_OTHER Other state
2 JT_MASTER Main level music
3 JT_1UP Extra life
4 JT_SHOES Speed shoes
5 JT_INV Invincibility
6 JT_MINV Mario Invincibility
7 JT_DROWN Drowning
8 JT_SUPER Super Sonic
9 JT_GOVER Game Over
10 JT_NIGHTSTIMEOUT NiGHTS Time Out (10 seconds)
11 JT_SSTIMEOUT NiGHTS Special Stage Time Out (10 seconds)

Console variable flags (CV_*)

Value Name Description
1 CV_SAVE The console variable's value is saved to config.cfg when changed. Currently does not really work for custom Lua-defined console variables because they are erased from config.cfg if they are not defined (i.e., if the script that defines them is not loaded) when the game is launched.
2 CV_CALL A function is called when the variable is changed.
4 CV_NETVAR The variable is synchronized for everyone in netgames; only the server or admin can modify it.
8 CV_NOINIT If a function is called when the variable is changed (CV_CALL), the function is not called when the variable is first registered.
16 CV_FLOAT The variable takes floating-point values, i.e., non-whole numbers such as 0.5 and 0.45 are accepted. These are then converted to a fixed-point integer value (e.g.: "0.5" becomes FRACUNIT/2).
32 CV_NOTINNET The variable cannot be changed in netgames.
64 CV_MODIFIED This flag is set when the variable is modified.
128 CV_SHOWMODIF The console displays a message when the variable is modified.
256 CV_SHOWMODIFONETIME The console displays a message when the variable is modified, but only once.
512 CV_NOSHOWHELP The variable is not shown in the list generated by the help console command.
1024 CV_HIDEN (or CV_HIDDEN) The variable is not accessible by the console.
2048 CV_CHEAT The variable is a cheat, and can be reset to its default value by using cheats off in the console.

Video flags (V_*)

Main article: Video flags

HUD items (HUD_*)

Kick reasons (KR_*)

Value Name Description
1 KR_KICK Kicked intentionally by the server or an admin
2 KR_PINGLIMIT Broke ping limit
3 KR_SYNCH Synch failure
4 KR_TIMEOUT Connection timeout
5 KR_BAN Player was banned from the server
6 KR_LEAVE Player quit
  Lua [view]
Language features SyntaxMetatables
SRB2 data ActionsConstantsFunctionsGlobal variablesHooksUserdata structures
SRB2Kart data Kart Userdata structuresKart FunctionsKart Hooks
Tutorials Freeslots and Object resourcesCustom player ability
  Sonic Object Configuration [view]
General ClearMainCfg
Objects ObjectStateSoundSprite2SpriteInfoSprite2InfoFreeslot
Unlockable content EmblemExtraEmblemUnlockableConditionSet
Miscellaneous WipesCharacterLevelCutscene / ScenePromptMenuHudItem
Related links ActionsConstantsCustom Object tutorial