|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Support::Windows Servers Support forum for Windows EQEMu users. |
03-17-2016, 07:00 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
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
__________________
|
|
|
|
03-17-2016, 07:16 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
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
// and does other mitigation checks. 'this' is the mob being attacked.
bool Mob::CheckHitChance(Mob* other, SkillUseTypes skillinuse, int Hand, int16 chance_mod)
{
/*/
//Reworked a lot of this code to achieve better balance at higher levels.
//The old code basically meant that any in high level (50+) combat,
//both parties always had 95% chance to hit the other one.
/*/
Mob *attacker=other;
Mob *defender=this;
float chancetohit = RuleR(Combat, BaseHitChance);
if(attacker->IsNPC() && !attacker->IsPet())
chancetohit += RuleR(Combat, NPCBonusHitChance);
Log.Out(Logs::Detail, Logs::Attack, "CheckHitChance(%s) attacked by %s", defender->GetName(), attacker->GetName());
bool pvpmode = false;
if(IsClient() && other->IsClient())
pvpmode = true;
if (chance_mod >= 10000)
return true;
float avoidanceBonus = 0;
float hitBonus = 0;
and more I didn't wanna spam post with
EDIT :
Code:
if(attacker->IsNPC())
hitBonus += (attacker->CastToNPC()->GetAccuracyRating() / 10.0f); //Modifier from database
__________________
|
|
|
|
03-17-2016, 07:50 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
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?
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
03-17-2016, 08:10 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
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.
__________________
|
03-17-2016, 08:30 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
You should be able to do something like
in-game to turn it on temporarily. ('4' should be the 'attack' log index.)
It will remain active until you turn it off with
or until the zone instance shuts down.
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
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
|
|
|
03-17-2016, 08:54 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
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
[03-17-2016 :: 20:50:09] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:50:09] [Attack] Chance to hit after level diff calc 95.00
[03-17-2016 :: 20:50:09] [Attack] Chance to hit after Agility calc 93.75
[03-17-2016 :: 20:50:09] [Attack] Chance to hit after weapon falloff calc (defense) 93.75
[03-17-2016 :: 20:50:09] [Attack] Chance to hit 93.75 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:50:09] [Attack] 3 FINAL calculated chance to hit is: 93.75
[03-17-2016 :: 20:50:09] [Attack] Final hit chance: 93.75%. Hit roll 37.97
[03-17-2016 :: 20:50:12] [Attack] CheckHitChance(Qpiddle) attacked by a_sylvan_bat001
[03-17-2016 :: 20:50:12] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:50:12] [Attack] Chance to hit after level diff calc 95.00
[03-17-2016 :: 20:50:12] [Attack] Chance to hit after Agility calc 93.75
[03-17-2016 :: 20:50:12] [Attack] Chance to hit after weapon falloff calc (defense) 93.75
[03-17-2016 :: 20:50:12] [Attack] Chance to hit 93.75 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:50:12] [Attack] 3 FINAL calculated chance to hit is: 93.75
[03-17-2016 :: 20:50:12] [Attack] Final hit chance: 93.75%. Hit roll 82.21
[03-17-2016 :: 20:50:15] [Attack] CheckHitChance(Qpiddle) attacked by a_sylvan_bat001
[03-17-2016 :: 20:50:15] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:50:15] [Attack] Chance to hit after level diff calc 95.00
[03-17-2016 :: 20:50:15] [Attack] Chance to hit after Agility calc 93.75
[03-17-2016 :: 20:50:15] [Attack] Chance to hit after weapon falloff calc (defense) 93.75
[03-17-2016 :: 20:50:15] [Attack] Chance to hit 93.75 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:50:15] [Attack] 3 FINAL calculated chance to hit is: 93.75
[03-17-2016 :: 20:50:15] [Attack] Final hit chance: 93.75%. Hit roll 51.40
[03-17-2016 :: 20:50:18] [Attack] CheckHitChance(Qpiddle) attacked by a_sylvan_bat001
[03-17-2016 :: 20:50:18] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:50:18] [Attack] Chance to hit after level diff calc 95.00
[03-17-2016 :: 20:50:18] [Attack] Chance to hit after Agility calc 93.75
[03-17-2016 :: 20:50:18] [Attack] Chance to hit after weapon falloff calc (defense) 93.75
[03-17-2016 :: 20:50:18] [Attack] Chance to hit 93.75 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:50:18] [Attack] 3 FINAL calculated chance to hit is: 93.75
[03-17-2016 :: 20:50:18] [Attack] Final hit chance: 93.75%. Hit roll 7.85
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
[03-17-2016 :: 20:43:06] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after level diff calc 92.22
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after Agility calc 90.87
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after weapon falloff calc (defense) 91.53
[03-17-2016 :: 20:43:06] [Attack] Chance to hit 91.53 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:43:06] [Attack] 3 FINAL calculated chance to hit is: 91.53
[03-17-2016 :: 20:43:06] [Attack] Final hit chance: 91.53%. Hit roll 0.45
[03-17-2016 :: 20:43:06] [Attack] CheckHitChance(Dangah) attacked by a_lurking_mummy000
[03-17-2016 :: 20:43:06] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after level diff calc 92.22
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after Agility calc 90.87
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after weapon falloff calc (defense) 91.53
[03-17-2016 :: 20:43:06] [Attack] Chance to hit 91.53 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:43:06] [Attack] 3 FINAL calculated chance to hit is: 91.53
[03-17-2016 :: 20:43:06] [Attack] Final hit chance: 91.53%. Hit roll 78.36
[03-17-2016 :: 20:43:06] [Attack] CheckHitChance(Dangah) attacked by a_lurking_mummy000
[03-17-2016 :: 20:43:06] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after level diff calc 92.22
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after Agility calc 90.87
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after weapon falloff calc (defense) 91.53
[03-17-2016 :: 20:43:06] [Attack] Chance to hit 91.53 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:43:06] [Attack] 3 FINAL calculated chance to hit is: 91.53
[03-17-2016 :: 20:43:06] [Attack] Final hit chance: 91.53%. Hit roll 30.88
[03-17-2016 :: 20:43:06] [Attack] CheckHitChance(Dangah) attacked by a_lurking_mummy000
[03-17-2016 :: 20:43:06] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after level diff calc 92.22
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after Agility calc 90.87
[03-17-2016 :: 20:43:06] [Attack] Chance to hit after weapon falloff calc (defense) 91.53
[03-17-2016 :: 20:43:06] [Attack] Chance to hit 91.53 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:43:06] [Attack] 3 FINAL calculated chance to hit is: 91.53
[03-17-2016 :: 20:43:06] [Attack] Final hit chance: 91.53%. Hit roll 57.74
[03-17-2016 :: 20:43:09] [Attack] CheckHitChance(Dangah) attacked by a_lurking_mummy000
[03-17-2016 :: 20:43:09] [Attack] Chance to hit before level diff calc 95.00
[03-17-2016 :: 20:43:09] [Attack] Chance to hit after level diff calc 92.22
[03-17-2016 :: 20:43:09] [Attack] Chance to hit after Agility calc 90.87
[03-17-2016 :: 20:43:09] [Attack] Chance to hit after weapon falloff calc (defense) 91.53
[03-17-2016 :: 20:43:09] [Attack] Chance to hit 91.53 after accuracy calc 0.00 and avoidance calc 0.00
[03-17-2016 :: 20:43:09] [Attack] 3 FINAL calculated chance to hit is: 91.53
[03-17-2016 :: 20:43:09] [Attack] Final hit chance: 91.53%. Hit roll 26.30
Both situations have super high hit rates. With level 1s starting out and getting pegged every single swing, it makes it extremely difficult. And if the 24 didn't have a fungi tunic regen they would barely survive. 90% hit rate sounds like it would be correct but the way it portrays in game vs world item/stat balance it hurts very bad.
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())
hitBonus += (attacker->CastToNPC()->GetAccuracyRating() / 10.0f); //Modifier from database
__________________
|
|
|
|
03-17-2016, 09:34 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
Mine is set the same
Code:
RULE_REAL(Combat, BaseHitChance, 69.0)
A lot of declarations broke in ruletypes.h and maxskill.h ive noticed. Ill check that NPCBonusHitChance modifier, if adjusting that drops the higher level stuff like level 20/30+ too much I think ill have to code in a level < 21 sumwhere to only drop the low lvl stuff. I'm mostly worried about beginning population being happy and having a chance.
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
DOULBE EDIT : DUH!!!! Combat:NPCBonusHitChance = 26, 26+69 = 95 hahahaha I got what ur saying now
__________________
|
03-18-2016, 05:04 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
Have you had any luck with this yet?
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
03-18-2016, 06:04 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
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.
__________________
|
03-18-2016, 08:01 PM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Yes, they are broken. If you have not gotten it then PM me, I already redid the ports two weeks ago.
|
03-18-2016, 09:15 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
Ok, I changed it to
attack.cpp
Code:
if (attacker->IsNPC()) {
if (GetLevel() <= 29) {
hitBonus += (attacker->CastToNPC()->GetAccuracyRating() / 15.0f); //Modifier from database
}
if (GetLevel() >= 30) {
hitBonus += (attacker->CastToNPC()->GetAccuracyRating() / 10.0f); //Modifier from database
}
}
Seems to be working a little better, I am going to do some more extensive tweaking on it tonight after players log. My test box is busted lol.
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.
__________________
|
03-19-2016, 02:13 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
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
__________________
|
03-19-2016, 03:00 PM
|
|
Hill Giant
|
|
Join Date: Dec 2013
Posts: 151
|
|
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?
__________________
"The true sign of intelligence is not knowledge but imagination."
|
03-19-2016, 03:43 PM
|
Discordant
|
|
Join Date: Aug 2009
Location: 2131231231
Posts: 255
|
|
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.
__________________
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 10:22 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|