User:Monster Iestyn/Sandbox

From SRB2 Wiki
Jump to navigation Jump to search

Other Source Code stuff

To do
Kill this entire section, it was made when 2.0 was the latest release. Besides which, Source Code Documentation is meant to replace it anyway

x<<y = x * 2^y (Left shifting)

x>>y = x / 2^y (Right shifting)

x++ = x + 1

x-- = x - 1

m_fixed.h

fixed_t:

Min = -2147483648 (-1 * 2^31, or -32768*FRACUNIT)
Max = 2147483647 (2^31 - 1, or 32767*FRACUNIT - 1)

doomdata.h

Map level types

"BSP" = Binary Space Partition

  • ML_LABEL (A separator, name, MAPxx)
  • ML_THINGS (Things)
  • ML_LINEDEFS (Linedefs)
  • ML_SIDEDEFS (Sidedefs)
  • ML_VERTEXES (Vertices, edited and BSP splits generated)
  • ML_SEGS (Linesegs, from linedefs split by BSP)
  • ML_SSECTORS (Subsectors, list of linesegs)
  • ML_NODES (Nodes)
  • ML_SECTORS (Sectors)
  • ML_REJECT (LUT, sector-sector visibility)
  • ML_BLOCKMAP (LUT, motion clipping, walls/grid element)

info.h

NUMMOBJFREESLOTS = 128

NUMSPRITEFREESLOTS = NUMMOBJFREESLOTS = 128

NUMSTATEFREESLOTS = NUMMOBJFREESLOTS*6 = 768


NUMSPRITES = 445 (Total number of sprites, including freeslots)

NUMSTATES = 2559 (Total number of states, including freeslots)

NUMMOBJTYPES = 445 (Total number of objects, including freeslots)

p_enemy.c

P_CheckMeleeRange

Checks how far the player is from the actor:

true - the player is within the actor's melee range
false - the player is too far away

Actions that check P_CheckMeleeRange:

Melee range distance limits:
  • Default:
if (dist >= MELEERANGE - 20*FRACUNIT + pl->radius) return false;
distance >= 64 fracunits - 20 fracunits + player radius
distance >= 44 fracunits + 16 fracunits
if distance >= 60 fracunits, P_CheckMeleeRange will return false
if (dist >= (actor->radius + pl->radius)*2) return false;
distance >= (20 fracunits + 16*fracunits)*2
distance >= (36 fracunits)*2
if distance >= 72 fracunits, P_CheckMeleeRange will return false
if (dist >= (actor->radius + pl->radius)*4) return false;
dist >= (32 fracunits + 16 fracunits)*4
dist >= (48 fracunits)*4
if distance >= 192 fracunits, P_CheckMeleeRange will return false
Melee Range height distance limits
  • Default:
if ((pl->z > actor->z + actor->height) || (actor->z > pl->z + pl->height)) return false;
if the player's z height is higher than the top of the actor, or the actor's z height is higher than the top of the player, P_CheckMeleeRange will return false
if (pl->z + pl->height > actor->z - (40<<FRACBITS)) return false;
if the top of the player is higher than 40 fracunits below the actor, P_CheckMeleeRange will return false
if (pl->z + pl->height > actor->z - (24<<FRACBITS)) return false;
if the top of the player is higher than 24 fracunits below the actor, P_CheckMeleeRange will return false

P_CheckMissileRange

Actions that check P_CheckMissileRange:

p_local.h

FLOATSPEED = FRACUNIT*4

= 4 fracunits

MAPBLOCKUNITS = 128

MAPBLOCKSIZE = MAPBLOCKUNITS*FRACUNIT

= 128*65536
= 8388608

MAPBLOCKSHIFT = FRACBITS+7

= 16 + 7
= 23

MAPBMASK = MAPBLOCKSIZE-1

= 8388608 - 1
= 8388607

MAPBTOFRAC = MAPBLOCKSHIFT-FRACBITS

= 23 - 16
= 7


PLAYERRADIUS = 16*FRACUNIT

= 16 fracunits

MAXRADIUS = 32*FRACUNIT

