(This is all unconfirmed information)
This directory contains all the relevant data for enemies. Each enemy has their own subdirectory in which there will usually be one graphic file and one txt file describing the enemy.
All enemies who are used in the game are listed in enemy.txt in the StartData directory. Enemies who are not listed there can not be used in the game.
Enemy.txt itself is just a list of the internal names of the enemies. These names are very important for the Enemy directory:
The following information has been extracted freely from comments in the files and observations. As such, there may be mistakes in this, so please use this with caution and make all mistakes publicly known so they can be corrected.
Blank lines seem to be ignored, so they can be used to structure the file.
Semicolons (';') mark comments. Everything to the right of a semicolon is ignored.
Usually, you have one declaration or one command per line. This may be followed by any amount of additional spaces and a comment marked with a semicolon as suggested above.
The first declaration is usually of the form
namej = ???
The next block of declarations are usually the following statistic declarations ("???" is always a decimal number in this block):
maxHP = ??? : The maximum HP the enemy has at level 1. Enemies start combat with their current HP equalling their maximum HP and they die/disappear when their HP reach 0. pow = ??? : This is probably power, so probably the enemy's strength. If that is the case, it should influence melee combat. con = ??? : I assume that this is constitution, so it would probably influence the amount of damage taken from a physical attack. agl = ??? : This is probably agility, so it might be about hit probability and dodging. mgc = ??? : This could be magic, and would then be linked to effectiveness of spells cast by that character. min = ??? : I believe this could be mind and it might be linked to guarding against spells. chm = ??? : This may be charisma. If that is the case, it is probably needed for charm attacks.
These values will be used if the enemy appears as a level 1 character.
When the enemy is encountered at a level higher than 1, for each level above 1, certain amounts are added to her basic statistics (for the basic statistics, see the previous section). This next block defines exactly how large these amounts are (they are fixed without any variation):
maxHPup = ??? :The maximum HP of the enemy are increased by this value for every level she has above the first. powup = ??? :The pow statistic is increased by this amount for every level above the first. You can use floating point numbers like "0.3" in order to have increases that do not take place every level (values are rounded down in the result). conup = ??? :The con statistic is increased by this amount for every level above the first. aglup = ??? :The agl statistic is increased by this amount for every level above the first. mgcup = ??? :The mgc statistic is increased by this amount for every level above the first. minup = ??? :The min statistic is increased by this amount for every level above the first. chmup = ??? :The chm statistic is increased by this amount for every level above the first.
I am not sure about the function of this, but it might be related to the speed bar. However, more information is required.
Its format is
mtrchg = ???
I am not sure about the function of this, but I think it may be charm resistance. However, this is only speculation, so further information would be appreciated.
Its format is
chmrst = ???
The next block lists how well the character resists against various damage types.
The declarations in this block all have the pattern
rst_[Damage Type Name] = ???
The next three declarations seem to indicate the amount of the rewards gained for defeating the enemy. While gold is very easy to understand, the reason for having two exp values is not known to me. The three declarations are as follows ("???" being a numeric value):
exp1 = ???
exp2 = ???
gold = ???
This seems to be a flag allowing for either 0 or 1 for its parameter, but its function is not clear to me. Its format is:
trgsel = ???
The next section of the file usually consists of blocks defining the various animations for the enemy. These blocks usually consist of a number of "anim_" declarations followed by a single "animloop_" declaration.
The declarations used are a bit more complex, which is why instead of "???", I will use "[description]" in order to name the different parameters. The square brackets are NOT part of the command but only mark my descriptions!
anim_[State Name]_[Animation Phase] = [x1],[y1],[x2],[y2],[frames],[x-offset],[y-offset]
Animations can only be defined for states defined in state.txt in the StartData directory. Each animation is made up of a number of animation phases, numbered continuously starting at 0 for each states. x1,y1 is the upper left corner and x2,y2 is the lower right corner of the clip of the enemy graphic file which should be used for the animation phase defined. "[frames]" provides the number of frames the phase should be on the screen before the next phase should be shown. The offset values are used if individual animation phases need to be placed at slightly different locations on the screen.
For each animation phase of each states, you need to have one "anim_" declaration and the numbering must be continuous for each states.
After defining the individual phases for a states, you usually define its loop behavior using the "animloop_" declaration. Its format is as follows:
animloop_[State Name 1] = [State Name 2],[animation phase]
"[State Name 1]" needs to be the name of the state for which the animation is being defined. "[State Name 2]", however, could be another state altogether. The "[animation phase]" must be a valid phase number within the animation definition for "[State Name 2]".
Animations work as follows: When an animation is invoked, its phase 0 is displayed for as many frames as its phase definition states. Then, the next phase is displayed, with phase numbers increasing by 1 for each phase. When there are no further phases left, the program looks at the "animloop_" declaration and jumps to the animation phase number "[animation phase]" within the animation for "[State Name 2]". If you want a certain animation to end in a static image, simply have "animloop_" point to the last phase within the animation, and have the static image as that last phase, of course.
Once you have defined the animations, you should define where the collision zone (or rather pixel) and body locations are for each state. This is done by means of the "pzdat" declaration:
pzdat_[State Name] = [x1],[y1],[x2],[y2],[x3],[y3]
x1,y1 are the collision coordinates, x2,y2 describe the location from whence missiles are launched, and x3,y3 are the location of the mouth.
The last section sets the skills which are available to the enemy and the frequency with which they are used.
Each definition consists of 2 lines which always have the following pattern:
sklnum = [skill name]
sklprb = ???
The "sklnum" declaration simply says which skill is being added to the list of skills available to the enemy. The name must be listed in the roster in skill.txt in the StartData directory.
The "sklprb" declaration takes a positive number as a parameter. The higher the number, the more likely the enemy is to use the skill during any combat turn.