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 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 charsel
- 2.6 face
- 2.7 superface
- 2.8 ability
- 2.9 ability2
- 2.10 actionspd
- 2.11 mindash
- 2.12 maxdash
- 2.13 normalspeed
- 2.14 runspeed
- 2.15 thrustfactor
- 2.16 accelstart
- 2.17 acceleration
- 2.18 startcolor
- 2.19 prefcolor
- 2.20 jumpfactor
- 2.21 highresscale
- 2.22 thokitem
- 2.23 spinitem
- 2.24 revitem
- 3 Custom sounds
- 4 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. Text in the
S_SKIN lump is not case-sensitive, e.g., the parameter "facename" could also be written as "FACENAME", "FaceName" or even "FaCeNaMe".
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 face = IDRALIFE ability = CA_DOUBLEJUMP ability2 = CA2_NONE normalspeed = 36 thrustfactor = 3 accelstart = 112 acceleration = 42 startcolor = 200 prefcolor = Steel_Blue 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 = metalsonic
- 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.
||The character can turn Super in Single Player/Coop after collecting all Chaos Emeralds. Used only by Sonic in unmodified SRB2.|
||The character uses the designated special ability animations (frames U–Z) for the character's Super form, much like Sonic does. This flag does not control the Super transformation animation; it will always be played when the player turns Super, regardless of the character's skin flags. If this flag is not set, the normal character animations are used while Super.
If set, then frames U and V are used for Super standing, frames W and X are used for Super running, frame Y is used for teetering on an edge, and frame Z is used for getting hurt while Super.
||The character's Super form will use the normal spinning animations when jumping, spindashing or otherwise rolling on the ground. If this flag is not set, the character will instead use standing, walking or running animations when performing these actions, as Super Sonic himself did in versions of SRB2 before v1.09.4.
This flag's effects are relevant only if
||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 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 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_SUPERANIMS|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 = METAL
- 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 = Metal_Sonic
- Default: CHRSONIC
The lump name for the character portrait displayed for the character in Single Player's character select screen and the Record Attack screen. This image must be exactly 128×128 pixels in size, or 256×256 for high resolution. Although the value is not case-sensitive (e.g., values "CHRMETAL", "chrmetal", and "ChRmEtAl" all point to the lump "CHRMETAL"), it's highly recommended to write the name in all-caps to match the name of the lump. XWE automatically gives this lump offsets, but it should not have any.
hudname = CHRMETAL
- Default: MISSING
The lump name for the life icon used for the character. The life icon is a 32×32 pixel picture shown at the bottom-left of the screen as part of the HUD. Although the value is not case-sensitive (e.g., values "METALIFE", "metalife", and "MeTaLiFe" all point to the lump "METALIFE"), it's highly recommended to write the name in all-caps to match the name of the lump. XWE automatically gives this lump offsets, but it should not have any.
face = METALIFE
- Default: MISSING
The lump name for the character's life icon when they turn Super. If this parameter is not supplied, the character's regular icon as supplied by face is used instead. Although the value is not case-sensitive (e.g., values "METALSUP", "metalsup", and "MeTaLsUp" all point to the lump "METALSUP"), it's highly recommended to write the name in all-caps to match the name of the lump. XWE automatically gives this lump offsets, but it should not have any.
superface = METALSUP
- 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:
Frames U and V are used for the flying animation, and frames W–Z are 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 that touch them while using this ability. When landing on the ground from gliding, the player will skid to a halt.
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
Frames U and V are used for the gliding animation, frame W is used for attaching to a wall without moving, and frames X–Z are used for the climbing 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 cancelled.|
||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. Characters with this ability also automatically have the ability to run on water.|
||Double jump||Pressing jump a second time in mid-air will make the player perform a second jump.|
||Floating||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, similarly to Super Sonic's own floating ability but without the limitation of needing to move while doing so.|
||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.|
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. The player will jump with the springing/falling animation frames (P, `, and lowercase a).|
||Spindash||The default secondary ability, which is used by Sonic, Tails and Knuckles. 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 (frames L–O).|
||Multiability||Changes how the player's primary special ability (which is set by ability) works. In most cases, it allows the special ability to be used more than once per jump, but for some abilities it has other effects instead:
The player will jump with the springing/falling animation frames (P, `, and lowercase a).
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
- Default: 15
Defines the minimum speed at which the character can spin at after charging a spindash.
mindash = 15
- Default: 90
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.
normalspeed = 32
- Sonic – 36
- Tails – 32
- Knuckles – 34
- 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.
thrustfactor = 3
- Sonic – 5
- Tails – 3
- Knuckles – 4
- 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.
accelstart = 128
- Sonic – 96
- Tails – 192
- Knuckles – 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.
acceleration = 40
- Sonic – 40
- Tails – 50
- Knuckles – 45
- Default: 160
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
prefcolor = Blue
- 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).
jumpfactor = 1.0
- 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. This allows you to use high-resolution sprites that show more detail. The default value is 0.5, which causes the sprites to be drawn at half-scale, allowing them to be twice as large. 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_THOK, the translucent speed trail left behind by Sonic, Tails and Knuckles.
revitem = MT_THOK
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 file loaded by SRB2, including existing sounds from
srb2.srb, sounds from another external file, or (most frequently) custom sounds provided in the WAD 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.