= 32 fracunits

MAXSTEPMOVE = 24*FRACUNIT

= 24 fracunits (Maximum height an object, e.g. the player, can walk up/down without jumping)


USERANGE = 64*FRACUNIT

= 64 fracunits

MELEERANGE = 64*FRACUNIT

= 64 fracunits

MISSILERANGE = 32*64*FRACUNIT

= 2048*FRACUNIT
= 2048 fracunits


ONFLOORZ = INT32_MIN

= -2147483648 (-1 * 2*31, or -32768*FRACUNIT)

ONCEILINGZ = INT32_MAX

= 2147483647 (2*31 - 1, or (32768*FRACUNIT)-1)


ITEMQUESIZE = 1024 (Time interval for item respawning)

p_mobj.c/p_mobj.h

STOPSPEED = (FRACUNIT/NEWTICRATERATIO)

= FRACUNIT
= 1 fracunit/1 tic (Slowest speed an object can move in any direction - if slower, the object stops moving altogether)

FRICTION = (ORIG_FRICTION/NEWTICRATERATIO)

= ORIG_FRICTION
= 59392

P_GenericBossThinker

(Thinker for custom SOC-made bosses)

P_Boss1Thinker

(Thinker for the Egg Mobile)

P_Boss2Thinker

(Thinker for the Egg Slimer)

P_Boss3Thinker

(Thinker for the Sea Egg)

P_Boss7Thinker

(Thinker for Brak Eggman)

P_SpawnMobj

ERZ3 mode

If TypeofLevel has ERZ3 (value 2048) set, all objects will have their destscale set to 50 upon spawning (half their regular size), except for the following:

  • MT_BLACKEGGMAN - Brak Eggman
  • MT_BLACKEGGMAN_GOOPFIRE - Brak Eggman's Goop
  • MT_BLACKEGGMAN_HELPER - Brak Eggman's Helper Object (The part of Brak Eggman you can stand on)
  • MT_BLACKEGGMAN_MISSILE - Brak Eggman's Missile
  • MT_SMOK - Smoke particle
  • MT_GOOP - Egg Slimer's Goop
  • MT_POP - Large Bubble Popping Object


Objects that are given MF_NOBLOCKMAP:


Objects that are given MF_NOCLIPHEIGHT when spawned:

  • MT_RING - Ring
  • MT_COIN - Coin
  • MT_BLUEBALL - Blue Sphere (If BLUE_SPHERES is defined)
  • MT_THOK - Thok Object
  • MT_GHOST - Ghost Object

p_polyobj.c/p_polyobj.h

BYTEANGLEMUL = (ANGLE_11hh/8)

= 134217728/8
= 16777216 (or 256*65536)

POLYOBJ_ANCHOR_DOOMEDNUM = 760 (PolyObject Anchor)

POLYOBJ_SPAWN_DOOMEDNUM = 761 (PolyObject Spawn Point)

POLYOBJ_SPAWNCRUSH_DOOMEDNUM = 762 (PolyObject Spawn Point (Crush))


POLYOBJ_START_LINE = 20 (Linedef Type 20, PolyObject - First Line)

POLYOBJ_EXPLICIT_LINE = 21 (Linedef Type 21, PolyObject - Explicitly Include Line)

POLYINFO_SPECIALNUM = 22 (Linedef Type 22, PolyObject - Parameters)

PolyObject Flags

Linedef Type 20 Flag settings

Linedef Flags PolyObject Flags
(none) POF_SOLID; POF_TESTHEIGHT; POF_RENDERSIDES
Effect 1 + POF_ONESIDE
Effect 2 - POF_SOLID
Effect 3 + POF_PUSHABLESTOP
Effect 4 + POF_RENDERPLANES
Effect 5 - POF_CLIPPLANES
Not Climbable + POF_LDEXEC

p_saveg.c

Sector Data

Linedef Data

mobj_diff_t (Mobj Data)

p_setup.c

P_SpawnSecretItems

Position of RedXVI:

x = 04220000000*-1

= 574619648*-1
= -8768

y = 0554000000*-1

