---------
 ZDAEMON	(v1.00)
----------

---------------------------------------------------------

An explanation of how to assemble skin pWADs for ZDaemon 

---------------------------------------------------------
 
Originally Written by Denis Fabrice for Doom Legacy (skinspec.txt)
Last updated 25-Aug-1998

Edited by Slayer1 and Myk Helnyte for ZDaemon (14/15-Jun-2001)

===========================

CONTENTS

A) overview
B) implementation
C) example
D) technical blurb
    1. skins and sprites in the pwad
    2. same resource names in different pwads

===========================

[A] OVERVIEW

Let's first have an overview of the parts that define a Skin:

S_SKIN: Each skin in a pwad is identified by a 'skin marker': this is a resource by the
name 'S_SKIN'. The resource contains data in the form of a text file, which describes
what is replaced by the skin, and gives the name of the skin.

SKIN SPRITES: A skin is basically a sprite replacement for the player avatar. ALL the
frames of the player sprite must be replaced : this includes the normal walk, attack,
and pain sequences, as well as the death and the "gib" sequences.

SKIN FACE: Although the status bar face is viewable only by the player who uses the skin,
it may be replaced in order to be consistent with the player character appearance. Like
the sprites, ALL the face graphics need to be replaced, if some are not defined, an error
will occur.

SKIN SOUNDS: To make it more fun, a skin can have a set of up to 10 sounds replaced, these
are called the 'skin sounds'. Skin sounds are replacements of a set of the original Doom
sounds, which are given out only by the skin that defines them. All the sounds need not be
replaced.

===========================

[B] IMPLEMENTATION

Now on to implementations:


  S_SKIN RESOURCE FORMAT: The content of S_SKIN is just a simple ASCII text file.

  If you put more than one skin into a wad file, there are effectively multiple resources
  of the same 'S_SKIN' name. If this is a problem you can add any characters after the
  'S_SKIN' characters, so that your wad editor doesn't complain. Example: S_SKIN1,
  S_SKIN2, and so on. ZDaemon will search only for the first 6 characters.

  Format of the text file:

   // comments start with '//'

   name = <skin_name>       <- Gives the name of the skin. A maximum of 16 chararacters
                               may be used (and NO SPACES).

   sprite = XXXX            <- identifies the sprites to use for the skin. Up to 4
                               characters. Sprite names are optional (see the example
                               below for details).

   face   = XXX             <- identify the status bar face graphics to use for this
                               skin. If you include a new face, its name MUST be 3
                               characters long.

   dsouch   = dsXXXXXX      <- replaces one of the 10 player sounds with a new sound.
   dsplpain =                  The new sound name MUST start with 'DS'
   dspdiehi =
   dsoof    =
   dsslop   =
   dspunch  =
   dsradio  =
   dspldeth =
   dsjump   =
   dsouch   =



===========================

[C] EXAMPLE

Here's a sample of a text file that you could have into the S_SKIN resource:

  // Homer Simpson skin by Mr. Skinner mail me skinner@springfield.com
  name = homer
  sprite = HOME
  face = HOM
  dsouch = dshoouch
  dsplpain = dshopain
  dsslop = dshoslop

As you see each line looks like: <variable> = <value>

Let's study each line, one by one:

  // Homer Simpson skin by Mr. Skinner mail me skinnner@springfield.com

This is just a comment line. Comments start with '//'. Use comments to put author
information or any other specifications. The comments are not displayed anywhere in the
game, but they may be useful if someone edits your pWAD, they'll know where it comes from
and who designed it.

  name = homer

This tells that the skin name is 'homer'. The skin name is displayed in the Player Setup
menu (in the game). It is also required if you use the skin cvar, in the console. To
change it you would go to the console and type: skin homer. It's easier to use the Player
Setup menu, though.

The skin name must be UNIQUE : if there are two skins with the same name in a pWAD, or if
the names of the skins in different pWADs loaded coincide (even if their resources are
different), only one of the skins will be used.

Attention: the name can't have spaces in it. For example a name like 'blues brothers' will
not work correctly.

  sprite = HOME

Tells the name of the sprite to use for the skin. Sprites in DOOM use only 4 letters, the
original player sprite is PLAY. The line above tells ZDaemon to look for HOMEA1 instead
of PLAYA1, HOMEA2A8 instead of PLAYA2A8, etc.

Renaming the sprites isn't necessary. If a sprite name isn't given, ZDaemon will look for
the first lump after the S_SKIN resource, and will read its name and use it as the sprite
name, searching for other sprites with the same name. Here's an example:

  S_SKIN
  HOMEA1
  HOMEA2A8
  HOMEA3A7
  HOMEA4A6
  etc.

You will want to rename the skin sprites only if your WAD editor requests that all
resources have a unique name, or for the sake of editing clarity.

Note: ALL the frames of the player sprites must be replaced.

  face = HOM

All the names of the status bar face graphics resources in the DOOM iWADs start with STF
(STFST01, STFGOD0, STFDEAD, etc.) This line simply gives the 3 characters to use in place
of STF. So in this example ZDaemon will look for HOMGOD0 instead of STFGOD0, HOMST01
instead of STFST01, and so on.

Attention: the resources STPB1-STPB3 are not used by ZDaemon. ZDaemon just uses STFB0 and
remaps the green color to the color of the player, just like it does for the sprites.

Note: unlike the sprite name, you MUST use the face name in order to change the status bar
face graphics. Also, remember that you must replace ALL the status bar face graphics, that
is: provide a replacement for all the resources that start with STF.

 dsouch = dshoouch
 dsplpain = dshopain
 dsslop = dshoslop

These lines give the sounds to use for that skin in particular in place of the game's
original sounds. Up to 8 sounds can be replaced, the sounds are related to the player
actions:

  DSOOF
  DSNOWAY
  DSPLPAIN
  DSPLDETH
  DSPDIEHI
  DSSLOP
  DSPUNCH
  DSRADIO

For each sound to replace, use a line like:

<original_sound_name> = <new_sound_name>

Any of the 8 sounds can be replaced, or all of them. The sounds that are not replaced
will sound just like the original ones. The replacement sounds don't have to be new, you
can use any sound from the game. For example, if you create an imp skin, you could replace
the player sounds with the imp sounds.

===========================

[D] TECHNICAL BLURB


1) Skins and sprites in the pWAD

If you have a wad with skins AND other sprite replacements, make sure you use S_START,
S_END sprite section markers so that the skin sprites are not replacing the default player
sprites, in case you use 'PLAY' for the skin sprites. If the PLAYxxxx skin sprites are
NOT within the sprites section markers, they will not be mistaken as the default player
sprites.


2) Same resource names in different pWADs

To make it clear; ZDaemon will add skins WAD PER WAD. This means it's not a problem if
there are resources with the same name in different pWADs. The support for S_SKINxx, where
XX is any character, is just because some WAD utilities don't like multiple resources of
the same name. You could, for example, use the same sprite name for several different
skins and place them all in the same pWAD, if they are delimited by skin markers (S_SKIN).
