PDA

View Full Version : Combat


RadiationVibe
01-21-2002, 02:31 PM
Is anyone working on refining the combat? I have been trying to figure out how EQ calculates the attack number so we can have a closer combat system.

I have a formula that is very close for the weapon skill portion. It's not exactly the same but very close. I'd say over 70% of the numbers are exact and the remaining 30% are 1 point off. I still need to add the strength and offense parts.

Nada
01-21-2002, 04:04 PM
Keep us updated with the infomation about combat code. I think the emu really needs a new combat system and, If you can post the code when its in a later stage.

Socket
01-22-2002, 04:21 AM
Give me some feedback on this. I'd like to know what you like/don't like about the current combat code.

Nada
01-22-2002, 04:57 AM
Its kinda off beat compared to the live servers, which it should we cant be perfect on it. For example i make my self lvl 40 grab the warrior 2handed epic and im hitting for 500-600 and im totaly stripped no armor at all. Also duel wield i think combat classes should have duel wield constantly working when you use 2 weapons. Most of all i think you hit to hard for your level maybe reduce the max hit for levels etc and, possible add berserker for warriors when they on about last bubble of hp. I have more to say just im at school dont have alot of time.

RadiationVibe
01-22-2002, 05:02 AM
I'm not saying I like or dislike anything. Actually what has been done so far is great. I would just like to see it closer to the real eq system. My goal is to determine how it calculates the attack and defense ratings then use those numbers hopefully in a similar way to the real eq.

darvik
01-22-2002, 05:17 AM
The formula is definetly out of whack. Last night I signed in, leveled myself to 70th , memmed ice commet , spawned a level 50 mob with default max HPs .. (something like 2420) , and boy was I surprised when she smacked me down in 1 hit for 2600+ damage with no weapon! :D

-- Darvik

Hmm
01-22-2002, 05:28 AM
dar thats because you go defense skill of zero :)

devn00b
01-22-2002, 07:06 AM
one thing i have noticed is that when i summon a lvl 70 mob say and im like lvl 61 the mob NEVER hits me...or when it does its for 10-25dammage...now a lvl 70 mob should be hitting for what? 350ish im guessing..need to set dammage by mob lvl im guessing..

Francisco
01-22-2002, 08:47 AM
It should be flurrying on you every round too :p

DeletedUser
01-22-2002, 09:54 AM
Yes, I am working on combat code, I will post the formulas right here: (Please note these are not on the public emu for two major reasons, 1) npcs do not have "base stats", 2) AC checks aren't functioning properly) PLEASE UNDERSTAND NOT ALL OF THESE ARE CODED INTO THE PROGRAM (meaning you can't copy and paste and they work)

First the chance to hit:
---------------------------------------------------------------------------------
float attacker = ((this->GetLevel()/2) * ((this->GetDEX()/6)+this->GetSTR()+atkbonus+this->pp.skills[skillinuse]));
float defender = (other->GetLevel()/2) * (other->GetAC()+(pp.skills[DEFENSE]/2)+other->GetINT()+other->GetAGI());
float hitsuccess = (attacker / defender);

Note: top of the division is all attacker info, bottom is defender.
---------------------------------------------------------------------------------
Then attack min damage:
---------------------------------------------------------------------------------

float mindmg = ((this->GetLevel()) * (weapon_damage * 2) * ((this->GetAGI()/4) + atkbonus + pp.skills[skillinuse] + this->GetSTR()));
float mindmg2 = ((other->GetLevel()) * (other->GetAC() + other->GetSTA() + other->GetINT() + other->GetAGI()));
float result = mindmg / mindmg2;
---------------------------------------------------------------------------------
Then attack max damage:
---------------------------------------------------------------------------------

float maxdmg = ((this->GetLevel()) * (weapon_damage * 3) * (this->GetAGI() + pp.skills[skillinuse] + this->GetSTR())*3);
float maxdmg2 = ((other->GetLevel()) * (other->GetAC() + other->GetSTA() + other->GetINT() + other->GetAGI()));
float result = maxdmg / maxdmg2;

Note: top of the division is all attacker info, bottom is defender.

---------------------------------------------------------------------------------
A random is put in these attacks so they are not static.
---------------------------------------------------------------------------------
Now for upping attack skills (chance to up your skill)
---------------------------------------------------------------------------------
float chanceskill = (maxskill*skillfactor) - ((curskill/10) * (1+(yourlvl-theirlvl));
float result = chanceskill / 1000; //makes it a decimal percentage

Yes, negatives are possible meaning, you don't get to up your skill! Makes sense, you don't get your skill upped on a lvl 30 :)
Note: skillfactor is a number that can be set for each combat skill, I assumed in a way we would want a difference of the uppage per combat skill. (Ofcourse there will be limits of max skill and max skill per level.)
---------------------------------------------------------------------------------
Yet another, upping trade skills! (similar to combat skills)
---------------------------------------------------------------------------------
float result = ((maxskill*skillfactor) - (curskill)) / 1000;

Note: Yet another decimal to be used for %. (Ofcourse there will be limits of max skill and max skill per level.)
---------------------------------------------------------------------------------
It never ends! Time for some monk combat! (and kick)
---------------------------------------------------------------------------------
MaxDmg:
float result = ((lvl*2)*(str+skill+agi))*5.5 / ((((lvl)*(AC+AGI+STA))/3)/10);

MinDmg:
float result = ((lvl*2)*(str+skill+agi))*1.5 / ((((lvl)*(AC+AGI+STA))/3)/10);

Note: top of the division is all attacker info, bottom is defender. Secondly, the multiplying by 1.5 and 5.5 can be changed for different skills to make it more realistic (flying kick obviousely hits for a lot more than regular kick, thats what you would change to make this work) and ofcourse chance to hit code would also be used on these.