= 95420416*-1
= -1456

z = ONFLOORZ

p_spec.c/p_spec.h

SCROLL_SHIFT = 5 (Amount (dx, dy) vector linedef is shifted right to get scroll amount)

CARRYFACTOR = (3*FRACUNIT)/32

= 3 fracunits/32 tics (Factor to scale scrolling effect into mobj-carrying properties = 3/32)


MAXANIMS = 64

Linedef Types 489 and 490

Linedef Flags Linedef type 489 Linedef type 490
None + POF_NOSPECIALS;
- POF_RENDERALL;
- POF_SOLID
- POF_NOSPECIALS;
+ POF_RENDERALL;
+ POF_SOLID
Not Climbable + POF_NOSPECIALS;
- POF_RENDERALL
- POF_NOSPECIALS;
+ POF_RENDERALL


VDOORSPEED = FRACUNIT*2/NEWTICRATERATIO

= FRACUNIT*2
= 2 fracunits/1 tic

Linedef type 540, Floor Friction

length = Linedef's length

friction = (0x1EB8*length)/0x80 + 0xD000

= (7864*length)/128 + 53248
= (983*length)/16 + 53248


If friction > ORIG_FRICTION (Ice):

movefactor = ((0x10092 - friction)*(0x70))/0x158
= ((65682 - friction)*(112))/344
= ((65682 - friction)*14)/43

If friction <= ORIG_FRICTION (Sludge):

movefactor = ((friction - 0xDB34)*(0xA))/0x80
= ((friction - 56116)*(10))/128
= ((friction - 56116)*5)/64


if (friction > FRACUNIT)

friction = FRACUNIT;

if (friction < 0)

friction = 0;

if (movefactor < 32)

movefactor = 32;
Linedef length friction movefactor
1 53309.4375 -219.2626953125
= 32
50 56319.875 15.927734375
= 32
53.34852492~ 56525.6 32
100 59391.75 255.91796875
100.004069~ 59392 (ORIG_FRICTION) 255.9375
101 59453.1875 2027.98546511~
150 62463.625 495.908203125
200 65535.5 47.69767442~
200.00813835~ 65536 (FRACUNIT) 47.53488372~


PUSH_FACTOR = 7


GLOWSPEED = 8

STROBEBRIGHT = 5

FASTDARK = 15

SLOWDARK = 35


CEILSPEED = (FRACUNIT/NEWTICRATERATIO)

= FRACUNIT
= 1 fracunit/ 1 tic

ELEVATORSPEED = (FRACUNIT*4/NEWTICRATERATIO)

= FRACUNIT*4
= 4 fracunits/1 tic

FLOORSPEED = (FRACUNIT/NEWTICRATERATIO)

= FRACUNIT
= 1 fracunit/1 tic


ORIG_FRICTION = (0xE8 << (FRACBITS-8))

= 232 * 2^16-8
= 232 * 2^8
= 232 * 256
= 59392

ORIG_FRICTION_FACTOR = (8 << (FRACBITS-8))

= 8 * 2^16-8
= 8 * 2^8
= 8 * 256
= 2048

Add_Pusher

<<(FRACBITS-PUSH_FACTOR)
= *2^(16-7)
= *2^9
= *512
<<(FRACBITS+1)
= *2^(16+1)
= *2^17
= *131072

T_Pusher

Touching the ground (while in FOF):

  • Wind - Half force
  • Current - Full force

Anywhere else in FOF:

  • Wind - Full force
  • Current - Full force
<<(FRACBITS-PUSH_FACTOR)
= *2^(16-7)
= *2^9
= *512

p_user.c

MAXBOB = 0x10<<FRACBITS

= 16 * 2^16
= 16 * 65536
= 16*FRACUNIT
= 16 fracunits (Maximum height the camera "bobs" when walking/running with 1st person camera)


SPACESPECIAL = 12 (Sector Type 12, Space Countdown)


MAXDRILLSPEED = 14000 (Maximum drilling speed as NiGHTS Super Sonic)

MAXNORMALSPEED = 6000 (Maximum flying speed as NiGHTS Super Sonic)

