Damage calculation

Content and general development discussion, including maps, quests, and server code from the development team.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Damage calculation

Post by Crush » Fri Dec 29, 2006 4:22 am

The posibility to attack other creatures is currently being implemented into TMWServ. So it is the time now to think about the damage calculation formulas.

How should damage be calculated? What aspects should affect the damage and in what way?

Exact formulas appreciated. Please don't spin off too much. Before making suggestions you should read the proposed Core game systems on the wiki (mainly attributes and skill system proposals).
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Post by Crush » Sat Dec 30, 2006 8:02 pm

Not many ideas yet.

I wrote a draft on the wiki about how damage calculation could work. I would like you to read it and say what you think about it:
http://wiki.themanaworld.org/index.php/ ... alculation
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Dr Wahl
Novice
Novice
Posts: 317
Joined: Sun Apr 09, 2006 7:15 am
Location: Washington
Contact:

Post by Dr Wahl » Sat Dec 30, 2006 8:24 pm

IMO, I think that physical strength should account for a large portion of the physical attacks. Weapons should also be a large chunk as well. A critical hit should be calculated in as well, maybe something like a %20 chance (for newly created characters), then things like restrictive armor (i.e. chainmail) might reduce the chance of a critical hit, and less restrictive armor (i.e. cotton shirt) might increase the chance of a critical hit. I plan on drawing up an entire formula, but I wanted to get this down on the forum first. Any comments?
Image
User avatar
Modanung
Knight
Knight
Posts: 1719
Joined: Fri May 20, 2005 4:51 pm
Location: Groningen, The Netherlands
Contact:

Post by Modanung » Sun Dec 31, 2006 12:33 am

I think strength, agility/swiftness and dexterity/precision should influence all attacks, but it depends on the weapon type how they do.
So something like the following:
Hammer damage = weaponlvl^(strength / weight) + hammer_skill + rand(0,precision) + rand(0,weight)^2
Axe damage = weaponlvl^(strength / weight) + axe_skill + rand(0,precision)^2 + rand(0,weight)
Sword damage = (weaponlvl * sword_skill) * (strength / weight) + rand(0,precision + swiftness)
Dagger damage = (weaponlvl * dagger_skill) * (precision/weight) + rand(0,swiftness) + strength
Bow attacks = (weaponlvl + arrowlvl) * bow_skill * precision + rand(0, strength)

On the other hand swiftness may also just allow for faster movement and shorter delays between attacks.
If you're looking for 3D FOSS games be sure to check out LucKey Productions on itch.io
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: Wed Sep 08, 2004 8:48 pm
Location: Espoo, Finland

Post by Rotonen » Sun Dec 31, 2006 8:17 am

I have no objections to elemental damage having healing properties on something that is mostly of the same element (probably a magically boosted player or an elemental).

Additionally biological damage should also be a side-effect of various other damagetypes. (You get hit by fire, you get a burn. You get hit by a hammer, you get at least a bruise if not bone damage. This should mostly apply to critical hits and could lead into critical critical hits.)
This message used to be meaningful.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Post by Crush » Sun Dec 31, 2006 1:10 pm

Rotonen wrote:I have no objections to elemental damage having healing properties on something that is mostly of the same element (probably a magically boosted player or an elemental).
When you are referring to the damage calculation of magical attacks in my article: When the caster has an element modifier of higher than 2 his attacks would heal every target. Not only those of the same element. But those of other elements would in fact be healed more. Sure you want that?

Beings that are so "elemental" that they are healed by attacks of the same element are possible, too. You just need a being with a negative elemental modifier.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Post by Crush » Thu Jan 04, 2007 1:26 am

Modanung wrote:I think strength, agility/swiftness and dexterity/precision should influence all attacks, but it depends on the weapon type how they do.
So something like the following:
Hammer damage = weaponlvl^(strength / weight) + hammer_skill + rand(0,precision) + rand(0,weight)^2
Axe damage = weaponlvl^(strength / weight) + axe_skill + rand(0,precision)^2 + rand(0,weight)
Sword damage = (weaponlvl * sword_skill) * (strength / weight) + rand(0,precision + swiftness)
Dagger damage = (weaponlvl * dagger_skill) * (precision/weight) + rand(0,swiftness) + strength
Bow attacks = (weaponlvl + arrowlvl) * bow_skill * precision + rand(0, strength)

On the other hand swiftness may also just allow for faster movement and shorter delays between attacks.
Although it sounds like a good idea to calculate the damage with a different formula for each weapon type you should keep in mind what a balancing nightmare it could become when the damage calculation formulas are that much different for every weapon.

