Skin

From SRB2 Wiki
Jump to: navigation, search
This article is about the definition of a skin. For the special lump used to create custom characters, see S_SKIN.

In SRB2, a skin is a form of sprite replacement for players, and sometimes other types of Objects in the game. For the player, each skin added to the game creates a playable character whom they can select and play as. Unlike in most Doom ports, skins in SRB2 will not only replace sprites and sounds but will also determine a character's abilities, movement speeds and other statistics, fundamentally defining how they play the game.

Note that the sprite replacement function of skins only applies to sprites belonging to the SPR_PLAY sprite set, which by default display Sonic in SRB2. When selected by an Object displaying any sprites from this set, skins other than Sonic's skin will automatically replace the default Sonic sprites with those belonging to a different character, transforming the Object's appearance. Apart from the player themselves, the Extra Life Monitor and Level End Sign also make use of this ability to change the icons displayed on them depending on the player's chosen character.

Three characters are available to play as in SRB2 by default: Sonic, Tails and Knuckles. Custom characters can be created and loaded into SRB2 through WAD files for alternative appearances or gameplay – a maximum of 32 skins (and therefore 32 characters) can be loaded into SRB2 in total, including SRB2's default three. To create a skin for a custom character, see the Character creation tutorial.

Selection and restrictions

Single Player

When starting a new game in Single Player, the character select (or "Choose Player") screen is used to choose the player's character. By default, there are four options to choose from: Sonic, Tails, Knuckles, and Sonic & Tails. The last of these starts the game with Sonic but adds a Tails bot as a secondary player, similarly to Sonic 2 and Sonic 3. Once the character is chosen, the player normally cannot change characters again afterwards – exceptions to this include going to levels that force the player to use a specific character (using the ForceCharacter parameter), using the skin console command while development mode is activated, or using Lua scripts to directly modify the skin the player is using.

Custom character select entries can be created via SOC, which will be displayed at the character select screen if they are enabled. Note that custom characters can choose not to be selectable at the character select screen.

Multiplayer

In contrast to Single Player, all characters loaded in SRB2 will automatically be available for use in multiplayer, and the player can switch between them using the skin console command or the Setup Player menu (Multiplayer → Setup Player 1/2) whenever they are idle. However, further restrictions may be applied to players attempting to change characters mid-game, depending on the gametype:

  • Co-op: The player's character can be changed at any time whenever the player is idle.
  • Race/Competition: The player's character can only be changed during the initial countdown or whenever the player is dead.
  • Match/Capture the Flag: The player's character can only be changed when the player is dead or spectating.
  • Tag/Hide & Seek: The player's character can be changed freely if the player is currently "it". Otherwise, it can only be changed during the hiding time countdown or whenever the player is dead or spectating.

If the console variable restrictskinchange is turned off, all the above restrictions besides the player being idle will no longer apply. On the other hand, the host can use the forceskin console variable to force all players in the game to use a particular skin and disable skin changes entirely.

S_SKIN

Main article: S_SKIN

S_SKIN is a special text lump that defines the stats for a character in SRB2, e.g., abilities, movement speeds and items spawned. The exact name for this lump in a WAD file is partially flexible – SRB2 will recognize any lump with the prefix "S_SKIN" in its lump name as an S_SKIN lump. For instance, "S_SKIN", "S_SKIN1", "S_SKIN2", "S_SKIN1A", "S_SKINAB" are all acceptable lump names for the S_SKIN lump. This lump can also define character-specific replacements for certain player sounds – see S_SKIN > Custom sounds for more details.

The S_SKIN lump also marks the start of the corresponding character's sprites; they must immediately follow it in the same WAD file, otherwise they will not be used (and the game will crash).

Console commands

The following console commands can be used to modify the properties of the player's character when development mode is enabled:

  • charability: Can modify the player's primary and secondary special ability.
  • charspeed: Can modify several of the player's speed values, such as the running speed, acceleration and special ability speed.

Linedef flags

The following linedef flags have special effects for characters with specific abilities in Single Player:

  • No Sonic: Prevents a linedef action from having an effect when playing as a character with the thok ability.
  • No Tails: Prevents a linedef action from having an effect when playing as a character with the fly ability.
  • No Knuckles: Prevents a linedef action from having an effect when playing as a character with the glide/climb ability.

None of the above flags will have any effect in multiplayer. If all three are combined, they will prevent a linedef action from having an effect except during multiplayer games.

Character-specific emblems

In versions of SRB2 prior to v2.1, three emblems were hidden in every non-boss act for Sonic, Tails and Knuckles separately. These type of emblems are collectable only by their associated characters; for all other characters, they will still appear in the map but will be uncollectable (and will appear translucent to the player). For details on creating character-specific emblems for SRB2, see Custom unlockables and emblems > Map-specific emblems.

Related links