P_GetPlayerHeight

Height = MT_PLAYER's Height

= 56 fracunits

P_GetPlayerSpinHeight

Height = MT_PLAYER's Height/7*(FRACUNIT/4)

= 56/1.75
= 32 fracunits

P_DoJump

Momz = (jumpfactor*momz)/100

= momz*(jumpfactor/100)
  • Underwater: Momz * 0.585
  • Quicksand: Momz/2
  • 2D Mode: Momz*1.1

P_DoJumpStuff

CA_THOK / CA_HOMINGTHOK:
Thokking Speed
Abilty Regular Underwater SRB1 Mode SRB1 Mode + Underwater
CA_THOK actionspd actionspd/2 actionspd/2 actionspd/4
CA_HOMINGTHOK actionspd/3 actionspd/6 actionspd/6 actionspd/12
CA_GLIDEANDCLIMB:
Gliding Speed
100% Scale (Normal) 75% Scale 50% Scale 25% Scale 200% Scale 300% Scale x% Scale
Normal form actionspd actionspd*(75/100)
=actionspd*0.75
actionspd*(50/100)
=actionspd*0.5
actionspd*(25/100)
=actionspd*0.25
actionspd*(200/100)
=actionspd*2
actionspd*(300/100)
=actionspd*3
actionspd*(x/100)
Super form actionspd*2 actionspd*(75/100)*2
=actionspd*0.75*2
=actionspd*1.5
actionspd*(50/100)*2
=actionspd*0.5*2
=actionspd*2
actionspd*(25/100)*2
=actionspd*0.25*2
=actionspd*0.5
actionspd*(200/100)*2
=actionspd*2*2
=actionspd*4
actionspd*(300/100)*2
=actionspd*3*2
=actionspd*6
actionspd*(x/100)*2
CA_SLOWFALL:
Z momentum
Regular gravity Reverse gravity
Normal form -gravity*4 gravity*4
Super form gravity*16 -gravity*16

P_2dMovement

P_3dMovement

P_ObjectplaceMovement

P_NukeEnemies

Range of Armageddon Shield's explosion = dist = 1536 << FRACBITS

= 1536*FRACUNIT
= 1536 fracunits

P_LookForEnemies

Max distance target can be from player = RING_DIST

= 512*FRACUNIT
= 512 fracunits

P_HomingAttack

const fixed_t ns = source->player->actionspd * FRACUNIT;
		source->momx = FixedMul(FixedDiv(enemy->x - source->x, dist), FixedDiv(ns,3*FRACUNIT/2));
		source->momy = FixedMul(FixedDiv(enemy->y - source->y, dist), FixedDiv(ns,3*FRACUNIT/2));
		source->momz = FixedMul(FixedDiv(enemy->z - source->z, dist), FixedDiv(ns,3*FRACUNIT/2));

Speed a player with CA_HOMINGTHOK will home to its target:

= Distance from target * (actionspd/1.5)

Linedef type 257, Quicksand Block

sinkspeed = Speed the player sinks into the quicksand

friction = Multiplied by the player's current momx/momy to set the "sludginess" of the player's movement


sinkspeed = abs(rover->master->v1->x - rover->master->v2->x)>>1;

sinkspeed = Linedef X distance/2
sinkspeed = FixedDiv(sinkspeed,TICRATE*FRACUNIT);
= sinkspeed/(35*65536)
= sinkspeed/2293760

sinkspeed = (Linedef X distance/2)/2293760

sinkspeed = Linedef X distance/4587520
sinkspeed = Linedef X distance/(1 fracunit/70 tics)

friction = abs(rover->master->v1->y - rover->master->v2->y)>>6