So I think that every weapon should use the same damage forumla and the damage should depend on as few factors as possible. It just keeps the game simple, easy to understand and thus easy to balance.

Dexterity is for hitting
Agility is for dodging
Strength is for damage

I think we should stick to that.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: Wed Sep 08, 2004 8:48 pm
Location: Espoo, Finland

Post by Rotonen » Thu Jan 04, 2007 7:00 am

I'm for "blunt / sharp / pierce" instead of that multitude of weapon types. Simple enough and makes sense.
This message used to be meaningful.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Post by Crush » Thu Jan 04, 2007 5:40 pm

We could do the difference between blunt and sharp weapons with different armor values.

Leather, for example, offers quite good protection against sharp weapons because it is really hard to cut through. But it provides almost no protection against blunt weapons like maces and the like because it changes its form very easily on impacts.

A plate armor on the other hand might take a lot of blows with a mace until it is deformed so much that the wearer is seriously hurt, but a strongly thrusted lance could pierce it with one blow.

So we could give armors different defence values for blunt, slicing and piercing attacks.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
Tarm
Novice
Novice
Posts: 336
Joined: Sat Mar 25, 2006 1:16 am
Location: Here

Post by Tarm » Thu Jan 04, 2007 9:36 pm

The problem with a blunt/sharp/pierce damage model is those weapons that fall in between. A rapier as an example have both sharp and pierce damage. Halberd is another one. RPGs usually solve this with different attacks like a character can slice or stab. Some have slicing damage as ordinary attacks and piercing for critical hits. With maces you can have blunt damage as a ordinary attack and crushing for critical hits.

The easiest way imho is still damage bonuses on certain weapons. Say spears or lances have a negative armour bonus and broadswords higher base damage but no bonus.
"I'm selfdestructive baby
But a friendly one" - Spiritual Beggars.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Post by Crush » Fri Jan 05, 2007 5:02 am

So you want the equip defence to be percentual modified by a modifier of the weapon?

With the formulas in my article this won't work well, because the damage is divided by the armor value. That means it would make no difference if you reduce the armor by 50% or increase the damage by 100%. The result would be the same.

A solution would be to get rid of the multiplication and division and use the classical rpg formulas where damage is the sum of the characters attack power and his weapons attack power and the defence is deducted from every attack:

damage = weapon_damage + strength + rand(0, weapon_skill)

HP loss = (Damage * element_modifier) - vitality - (equip_defence / armor_modificator)
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
jerzyjerzy
Peon
Peon
Posts: 5
Joined: Thu Nov 08, 2007 5:07 pm

Bug or what?

Post by jerzyjerzy » Thu Nov 08, 2007 5:23 pm

I have problem with damage. When I up dexterity to 50 (lvl57) then I dont decrease the value of arrows when I use bow. This is fine for me but my hit damage enemy is 50-60 points (sick!) What ever my sword and bow have max 60 points of enemy damage. My fist have 50 points damage of enemy. Whats wrong? I have:
Lvl 58
Strength 32
Agility 32
Vitality 25
Intelligence 5
Dexterity 50
Luck 20
(Sword) (Bow)
Attack 155 Attack 125
Defense 66
% Accuracy 108
% Evade 94
% Reflex 1
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: Thu Aug 25, 2005 5:08 pm
Location: Germany

Post by Crush » Thu Nov 08, 2007 5:27 pm

jerzyjerzy, you are offtopic here.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
voodoo.child
Peon
Peon
Posts: 1
Joined: Sat Nov 17, 2007 3:50 pm

Post by voodoo.child » Sat Nov 17, 2007 4:03 pm

I believe weapons should have a minimum and maximum damage.

so instead of:
<quot>
damage = weapon_damage + strength + rand(0, weapon_skill)
</quot>

let's have
damage = rand(f(min_weapon_damage), f(max_weapon_damage))

where f is a function like:
f(damage) = (damage + weapon_skill^0.75) * (1 + sigmoid(strength))
User avatar
Modanung
Knight
Knight
Posts: 1719
Joined: Fri May 20, 2005 4:51 pm
Location: Groningen, The Netherlands
Contact:

Post by Modanung » Sat Nov 17, 2007 7:35 pm

voodoo.child wrote:I believe weapons should have a minimum and maximum damage.
Well, with Crush's last damage formula the minimum damage would be:
weapon_damage + strength

And maximum damage:
weapon_damage + strength + weapon_skill
If you're looking for 3D FOSS games be sure to check out LucKey Productions on itch.io
Post Reply