NPCs Almost never miss on attack
Since I recompiled the latest build NPCs very very rarely miss an attack. From level 1 to 70 the npcs almost always land atleast some damage. Granted as you get higher up in level with parry dodge and ripostle you avoid a little more but the natural miss chance is tiny. I did notice the all npcs double attack got fixed for low levels but seem to be doing the same amount of damage due to high % hit rate. I tried changing some NPC accuracy but it did not effect it. I am searching through the code to find where it is handled and will post it here. Unless someone beats me to it. Sometimes its still hard to find the stuff w/o knowing the naming terminology lol
|
Found it I think in attack.cpp
attack.cpp Code:
// called when a mob is attacked, does the checks to see if it's a hit EDIT : Code:
if(attacker->IsNPC()) |
Not doubting anything that you've said..but, there is a ton of logging code in that function.
Have you enabled that log channel to see what the actual values are for a combat session? |
Ummmm I actually don't know how to do the logging hahaha. Let me look into it, I know the setup changed via control in a database table. ill get back in a sec to ya.
Edit : ok I see it, just enable with 1 and #logs reload_all, enabled attack, noticed in cpp its categorized by attack. |
You should be able to do something like
Code:
#logs set file 4 3 It will remain active until you turn it off with Code:
#logs set file 4 0 EDIT: I do recommend using the file option or you will end up with a lot of spam in-game or in your console window :P |
For some reason I cant get it to post attack in console, I tried it with scripts and it shows but nothing attack based spams in console, I did however get it in the log file and as follows
level 1 noob vs level 1 mob Code:
[03-17-2016 :: 20:50:09] [Attack] CheckHitChance(Qpiddle) attacked by a_sylvan_bat001 Level 24 Velious era twink vs level 20 Unrest Mummy Code:
[03-17-2016 :: 20:43:06] [Attack] CheckHitChance(Dangah) attacked by a_lurking_mummy000 EDIT : So the question being, if I wanted to decrease the Hit chance for mobs, would I change the 10.0f float to a higher value? Code:
if(attacker->IsNPC()) |
I would probably start here first:
https://github.com/EQEmu/Server/blob...ttack.cpp#L188 Which defaults to this - if no database rules are found: https://github.com/EQEmu/Server/blob...letypes.h#L392 (My database rule value is set to '69.0' as well...) How did you get 95.0? EDIT: Duh! https://github.com/EQEmu/Server/blob...letypes.h#L393 Try lowering the NPCBonusHitChance to see if that helps. |
Mine is set the same
Code:
RULE_REAL(Combat, BaseHitChance, 69.0) EDIT : level 20-30+ it seems to start leveling off as classes get dodge, parry, ripostle skills and up in skill value. EDIT : Should this be saying 69 and not 95? Code:
[03-17-2016 :: 20:43:06] [Attack] Chance to hit before level diff calc 95.00 |
Have you had any luck with this yet?
|
I'm about to get back into it, been stuck worken on nexus ports. the scripts don't cast the port spells anymore with current build the spell interrupts. Having to change the cast method, I guess $npc->CastSpell(13022,2935); #flavor got broke or something else changed, eitherway people cant get in or out of nexus.
|
Yes, they are broken. If you have not gotten it then PM me, I already redid the ports two weeks ago.
|
Ok, I changed it to
attack.cpp Code:
if (attacker->IsNPC()) { At 1st I thought I broke it but then realized some information doesn't show up in gmsay vs logs. On debug 3, Hit roll ##.## shows up in logs but no gmsay. After realizing that it seems to be doing pretty good. More info to follow. |
Ok that definitely didn't work. The code went through so that's good with no errors but the floating value I think is for a modifier accuracy calculation and according to the debug I don't have any to calculate. Maybe from AA or something. So I will dig some more
|
That's because accuracy has to do with the database values in npc_types when mobs are spawned. I don't even think they're coded to benefit from item(s) / spell(s) accuracy either. Wrong thing :P
(The most edited post in the history of posting.) Check your rule_values table for WeaponSkillFalloff value. Is it set to 0.33? |
yea weaponskillfalloff is set to 0.33. I tried adjusting accuracy on npc_types on a test level 1 npc and the npc still landed too many times. I am just tryen to tweak them down a tiny bit lol
EDIT: I have noticed when the NPC does miss, the high majority are kicks and bashes, not melee swings. |
All times are GMT -4. The time now is 02:56 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.