S_SKIN is a special text lump that is used to define a playable character skin for SRB2. It determines the name of the skin and various attributes for the character itself, e.g., abilities, movement speeds and items spawned. The lump itself also acts as a starting marker for the character's sprites, which must immediately follow it within a WAD or PK3 file.
The name of this lump is partially flexible – the game will only check if the lump's name starts with "S_SKIN" in order for it to be recognised as the definition of a new skin. Anything can be used after these first six characters, e.g.,
S_SKINAB are all acceptable alternatives to
S_SKIN as the lump name.
- 1 Format
- 2 Parameters
- 2.1 name
- 2.2 flags
- 2.3 hudname
- 2.4 realname
- 2.5 ability
- 2.6 ability2
- 2.7 actionspd
- 2.8 mindash
- 2.9 maxdash
- 2.10 normalspeed
- 2.11 runspeed
- 2.12 thrustfactor
- 2.13 accelstart
- 2.14 acceleration
- 2.15 startcolor
- 2.16 prefcolor
- 2.17 supercolor
- 2.18 prefoppositecolor
- 2.19 jumpfactor
- 2.20 radius
- 2.21 height
- 2.22 spinheight
- 2.23 shieldscale
- 2.24 camerascale
- 2.25 highresscale
- 2.26 thokitem
- 2.27 spinitem
- 2.28 revitem
- 2.29 followitem
- 2.30 contspeed
- 2.31 contangle
- 2.32 availability
- 3 Custom sounds
- 4 Patching existing skins
- 5 Related links
The format of text within
S_SKIN is very similar to that of a SOC lump – it consists of a list of parameters and their values. Most text (with the exception of realname) in the
S_SKIN lump is not case-sensitive, e.g., the parameter "hudname" could also be written as "HUDNAME", "HudName" or even "hUdNaMe".
When placed at the start of a line, the
# (number sign, or hash) symbol is used to signify the start of a comment, just as in SOCs. However, comment lines can also be started by placing two forward slashes (
//) at the start of a line.
The following is a typical example of what an
S_SKIN lump looks like:
name = Idreia ability = CA_DOUBLEJUMP ability2 = CA2_NONE normalspeed = 36 thrustfactor = 3 accelstart = 112 acceleration = 42 startcolor = 200 prefcolor = Azure jumpfactor = 1
Note that you don't have to supply all parameters available for
S_SKIN (see below), or even anything at all (though this is not recommended). Any parameters that are left out will be set to default values, which are listed below.
- Default: skin [number]
The unique name of the skin, for identification purposes internally. It is used with the
skin console variable and will always be used and displayed in all lowercase. Spaces are not allowed; use underscores instead. If another skin of the same name is added to the game, the game will automatically add a number to the end of the latter skin's name. To avoid this, ensure that your skin name is unique, for example by adding by your own username or an abbreviation of it to the end.
name = shadow
- Default: 0
Determines the skin flags given to the skin – these are a series of toggles that determine whether certain traits available for a character are applied. These are listed in the table below. Alternatively, flags can be given individually using their parameters. For example,
super = true is an alternative way of giving a character the
||The character can turn Super in Single Player/Coop after collecting all Chaos Emeralds. Used by Sonic, Knuckles and Metal Sonic in unmodified SRB2.|
||The character's Super form will use standing, walking or running animations, instead of the normal spinning animation, when jumping, spindashing or otherwise rolling on the ground. This replicates the old Super Sonic animations in versions of SRB2 before v1.09.4.|
||The character does not create dust particles when charging a spindash.|
||The character's sprites will be rendered at a different scale, which is set by the highresscale parameter. This allows you to use high-resolution (or low-resolution) sprites for your character.|
||The character does not display skid particles and play the skidding sound when braking or making sharp turns.|
||The character's animations will not be automatically adjusted according to the player's speed, for example when Sonic's walking animation speeds up as he walks faster. Instead, the animations will use the default state durations as set in the player's states.|
||Allows the character to run on top of water and goop FOFs.|
||The character will not curl up into a ball when jumping. They will use a falling state when going down, and their height will not be reduced. If the character does not have dedicated jump frames, then they will also use spring frames instead of rolling frames. Used by Fang and Amy in unmodified SRB2.|
||This character cannot damage enemies by jumping in them from any angle. Used by Fang and Amy in unmodified SRB2.|
||This character will always be able to damage enemies by landing on them, regardless of their vulnerability.|
||This character cannot damage enemies from any angle, but they can still land on enemies. This is equivalent to combining SF_NOJUMPDAMAGE and SF_STOMPDAMAGE.|
||This character is considered a "robot". While dying, they will spawn explosion effects. While underwater, this character will get unique drowning numbers, sound effects, and electric short-out particle effects. Used by Metal Sonic in unmodified SRB2.|
||This character will have the "Dash Mode" ability, giving them increased top speed and jump height the longer they run without losing speed. When paired with SF_MACHINE, Dash Mode will also be able to damage enemies and destroy spikes. Used by Metal Sonic in unmodified SRB2.|
||This character's edge teeter animation will play faster than usual. Used by Fang in unmodified SRB2.|
||This character's primary ability can be used more than once per jump. Used by Metal Sonic in unmodified SRB2.|
||The character's NiGHTS Mode sprites will not use automatic sprite rotation.|
||The character's NiGHTS Mode sprites will not use super color gradients. (The skin must also have |
||?||The character will not use super sprites while super.|
||?||The character will not receive a jump boost while super. Used by Knuckles in unmodified SRB2.|
The skin flags are stored in an integer value where each bit represents a flag, i.e., 0 means "disabled" and 1 means "enabled". To set several flags at once, they must be combined with the bitwise OR operator (
flags = SF_SUPER|SF_HIRES|SF_NOSKID
- Default: ???
The name of the character displayed next to the life icon on the HUD. It is recommended to keep this name short so that it fits above the lives counter. If this parameter is not supplied, the name defaults to the value given by realname if it is set, or otherwise by name.
hudname = SHADOW
- Default: Someone
The "real" name of the character displayed by the game in general, e.g., on intermission screens, the multiplayer character select screen, etc. This is not required to be a unique name, unlike with name. If this parameter is not supplied, the name defaults to the value given by hudname if it is set, or otherwise by name.
realname = Shadow
- Default: CA_NONE
The character's primary special ability, such as Sonic's thok, or Tails's flying ability. It is usually activated by pressing the jump button a second time in mid-air after jumping. Only one ability may be selected; they cannot be combined. The values possible are as follows:
||No ability||The character will not have a special ability. This is the default setting when this parameter is not supplied.|
||Speed thok||Sonic's default ability, loosely based on Sonic's air dash attack from Sonic Adventure. Pressing jump a second time in mid-air will thrust the player forward at a speed determined by actionspd.|
||Flying||Tails' default ability, based on Tails' flight ability from Sonic 3. Pressing jump a second time in mid-air will make the player start flying in mid-air – repeatedly pressing jump afterwards will allow the player to fly further upwards. However, the player can only fly for a limited amount of time (determined by |
Other notes about flying:
Sprite name FLY_ is used for the flying animation, sprite name SWIM is used when flying underwater, and sprite name TIRE is used when the character is tired and cannot fly anymore.
||Gliding and climbing||Knuckles' default ability, based on Knuckles' abilities (gliding, climbing and rock smashing) from Sonic & Knuckles. Pressing jump a second time in mid-air will make the player start a glide – the player will accelerate forward from a starting speed determined by actionspd for as long as the jump button is held down. However, the player will gradually lose height while doing so. The player will be able to damage all enemies by aiming their glide into them while using this ability. When landing on the ground from gliding, the player will skid to a halt in the glide animation. When releasing a glide, the player will lose momentum and go into a landing animation. As of 2.2.5, if the player is underwater, they will swim rather than glide. Swimming is slower than gliding but it provides more horizontal control.
If the player glides into a wall, they will latch onto it and can climb up, down or sideways on it, as well as climb over to adjacent walls. If the player is climbing, pressing jump will make them jump off and face away from the wall; pressing spin will make them jump off while still facing the wall. However, not all walls are climbable; some linedefs may have the Not Climbable flag checked, which prevents characters with this ability from climbing it. Any walls that are part of the sky will also not be climbable regardless of linedef flags.
Additionally, characters with this ability will be able to destroy all types of bustable FOFs on touch, rather than needing to spin into them. Bustable FOFs that have the
Sprite name GLID is used for the gliding animation, SWIM is used for swimming, sprite name CLNG is used for attaching to a wall without moving, sprite name CLMB is used for the climbing animation and sprite name LAND is used for the landing animation.
||Homing attack||A weakened version of the speed thok ability, but with the addition of a homing attack feature similar to that in Sonic Adventure and beyond – if an enemy, spring or monitor is close enough to the player when triggering the ability, the player will home in towards the target Object until they touch/destroy it. If the character fails to reach the Object within 3 seconds, the homing attack is automatically canceled.|
||Swimming||Similar to the flying ability, except this ability will work only underwater; attempting to use this ability outside of water will do nothing. Unlike flight, however, the ability can be used indefinitely while underwater.
Sprite name SWIM is used while using this ability.
||Double jump||Pressing jump a second time in mid-air will make the player perform a second jump.|
||Floating||Metal Sonic's default ability. Pressing jump a second time in mid-air and holding the button down will allow the player to hold their vertical position in mid-air continuously. While moving slowly, they will slowly fall over time.|
||Floating with slow descent||Pressing jump a second time in mid-air and holding the button down will cause the player to fall downwards at a slower rate than normal. This is similar to E-102 Gamma's booster powerup from Sonic Adventure. The falling speed is fixed and cannot be adjusted with the actionspd parameter.|
||Telekinesis||Pressing the jump button a second time in mid-air will push enemies and players within a radius of 384 fracunits around the player away; pressing the spin button in mid-air will pull them closer instead. The thrust of the pushing/pulling is determined by actionspd.|
||Fall switch||Reverses the player's vertical momentum when pressing jump a second time in mid-air, thrusting them in the opposite direction instead.|
||Jump boost||The player's jump strength increases with the player's running speed – the faster the player moves, the higher they can jump. actionspd is used as a multiplier for the jump boost given. Pressing the jump button in mid-air has no effect.|
||Air drill||Pressing jump a second time in mid-air will initiate an air drill, thrusting the player forward and upward. The player will fly upwards in an arc, eventually finishing the drill when the player starts falling down to the ground. Holding the spin button while drilling will cause the player to descend more quickly. actionspd is used as an angular speed for the drill – the higher the value is, the steeper and quicker the player's ascent will be.|
||Jump-thok||A hybrid between the thok and the double jump, which thrusts the player both forward and upward. As with the regular thok, actionspd determines the horizontal thrust.|
||Pogo bounce||Fang's default ability. Pressing jump a second time and holding it lets you bounce high off of enemies and on any hazards, similar to Scrooge McDuck's ability from DuckTales.
Uses sprite name BNCE while in the air, and sprite name LAND during the pause when hitting the ground.
||Spin attack||Amy's default ability. Lets you roll up temporarily, allowing you to damage enemies, by timing a second jump press. This ability will also occur when you press jump and spin without a shield. Bustable FOFs that have the |
Uses sprite name TWIN for this ability.
ability = CA_THOK
- Default: CA2_SPINDASH
The character's secondary special ability. Only one of these may be selected; they cannot be combined. The values possible are as follows:
||No ability||The player will not have a secondary special ability.|
||Spindash||The default secondary ability, which is used by Sonic, Tails, Knuckles, and Metal Sonic. The player can use the Spin control to charge a spindash, or otherwise spin on the ground while moving. The player will also jump with the spinning animation (sprite prefix ROLL).|
||Gunslinger||The secondary ability used by Fang. This character will get an arrow hovering over enemies and monitors. Pressing the Spin control while not moving will put the character in their firing animation and shoot their revitem toward the target.|
||Melee attack||The secondary ability used by Amy. This character will do a small hop and damage any enemies from the front when they press the Spin control on the ground. Bustable FOFs that have the |
ability2 = CA2_SPINDASH
- Default: 30
The speed value of the character's primary special ability. For most abilities, it determines how fast the character will move while performing the special ability, but the specific effect depends on the ability. It is possible to supply negative values for this parameter, which will generally make the ability work in reverse. For example, the thok becomes reversed and sends the player backwards, flight and swim become unable to rise and are turned into a slow fall that gradually becomes faster and can't hurt enemies, and glide becomes a backwards glide that cannot climb walls.
actionspd = 20
- Sonic – 60
- Tails – 100
- Knuckles – 25
- Metal Sonic – 60
- Default: 15
Defines the minimum speed at which the character can spin at after charging a spindash.
mindash = 15
- Default: 70
Defines the maximum speed at which the character can spin at after charging a spindash. Setting this to 0 will cause the player to spin in place after releasing a spindash.
maxdash = 90
- Default: 36
The character's normal top running speed. The top speed is doubled when Super or when using Super Sneakers and it is halved when flying or while underwater. Is set to the default for every character in base SRB2.
normalspeed = 32
- Default: 28
Defines at which speed the character starts going into their running animation. This value can be higher than the character's normalspeed. For example, in v1.09.4 and older, Tails could only enter his running animation by using Super Sneakers.
runspeed = 30
- Default: 5
Part of the player's acceleration, which is calculated as follows:
thrustfactor * (accelstart + speed * acceleration). This means that thrustfactor is a factor applied to the whole acceleration value regardless of how fast the player is currently moving. Is set to the default for every character in base SRB2.
thrustfactor = 3
- Default: 96
The speed-independent part of the player's acceleration. The acceleration is calculated as follows:
thrustfactor * (accelstart + speed * acceleration). This means that accelstart determines how fast the player accelerates when they start moving from a standstill. As the player gains speed, the acceleration increases further by the factor determined by acceleration. Is set to the default for every character in base SRB2.
accelstart = 128
- Default: 40
The speed-dependent part of the player's acceleration. The acceleration is calculated as follows:
thrustfactor * (accelstart + speed * acceleration). This means that acceleration determines how much the player's acceleration increases as they gain more speed. Is set to the default for every character in base SRB2.
acceleration = 40
- Default: 96
Specifies the range of colors in the palette on the character's sprites that can be changed in multiplayer modes. This is a range of 16 colors, starting from the palette color index specified by this parameter. See List of skin colors for more information.
startcolor = 192
- Default: Green
Specifies the default skin color for the character. Only the color names listed below can be used; numbers are not accepted. This is required for Single Player, where the character's color cannot be changed by the player. The possible values are as follows:
prefcolor = Black
- Default: Gold
Specifies the default skincolor for the character's Super form. Only the color names listed below can be used; numbers are not accepted. The possible values are as follows:
supercolor = Tan
- Default: N/A
This specifies the skincolor for the character's signpost background, when you're using their prefcolor. Omitting this option, or using another color in multiplayer, will use the pre-defined opposite color for their skincolor. Only the color names listed below can be used; numbers are not accepted. The possible values are as follows:
prefoppositecolor = Red
- Default: 1.0
Sets the jump strength, measured as a factor of the default jump strength. The default setting is 1.0 (100% jump strength), while Knuckles uses 0.85 (85% jump strength), Fang uses 1.1 (110% jump height), and Amy uses 1.135 (113.5% jump height).
jumpfactor = 1.0
- Default: 16
Sets the character's hitbox radius.
radius = 32
- Default: 48
Sets the character's hitbox height. Fang has this set to 60.
height = 96
- Default: 32
Sets the character's hitbox height while they are in the rolling/spinning state.
spinheight = 8
- Default: 1.0
Changes the size of the sprites of any shields on the player. Knuckles has this set to 1.1 (110% scale), and Fang has this set to 1.2 (120% scale).
shieldscale = 0.9
- Default: 1.0
Changes the scaling of the camera positioning. This can be useful for smaller or bigger characters.
camerascale = 0.5
- Default: 0.5
If the skin flag
SF_HIRES is set, this parameter is used to set the scale at which the skin's sprites are drawn. Values between 0 and 1 allow you to shrink high-resolution sprites to show more detail, and values above 1 will upscale low-resolution sprites. The default value is 0.5, which renders sprites at half their regular dimensions. Note that this does not affect the character's overall size, only the resolution at which the sprites are drawn.
highresscale = 0.5
- Default: -1
Sets the Object type of the Object that is spawned when the player thoks (or performs a similar special ability like homing attack or air drill). The default value is -1, which sets the Object type to
MT_THOK, the translucent speed trail left behind by Sonic.
thokitem = MT_THOK
- Default: -1
Sets the Object type of the Object that is spawned when the player spindashes or spins on the ground. The default value is -1, which sets the Object type to
MT_THOK, the translucent speed trail left behind by Sonic, Tails and Knuckles.
spinitem = MT_THOK
- Default: -1
Sets the Object type of the Object that is spawned when the players charges a spindash. The default value is -1, which sets the Object type to
MT_NULL. In previous versions, this was
revitem = MT_THOK
- Default: 0
Sets the Object type of the Object that is always spawned when using the character. Tails sets this to MT_TAILSOVERLAY, while Metal Sonic uses MT_METALJETFUME. 0 will have no following object.
followitem = MT_TAILSOVERLAY
- Default: 17
Changes the speed of the CNT1 and CNT4 animations on the Continue screen animation. This is set to 7 for Tails, and 4 for Amy, Fang and Metal Sonic.
contspeed = 20
- Default: 0
Sets the sprite angle to use initially on the Continue screen animation. This is set to 3 for Sonic, 7 for Knuckles, and 1 for Amy and Metal Sonic.
contangle = 4
- Default: 0
Sets the Unlockable entry required to be achieved to play as this character. If set to 0, this character will be playable from the start. Characters who are unlockable will not appear in the log file as "added" when the file they are in is loaded.
availability = 1
As an optional feature, the
S_SKIN lump is capable of replacing specific sounds (e.g., jumping, spinning, spilling rings) with alternative sounds exclusively for the corresponding character (i.e., the sound will be unchanged when played for other characters). The sounds to play can be located in any WAD or PK3 file loaded by SRB2, including existing sounds from
srb2.pk3, sounds from another external file, or (most frequently) custom sounds provided in the file containing the character and
S_SKIN lump itself. The new sound(s) will not take up any sound freeslots.
S_SKIN lump defines custom sounds for a character by referring to the lump names of the original sound and the sound to replace it, such as in the example displayed below:
dsthok = dsmythok
This will cause any instance of the sound
sfx_thok (lump name
DSTHOK) to be replaced by a sound whose lump name is
DSMYTHOK whenever the sound is played by the character defined in the
Below is the full list of sounds that can have character-specific replacement sounds through a character's
S_SKIN – any other sounds besides these will not be accepted in the
|Lump name||Sound name||Description|
||Sound made when going into a spin while moving|
||Tails exhausted from flying|
||Grabbing an air bubble|
||Pain taunts #1–#4 1|
||Victory taunts #1–#4 1|
||Death taunts #1–#4 1|
1 Whenever a taunt is used, the game will randomly select one of the four taunt sounds to play. If you want to increase the chances of playing a specific sound compared to the others, place the same sound in more than one slot. If you want to use one taunt sound, place it in all four taunt slots.
Patching existing skins
By giving your lump the
P_SKIN name instead, you can edit an existing skin. The
name field will be used as the skin to modify, every other field (with the exception of
availability) will modify it. Any missing fields will use the setting that was already there.
name = fang realname = Nack hudname = NACK