Manual page for PLAYER(5)
player.config - player configuration file for crock
file contains entries that specify certain character specific parameters,
the locations of bitmaps and sound files, the definitions of moves and
There are four sections to the player config file:
variables, bitmaps (and sounds), moves,
Each command is terminated by a newline.
Lines that begin with a hash sign
are interpreted as comments and are ignored, as are blank linkes.
Variable entries have the following form:
set variable value
can be one of the following:
to set the global width of the character
to set the version of the config file format.
The only valid values are:
Obsolate. Initial version of config file.
The current version of the config file, as described by this man page.
Specifies the path that should prefix all bitmap and bitmask file names.
Note that if the environment variable CROCKROOT is defined, it is prepended
to all filenames, before the pathprefix. This allows the pathprefix to
refer only to directories within the crock distribution (or an alternative
set of directories).
Specifies the suffix that should be added on the end of all bitmap
file names. Typcially ".xbm".
Specifies the suffix that should be added on the end of all bitmap mask
file names. Typcially ".m".
Specifies the suffix that should be added on the end of all sound
file names. Typcially ".wav".
Specifies which direction the player is facing. Legal values are
"left" and "right".
Specifies how far a player moves with each step to the left or right.
Obsolete. Specifies the flag values initially for the character.
This value would be the sum of all the special move attributes that
the character should initially possess. The idea being that certain
special moves would require a certain amount of "experience" to be
gained before they could be used. Support for this feature was removed
from the code due to the tediousness of keeping it in sync with the
special moves. No support for adding attributes was implemented.
is a symbolic or numeric value, depending on the variable set.
- Bitmap loading entries have the following form:
load tag filename xoffset yoffset offense_zone,
head_zone, mid_zone, low_zone
is the "tag name" or nickname of that image. The
is used to refer to the bitmap when defining moves.
is the full path to the X bitmap file. This is for both the
bitmap image and the bitmap mask. The actual filename to load
is constructed by taking the
to it and adding
to it (for bitmaps and bitmap masks, respectively).
are numeric offsets for the image in pixels from the upper left corner
of the window. Note that these must be determined and calibrated, because
different frames have
widths and heights, since each is cropped to reduce space utilization.
The perl scripts
can be used to determine the offsets and uniformly change the offsets
respectively. If the global
values are changed, the bitmap offsets must be changed as well.
offense_zone, head_zone, mid_zone,
all have the same form:
- xhigh yhigh xlow ylow
these form the boundary line for that zone. Note that the comma
is required to separate each zone definition.
represents the area of the image that is attacking, such as the
first in a punch or foot in a kick. If the move is not an attack
then it should be defined as: "-1 -1 -1 -1,".
represents the area from the top of the head to the neck and is used
to determine if an attack hit the head. If there is no head zone
present, perhaps due to an unusual crouch or doubling over, then it
should be defined as "-1 -1 -1 -1,".
represents the area from the neck to just below the torso (typically
approximated around the mid-thigh region) and is used to determine if
an attack hit the mid section. If there is no mid zone present, then
it should be defined as "-1 -1 -1 -1,".
represents the area from just below the torso (around the mid-thigh)
to the bottom of the feet and is used to determine if an attack
hit the legs and trips the fighter. If there is no low zone present,
perhaps due to a jump, then it should be defined as "-1 -1 -1 -1". Note
that there is no comma after the low zone definition.
- Also note that if a frame is defined as being "invulnerable",
then all three vulnerable zones,
should be defined with -1's. A fighter is "invulnerable" while
recovering from an attack (e.g., getting knocked down and then
standing back up), losing, wining, etc.
- A varient of the
command is the
command which allows a new mask to be associated with an image that
has already been loaded. It has the following form:
load originaltag tag filename xoffset yoffset
offense_zone, head_zone, mid_zone, low_zone
is the tag name of the already loaded bitmap image to use for the frame.
Note that only the new mask will be loaded from disk.
- All other fields are exactly the same as the
- The final loading command is the
command which loads in sounds. It has the following form:
soundload sound_tag filename
is the "tag name" or nickname of that sound. The
is used to refer to the sound when defining moves.
is the full path to the sound file. The actual filename to load
is constructed by taking the
to it and adding
to it. Note that it may be necessary to change the
variable before this command, if the sounds are in a different
directory than the images.
- Moves definitions are multiline commands formed by specifying
the move name and attributes and all of the images that comprise it.
Moves are defined as follows:
define movename damage xoffset yoffset flag
[ ... ]
is the name that the move is called.
to be defined. Refer to section XXXXX for a complete list.
is used when binding a key to that move. Refer to the definition of
for more details.
specifies how much damage the move does. Players strength start at 100
and go to zero. Blocked moves do one quarter the damage of undefended moves.
specify the force imparted by the attacker to defender when they receive
an unblocked hit. This can be used to knock the defender back or in the air.
specifies if this move has any special attributes. A value of 0
indicates that it is a normal move. A non-zero value causes
to call a code to handle the move. Note that unfortunately, much
of the code must be custom written for that move. Refer to the
for a list of all the legal values of
In addition, special moves have been defined (currently) as bitfields,
so the values tend to get large, since each value must be twice that of
the previous. This may change in a future version.
- If there is a sound to be associated with that move (and played
when it is invoked) then the line immediately following the
command must be a
is the tag associated with the sound that was loaded with the
- After the optional
line, there are zero or more instances of the
line, which specifies the frames, in order, to use for the move.
is the tag associated with the image that was loaded with the
is the delay or number of "ticks" associated with that frame. A larger
number holds the player in that pose for a long time, a small number
makes a quick move. "ticks" is a game dependent time unit and is
currently defined to be 100,000 microseconds.
- The move definition is terminated by the
- Keybindings associate keys to the move names and have the following form:
is the name of the move as specified with a
specifies they key bindings to be used for that move. The key
bindings follow the X key translation conventions (refer to XXX
Here is a trimmed down version of the config file currently used by crock.
Note that the only difference is that the real version has more backgrounds
# PHASE I:
#Set up some variables. Format
# is: set varname value
set version 2
# path to look for bitmaps
set pathprefix /n/weather/0/frank/frames/done-golden/
set bmsuffix .xbm
#bitmap mask suffix
set bmmsuffix .m
#sound file suffix
set sndsuffix .wav
#character is facing right or left
set face right
#width (approx. max) of character
set width 230
# size of step he takes
set stepsize 25
# PHASE II:
# Load in bitmaps
load ts0 s0 0 90 -1 -1 -1 -1, 122 12 119 58, 119 58 134 150, 134 150 155 264
load ts1 s1 0 90 -1 -1 -1 -1, 127 12 118 53, 118 53 138 160, 138 160 174 268
load ts2 s2 0 90 -1 -1 -1 -1, 100 13 100 59, 100 59 118 158, 118 158 166 263
load tw0 walk0 0 90 -1 -1 -1 -1, 115 16 101 57, 101 57 132 163, 132 163 183 263
load tw1 walk1 0 90 -1 -1 -1 -1, 142 14 137 53, 137 53 160 162, 160 162 200 263
load tw2 walk2 5 105 -1 -1 -1 -1, 143 13 137 54, 137 54 156 165, 156 165 183 271
load tw3 walk3 0 70 -1 -1 -1 -1, 115 14 103 52, 103 52 120 167, 120 167 149 275
load tw4 walk4 0 90 -1 -1 -1 -1, 125 18 108 56, 108 56 134 154, 134 154 158 264
load tlj0 lj0 -20 80 -1 -1 -1 -1, 115 16 109 56, 109 56 138 171, 138 171 176 271
load tlj1 lj1 -10 80 188 34 204 54, 110 17 107 57, 107 57 134 174, 134 174 169 274
load tlj2 lj2 5 80 224 29 225 25, 121 12 114 50, 114 50 145 172, 145 172 175 269
load tlj3 lj3 -20 85 -1 -1 -1 -1, 98 11 92 52, 92 52 121 162, 121 162 163 264
# load a sound into the audio server (if present)
set pathprefix /n/monster/1/remcon/frank/sounds/
soundload low hmmm
# PHASE III:
#define a move
define stance 0 0 0 0
define leftjab 10 10 0 0
define moveleft 0 0 0 0
define moveright 0 0 0 0
# PHASE IV:
#bind a move name to an action.
bind leftjab <Key>KP_Add
bind quit <Key>q
bind moveleft <Key>Left
bind moveright <Key>Right
Copyright (c) 1994 Frank Adelstein
Created by unroff & hp-tools.
© by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97