View Single Post
  #7  
Old 09-06-2010, 10:52 PM
lich2594
Sarnak
 
Join Date: Jun 2006
Location: Tennessee, USA
Posts: 77
Default

Quote:
Originally Posted by Brewhaus View Post
May I ask how you fixed the AC issue? Do you mean you found a way to change it in the DB or you changed it in the code and recompiled?
I changed some variables, deleted some, and added new code to the source.

Digging around through the bot code lead me to more than one issue that I resolved. The first issue was the incorrect AC values, the cause of this is that the bot code loads in data with the NPC code; creating a "double post" of information so to speak. After a few times creating incorrectly valued AC, it glitches and starts spitting out insane data.

The way I fixed this was to disable the bot.cpp code from adding any extra values. The code is not completely fixed, but it's a lot more accurate than the glitch previously used. Now, a 400AC piece of armor adds 800AC, each time I give another similar piece to the bot. (It sounds off still, but this method puts the bot almost equal in AC value as a normal player of the same class).

The second issue that was resolved is the mitigation of the bots. This was the main issue all along, but I thought that it was the AC because of the incorrectly displayed results. It could have been a combination, as well.

To correct this, you can adjust these lines of code:

(Located in bot.cpp)
Code:
damage -= (minhit * defender->GetItemBonuses().MeleeMitigation / 100);
damage -= (damage * defender->GetSpellBonuses().MeleeMitigation / 100);
These values may work fine, until you start to get up in the 8.5k+ AC range. Then it seems to put the bots into a GOD-mode state, where they can not be attacked. If you change the /100 to a higher number, such as /200, it will allow the bots to be hit more. (I'm not giving out my exact numbers, lol)

I hope this helps you!
__________________
Reply With Quote