|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
03-09-2008, 11:56 AM
|
Fire Beetle
|
|
Join Date: Sep 2007
Posts: 22
|
|
Adding a ATK field to npc_types
This is a simple fix to add a ATK field in the db and populate the atk value of a npc . There is a value ATK in npc but presently it always 0 (you see it with the #showstats command) and this value is used in the IntervalAC calculation for damage mitigation .
Here the required SQL for the db
Code:
ALTER TABLE npc_types ADD COLUMN `ATK` mediumint(8) unsigned NOT NULL default '0';
And then in the zonedb.cpp file . In the ZoneDatabase::GetNPCType (uint32 id) function.
change the code
Code:
"npc_types.see_invis_undead,"
"npc_types.lastname,"
"npc_types.qglobal,"
"npc_types.AC,"
"npc_types.npc_aggro,"
"npc_types.spawn_limit,"
"npc_types.see_hide,"
"npc_types.see_improved_hide";
if (id == 0)
MakeAnyLenString(&query,
"%s FROM npc_types,spawn2 WHERE spawn2.zone='%s'"
" AND npc_types.id=spawn2.id",
basic_query, zone->GetShortName());
TO
Code:
"npc_types.see_invis_undead,"
"npc_types.lastname,"
"npc_types.qglobal,"
"npc_types.AC,"
"npc_types.npc_aggro,"
"npc_types.spawn_limit,"
"npc_types.see_hide,"
"npc_types.see_improved_hide,"
"npc_types.ATK";
if (id == 0)
MakeAnyLenString(&query,
"%s FROM npc_types,spawn2 WHERE spawn2.zone='%s'"
" AND npc_types.id=spawn2.id",
basic_query, zone->GetShortName());
And add the bold line in the following code:
Code:
tmpNPCType->qglobal = atoi(row[r++])==0?false:true; // qglobal
tmpNPCType->AC = atoi(row[r++]);
tmpNPCType->npc_aggro = atoi(row[r++])==0?false:true;
tmpNPCType->spawn_limit = atoi(row[r++]);
tmpNPCType->see_hide = atoi(row[r++])==0?false:true;
tmpNPCType->see_improved_hide = atoi(row[r++])==0?false:true;
tmpNPCType->ATK = atoi(row[r++]);
This will give you the possiblity of adding a atk value to npc and give them more chance of passing thru player mitigation.
--
Pyronis / Kahel
Dev Jest 3 Server
|
|
|
|
03-09-2008, 12:57 PM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
isnt ATK stats suppose to be deirved from ncp stats? according to last server update?
|
03-09-2008, 01:19 PM
|
Fire Beetle
|
|
Join Date: Sep 2007
Posts: 22
|
|
The atk value is always 0 and never updated. You can see at with #showstats or used the combat logging you will see in the IntervalAC logs that npc have weak attackRating compared to a PC defenseRating
|
03-09-2008, 01:36 PM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
You can increase the atk rating of npcs by giving them abhorrent amounts of strength but I agree with this approach it will let people further tune their npcs without making them bash for absurd amounts of damage.
|
|
|
|
03-09-2008, 01:41 PM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
I was thinking that STR is what decided the attack rating of NPCs now, but it seems from my testing that STR only factors how hard the NPC will hit for on average.
I may be wrong, but I believe that attack should be the factor in how often an NPC will land hits against a player depending on how much AC they have. My testing shows that players with really high AC will be missed ALOT by any NPC with any stats. Right now it seems that the only factor in how often an NPC will land a hit is NPC level vs AC of player. This is fine for most lower level encounters, but in level 70+ encounters, you will see level 70 NPCs landing maybe 20% of all hits depending on player AC.
If adding an attack field will allow one to change how often NPCs land hits, that is EXACTLY what I have been looking for since the Combat:UseIntervalAC rule addition. It will mean that I can slightly lower max hit of NPCs in the end-game and reduce their hit speed. Having NPCs that are hardly able to land hits on players really makes for messy encounter balance. They have to be set to hit considerably faster than the old system and harder as well. Which means if you get a lucky flurry from a mob, it could mean instant death, since the encounters are tuned to the NPCs missing so often.
A working attack value system is something I consider on the top of my list for feature requests. As long as attack is indeed what decides how often an NPC will land hits. That will mean 1 more thing to tune when encounter balancing, but it will also mean for much more flexibility in encounter design. Being able to make end-game NPCs with consistent damage will mean making tiers of end-game encounters will be much easier to define.
If it isn't attack that calculates how often an NPC lands hits vs AC, then hopefully someone knows what is. I just got done retuning all of my custom zones to the new combat changes, but I wouldn't mind adjusting them 1 more time to add in attack. I think if I can adjust how often mob hits land, I should just be able to reduce hit rate and the 2 can balance each other out. And overall, NPC dps will be more consistent.
Thanks again, LordKahel! You have been coming up with some nice code additions which I am sure we all hope make it into future builds
|
|
|
|
03-09-2008, 01:48 PM
|
Fire Beetle
|
|
Join Date: Sep 2007
Posts: 22
|
|
Actually AC has no impact on wethever a npc will hit a player or not . level + defense skill vs level + weapon skill - avoidance and AAs will determine if a NPC hits or not . Then it checks all the skills (dodge, block, etc..) .
AC is used in the IntervalAC system to mitigate damage fom the hit itself.
|
03-09-2008, 02:00 PM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
woudl be ncie if devs woudl post EXACT formulas of To Hit and To damage =)
cuase DEX supose to play SOME part if often you land a hit - after isnt what dex is all about?
STR and ATK on other hand supose to determine how well you penetrate your target armor (ac).
so first you need to actualy HIT the target
then your str/atk will determine how much dmg you delt based on how good your ATk is compared to targets AC.
In other words it should be posible to:
A) hit every time for very little dmg (high DEX, low ATK)
B) miss most of the time, but ocasinaly score hist for MASSIVE dmg (low DEX, very high ATK)
or at least this is a logical understanding of melee combat
|
|
|
|
03-09-2008, 02:06 PM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Quote:
Actually AC has no impact on wethever a npc will hit a player or not . level + defense skill vs level + weapon skill - avoidance and AAs will determine if a NPC hits or not . Then it checks all the skills (dodge, block, etc..) .
|
Ya, that was the other concern of mine. From my testing, it seems that NPCs only land more hits at high levels if they are considerably higher level than the player. I really just don't want to have level 100 trash and level 150 bosses (if that is even possible). If that is the only way to do it, I will just leave things as they are now. Maybe the next end-game zone I do, I will try some really high level NPCs and report my test findings while I tune it.
In my testing on the current system, I have found that if I want NPCs to land hits in the thousands, their STR has to be in the thousands. That doesn't seem right to me, but it works. If attack will let me lower STR and still hit high, that may be useful depending on how it calculated the hits. One of the main issues I have right now is that min/max damage are only caps and don't seem to calculate into actual damage. It seems that STR is what decides how hard the NPC will hit. So you have to adjust both STR and Min/Max to the right range or your encounters will be not work properly at all.
Sorry, not trying to derail your post. I am just trying to get an idea of what attack will do differently than STR. I imagine you would be able to set much lower STR and have high attack and the mobs would hit in the correct range. But if it does nothing different than what STR already does now, it would mostly just be 1 more field to fill out and tune.
Last edited by trevius; 03-09-2008 at 10:10 PM..
|
|
|
|
03-09-2008, 02:07 PM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
It is possible to mitigate a hit to a miss via the AC system, though it takes a lot of AC and the attacker has to have a rather low hit rating. It's not a miss in the conventional sense it's just the damage was mitigated to 0.
|
03-09-2008, 02:12 PM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
Quote:
Originally Posted by KLS
It is possible to mitigate a hit to a miss via the AC system, though it takes a lot of AC and the attacker has to have a rather low hit rating. It's not a miss in the conventional sense it's just the damage was mitigated to 0.
|
actuly it would be nice if game would actualy say:
"You strike Orc_Pawn but his armor absorded all the damage"
rather than " You have missed"
this would actualy give players a clue if they need better DEX/offesive or more STR/ATK
|
03-09-2008, 02:59 PM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
Yeah it would be nice, blame sony. =(
|
03-09-2008, 03:09 PM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
Quote:
Originally Posted by KLS
Yeah it would be nice, blame sony. =(
|
wait isn't combat calculations done by the server?
if so- why can't the server send back the proper message text?
|
03-09-2008, 03:55 PM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
The client still interprets the damage packet on it's own. You could send custom messages but it would drastically increase network traffic.
|
|
|
|
03-10-2008, 01:02 AM
|
Fire Beetle
|
|
Join Date: Sep 2007
Posts: 22
|
|
Quote:
From my testing, it seems that NPCs only land more hits at high levels if they are considerably higher level than the player. I really just don't want to have level 100 trash and level 150 bosses (if that is even possible). If that is the only way to do it, I will just leave things as they are now.
|
Yes level is the only easily modifiable attribute that will affect a npc hit chances. But beyond a 20 level difference it will have no impact . So if a player is level 70 , then a npc beyond level 90 will hit the same thing has a level 90 npc.
Quote:
Sorry, not trying to derail your post. I am just trying to get an idea of what attack will do differently than STR. I imagine you would be able to set much lower STR and have high attack and the mobs would hit in the correct range. But if it does nothing different than what STR already does now, it would mostly just be 1 more field to fill out and tune.
|
You are right that right now atk is added to str when calculating mitigation and htis can already be done by giving insane amount a str. But this fix is to populate the npc Atk value from the DB wich is not done atm. After that ATK can be used in other formulas but it need to be populated first .. so consider it the first step. And also npc->GetATK() is added directly to the formula while STR is multiplied by a certain percentage so you need more STR then atk to achieve the same results.
|
|
|
|
03-10-2008, 09:02 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
As far as I can see, the main thing that adding attack would help is STR debuffs like Cripple. At this time, some of my NPCs have 2000+ STR, so reducing their STR by 100 does little to no impact to how hard the NPC hits for. If the STR could be set to say 400 instead, reducing it by 100 should be a noticeable difference. Just a thought.
|
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 08:53 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|