Page 1 of 1
3.5k: Combat Algorithm
Posted: Sat Mar 18, 2006 5:37 pm
by stranf
I'm running 3.5k with 3.4w .DFNs.
I noticed that damage taken and damage inflicted has dropped significantly. I fought an energy vortex for about six minutes watching me do 1 damage with a new viking sword and 3 damage with a perfect composite longbow, and he only could inflict up to 6. I got bored and ran away, but I did gain 1.5 in tactics. He barley had a little bit of red off his status bar. I could have made GM warrior, but I honestly think it would have taken me an hour to kill him.
Then I went outside to find the orc warrior guy with big axe and funny helmet (orc lords?) I engaged him in combat and finally slew him after 5 1/2 minutes or so. (I cleaned my room, went to the bathroom, etc. Very boring)
I'm had 91.6 swords, 98.1 tactics, 80 parrying, DEF of 16.
Is there anyway we can tweak the combat algorithms? It's no secret that combat is the weakest link of the UO engine. I personally support a system where damage dealt and recieved is very quick, so combat dosen't last a long time and players are forced to retreat to heal. Sitting and hacking at each other for 5 min. plus is not the way it should be...but then again I haven't been on OSI shard for awhile.
Keep up the good work.

Re: 3.5k: Combat Algorithm
Posted: Sat Mar 18, 2006 5:56 pm
by Grimson
stranf wrote:I'm running 3.5k with 3.4w .DFNs.
That shouldn't cause problems with combat, but it will cause problems in other areas.
stranf wrote:I noticed that damage taken and damage inflicted has dropped significantly.
I'll have a look at it, I could have made a mistake when moving the calculations.
stranf wrote:Is there anyway we can tweak the combat algorithms?
Not yet, but I'm planning on allowing the user to override the damage calculations via JS.
Posted: Sat Mar 18, 2006 6:44 pm
by Grimson
Found and fixed it, try 0.98-3.5k-experimental4.
Posted: Tue Mar 21, 2006 6:54 am
by stranf
PC combat seems to be fixed.
My friend was testing it and fought one of my black knight fighter NPCs.. (shadow iron chain (def 16?), 99 swords, 99tactics, etc)
and the NPC could only do 1 to 2 points of damage. (My friend's PC had shadow plate with of def of 26 I think?)
This could be an armor DEF value issue and not an executable issue. I think I'm going to drop the armor .def values and test to see if I can make combat more balanced.
Posted: Tue Mar 21, 2006 2:24 pm
by Grimson
stranf wrote:PC combat seems to be fixed.
PCs and NPCs use the same code.
stranf wrote:This could be an armor DEF value issue and not an executable issue. I think I'm going to drop the armor .def values and test to see if I can make combat more balanced.
And check the lowdamage and highdamage values of the weapon the NPC uses.
Edit:
Some notes about how combat currently calculates the damage:
For the base damage it gets a random value between the low- and highdamage values of the weapon the attacker has. If the attacker doesn't have a weapon and is a NPC it uses the low- and highdamage values of the char, else it uses the wrestling skill.
Then it multiplies the base damage with the race damage modifier, that is currently unused as there is nothing specified in races.dfn.
Then it adds up to 20% damage to the base damage, depending upon the strength of the char.
Then it uses the external value (meaning the value you see in game) of the tactics skill plus 50 as a percent value against the base damage and adds that to the current damage.
After that it uses the internal value (the real value multiplied by 10) of the anatomy skill divided by 5 (against NPCs) or 2.5 (against PCs) as a percent value against the base damage and adds that to the current damage.
Then it checks whether the char is a GM at lumberjacking, and if he is it adds another 30% of the base damage to the current damage.
Then it reduces the damage up to 20% based on the targets tactics skill.
After that it adds elemental and race based damage of the weapon the attacker has.
For the defense it first checks whether the target has a shield, if it has and it's parrying skill is high enough it decreases damage by a value between the shields def value and the def value divided by 2.
Then it gets the def value of the armor part that has been hit and generates a random number between that value and the value divided by 2. Then it reduces the damage by a value, that is calculated by multiplying the random def value with the internal skill value, of the skill the attacker used, and dividing that through 750.
Finally it checks whether the target is a PC, and if it is it divides the damage by the COMBATNPCDAMAGERATE value specified in the uox.ini.
Posted: Tue Mar 21, 2006 3:46 pm
by Grimson
Btw. if I remember correctly you increased the amount at which players will gain stats/skills. So I suppose most of your players are already quite high level. In that case it is normal that most NPCs can't harm them much and only champions and some magical creatures may still give them a real fight.
In that case you have to make most of the NPCs quite a bit tougher to keep it interesting.
Posted: Tue Mar 21, 2006 4:07 pm
by Xuri
You can also tweak the COMBATNPCDAMAGERATE setting in UOX.INI (if that is still used

).
Posted: Tue Mar 21, 2006 4:56 pm
by stranf
Now that would be slick. The monster damage seems to be ok, but if there is a way to make NPCs deal out a bit more, that would be nice.
I'll check my UOx.ini and see what I can do.
Posted: Tue Mar 21, 2006 6:36 pm
by Grimson
I'll try to finish the possibility to override the combat damage calculation via JS today.
Posted: Tue Mar 21, 2006 7:51 pm
by stranf
There are a few things I can try.
First, I could add the lumberjacking and anatomy to my NPC.
My players are around 70-90 on most combat skills, none are GM level yet.
The NPCs I've created should be "champion quailty" in skills, etc. It's just the base broadsword or longsword dosen't have enough "umph" to penetrate some of my players' plate armor.
I'll give my black knights and stuff some skills in anatomy, lumberjacking, etc, and see if that will up their damage tally some.
Posted: Tue Mar 21, 2006 8:42 pm
by Grimson
0.98-3.5n-experimental2 contains those changes:
viewtopic.php?p=5825#5825
You can use this and for example multiply the baseDamage value by 2 or 4 if the attacker is a NPC and the defender a PC.
Posted: Tue Mar 21, 2006 8:44 pm
by stranf
Thanks grimson I'll check that out.
That should balance my sword-wielding champion style NPCs vs. a PC.
Posted: Thu Mar 23, 2006 4:36 am
by Kiff
I just started using the lastest CVS and I have the same problem I think. I'm naked here fighting a rabbit with 55 swords 55 tacs, with a long sword, and the rabbit is taking 0 damage... (nor am I taking damage, which even though it's a rabbit it should be doing damage since I"m naked). Hopefully this can get fixed up pretty soon , as right now players are having a macrofest fighting harpies that can't hit them back.
Posted: Thu Mar 23, 2006 4:59 am
by Kiff
Ach....Can't take players backwards to another build either because the console doesn't like the new elemental resist tags some things have apparently... ACH! It all seemed so good, hiding even works, but alas, combat doesn't :p
Posted: Thu Mar 23, 2006 5:43 am
by Grimson
Kiff wrote:I just started using the lastest CVS and I have the same problem I think. I'm naked here fighting a rabbit with 55 swords 55 tacs, with a long sword, and the rabbit is taking 0 damage... (nor am I taking damage, which even though it's a rabbit it should be doing damage since I"m naked). Hopefully this can get fixed up pretty soon , as right now players are having a macrofest fighting harpies that can't hit them back.
I have just checked the damage calculations for normal combat and they are the same they were in the last release. Are you hearing the sound for a hit or the sound for a miss? If it is the sound for a miss then the problem is not with the damage calculation.
Kiff wrote:Ach....Can't take players backwards to another build either because the console doesn't like the new elemental resist tags some things have apparently... ACH! It all seemed so good, hiding even works, but alas, combat doesn't :p
As has been said before, you can ignore the messages about unknown tags when downgrading or working with experimental builds.
Btw. a rabbit does only 1 damage, given that with the default settings the damage against PCs is divided by 2 he won't do any damage at all.
Posted: Thu Mar 23, 2006 4:03 pm
by Grimson
I found a bug with the JS override for the damage calculation, give 0.98-3.5n-experimental3 a try.
Posted: Sun Jul 09, 2006 11:01 pm
by giwo
Has this issue been fixed?
Posted: Fri Jul 21, 2006 3:04 am
by stranf
I believe it has.
I've done some fighting on 3.7 and the damage seems to be working well. However, I had tweaked a few .dfns to make it more difficult (ie. gave plate a base DEF of 28% instead of 40 or 60 or whatever it was.)
All in all, I think combat engine in 3.7 has been the most playable since I've started playing.