Source:Sanctuary notes
This page is a verbatim reproduction of original source material and should not be edited except for maintenance. | |
Description |
Author's notes, comments, and solutions for Eamon adventure #204, Sanctuary. |
---|---|
Source |
The BASIC files "COMBAT NOTES" from the original game disks |
Date |
September 1989 |
Author | |
License |
It is believed that the use of this copyrighted item in Eamon Wiki qualifies as fair use under the copyright law of the United States. |
Combat notes
This program explains the combat system employed in this game from a technical point of view.
The combat system is closely tied to the new encumbrance system, and the two form an "Advanced Combat & Encumbrance" ("ACE" for short) system that was first employed, in rudimentary form, in The Boy and the Bard and appears more completely in Sanctuary.
However, the system was (and is being) developed independently from these adventures, and was modified or reduced for their particular needs. These notes address the system itself and therefore may describe features and code that are not apparent or do not exist in Sanctuary.
The central, major change to previous combat systems, around which all the other changes revolve, is the basing of hit scoring on a series of damage level breakpoints determined by the type of armour worn by the defender. These damage levels (quality of hit) then determine the number of "dice" of damage done. Thus, making contact (hitting) and the calculation of damage (dice & sides) are not separate calculations as they are in previous systems, but are instead closely related.
In general, "ACE" involves changes or special code in four areas: character conversion, artifact fields, monster fields, and the attack routines of the main program.
Character conversion
The major disadvantage of this system is that it is not compatible with old systems and with the current structure and fields of the character record. Thus, the data in the Fresh Meat file must be converted into data, fields, etc. that are used by "ACE". Because of the plot of Sanctuary, this was not too much of a problem, since the character loses most of his weapons and his shield. Thus, Sanctuary's coversion is largely rigged and many values and stats are simply assigned arbitrarily.
Ideally, character conversion would be standardized like the rest of the "ACE" system. However, the character record is just too different for this to be possible. The only way to solve the problem would be to convert the Main Hall, character creation, character record, Fresh Meat file, etc. to support "ACE". The new master disk would need to support things like the new weapon types, shield skill, and weapon data.
While I strongly believe that a major overhaul of Eamon combat is needed to rejuvinate combat and restore it as an important and exciting part of the game, instead of a familiar, boring, tedious thing you do between solving puzzles, I realize that making major changes to the Eamon system is too much to ask and would be imposing upon other authors. Therefore, the problem of character conversion will always exist and will always involve a certain amount of tinkering with the character and arbitrary value assignments. I think that the positive things that "ACE" brings to the game far outweigh this disadvantage, but it is nevertheless an enduring concern of mine.
Anyway, here's how the latest version of "ACE" handles character conversion, though it is still evolving:
First, artifacts for armour and shield are created. At this point, there is no code for armour expertise, because the penalties assigned under the old system would severely affect the character in the new system. To effectively include armour expertise (and it's not that I have something against it) would require changes in the master disk. Shield skill will probably be arbitrarily assigned or will be made from an average of two or three weapon abilities plus an arbitrary bonus.
Next, while hardiness (HD) is not changed, M%(0,1)
is adjusted to make sure hardiness is in the ballpark of a tough but not super humanoid. Thus, M%(0,1)=HD
if HD < 19, +1 for HD 19-22, +2 for HD > 22.
M%(0,2)
is the character'sstrength bonus (if any), which is equal to the bonus for HD. The character gets +10 to maximum carrying weight or +20, according to the same ranges.
M%(0,3)
is the character's agility bonus, which is +5 for AG 19-22, and +10 for AG > 22. The agility bonus is added to the offensive bonus of all attacks, and also serves as the char's natural defensive (dodging) odds, M%(0,7)
.
I am considering increasing the bonuses to M%(0,1)
in order to give characters who depend upon their HD a better survival chance and better representation.
Normal Eamon weapon types are axe, bow, mace, spear, sword. "ACE" weapon types are edged (slashing, hacking weapons), blunt (crushing, bludgeoning), thurst, thrown, projected (bows, slings, etc.). I am not currently decided on whether or not to do a straight conversion or average a few of the old fields into the new ones (like axe+sword/2 = edged) or do something else. Converting weapons is the biggest problem and will probably be handled in individual ways unique to particular adventures. The main problem is converting dice & sides to damage bonus, as well as converting types.
Anyway, in one way or another the character gets converted. Before I go into the attack routines, it is necessary to explain the changes to artifact and monster fields.
Artifact field modifications
All weapons are artifact type 2 (A%(A,2)=2
) and shields are type 3. There is no "magic weapon" type because there is no longer a "break weapon" fumble, which, personally speaking, has ruined a lot of my adventuring over the years and I don't think anyone else will miss it either. In the future I hope to expand the system so that just about anything could be used as a weapon or shield, but this is not currently supported.
For weapons, A%(A,5)
is type:
- edged
- blunt
- thrust
- thrown
- projection
- ammunition (arrows, darts, etc.).
A%(A,6)
is the offensive bonus/penalty. A%(A,7)
is the damage potential bonus/penalty of the weapon, usually a number between -3 and +1, or +2 for a two-handed weapon. A magical sword with a bonus of +5 would be an extremely powerful weapon. A%(A,8)
is number of hands needed to ready it. Some two-handed weapons can be used withone hand, at a penalty. These weapons have A%(A,8)=1.5
.
For shields, A%(A,5)
= coverage, or size, which is the bonus to blocking ability. A%(A,6)
is composition, i.e. wood, covered wood, metal. A%(A,7)
is its strength, which figures in shield breaking. A%(A,8)
, #hands, is almost always 1.
Monster field modifications
M%(M,2)
= original number in group
M%(M,14)
= current number
M%(M,6)
= size. This field does not directly affect defensive odds; do% already take into account size. Size has its own field because it can be used to reduce (or eliminate) the likelihood of a critical hit. This is helpful for large monsters, magical monsters, etc. Negative values represent large size, usually -1 to -10 (biggest). Positive values do not increase crit hit chances and can be used for other things by the designer.
M%(M,7)
= natural defensive odds, (NDO%
). NDO% represents size, speed, and magical/special factors — invisibility, etherealness, etc. Most animals will have NDO%
, some in the range of 40-60 (very small, very fast).
M%(M,8)
= combat defensive odds, (CDO%
). Positive values of CDO%
represent parrying ability. Negative values represent shield use. Few monsters will actually have a shield artifact, so they do not have their shields broken.
M%(M,9)
= armour class and armour protection. These are two different things but are represented by the same variable.
M%(M,10)
= attack type. This triggers the appropriate battle verbs in combat. It also determines if the monster's attacks can be parried or blocked with a shield. I would also like to use this field to indicate special attacks, like +100 for poison, +200 for breath weapon, and so on for spells, life drain, etc. This is not currently supported but can be added if needed.
M%(M,11)
= offensive bonus. As you know by now, "ACE" does not go by base offensive odds or comparative agility.
M%(M,12)
= damage potential bonus.
Attack routines
OK, how do attacks work? When the character attacks, a few things have to be taken care of to make him look like a "regular" monster so that the attack routines in lines 7500-7799, which all attacks use, will function.
The program uses the artifact in the character's right hand as his "ready weapon." M%(0,11)
(offensive bonus, or OB) is set to skill with weapon type + weapon's OB + agility bonus (M%(0,3)
).
M%(0,12)
= strength bonus (M%(0,2)
) + weapon's damage bonus (A%(A,7)
).
M%(0,10)
— attack type — is set according to the type of weapon used. If the character is using a melee weapon, and the defender's attack type permits it, the character's combat defensive odds (M%(0,8)
) is set equal to his offensive bonus (M%(0,11)
). If the character has a shield in his left hand, then the character gets negative combat defensive odds equal to -(shield ability + SH. Size + AG bonus). A shield can block a few types of attack that can't be parried, but there are still some that can't be blocked.
M%(0,8)
is halved if there are two opponents, and is cut in three if there are three or more opponents.
I am skipping over ranged combat because I am still working on it. Unarmed combat does exist; it automatically kicks in if the character's right hand is empty, "RH=0". Artifact zero is "empty hand", which is a blunt weapon with +15 OB and -4 DPB. Unarmed combat uses the "punch/kick" attack verbs.
OK, now the character's fields are set up, and the attack goes to the main attack routines, lines 7500-7799. At this point the program acts in terms of "OF" and "DF".
First, offensive bonus (OB)=M%(OF,11)
and DPB (damage potential bonus) = M%(OF,12)
. Next, the attack message is printed, according to the attack type (M%(OF,10)
). There are three verbs for each type and they progress in order until they repeat. Hostile monsters may attack with surprise if their status (M%(OF,15)
)=5. In this case, they are unidentfied, they score an automatic (but minimum hit), and then lose their surprise.
Next, AC (Armour Class) = M%(DF,9)
. AC 0 is no armour, AC 1 is light leather, AC 2 is heavy leather/studded, AC 3 is metal. If M%(DF,9)
>3 then AC=3. It is now that the damage levels (DL%(1-4)
), the breakpoints for the different qualities of hit, are set. The base values are for no armour, and are adjusted for other types all in one line. DL%(1)
is the minimum modified roll needed for a hit, a light hit. DL%(2)
is the minimum for a medium hit, DL%(3)
— serious hit, DL%(4)
— critical hit (instant kill). DL%(4)
is adjusted by 5 for every -1 of size. A size of -7 or greater effectively neutralizes critical hits even for AC 0.
The damage levels look like this:
DL%(1) | DL%(2) | DL%(3) | DL%(4) | |
---|---|---|---|---|
AC0 | 75 | 75 | 90 | 115 |
AC1 | 70 | 80 | 90 | 125 |
AC2 | 65 | 85 | 95 | 130 |
AC3 | 60 | 85 | 105 | 135 |
As you can see, the heavier the armour, the easier it is to make contact, but the harder it is to score more serious hits.
Now comes the random roll (RR
) of 0-99. This becomes a modified roll: MR = RR + OB
, - M%(DF,7)
if the defender has negative defensive odds for being big, slow, whatever.
If the MR already falls below DL%(1)
, then the attack is simply a poor one, the message "---a miss" appears, and the attack ends. Surviving this, the character's encumbrance penalty is subtracted from MR if the attacker is the character, and if the MR now falls below DL%(1)
, the attack fails and "---too slow!" appears. Surviving this, the defender's NDO%
(M%(DF,7)
) are subtracted. If the attack fails now, it is "---dodged!"
Next, the absolute value of the defender's CDO%
are subtracted, and if the attack fails now, it is either "---parried!" or "---blocked!" Depending on the sign of M%(DF,8)
. If the character is defending with a shield the program checks to see if the monster breaks or damages his shield.
If the attack is still alive at this point, it goes to the damage routines, starting at 7600. Here the final MR is compared against the damage levels to determine the type of hit, light (minimum), medium hit, serious hit, critical hit. The variable HT
represents these levels; HT
=1, 2, 3, or 4. If HT
=4, then regardless of the weapon or the monster's armour, the routine prints "---a critical hit!" and goes to 7700 for the instant kill.
Depending on HT
, the message "---a hit!" or "---a good hit!" or "---a solid hit!" is printed.
Damage is determined in line 7620. S
= sides of the die, which is normally six. If the attacker's DPB is negative, the sides are reduced. Thus, a dagger, DPB = -2, has a 4-sided die. The die is then "rolled" for a random damage determination, and the DPB, if positive, is added. Then, for each level of hit above 1, a full die of damage and another DPB (if positive) is assessed.
From this total damage is subtracted M%(DF,9)
; thus, if the monster has an armour of 100, it is counted as AC 3, but it will be impossible under normal conditions to hurt it. If the damage has been reduced below 1, the message "absorbed by armour" appears and the attack ends, although you can put in special attacks here that merely need totouch the defender to take effect.
Some examples of damage ranges: attack "A" is with a broadsword, DPB=0; "B" is a dagger, DPB=-2; "C" is a 2-handed sword, DPB=+2; "D" is a stomping mumak, DPB+4 (better get out of the way!)
AC0 | AC1 | AC2 | AC3 | |
---|---|---|---|---|
A: | ||||
HT=1 | 1-6 | 0-5 | 0-4 | 0-3 |
HT=2 | 7-12 | 6-11 | 5-10 | 4-9 |
HT=3 | 13-18 | 12-17 | 11-16 | 10-15 |
B: | ||||
HT=1 | 1-4 | 0-3 | 0-2 | 0-1 |
HT=2 | 5-8 | 4-7 | 3-6 | 2-5 |
HT=3 | 9-12 | 8-11 | 7-10 | 6-9 |
C: | ||||
HT=1 | 3-8 | 2-7 | 1-6 | 0-5 |
HT=2 | 11-16 | 10-15 | 9-14 | 8-13 |
HT=3 | 19-24 | 18-23 | 17-22 | 16-21 |
D: | ||||
HT=1 | 5-10 | 4-9 | 3-8 | 2-7 |
HT=2 | 15-20 | 14-19 | 13-18 | 12-17 |
HT=3 | 25-30 | 24-29 | 23-28 | 22-27 |
This damage is added to M%(DF,13)
, and you know the rest.
That covers the basic routines. "ACE" also handles lines 300-500 a little differently, although I am trying to arrange the basic structure like DDD 7.0.
For one, you can give a monster negative status (M%(M,15)
=-whatever) and for each point, the monster is inactive for a round. While it is inactive, it can be attacked with its defenses down, +20 to MR and no defensive odds.
At this point, no more than five members of a group may attack in one round, although this may go up to 8 to reflect DDD 7.0. Actually, I will probably keep it at 5 unless there are lots of good guys and bad guys going at it, in which case more attacks should take place each round. The adjustment to 300-500 involves defender determination. It is an attempt to more evenly spread combat out amongst the combatants while still reflecting the fact that some groups will be closer to the front and therefore be more likely to be attacked.
GG = number of good guy groups; G2 = total number of good guys. BG and B2 reflect bad guys. If GG = 2, then the base chance that the character will be attacked is 60%; the other 40% of the time, the ally is attacked. The change of the character being attacked goes down to 40 if there are two allies, and down to 30 for three or more. When the bad guy attacks, a roll is made, and if the roll falls below the character's chance, the character is the defender, and off we go. If not, then a loop checks all the remaining good guy groups in monster order, and for each group there is a 70% chance that that group will be attacked. If the group is the last remaining group, the chance is 100. When designing allies, you can number them according to who is likely to be up front and who is going to stay behind; weak allies who are important should be in this category.
When good guys attack bad guys, the first bad guy group has a 70% chance to be attacked, followed by the next, etc.
That's about it. I'd appreciate any comments, suggestions, etc.