ID:223854
 
Greetings. I just wanted to make a quick post here because I'm puzzled on an aspect in typical RPG games. Lets use WoW for example. Back when I actually cared to play WoW, they had a feature which increased your stats as you used "that" combat skill. Say I didn't have a weapon and I was attacking a monster with my bare hands. I'd get a notification saying, "Your skill in Unarmed has increased to [insert_number]." I never really followed how that factored into the actual combat.

My question is... does anybody recall what exactly the Unarmed skill increase did to your default combat stats? Any examples? In my project, I really wanted to alter this formula as I've always enjoyed it, but never understood it fully. This would be a great deal of help. Thanks!
Well, the exact formulas will vary depending on how you scale damage in your game, but it probably takes into account your raw physical power(strength), your skill with the specific weapon you're using(in this case gloves/unarmed), the power of the weapon(0 if unarmed), any feats or skills you have that are associated, buffs, debuffs, and then your opponent's totaled defensive score(potentially against your weapon type, depending on the depth of the system).

A simple example would be like this:

mob/verb/Attack()
//target finding
var/base_damage = attacker.strength
base_damage += attacker.weaponskill
base_damage += attacker.weapon.power

//We make a new var so we have access to the base_damage if needed
var/total_damage = base_damage
base_damage -= defender.endurance
base_damage -= defender.armor.armorclass

//To add some small variance to the damage, you would add/subtract a small
//percentage, in this case anything from -10% to 10%.
base_damage += rand(round(base_damage/1.1), base_damage*1.1)


I don't really play WoW, but I doubt they would have your weapon specific skills influence your actual baseline stats. It would cause a bit of trouble with someone maxing their spear skill and then being pretty good at punching people to death because they still have that strength bonus from their spear use.
Branks wrote:
My question is... does anybody recall what exactly the Unarmed skill increase did to your default combat stats? Any examples? In my project, I really wanted to alter this formula as I've always enjoyed it, but never understood it fully. This would be a great deal of help. Thanks!

It's been a while but I think it just changed your chance to hit. I don't think it impacted damage numbers at all (aside from missing meaning you'd deal zero damage). Your skill would max out at 5 times your level (300 at level 60).

If you were attacking a level x enemy and your weapon skill was 5*x, you'd have a set chance of hitting them (95% or 96%, I think). If your weapon skill was 5 less than that (ex: a weapon skill of 95 when attacking a level 20 enemy) you might have only a 94% chance to hit.

The actual damage dealt was based on your weapon, attack power (which was influenced by strength/agility, depending on your class), and the enemy's armor.
Thank you guys, your posts have helped me a ton! I appreciate the examples from both of you.