friction = Linedef Y distance/64
Linedef X distance (fracunits) sinkspeed
0 0
1 1/4587520
= 1 fracunit/70 tics
2 2/4587520
= 2 fracunits/70 tics
= 1 fracunit/35 tics
7 7/4587520
= 0.00000152587890625
= 7 fracunits/70 tics
= 1 fracunit/10 tics
35 35/4587520
= 0.00000762939453125
= 35 fracunits/70 tics
= 1 fracunit/2 tics
70 70/4587520
= 0.0000152587890625
= 70 fracunits/70 tics
= 1 fracunit/1 tic
140 140/4587520
= 0.000030517578125
= 140 fracunits/70 tics
= 1 fracunit/0.5 tics
Linedef Y distance (fracunits) friction
0 0
= 0% of Player's speed
1 1/64
= 0.015625
= 1.5625% of Player's speed
2 2/64
= 1/32
= 0.03125
= 3.125% of Player's speed
16 16/64
= 1/4
= 0.25
= 25% of Player's speed
32 32/64
= 1/2
= 0.5
= 50% of Player's speed
48 48/64
= 3/4
= 0.75
= 75% of Player's speed
64 64/64
= 1
= 100% of Player's speed
128 128/64
= 2
= 200% of Player's speed


MAXCAMERADIST = 140*FRACUNIT

= 140 fracunits (Max distance the camera can be in front of the player, in 2D mode)

r_things.h

MAXSPRITELUMPS = 8192

MAXVISSPRITES = 2048


SKINNAMESIZE = 16

DEFAULTSKIN = "sonic\0\0\0\0\0\0\0\0\0\0"

s_sound.c/s_sound.h

S_MAX_VOLUME = 127


S_CLIPPING_DIST = 1536*0x10000

= 1536*FRACUNIT
= 1536 fracunits (when to clip out sounds)

S_CLOSE_DIST = 160*0x10000

= 160*FRACUNIT
= 160 fracunits (Distance to origin when sounds should be maxed out)

S_ATTENUATOR = ((S_CLIPPING_DIST-S_CLOSE_DIST)>>(FRACBITS+4))

= ((1536*FRACUNIT-160*FRACUNIT)>>(20))
= (1376*FRACUNIT)/ 2^20
= 90177536/1048576
= 86

NORM_VOLUME = snd_MaxVolume

NORM_PITCH = 128

NORM_PRIORITY = 64

NORM_SEP = 128

S_PITCH_PERTURB = 1

S_STEREO_SWING = 96*0x10000

= 96*FRACUNIT
= 96 fracunits

SURROUND_SEP = -128

S_IFRACVOL = 30

Mario Mode Sounds

The following sounds change in Mario mode:

Replaced Sound(s) Mario Mode sound
6 - sfx_altow1
7 - sfx_altow2
8 - sfx_altow3
9 - sfx_altow4
100 - sfx_mario8
228 - sfx_thok 99 - sfx_mario7
119 - sfx_pop 97 - sfx_mario5
84 - sfx_jump 98 - sfx_mario6
208 - sfx_shield 95 - sfx_mario3
83 - sfx_itemup 96 - sfx_mario4
230 - sfx_tink 93 - sfx_mario1
41 - sfx_cgot 101 - sfx_mario9
91 - sfx_lose 94 - sfx_mario2


MAXNEWSOUNDS = 10


PICKUP_SOUND = 0x8000

= 32768 (mask used to indicate sound origin is player item pickup)

sounds.h

NUMSKINSOUNDS = 25 (Total number of sounds for characters)

NUMMUSIC = 1049 (Total number of musicslots, including reserved tunes)

NUMSFX = 1090 (Total number of sounds, including freeslots)


NUMSFXFREESLOTS = 800

NUMSKINSFXSLOTS = 32*NUMSKINSOUNDS = 800

st_stuff.c/st_stuff.h

STARTBONUSPALS = 9

NUMBONUSPALS = 4

NUMHUDITEMS = 35 (Total number of HUD Items)

ST_drawDebugInfo

ST_drawContinueHUD

ST_drawEmeraldHuntIcon

Distance from Emerald Radar Color Beeping interval
0 - 128 fracunits Red 5 tics
128 - 512 fracunits Orange 10 tics
512 - 1024 fracunits Yellow 20 tics
1024 - 2048 fracunits Green 30 tics
2048 - 3072 fracunits Blue 35 tics (1 second)
3072 fracunits or more Grey None

Other