If there are any questions, don't ask :) I posted this just for reference, nothing else.

PimpDaddy
01-22-2002, 09:45 PM
Some notes:

-DEX and STR have nothing to do chance to hit, I think
DEX is only for archery, throwing and faster upping weapon skills.
STR only raises max damage (at higher levels) and modal damage (slightly). Chance to hit is solely based on attacker offense skill, weapon skill and level vs. defender level and defense skill/AC.

-AC really has two properties: avoid getting hit, and if you get hit, avoid damage (a green mob will hit you less and for less damage). Total AC takes defense skill into account.

-Mobs seem to have different AC's for different weapon types. I dont know if there is a difference for 1hb, 1hs, etc, but I know that some mobs are more vunerable to archery than others (trac for example).

-AGI raises total AC, but only a small amount. AGI is also used for reposite/dodge type of skills, but not directly in a to hit/miss calculation. Its impact would be to big.
AGI is also unrelated to calculating damage output.

-INT is entirely unrelated to combat formula. It only raises skills.

-There are damage caps at certain level intervals (10, 20, 30 i think).
Max damage calculation is slightly different for each of these levels too.

-There should be a class related damage factor (i.e. monks have higher damage tables than warriors).


As you can see, EQ's combat system is pretty complicated.

RadiationVibe
01-23-2002, 02:32 AM
I think Image is trying to create a combat system that makes more sense than what EQ does. I like that approach, but I also want to see a system that functions the same as EQ and let the server operator decide which to use.

Strength does increase the attack rating which I assume translates to a greater chance of hitting.

Image, are you open to having a choice on the combat? I think there are flaws with the EQ way but I believe a lot would want to use it.

RadiationVibe
01-23-2002, 02:41 AM
I think Image is trying to create a combat system that makes more sense than what EQ does. I like that approach, but I also want to see a system that functions the same as EQ and let the server operator decide which to use.

Strength does increase the attack rating which I assume translates to a greater chance of hitting.

Image, are you open to having a choice on the combat? I think there are flaws with the EQ way but I believe a lot would want to use it.

Trumpcard
01-23-2002, 02:50 AM
I would also like to see facing incorporated into the attack algorithms. IE, you gain a + to attack/damage on a creature with
its back to you. Nothing like a good ol sneak attack. Another
factor that should be put in is a penalty when the character is overweight on attack skills.

PimpDaddy
01-23-2002, 08:27 AM
Just thought most people were looking for more or less an exact copy of the eqlive servers. Oh well, just pointing some stuff out in case this was so.

The ATK value you see in the eq client is a actually a combined value of the to hit rating and str related attack rating. Originally these were two separate values in the client, but as not to confuse user they combined it into one. It is not an acurate reflection, more of an simple overal rating to keep it understanble to a wide audience. Parsing of logs still shows that STR does not effect to hit ratio.

Strength doesnt do much on lower levels, except raise the limit of what you can carry. Its effect on higher levels is more noticable, but not that spectacular either. In most cases (on lower and even conning mobs) the net effect of a level 60 shaman str buff on a level 50 player is about 1 to 2% damage increase. On larger, higher level creatures the effect is more usefull, up to 5%, even up to 10% I have heard.

DeletedUser
01-23-2002, 09:14 AM
Im not trying to duplicate the formulas verant uses, I am creating my own, but I would gladly make an alternative if people were not satisfied...

Trumpcard
01-23-2002, 09:22 AM
I think it's great so far. Little bits and pieces will get tweaked along the way. I was toying with the idea of trying to come up with a 'configurable' combat system, so that pertinent combat parameters were stored in a database table giving the indivudual admins the ability to customize combat values on the fly without having to recompile source. Have to track down all the configurable values and come up with some kind of table struct, but dont know if anyone would really care about that degree of customization to their server.

RadiationVibe
01-23-2002, 11:12 AM
I do remember hearing something about the number being a composite of two factors, but I had forgotten about that. I believe defense is that way also. One number effects the chance of being hit and the other how much damage you take. Too bad they decided to join the two numbers.

Image,

(This isn't a question. It's a comment since you are not taking questions about your formual :D )

float attacker = ((this->GetLevel()/2) * ((this->GetDEX()/6)+this->GetSTR()+atkbonus+this->pp.skills[skillinuse]));
float defender = (other->GetLevel()/2) * (other->GetAC()+(pp.skills[DEFENSE]/2)+other->GetINT()+other->GetAGI());
float hitsuccess = (attacker / defender);

There is no point to dividing the level by 2. You can take that out or make it divide by 100 and the resulting hitsuccess number will still be the same. I like where you are going with this. I put some sample numbers to it and like the results. I keep thinking that Dex should have a bigger role, but I'm not sure why.

DeletedUser
01-23-2002, 11:16 AM
I just wanted to stick level in there to make your level somewhat useful, but the level does have a big part, it takes the second part of the equation and multiplies it by half of your level, its very important in the formula :) and as for dex, Verant never used it, im happy its there, even if its divided by 6 :)

RadiationVibe
01-23-2002, 11:53 AM
I understand why level is there. It's just that the "/2" part isn't necessary.

If you pull that out, like below, the result for hitsuccess will be exactly the same. It affects the individual numbers, but when you divide them by each other the net result is the same.

float attacker = this->GetLevel() * (this->GetDEX()/6)+this->GetSTR()+atkbonus+this->pp.skills[skillinuse]);
float defender = other->GetLevel()* (other->GetAC()+(pp.skills[DEFENSE]/2)+other->GetINT()+other->GetAGI());

float hitsuccess = (attacker / defender);

DeletedUser
01-23-2002, 11:59 AM
Ah ok I see your point... dunno why I did that... (might have been testing other numbers on dividing, *shrug*)