PDA

View Full Version : Does anyone have and good links to EQ combat equations?


Kaiyodo
03-27-2002, 06:10 AM
I was thinking of polishing up the combat system modifications I wrote (which are now in 0.2.6) in order to match them more closely to the real EQ ones, but I need more info!

The damage calculation I'm using is very simple, choose a random number between the min and max damage and use that. As we all know, EQ doesn't behave like that, you often hit for 'magic numbers' e.g. 2x weapon damage+1. That's what I'm trying to work out how to calculate.

Has anyone worked out how this is calculated? Or got any links to forums with discussion of the mathematics of it.

I'm also interested in formulae of how AC is used when determining damage mitigation/avoidance and the effect of ATK vs. AC. It's getting embarassing having a level 60 warrior being beaten up by a level 30 mob hitting for max damage every swing :)

I'm sure I've seen many a discussion of these topics on various message boards over the past 3 years, but I'm at a loss where to look now.

Any info appreciated :)

K.

DeletedUser
03-27-2002, 06:24 AM
What combat code is this? The PC attack equations are still mine :P

DeletedUser
03-27-2002, 06:27 AM
BTW, stop using so many floats and rand_max, it kills :)

Kaiyodo
03-27-2002, 07:38 AM
I said 'modifications', didn't claim all the code was mine! :)

I modified the min/max damage calc ..


int max_hit = weapon_damage * ((GetSTR() + pp.skills[skillinuse]) / 100); // Apply damage formula


and changed the damage bonus calcs, lines 163-194 in attack.cpp :)

What exactly do you mean about floats and rand_max? There's a few calls to (rand()%rand_max) in my DW/DA code, which I used as there didn't seem to be a faster alternative available to get a random float number between 0 and 1. I wouldn't imagine doing two divides 4 times every second (assuming quad attack with max haste) per player would hurt any PC made withing the last 5 years :)

K.

Dayfvid
03-27-2002, 08:12 AM
Kaiyodo, check out the following link: http://pub14.ezboard.com/fthesteelwarriorthearena.showMessage?topicID=1242. topic

Interesting observation in there, hopefully that helps out.

-Dayfvid

Kaiyodo
03-27-2002, 08:46 AM
Thanks Dayfvid, that's just the sort of thread I was looking for! Very interesting to see the maths behind what defensive does too.

K.

xxxjustinxxx
03-27-2002, 03:04 PM
I'm pretty sure this is how they work with ac

AC is a damage reducer ~ so something like 100ac = 8%damage redux.

You have 400ac? you get 32% damage reduced.

I think the real percentage is closer to 6 or 7% per 100.

agility is an inherent (sp?) dodge type check. If you have a 125agi, you have x% chance to dodge the attack.

I haven't gone so far as to try to figure out the base % on the agi is, but be sure to remember the lowest possible agi to 200 or so is how they figure it... I don't imagine Verant would allow anything more than a 70% max change to dodge attacks w/o using the Dodge skill (ie, no maxing agi for a druid to become a ninja)

mob damage is mob level times 2 plus 2. AC decides how much you, personally, will take. You're going to get a lot of conflicting damage reports if you just go source to source. Each will be able to tell you the damage difference, and those might be similar, but it really is based on AC.

I hope this helps, if it doesn't, I'll eat a sock.

I'm out,
j

Osmodiar
03-27-2002, 06:27 PM
well justin i must disagree.
you seem to have no basis for your claims and besides that it sounds way way too simple for ac to just change the percent of damage recieved. maybe it increases the probability of the ammount of damage you recieve in the "does the mob hit me" algorithm but other than that it sounds like you just assumed it made mobs hit you less and desided that a percentage dicreament sounded good. mosat people would say that thats simply not the case.
as for the dodge thing, i think the algorithm there has something to do with agility but it may be such a small part that it actually has very very little to do with it. for iunstance if it was somethign like Dodge probabilty= (dodgeskill*.05 +agility*.01) or somethign along those lines, i would hate to think dodge was more affected by agility than by the actual dodge skill level.
just my 2 cents