Var1 >> 16 or Var2 >> 16 = Upper 16 bits

Var1 & 65535 or Var2 & 65535 = Lower 16 bits

Reaction time

(Not to be confused with the Object Info property called ReactionTime - that value is actually the starting value for the actor's reaction time, and doesn't change)

Actions that lower the actor's reaction time by 1 each time they are used:

Actions that perform effects when the actor's reaction time = 0:

Actions that set a new reaction time:

extrainfo

This value is set by adding a multiple of 4096 to the Thing Type number of the specified object.

There are 16 possible values you can have for each Thing Type number (note that SRB2DB does not recognise extrainfo at all, and so will generally display Things with extrainfo values of more than 0 as Unknown Thing Types):
  • 0: +0 (Regular Thing Type number)
  • 1: +4096
  • 2: +8192
  • 3: +12288
  • 4: +16384
  • 5: +20480
  • 6: +24576
  • 7: +28672
  • 8: +32768
  • 9: +36864
  • 10: +40960
  • 11: +45056
  • 12: +49152
  • 13: +53248
  • 14: +57344
  • 15: +61440

List of SRB2 Thing Types that use extrainfo:

Vanilla:
XSRB2:
  • Objects with MF_ENEMY - sets the starting size of the object:
  • extrainfo = 1: destscale = 50 (half regular size)
  • extrainfo = 2: destscale = 200 (double regular size)
  • extrainfo = 1: destscale = 50 (half regular size)

Flame Jets

Fan Particle Generator/A_ParticleSpawn

Linedef Type Speeds

  • Linedef type 3 - Zoom Tube Parameters: 1/8 FU/tic * FU X distance
  • Linedef type 4 - Speed Pad: 1 FU/tic * FU length
  • Linedef type 9 - Chain Parameters: ? FU/tic * FU Y distance
  • Linedef type 11 - Rope Parameters: 1/8 FU/tic * FU X distance
  • Linedef type 12 - Rock Parameters: 1/16 FU/tic * FU length
  • Linedef type 30 - Waving Flag: 1 FU/tic * FU length
  • Linedef type 52 - Continuously Falling Sector: 1 FU/tic * FU length
  • Linedef Types 53, 54, 55: 1/4 FU/tic * FU length
  • Linedef Types 56, 57, 58: 1/4 FU/tic * FU X distance/Y distance
  • Linedef type 59 - Activate Floating Platform: 2 FU/tic
  • Linedef type 60 - Activate Floating Platform (Adjustable Speed): 1/4 FU/tic * FU length
  • Linedef type 61 - Crusher (Ceiling to Floor):
    • Without Effect 4: 1/8 FU/tic * FU length
    • With Effect 4: 1/4 FU/tic * FU X distance
  • Linedef type 62 - Crusher (Floor to Ceiling):
    • Without Effect 4: 1/16 FU/tic * FU length
    • With Effect 4: 1/8 FU/tic * FU X distance
  • Linedef Types 190, 191, 192, 193, 194, 195: 1/4 FU/tic * FU length
  • Linedef type 257 - Quicksand: 1/70 FU/tic (or 1/2 FU/second) * FU X distance
  • Linedef type 259 - Custom FOF: (FF_QUICKSAND) 1/70 FU/tic (or 1/2 FU/second) * FU X distance
  • Linedef Types 403, 404: 1/8 FU/tic * FU length
  • Linedef Types 405, 407: 1/8 FU/tic * FU X distance
  • Linedef type 428 - Start Platform Movement: 1/4 FU/tic * FU length
  • Linedef Types 429, 431:
    • Without Effect 4: 1/8 FU/tic * FU length
    • With Effect 4: 1/4 FU/tic * FU X distance
  • Linedef type 430 - Crush Floor Once: 1/4 FU/tic * FU X distance
  • Linedef type 480 - PolyObject Door Slide: 1/8 FU/tic * Front Texture X offset units
  • Linedef type 481 - PolyObject Door Swing: ? FU/tic * Front Texture X offset units
  • Linedef Types 482, 483: 1/8 FU/tic * Front Texture X offset units
  • Linedef Types 484, 485, 486, 487: ? FU/tic * Front Texture X offset units
  • Linedef type 488 - PolyObject Move By Waypoints: 1/8 FU/tic * Front Texture X offset units
  • Linedef Types 500, 501: 1 FU/tic
  • Linedef type 502 - Scroll Wall According To Linedef: 1/32 FU/tic * FU length
  • Linedef Types 503, 504: (Base speed) 1/32 FU/tic * FU length
  • Linedef type 505 - Scroll Texture By Front Side Offsets: 1 FU/tic * Front Texture offset units
  • Linedef type 506 - Scroll Texture By Back Side Offsets: 1 FU/tic * Back Texture offset units

