Custom character tutorial/Character select

From SRB2 Wiki
Jump to: navigation, search
  Custom character tutorial [view]

Chapter 1: OverviewChapter 2: S_SKINChapter 3: SpritesChapter 4: Character select

If you want your character to be usable in Single Player, you need to add an entry to the character select screen. This chapter explains how to set up a character select entry for your character, assuming you have already created an S_SKIN lump for the character at the least.

Creating the character select entry

Character select entries are created via SOC. Specifically, you must add a Character block to a SOC lump. If you are using a WAD file, the name of the SOC lump must start with SOC_ (e.g.: SOC_CHAR), or otherwise be MAINCFG or OBJCTCFG. If you are using a PK3 file, the SOC lump can have any name, but must be placed in the SOC/ folder. If your WAD or PK3 file already contains a SOC lump, you can simply open it in a lump editor and add your Character block to it. Otherwise, create a new lump with one of the previously listed acceptable names or in the SOC/ folder, respectively, and put the character select entry block into it.

Example

This is a typical example of what a character select entry may look like:

Character
SkinName = idreia
DisplayName = Idreia
TagTextColor = SKINCOLOR_CORNFLOWER
TagOutlineColor = SKINCOLOR_GOLD
PlayerText = ^4Idreia^0 can progress through zones fairly quickly, despite not being able to spin.

^7Ability:^0 Double Jump
Press jump after jumping once to do a double jump. Pretty simple.

^7Tip:^0 Use the double jump to save yourself from platforming gone wrong or dodge an enemy's attack.
#

Constructing the character select entry

This section explains how to create a character select entry for your custom character from scratch.

Step 1: Identification

The character select entry should start off with the following parameters:

  • Character: This is the header for the character select entry's SOC block. In most cases this should be written as a line on its own without a number, so it will appear at the end of the list of characters at the character select screen.
  • SkinName: This is the name of the character to load up when the character select entry is chosen. This parameter's value should be identical to the one you set for name in the S_SKIN lump earlier in this tutorial.
  • DisplayName: This changes what the character's name tag displays when they are hovered over in the character select screen. # can be used for line breaks.
  • TagTextColor: This determines the color of the character's name when they are being hovered over in the character select screen. This parameter accepts the name of the skincolor prefixed with SKINCOLOR_. See List of skin colors for the strings this parameter accepts.
  • TagOutlineColor: This determines the color of the outline of the character's name when they are being hovered over in the character select screen. This parameter accepts the name of the skincolor prefixed with SKINCOLOR_. See List of skin colors for the strings this parameter accepts.
  • NameTag: This sets a custom graphic to use over the existing font for the character's name. DisplayName must be blank for this to work.
  • OppositeColor: This determines the color of the background when the character is hovered over in the character select screen. This parameter accepts the name of the skincolor prefixed with SKINCOLOR_. See List of skin colors for the strings this parameter accepts. This is unaffected by the prefoppositecolor setting in S_SKIN.
  • Status: This parameter determines whether the character select entry will be displayed or not. This defaults to 1, but can be set to 0 to hide a character.

Step 2: Description

Next, a description for your character's entry can be given using the PlayerText parameter. The text you supply will automatically wrap and a large space is available. Use the # character to mark the end the text for this parameter. Custom color codes are commonly used here – most of the text is given in the default white color, while the character's name (the first mention only) and any section headings are usually colored as close to the character's preferred color as possible. See below for a recreation of Sonic's description as an example:

PlayerText = ^4Sonic^0 can blast through zones faster than anybody else, but he finds getting through hazards the most difficult.

^4Ability:^0 Speed Thok
Double jump to zoom forward with a huge burst of speed.

^4Tip:^0 The speed thok can be hard to control, but it's quite powerful once it's mastered. Remember you can hold backwards to brake!
#
  Custom character tutorial [view]

Chapter 1: OverviewChapter 2: S_SKINChapter 3: SpritesChapter 4: Character select