Character WAD Tutorial
|It has been suggested that this article should be split into multiple articles. Please discuss this in the article's Talk page.|
A Character WAD is a WAD file used in Sonic Robo Blast 2 that contains playable characters. These can be loaded up, and usually, they will be selectable in the Character Select screen to be played as through the levels. Examples include those that are part of SRB2, such as Sonic, Tails, and Knuckles. Examples in the conventional sense are custom characters, such as Amy, Shadow, and Metal Sonic.
As of v2.0, 275 frames in total can be dedicated to a character. A character WAD can be considered complete with only up to 173 frames though, made possible due to the abridged system of handling sprites. The sheer number of sprites alone contributes to the history of completed Character WADs, notorious for having few results being yielded. Nonetheless, several completed Character WADs do exist; the majority of those are edited from the official sprites, while ones made — to some degree — from scratch, also exist.
To edit and create Character WADs, one uses lump editors such as SLADE or XWE. The creator draws the amount of sprites their Character WAD requires, and then they add them to the WAD File using such aforementioned lump editors.
You need the following things to create your own character WAD:
- A lump editor like SLADE or XWE.
- A basic outline for your character (ex. what s/he is, what s/he can do, what s/he looks like, etc.).
- A couple of frames of what your character looks like.
- A basic knowledge of what a WAD file is and how to use your editor.
A Character WAD, collectively, consists of a series of lumps. The lumps seen in a Character WAD are the following:
- S_SKIN1 - The defining lump of a playable character. This is a SOC lump containing attributes which are tweaked to the character's intended properties.
- Player Sprites - The entire series of sprites that make up the character. There may be 275 in total; 173 sprites alone may be made for a complete character WAD using the "abridged" sprite naming scheme. See Frame List below.
- OBJCTCFG - Essentially a SOC which defines how the playable character is displayed on the Single Player Character Select screen. This is optional, though it's needed if the character is to be used in Single Player.
Constructing the S_SKIN1 lump may possibly be the easiest place to start. If you already know how fast you want your character to run, what ability it has, how high it can jump, etc., you can start by making an S_SKIN1 lump to set the appropriate attributes.
As with level headers and other SOCs, the attribute names themselves of S_SKIN1 are not case-sensitive. That means "facename" can be identified as "facename", "FACENAME", "FaceName", or even "FaCeNaMe", and it will still mean the same.
The format for an S_SKIN1 lump is as follows:
name = face = facename = ability = ability2 = normalspeed = thrustfactor = accelstart = acceleration = startcolor = prefcolor = jumpheight = highres = runspeed = superspin = superanims = superface = spinitem = ghostspinitem = thokitem = ghostthokitem = actionspd = mindash = maxdash =
Attributes for S_SKIN1
The name of the character, for identification purposes. It shows up in the Multiplayer Character Select screen, and it's also used with the SKIN command in the console. Spaces are not allowed; use underscores instead.
name = Metal_Sonic
The lumpname to the life icon used for the character. The life icon is a 32x32 picture shown at the bottom-left of the screen as part of the HUD. Although the value is not case-sensitive (values "STLIFE", "stlife", and "StLiFe" all point to the lump "STLIFE"), it's very highly recommended to input the value in all caps, to match that the lumpname is presumably all caps as well. It's more elegant and accepted this way. XWE automatically gives this offsets, but this lump should not have any.
face = METALIFE
The lumpname to the life icon name used for the character. The life icon name is the graphic used next to the life icon which displays the character's name in some way. As with face, while the lumpname value is not case-sensitive, one should really type the lumpname in all capitals for elegance, to match exactly with the name of the lump. XWE automatically gives this offsets, but this lump should not have any.
facename = MESONIC
The character's special ability, such as Sonic's thok, or Tails's flying ability. Only one may be selected; the Level Header rule of adding numbers to combine properties does not apply here. The values possible are as follows:
|0||Sonic Speed Thok|
|1||Tails Fly (Frames U and V are used for flying, Frames W-Z are used when the character can't fly anymore)|
|2||Knuckles Glide/Climb (Frames U and V are used for gliding, Frame W is used for the climbing "standing", and X-Z are used for the actual climbing movement animation)|
|4||Super Sonic Float|
|5||Float with Slow Descent (similar to E-102 Gamma's booster powerup in Sonic Adventure)|
|6||Swim (basically the flying action only allowed underwater)|
|8 and above||No ability|
ability = 0
The character's secondary ability. This can be either spinning, both while jumping and as a spindash, or the the option to use the special ability more than one time per jump. Some abilities like Slow Fall get a higher jump height instead. Only one of these may be selected; the Level Header rule of adding numbers to combine properties does not apply here. The values possible are as follows:
ability2 = 0
The character's normal running speed, without powerups. Cannot exceed 50.
normalspeed = 32
- Sonic - 36
- Tails - 32
- Knuckles - 34
Has to do with the character's speed. Literally, as found in the SRB2 source, "Thrust = thrustfactor * acceleration".
In other words, the character's other speed values are multiplied by whatever value thrustfactor is to give a complete picture of the character's speed. The higher the thrustfactor, the more speedy the character is. Think "thrust factor"; the character thrusts themselves forward by a factor of this much (whatever the value for this attribute is.) Cannot exceed 5.
thrustfactor = 3
- Sonic - 5
- Tails - 3
- Knuckles - 4
The rate that the character starts to accelerate at from when they first stand still. Once one first presses the key, the character's speed will increase by this much until they gain enough speed. Cannot exceed 192.
accelstart = 128
- Sonic - 96
- Tails - 192
- Knuckles - 128
The rate the character accelerates once they are already moving. When moving, their speed will increase by this much per certain amount of time until it reaches the normalspeed. Cannot exceed 50.
acceleration = 40
- Sonic - 40
- Tails - 50
- Knuckles - 45
Specifies the range of colors of the palette on the character's sprites that can change in Multiplayer mode. By default, this is a range of 16, starting from the specified startcolor. See About the Palette below.
startcolor = 192
The default color for the character. This is especially useful (and practically required) in Single Player mode, where the color cannot be changed by the player. Yellow has been disabled in the gametype Match. The possible values are as follows. (Do not set it to 0 or there will be glitches.)
prefcolor = 7
Sets the jump height, measured in percentage of the default jump height. The usual setting for this would be 100 (100% of the default height), although Knuckles has it set to 85. Cannot exceed 100.
jumpheight = 100
If your skin has a sprite which is twice as large as a normal player sprite, highres will shrink it to half size for you. This is better than resizing the sprites by hand because it is both easier to set and it doesn't lose every other pixel in higher resolutions.
highres = 1
Defines at which speed the character starts going into their running animation. This does not have to be within the confines of the character's normalspeed. An example would be Tails in previous versions of SRB2, where he could only reach his runspeed by use of Super Sneakers.
runspeed = 30
Defines whether the Super character goes into their spinning animation when they jump/spindash or not. Super Sonic used to not show the spin animation when performing these actions, but rather his standing animation. "0" stands for does not display spinning animation, "1" stands for does display spinning animation.
superspin = 1
Defines whether to use the designated Special Ability frames (animations U-Z) for the character's Super form, much like Sonic is set to. If not, the normal animations are used. "0" stands for use normal animations, "1" stands for use Special Ability animations.
If superanims = 1, then frames U and V are used for Super standing, frames W and X are used for Super running, frame Y is used for tipping on an edge, and frame is used for Z is for getting hurt while Super; the last effect is possible using the super turret SOC effect.
superanims = 1
The lumpname of the character's lives icon when they turn super. When left blank, it defaults to Super Sonic's life icon.
superface = METALSUP
Replaces the default translucent speed trail left behind by spindashing and spinning on the ground with the specified SOC Object entry. Note that this only applies to spindashing and spinning; it doesn't change the speed trail left behind by thokking. For thokking, see thokitem. As with thokitem, the value corresponds not to map Thing numbers, but to Object entries used within SOCs. If this value is set to 0, the spinitem will be set to the default Object,
spinitem = 157
If set to 0, allows the spinitem to perform actions, not automatically disappear after 8 tics, and not be a scenery object. By default, this setting is set to 1.
Use this attribute wisely. A good deal of spinitems won't produce the desired effect; setting spinitem = 108 (the GFZ Boss Missile), for instance, would appear not to spawn anything; in reality, though, the missile is spawned, but it's automatically destroyed when it collides with the player. All missiles follow this behavior. A lot of screwy effects can be achieved using this attribute; setting spinitem = 1 (the blue Crawla) gives the player instant points and lives, and the player can also spin into mid-air and actually ascend due to destroying the spawning blue Crawlas.
ghostspinitem = 0
Replaces the default translucent speed trail left behind by thokking with the specified SOC Object entry. This applies only to thokking; for spindashing and spinning, see spinitem. As with spinitem, the value corresponds not to map Thing numbers, but to Object entries used within SOCs. This is useful for custom character abilities. If this value is set to 0, the thokitem will be set to the default Object,
thokitem = 157
If set to 0, allows the thokitem to perform actions, not automatically disappear after 8 tics, and not be a scenery object. By default, this setting is set to 1.
Use this attribute wisely. See the warning supplied in ghostspinitem.
ghostthokitem = 0
Defines the speed value of the character's special ability, or how fast the character can move when performing their special ability. This only applies for Thokking (both regular and homing), Flying, Gliding, and Swimming. Cannot exceed 60 (Case exceptions are flying and swimming). A negative value can also be given to actionspd to make any of the abilities do reverse actions. The thok becomes reversed and sends the user 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
Defines the minimum speed that the character can spin off after charging a spindash. Default is 15. Cannot exceed 60.
mindash = 15
Defines the maximum speed that the character can spin off after charging a spindash. Set to "0" to give the character a mêlée attack. Default is 60. Cannot exceed 60.
maxdash = 60
One can directly make S_SKIN1 by making a new lump in a lump editor and typing the details out. Another way is to write it with an external text editor such as Notepad and then import it into the WAD file. This can be done by saving the text file, and then, using a lump editor, importing it into the Character WAD with the name S_SKIN1.
S_SKIN1's placement is very important. S_SKIN1 must be placed right before the first frame of the Character WAD. The reason for this is that once SRB2 reads an S_SKIN1 lump, it automatically tries to look for all of the character's frames — in order — directly after that lump. If they're not directly after S_SKIN1, and another lump is there (say, S_START is the lump after S_SKIN1 rather than PLAYA1) the game crashes. Note that if your sprites appear between lump markers S_START and S_END, it's okay to put S_SKIN1 inbetween those lump markers. Just so long as S_SKIN1 appears directly before the first frame, SRB2 will understand it.
This is a typical example of what an S_SKIN1 lump may look like:
name = Idreia face = IDRALIFE facename = IDRANAME ability = 6 ability2 = 0 normalspeed = 36 thrustfactor = 3 accelstart = 112 acceleration = 42 startcolor = 200 endcolor = 207 prefcolor = 8 jumpheight = 100
Note that you don't have to supply all values in S_SKIN1, or even anything at all. Whatever is left out should default to Sonic's attributes, with the exceptions of name.
OBJCTCFG is required if you'd like to have your character selectable — and essentially playable — in Single Player, in the Character Select screen. Just like S_SKIN1, it is a text lump, or more accurately, a SOC lump. Because it's an SOC lump, the "Character" block can also be put into a MAINCFG instead of making an OBJCTCFG, and the character addon it applies to then depends on the "Character" and "SkinName" attributes below.
You'd go about making and importing OBJCTCFG in the same way as for S_SKIN1, but compared to that, it only has a small amount of variables. The variables are:
SRB2 version = Character PlayerName = PicName = SkinName = Status = PlayerText =
In some Character WADs, you might see the attribute "MenuPosition = " in the OBJCTCFG. This is an obsolete value.
Attributes of OBJCTCFG
Determines which SRB2 version that the Character WAD is designed for. Presumably, your character is designed for v2.0, so you'd want to fill this attribute with "200". You see this same variable in the MAINCFG lump, so if you're placing the Character block there, this attribute may already be on the MAINCFG lump.
SRB2 version = 200
Starts a "Character" block. Determines what slot your character will appear in when loaded in SRB2 in the multiplayer select screen. This must be set. The simplest option would be to set it to "4".
The name of the character that will show up in the Single Player Character Select screen. This is where you would put the name of your character. As this determines what exactly appears on the Character Select screen, spaces and other such characters can be used here.
PlayerName = Dr. Eggman
The name of the image lump that is displayed when the character option is highlighted in the Single Player Character Select screen. This image must be exactly 128 x 128 pixels in size. This value is case-sensitive; presumably, one would type this value in all capitals, since lumpnames are typically in all capitals.
PicName = EGGMPICS
Tells SRB2 the name of the character you made. Use the same variable you used for Name in S_SKIN1.
SkinName = Metal_Sonic
Currently, its purpose is supposedly to enable or disable the display of the character's entry in the Character Select screen. "0" stands for don't display the character's entry, "32" stands for display the character's entry. "32" seems to give the typical function.
One valid use of this is enabling or disabling characters' entries using separate wadfiles. Say if a Character WAD, with entry Character 0 were initally playable at the start of the game. If another character, Character 1 were added to the play, a story element can occur where Character 0 is kidnapped, so they wouldn't be playable. A separate SOC can be added which defines for Character 0 only "Status = 0", and nothing else.
Status = 32
The description that the character will have in the Single Player Character Select screen. Like in Cutscenes, the text does not automatically wrap. Use line breaks and spaces to accomodate. This attribute string is ended by the # character.
Note that the first three lines are prefixed by a series of spaces. This is to make way for the texts "Speed:", "Ability:", and "Notes:", which come before the respective three lines. Also note that this attribute can only take seven lines of text: one for the Speed, one for the Ability, and five for the Notes. If there are any more, the additional lines get trimmed off.
PlayerText = Fastest Speed Thok Not a good pick for starters, but when controlled properly, Sonic is the most powerful of the three. #
Like S_SKIN1, OBJCTCFG is a text lump. Its attributes can directly be put into a new lump in a lump editor, or it can be written in an external editor program such as Notepad. Using an external editor program, save the OBJCTCFG as a text file, and then import it into the WAD file using a lump editor.
This is a typical example of what an OBJCTCFG lump may look like:
SRB2 version = 200 Character 0 PlayerName = Amy PicName = AMYCHAR SkinName = Amy Status = 32 PlayerText = Fast Double Jump The girlfriend of Sonic The Hedgehog, doing anything to get him to love her, is now in SRB2.
A Character WAD consists of a series of frames that make up the visual design of the character that's implemented into the game. At least 173 frames are needed to make a complete character WAD. 275 frames may be made in total.
Frames are defined in a Character WAD by a certain name format: "NAMEAx", where:
- "NAME" is a four-letter prefix that's unique to your character
- "A" is the animation that the frame consists of; see Frame List below.
- "x" is the rotation number that defines which rotation the frame consists of.
A Character WAD sprite is depicted in eight rotations. The rotation number defines which rotation the specific frame depicts. There are nine rotations; A1-A8 cover individual frames ("A" being the name of the frame), while A0 will render the sprite no matter what angle it's facing. One would think that, since there are 33 different animations in 8 different rotations, as well as 9 Super Transform frames, 273 sprites would have to be made to make a complete character WAD. Actually, one would not have to make nearly this many to make a complete product.
The Naming System and Rotations
For starters, SRB2's method of handling sprites allows for a condensed (or abridged) structure of sprites to be used in character WADs. There are eight rotations for a sprite, so one would deduct that there would be eight sprites. However, the way sprites are handled allows two rotations to be compacted into one sprite. The one sprite, which is drawn to depict only one rotation by itself, is merely flipped to serve as a depiction for the second rotation. It's very common — almost universal — practice to take advantage of this rule. If you take a look at a typical character WAD, you'll see listings that consist of lumpnames like these:
PLAYA1 PLAYA2A8 PLAYA3A7 PLAYA4A6 PLAYA5
Note how some of the frames define two rotations: PLAYA2A8, for example, defines that it can be used for rotations "A2" and "A8". The first rotation that's defined tells that the specific rotation is the one drawn in the sprite. The second rotation that's defined tells the game to flip the sprite to make that rotation. This animated GIF shows exactly how this works:
Adopting this condensed structure allows one to make a character WAD with only 170 sprites, rather than the 275 that the game supports total. It's a very good time-saver.
Note, however, that because the game flips the one sprite using this naming scheme, asymmetrical features would be flipped as well. For example, if the character carried a weapon on their right hand, it would also appear on their left hand by error when the game flips the sprite, as if they were "switching hands". This can be seen as problematic. Contrary to popular belief, however, it's actually possible to make a character with asymmetrical features by falling back onto the uncondensed naming structure of sprites, like so:
PLAYA1 PLAYA2 PLAYA3 PLAYA4 PLAYA5 PLAYA6 PLAYA7 PLAYA8
This way, different sprites can be drawn for all the rotations. PLAYA2 would show the character holding their weapon on their right hand — the one away from the camera, while PLAYA8 could still show the character holding their weapon on their right hand — in this case, the one towards the camera.
Yet, there is a method to display the same sprite for all angles, as shown.
It is not recomended to use this for anything other than the transformation, death, signpost and life-box though, as no one wants to see your character always walking towards you when you are facing him from the back.
You can also flip the sprite for use in other frames, like this.
This will enable you to save some time on importing, and lower the file size at the same time.
Lowercase Lump Names
The last fifteen frames in that list all have lowercase letters in them. That means that it's going to have to look like this:
PLAYa1 PLAYa2a8 PLAYa3a7 PLAYa4a6 PLAYa5
Most WAD editors now support lowercase lump letters, though the feature may be turned off by default. Both XWE and SLumpEd, two very popular WAD editors, support this in newer versions. If you would like to know how to turn this feature on, check the XWE Tutorial or SLumpEd Tutorial to adjust the settings. Also, it is worth noting that this applies to the last 15 frames, the "Falling 2", "Tails Pickup" frames, "Life Monitor" frames, "End Sign" frames, and "Super Transform" frames. The first fifteen frames, "Standing", "Boredom Frame 1", "Boredom 2", "Walking", and "Jumping" are all supposed to use capital letters. The character will not work correctly if these lumps do not use lowercase letters.
About the Palette
In SRB2, the
STARTCOLOR determines what colors can change in multiplayer mode. The value for the value correspond to the colors in the palette. The
STARTCOLOR value is what determines which color along the palette is the startpoint for the color change and automatically ends 16 colors ahead of it. So, if a character is green (such as Sonic and Tails are in sonic.plr & tails.plr), and the green color is what is meant to change, then the
STARTCOLOR value would be 160. So, using the example above, green colors, if
STARTCOLOR is 160, the end value can not be more than 175.
It is not required that
STARTCOLOR use a line of colors. Two sets of colors can be used, as long as they are within 16 values of
STARTCOLOR. For example, with a blue character, having
STARTCOLOR with a value of 232, and end with 247, the color cyan, 247, will change as well. However, SRB2 will treat them as if they are all along the same line of color, so making a character use green in a multiplayer game will cause both the blue and cyan colors to turn green.
Lastly, characters are capable of having extra sounds. These sounds are either played when the character does something (such as jumping), or when the player activates a sound (such as taunts). The following is a list of sounds that SRB2 has for its regular characters, Sonic, Tails, and Knuckles:
|dsspin||Sound when Sonic goes into a spin while moving|
|dspudpud||Tails tired from flying|
|dsthok||Sound effect used for Sonic's Thok|
|dsradio||Little "ding" when you message a player|
|dsgasp||Grabbing a bubble|
However, adding any sounds to the character WAD with those names would overwrite the ones SRB2 has by default. But there is a way to add custom sounds without replacing the ones SRB2 has. If the sounds in the character WAD are given a different name, then they can be used, but they must be directed to do so in the S_SKIN. Here is an example from the old Zim.dta, a nicktoon character that was remade for SRB2, but has since been removed:
dsspin = dszspin dsputput = dszput dspudpud = dszpud dsspndsh = dszdash dszoom = dszzoom dsradio = dsztalk dsgasp = dszgasp dsjump = dszjump dstaunt1 = dsizim01 dstaunt2 = dsizim02 dstaunt3 = dsizim03 dstaunt4 = dsizim04 dsaltow1 = dsizim05 dsaltow2 = dsizim06 dsaltow3 = dsizim07 dsaltow4 = dsizim08 dsvictr1 = dsizim09 dsvictr2 = dsizim10 dsvictr3 = dsizim11 dsvictr4 = dsizim12 dsaltdi1 = dsizim13 dsaltdi2 = dsizim14 dsaltdi3 = dsizim15 dsaltdi4 = dsizim16
Notice how not all the available names have been used. This is because SRB2 does not require all the options filled, only the ones that have been added.