Character Skin Color Reference Sheets

Vanilla SRB2

Value Color Name #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #16
1 Cyan 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
2 Peach 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
3 Lavender 248 249 250 251 252 253 254 255
4 Silver 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
5 Orange 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
6 Red 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
7 Blue 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
8 Steel Blue 200 201 202 203 204 205 206 207
9 Pink 144 145 146 147 148 149 150 151
10 Beige 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
11 Purple 192 193 194 195 196 197 198 199
12 Green 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
13 White 0 1 2 3 4 5 6 7
14 Gold 112 113 114 115 116 117 118 119
15 Yellow 97 98 99 100 101 102 103 104 113 114 115 116 117

SRB2CB

Value Color Name #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #16
1 Cyan 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
2 Peach 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
3 Lavender 248 249 250 251 252 253 254 255
4 Silver 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
5 Orange 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
6 Red 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
7 Blue 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
8 Steel Blue 200 201 202 203 204 205 206 207
9 Pink 144 145 146 147 148 149 150 151
10 Beige 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
11 Purple 192 193 194 195 196 197 198 199
12 Green 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
13 White 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
14 Gold 112 113 114 115 116 117 118 119
15 Yellow 97 98 99 100 101 102 103 104 113 114 115 116 117
16 Black 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
17 Dark Red 136 137 138 139 140 141 142 143
18 Dark Blue 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
19 Neon Green 184 185 186 187
20 Hot Pink 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
21 Brown 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

SRB2 Riders

Value Color Name #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #16
1 Black 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
2 Grey 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
3 Silver 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
4 White 0 1 2 3 4 5 6 7
5 Pink 144 145 146 147 148 149 150 151
6 Light Red 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
7 Red 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
8 Dark Red 136 137 138 139 140 141 142 143
9 Purple 192 193 194 195 196 197 198 199
10 Lavender 248 249 250 251 252 253 254 255
11 Steel Blue 200 201 202 203 204 205 206 207
12 Dark Blue 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246
13 Blue 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
14 Light Blue 224 225 226 227 228 229 230 231
15 Cyan 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
16 Neon Green 184 185 186 187
17 Green 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
18 Army 176 177 178 179 180 181 182 183
19 Yellow 97 98 99 100 101 102 103 104 113 114 115 116 117
20 Gold 112 113 114 115 116 117 118 119
21 Orange 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
22 Peach 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
23 Beige 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
24 Brown 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
25 Rosewood 152 153 154 155 156 157 158 159

Custom Skin Color Ideas

