Combat system - as requested by Damien
Posted: Wed Apr 18, 2001 2:21 pm
Damien asked me, to give some details and facts about the combat system.
I will not give the whole model behind the system, but a short glance to understand the complexity and relations.
It is NOT important, that you understand or even read this thing, to play the game. The server does all the calculations for you to shield you from this complexity.
Damage types
------------------
There are three types of damages. Each weapon causes damage in only one of these groups. The types are: concussion, slashing, puncture. Each weapon could be one or two handed or distance weapon (with "launcher" like bow or sling, or without, like throwing stars).
Each armor has a specific effectiveness against each of the damage types. Example:
A chain mail isn't very effective against puncture weapons, because a “needle” could pass the chains. It is more effective against concussion weapons, because it takes away some of the energy of the blow to move the chains.
Weapon statistics
---------------------------
Besides its damage type, each weapon has a few statistics:
- The attack strength within its damage type. It is the main modifier for the damage this weapon creates within a single strike.
- The defence strength. It modifies your chance of parrying a blow with your weapon. Shields in Illarion are similar to weapons. They have a small attack strength, because you can crush the shield against your opponent, and a high defence strength to parry. Shields are therefore concussion weapons.
- An accuracy. It modifies your enemies chance to parry the weapon.
- A range. Most weapons have a range of one field, but we could easily make the halberd reach two fields for example. The range of distance weapons like bows is determined by the sum of the bows and arrows range. That way we could create special arrows, that reach longer than others. This is also the reason, why bows don’t have a high range right now. We want to be able to increase the range, without shooting out of the screen.
- A Speed value. This determines how many strikes you can do in a given time interval.
If you don’t have a weapon in one hand, you will use your fist, which has the same attributes like the weapons.
Combat itself
----------------
When you engage someone in combat, your armor value for each piece of armor you wear is cumulated for each damage type. Then a check is made, if your opponent parries your blow. If not, the damage is calculated. Afterwards, your enemy has the chance to learn a little bit of parry (if he received any damage and it is not much higher than the attackers attack skill – this should disable people from rising their parry by standing in a crowd of monsters, that don’t harm them). You can also learn some of your weapon skill, but only to a level slightly above your opponents parry skill level.
The parry check
-------------------
Here the attacker and opponent are compared. The defender calculates a value with his weapons defence capability, his agility and parry skill and compares this to the attackers weapon accuracy, agility, attack skill and a random value. If the attackers value was higher, the damage is calculated.
The damage calculation
-----------------------------
The damage is determined in a formula, that combines the following attacker values:
Weapons attack strength, attack skill, strength, dexterity and a random value. The defenders constitution and armor are also considered.
The importance of the parameters differs from damage type to damage type:
Concussion weapons: more strength than dexterity
Slashing weapons: equal strength and dexterity
Puncture weapons: less strength than dexterity
The skills are the most important part in this equation: If you are fighting against an unarmored opponent and have highest strength, you do double the damage than a character with lowest strength. Same situation with highest and lowest attack skill would be 6 times more damage. Something similar applies to parry versus agility.
Our goals with this system
----------------------------------
- It shouldn’t be possible to rise your skills to maximum by fighting with monsters much below your strength (powergaming, often afk (away from keyboard))
- weapons and armor shouldn’t have only one attribute. There is no clear “this is the best weapon”. There may be a “this weapon is best against this opponent”
- It should be possible to teach a weak character fighting. The skills are more important than the base attributes (strength, dexterity…). For an untrained character the attributes still make the difference.
- Different weapons (damage types) should rely on different attributes (concussion more strength, puncture more dexterity….)
The part of the source code, that is handled every time one person does a strike against another is more than 600 lines of code. As you can see from this, it couldn’t be our goal to make it much more complex.
I will not give the whole model behind the system, but a short glance to understand the complexity and relations.
It is NOT important, that you understand or even read this thing, to play the game. The server does all the calculations for you to shield you from this complexity.
Damage types
------------------
There are three types of damages. Each weapon causes damage in only one of these groups. The types are: concussion, slashing, puncture. Each weapon could be one or two handed or distance weapon (with "launcher" like bow or sling, or without, like throwing stars).
Each armor has a specific effectiveness against each of the damage types. Example:
A chain mail isn't very effective against puncture weapons, because a “needle” could pass the chains. It is more effective against concussion weapons, because it takes away some of the energy of the blow to move the chains.
Weapon statistics
---------------------------
Besides its damage type, each weapon has a few statistics:
- The attack strength within its damage type. It is the main modifier for the damage this weapon creates within a single strike.
- The defence strength. It modifies your chance of parrying a blow with your weapon. Shields in Illarion are similar to weapons. They have a small attack strength, because you can crush the shield against your opponent, and a high defence strength to parry. Shields are therefore concussion weapons.
- An accuracy. It modifies your enemies chance to parry the weapon.
- A range. Most weapons have a range of one field, but we could easily make the halberd reach two fields for example. The range of distance weapons like bows is determined by the sum of the bows and arrows range. That way we could create special arrows, that reach longer than others. This is also the reason, why bows don’t have a high range right now. We want to be able to increase the range, without shooting out of the screen.
- A Speed value. This determines how many strikes you can do in a given time interval.
If you don’t have a weapon in one hand, you will use your fist, which has the same attributes like the weapons.
Combat itself
----------------
When you engage someone in combat, your armor value for each piece of armor you wear is cumulated for each damage type. Then a check is made, if your opponent parries your blow. If not, the damage is calculated. Afterwards, your enemy has the chance to learn a little bit of parry (if he received any damage and it is not much higher than the attackers attack skill – this should disable people from rising their parry by standing in a crowd of monsters, that don’t harm them). You can also learn some of your weapon skill, but only to a level slightly above your opponents parry skill level.
The parry check
-------------------
Here the attacker and opponent are compared. The defender calculates a value with his weapons defence capability, his agility and parry skill and compares this to the attackers weapon accuracy, agility, attack skill and a random value. If the attackers value was higher, the damage is calculated.
The damage calculation
-----------------------------
The damage is determined in a formula, that combines the following attacker values:
Weapons attack strength, attack skill, strength, dexterity and a random value. The defenders constitution and armor are also considered.
The importance of the parameters differs from damage type to damage type:
Concussion weapons: more strength than dexterity
Slashing weapons: equal strength and dexterity
Puncture weapons: less strength than dexterity
The skills are the most important part in this equation: If you are fighting against an unarmored opponent and have highest strength, you do double the damage than a character with lowest strength. Same situation with highest and lowest attack skill would be 6 times more damage. Something similar applies to parry versus agility.
Our goals with this system
----------------------------------
- It shouldn’t be possible to rise your skills to maximum by fighting with monsters much below your strength (powergaming, often afk (away from keyboard))
- weapons and armor shouldn’t have only one attribute. There is no clear “this is the best weapon”. There may be a “this weapon is best against this opponent”
- It should be possible to teach a weak character fighting. The skills are more important than the base attributes (strength, dexterity…). For an untrained character the attributes still make the difference.
- Different weapons (damage types) should rely on different attributes (concussion more strength, puncture more dexterity….)
The part of the source code, that is handled every time one person does a strike against another is more than 600 lines of code. As you can see from this, it couldn’t be our goal to make it much more complex.