Formulas / Calculations for AC and MR?

Discussion on running your own board and editing MajorMUD.
User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Formulas / Calculations for AC and MR?

Post by syntax »

Anyone have the calculation for how monster attacks get calculated vs AC and MR? e.g. Monster attack accuracy VS character AC and Monster attack spell damage VS character MR (resistance chance and damage resisted)?


Ravyn
Posts: 38
Joined: Wed Mar 30, 2016 4:40 pm

Re: Formulas / Calculations for AC and MR?

Post by Ravyn »

Accuracy vs ac/dodge is very complex with many variables, seth rudesill and christopher crain would be the ones to ask, here is MR-


MR FORMULAS


By Ravyn of Codered BBS

--------------------------------------
Non-ANTIMAGIC

MR on Dmg = (Dmg *((MR-50)/200)), while MR = 50 to 150 max, if MR>150 then MR=150,
Which means a max of 50% damage reduction
note: the damage shown to the user is not the damage taken, it does not include this formula.


Resist NO/NEVER seem to be same, possibly NO offers 1/10th of Yes %? Never is never
Resist Yes will allow MR to completely resist, possibly using above formula as %


---------------------------------------

ANTIMAGIC

Mr on any (dmg-mr) | dmg = (dmg - (dmg *(MR/200))), no max
note: the damage shown to the user is not the damage taken, it does not include this formula

Resist same


DeathCow
Posts: 14
Joined: Tue Aug 07, 2012 12:58 am

Re: Formulas / Calculations for AC and MR?

Post by DeathCow »

Ok so the basic formula for combat -- This is from memory so work with me here..
D=total of defensive stats
A=total of accuracy stats
(((D*D) / (A*A)) /100) = Chance to miss

Code wise its a little different, they actually divided by 10 twice, which both is, and isn't important.

One reason that it is important, if you recall the combat changes from 1.11m->1.11M (are those numbers even right? The letters are..) what they actually changed was changing one of those 10's to a 14. I'm pretty sure this formula with the
random 14..only effects normal combat and not martial arts, bash, smash, backstabs(I'm 100% that its not in the backstab formula).

total defense
In normal combat we use a players armour class plus their secondary defense stat (often refered to as hidden AC) which includes shadow, prev, ect.
For backstabs we use a players armour class /2 plus their perception /2

total accuracy
obviously there are a lot of stats involved here including Stats, LEVEL, Combat Level, Gear, Spells, Quests, Some wonky bonus if your level hits an even square root.
Backstabs use stats, but also add in the players total stealth, ignore most of the usual acc bonuses and instead use BS specific ones.


There is a chance that the source code might actually be something we get a chance to look at in the reasonably near future so that could certainly make me trying to recall off the top of my head what all these formulas are worthless But if you have any questions though I'm happy to help.. I just dont have a book of formulas t just copy pasta over to you.


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

Hey man, nice to "see" an old face :)

I'm not sure how I can translate that into usable numbers for an ACCY vs AC chance, which looks to be the primary factor. Surely dodge will play a large(r) part for certain classes as well, which is a whole other conversation, but how much do the other "secondary defenses" and hidden AC factor in?

Here are the results from my monster ACCY vs AC testing:
ac-accy-testing.png
ac-accy-testing.png (30.72 KiB) Viewed 11194 times
DeathCow wrote:There is a chance that the source code might actually be something we get a chance to look at in the reasonably near future so that could certainly make me trying to recall off the top of my head what all these formulas are worthless But if you have any questions though I'm happy to help.. I just dont have a book of formulas t just copy pasta over to you.
...Uhm, care to elaborate? I'll also take this moment to announce that I have the megamud source code. It's written in vanilla c++ and pretty hard to work with though. We've been using it to pull code from to try and work with the megamud databases and update them.


DeathCow
Posts: 14
Joined: Tue Aug 07, 2012 12:58 am

Re: Formulas / Calculations for AC and MR?

Post by DeathCow »

syntax wrote:Hey man, nice to "see" an old face :)

I'm not sure how I can translate that into usable numbers for an ACCY vs AC chance, which looks to be the primary factor. Surely dodge will play a large(r) part for certain classes as well, which is a whole other conversation, but how much do the other "secondary defenses" and hidden AC factor in?
1:1
so, like 20 prev is 20 ac, shadow is a flat 10.

DeathCow wrote:There is a chance that the source code might actually be something we get a chance to look at in the reasonably near future so that could certainly make me trying to recall off the top of my head what all these formulas are worthless But if you have any questions though I'm happy to help.. I just dont have a book of formulas t just copy pasta over to you.
...Uhm, care to elaborate? I'll also take this moment to announce that I have the megamud source code. It's written in vanilla c++ and pretty hard to work with though. We've been using it to pull code from to try and work with the megamud databases and update them.
They might just give it to us, ironically the slow down is that they are moving offices. <-- Not even a joke.


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

DeathCow wrote:
syntax wrote:Hey man, nice to "see" an old face :)

I'm not sure how I can translate that into usable numbers for an ACCY vs AC chance, which looks to be the primary factor. Surely dodge will play a large(r) part for certain classes as well, which is a whole other conversation, but how much do the other "secondary defenses" and hidden AC factor in?
1:1
so, like 20 prev is 20 ac, shadow is a flat 10.
Ok, but monsters don't have multiple accuracy stats (?) and using my level 1 toon with varying AC values and little to no other secondary defenses, the D/A/100 doesn't work out to verify my testing. 100AC / 200ACCY = 0.5 / 100 = 0.005 ?


DeathCow
Posts: 14
Joined: Tue Aug 07, 2012 12:58 am

Re: Formulas / Calculations for AC and MR?

Post by DeathCow »

Ya you should be getting 98% in testing. It caps. Guess I coulda mentioned that.

also its D*D, and A*A

There is a rather narrow range of values for AC and ACC that don't return the cap'd results -- This is one reason why high level combat is also always 5 misses or 5 hits.

Btw the .005 would be the %


User avatar
syntax
Site Admin
Posts: 517
Joined: Tue Jun 02, 2009 10:02 am

Re: Formulas / Calculations for AC and MR?

Post by syntax »

DeathCow wrote:also its D*D, and A*A
Yea I realized that after I posted but it still doesn't make it work out.

150*150 = 22500
300*300 = 90000
225000/90000=2.5
2.5/100 = 0.025 which is only 2.5% chance to miss. It should be around 35%.


DeathCow
Posts: 14
Joined: Tue Aug 07, 2012 12:58 am

Re: Formulas / Calculations for AC and MR?

Post by DeathCow »

syntax wrote:
DeathCow wrote:also its D*D, and A*A
Yea I realized that after I posted but it still doesn't make it work out.

150*150 = 22500
300*300 = 90000
225000/90000=2.5
2.5/100 = 0.025 which is only 2.5% chance to miss. It should be around 35%.

Oh maybe I've f'd something up in my head... follow me here


150*150 =22500

22500/100=225

300*300=90000
90000/140=643 (the 140 is because metro changed one of the /10's into a /14)

225/643= 0.349

I must have forgot random number when I squeezed out a condensed formula in my head.


I've still 'fd something up.. I realize this doesn't make sense.. But we do get the right number so hold on. -- Oh wait there we go ^^^


User avatar
lucid2310
Posts: 25
Joined: Thu Mar 17, 2016 3:31 am
Location: Palm Bay, FL

Re: Formulas / Calculations for AC and MR?

Post by lucid2310 »

This is awesome news about megamud and mmud source code becoming available. Would it be possible to get a copy of megamud or will it be posted at some point?


Post Reply