Value Color Name #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 #14 #15 #16
16 Cyan (Fixed) 208 209 210 211 212 213 214 215 216 217 218 219
17 Dark Orange 88 89 90 91 92 93 94 95 152 153 154 155 156 157 158 159
18 Dark Green 168 169 170 171 172 173 174 175
19 Dark Pink 144 145 146 147 148 149 150 151 134 135 136 137 138 139 140 141
20 Peach-Brown 72 73 74 75 76 77 78 79 48 49 50 51 52 53 54 55
21 Olive 105 106 107 108 109 110 111 31
22 Neon Green 184 185 186 187 188 189 190 191
23 Full-range Red 120 121 123 124 126 127 129 130 132 133 135 136 138 139 141 143
24 Full-range Blue 224 225 226 228 229 231 232 234 235 237 238 240 241 243 244 246
25 Full-range Orange 80 81 83 85 86 88 90 91 93 95 152 153 154 156 157 159
26 Full-range Peach-Brown 64 66 68 70 72 74 76 78 48 50 52 54 56 58 60 62
27 Robo-Hood Green 177 178 165 167 182 171 183 173
28 Light Green 160 161 162 163 164 165 166 167
29 Light Orange 80 81 82 83 84 85 86 87
30 Light Steel Blue 200 201 202 203
31 Light Army 176 177 178 179
32 Teal 220 221 222 223
33 Cerulean 216 217 218 219
34 Salmon 120 121 122 123 124 125 126 127
35 Golden Brown 112 113 114 115 116 117 118 119 156 157 158 159
36 Dark Army 176 177 178 179 180 181 182 183 173 174 175 31
37 Dark Steel Blue 200 201 202 203 204 205 206 238 239 240 241 242 243 244 245 246
38 Lilac 120 121 122 123 192 248 249 250
39 Pistachio 176 177 178 179 166 167 168 169 170 171 172 173
40 Turquoise 208 209 210 211 212 213 214 215 220 221 222 223
41 Ivory 120 0 1 2 4 6 8 10
42 Jet Black 200 201 202 203 204 205 206 207 28 29 30 31
43 Byzantium 192 248 249 250 251 252 253 254 255 29 30 31
44 Indigo 192 193 194 195 196 197 198 199 255 29 30 31
45 Dark Neon Green 187 188 189 190 191 175 30 31
46 Dark Rosewood 152 153 154 155 156 157 158 159 139 140 141 142 143 31

Vanilla SRB2 Character S_SKINs

Actions originating from Doom

The 4 Source Code-only SOC Actions!

A_BossZoom

Object Property Use
AttackSound Attacking sound
Speed Speed (Speed*5*FRACUNIT)

A_Boss1Chase

Object Property Use
MeleeState Attack State #1
MissileState Attack State #2
RaiseState Pinch Phase Attack
Damage When the boss' health points reaches this value, start pinch phase
Speed Chasing Speed

A_Boss2Chase

(If the actor is MT_EGGMOBILE2, actor->watertop = Speed)

Angle Increment

actor->target->angle += FixedAngle(FixedDiv(FixedMul(actor->watertop, (actor->info->spawnhealth*(FRACUNIT/4)*3)), speedvar*FRACUNIT))

Angle Increment = (Speed*(Spawnhealth*0.75))/(health*FRACUNIT)

(Since the Egg Slimer pogos around instead for Health Points 2 and below, I won't list their values here. :P )

Object Property Use
AttackSound Goop Spraying Sound
SpawnHealth Used to set the Angle Increment
PainChance Object number of goop to spawn
Speed Used to set Angle Increment

A_Boss2Pogo

Object Property Use
RaiseState Pogoing state
AttackSound Pogoing sound
PainChance Object number of goop to spawn

Test Wads

  • FanParticleGenTest2.wad - Basically some test map showcasing 128 of the different angles you can set for Fan Particle Generators

Colormaps used in Vanilla SRB2

Name Hex code (General color) Hex code (Fade)
Generic Water #40A0FFJ Default (Black)
THZ Slime #E000E0S Default (Black)
THZ Alarm Floodlight #FF0000Z Default (Black)
ACZ Water #0004FFJ Default (Black)
RVZ Lava #FF7F00Z #FF7F00Z
ERZ1 Fog #1 #7F7F7FZ #7F7F7FZ
ERZ1 Fog #2 #0000FFZ #0000FFZ
ERZ2 Acid #999999D #00FF00Z
ERZ2 Gravity Change section Fog #FF0000A #FF00006
ERZ2 Teleport Fog #999999D #FFFF00Z
ERZ2 Misc Fog #1 #00AAFF0 #00AAFF0
ERZ2 Misc Fog #2 #FFFFFFF #00FF000
ERZ2 Misc Fog #3 #999999D #0000FFZ
ERZ2 Final Area Fog #1 #FF5500A #FF55000
ERZ2 Final Area Fog #2 #FF6600A #FF66000