Lyenu X`Arie
03-27-2002, 10:30 PM
You have to take into account also.. what if the mob is higher level to me? You still get hit harder if the mob is higher... and this 6% to the 100AC method sounds good but... lets say someone gets 1700ac... that would mean that 17*6=never getting hit. As it's just slightly over 100. Anyways it's a good idea.. but it's going to be a little more complicated.. but it does help reduce DMG =D.

Drawde
03-28-2002, 04:49 AM
Doesn't AC also reduce the chance of enemies hitting you?
It certainly does in most RPG combat systems.

Kaiyodo
03-28-2002, 05:59 AM
General consensus is that chance to hit is not affected by AC at all, it only affects damage mitigation.

Chance to hit is based off Agi and defensive skills (parry, riposte etc .) . I've seen tests that show the percentage number of hits remaining constant with varying AC, and only the damage amount being reduced.

K.

xxxjustinxxx
03-28-2002, 08:52 AM
let me try to outline it again while I'm not high :)

AGI + DODGE = ATTACK

AC = Weapon Skill + Strength Bonus + Weapon damage (so the str bonus improves your maxx and min damage, but not the averages, just adds a base bonus # to ATTK and to damage)

there are your very most basic equations.

The 6% way, as I am now going to refer to the method, can also have the str modifier taken into account. Also, weapon skill could increase damage, thereby allowing higher level mobs to do higher damage.

the main points to remember are: A level 1 character with a really high agi STILL has a minute chance to dodge a level 60 character. Maybe just a .000001%, but there is always going to be a percent.

And this is the most important one: In real life, if one wears armor, it does not affect whether or not you are hit. It affects whether or not the hit actually harms you.
A bullet-proof vest keeps the bullet from penetrating the vest, it DOES NOT make you into some sort of ninja so you're not hit.
Your skin is not punctured, but your sorry ass has still been shot. It will hurt, but not kill you. EXACTLY the same with armor. An arrow or sword might not cut you, but it'll still hurt (bruise, etc) so you still would take damage.
I could beat a plate helm with a mace enough that, while not ever cracking the man's skull, nor even harming a hair on his head, could knock him out merely by the jarring effect.

Games that make plate armor make you harder to hit are only getting it half right. They should make it harder to HURT you, easier to hit as the weight increases, hence the loss of AGI.

You guys really can trust this method, as I am almost certain it's how they figure damage. I don't have the real numbers, but I have played EQ (a lot) and this is some very very basic shit, if you think about it for a couple minutes.

by the way, you're all invited to the Teddy Bears picnic
sorry, I *am* high now....

j

Stilborn
03-28-2002, 09:14 AM
Ok here is how things work, not smart enough to figure out the formulas involved but i can tell you a few things reguarding combat:

If you are lvl 1 and attack a lvl 27 mob and that mob max hits for 42 then it will still have a max hit of 42 if you are lvl 20 or lvl 50, the max he hits for does not change regardless of your defence skills or AC.

AC is effected by your AGI, item AC, and Defence skill, this number is used to determain the % ratio that you will be hit at.

If you take a lvl 1 super twink and he has an AC of say 700 and you take a lvl 40 that has an AC of 700 then both of these characters will have the same chance of being hit by the same mob.

If an attack is tagged as a hit it then go against your other defence skills, dodge, parry,block etc. to perform those checks.

Melee skills are only checked on successes ie. defence only goes up on MISSES. Offence only goes up on HITS.

So your AC has nothing to do with how hard the mob hits you it determines how often it hits you.

hypothetical example:

Crunchy the lvl 40 dwarf warrior has an AC of 700 unbuffed. He decides to go get pizza and goes afk. A skeleton comes by and aggros him. For the next 35 minutes the skeleton is banging on him uninterupted... the skeleton is lvl 5 and its % to hit 700ac target is say 3% (This number is just a guess, also this example does not take into account repostes, dodge etc). So anyway, Crunchy comes back after gorging himself and sees that skeleton has been wacking on him for 35 minutes and propley kills him....

Now the skeleton hits for a max of 15, so if we stick with the 3% change i made up above then you will see 97% misses and of the 3% hits some will be for the skeletons max of 15.

Now Crunchy decides that being a dwarf sucks.. the chicks have beards and there city smells like old cheese. So he decides to create a DE warrior because de chicks roxor and start over.. he twinks the crap out of his de warrior and gets him to lvl 5. because he twinked the crap out of him instead of crafted he now has cobalt and low and behold his de war has an AC of 700 (remember this is just to illustrate.. i have no idea if his AC would be 700 with full cobalt or not). Again after all this work he goes off for more pizza, the same thing happens with the skeleton and low and behold the stats of the amount of damage he takes and the % he was hit will be the exact same as they are for the 40 warrior not counting repostes, dodge etc.

So in closing I haven't answer your question but this is how it works.

Stilborn

Stilborn
03-28-2002, 10:34 AM
Opps forget a bunch of stuff like attacking

First off STR + weapon skill = atk (not counting atk modifiing buffs like wolfform)

Secondly STR WILL modify your max dmg amount

So taking the Crunchy the warrior example again but from an attack angle:

Now Crunchy having eaten two pizzas is under a super pizza buzz decideds that he is going to attack a kodiak to see if it has a hq skin on it, forgetting that he is not lvl 40 any more but lvl 5.

His str is say 100 at the moment and since he is under lvl 10 his soft cap is 21dmg so he goes after the kodiak. In effect we can now compare him to the skeleton that was attacking him earlier.. the bear has an AC that Verant decided a (normal) lvl 18 creature will have.. lets say 200ac and it has a set amount of hp that a (normal) lvl 18creature would have say 300 hp (dont have any showeq logs in front of me so these are just made up numbers).


So he is fighting away and since his 1hs and offence skills are maxed for his lvl they are both at 30 and with a str of 100 his atk rating is say 300.. the combat table cross references against the bears 200ac and comes back with a 35% hit chance. His highest hit is a 21 dmg and he misses 65% of the time.

A passing 60 shaman casts Maniacal Strength str buff on Crunchy and doesn't bother to heal him as the bear has not hit him much. His Ac is 700 as we remeber and the (normal) lvl 18 creatures cross reference to hit ac 700 is say 10%. So Crunchy now has a str of 167 and this does two things.. it raises his atk number to say 350 and his max dmg now goes over the 21 soft cap to 27dmg. The 350 atk ratio is cross referenced against the bears 200ac and his hit % is now 40%.

Now after 10 minutes Crunhy finally kills the bear.. he decides that maybe starting over was not a great idea and the smell of old cheese isnt that bad...

He re-equips his 40 dorf warrior and decides that e is going to go kill some more bears. Now his ac will go up as his defence is much higher than the lvl 5 warriors was but we will ignore that and stay with a ac of 700. He finds a kodiak that is lvl 18 again and goes at it... the bear has the same chance of hitting him and has the same change of doing the same amount of damge as it did on the lvl 5 version.

Since he is lvl 40 his dmg caps are gone and he now hits much harder.. lets take a forged velium battle axe.. 30/36 before 27 his average hit was for 30x2 +1 so 61 after 27 he started to get the weapon bonus.. so at lvl 40 he has a weapon bonus of say 8. So he will now hit for 30x2+8 or 68 more often than any other number.. this is his most frequent dmg number.. his max is up around 120 or so but he will hit for 68 more often than any other number...

i have to go but i hope this helps..

Stilborn

Lurker_005
03-28-2002, 12:50 PM
Here is my take on the whole thing: Do something that makes sense.

Just put in some reasonable equations that use STR AGI DEX AC SKILLS and perhaps LEVEL with good randomness and make it fun for now. After that is done, adjust what affects what, and how much later. If it is like EQ then OK if it isn't that is OK too. Without the real EQ equations we are just guessing about a system that while it works, isn't the the most loved. Part of what makes this project fun is the ability to make changes to how Verant set up EQ

Kaiyodo
03-29-2002, 01:11 AM
That's exactly what I'm doing Lurker. The reason I posted this thread was to see if the actual formulae had been discovered and generally agreed on, I can see from the posts that it most certainly hasn't :)

I suppose I can live without getting all the magic numbers right for now.

K.

Trumpcard
03-29-2002, 03:06 AM
I think this is a case where statistical analysis could probably produce a very close approximation..

Grab some parsed logs (got a few friends who regularly parse and analyze their damage output), plop in all the variables, apply some numerical analysis, and we could probably get a close functional approximation.

Thats if you want to use THEIR way of doing it. Personally, I think it would probably be better to insert some constants into the attack routines determined by a database variable, that way we could just alter a constant factor in the database, and see the resulting affect on combat for balancing purposes. Just tweak it until it was at a reasonable , playable level..