Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2012, 12:39 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default ReleaseBots Rev 2171

Is anyone else having trouble compiling bots with this rev?

This line in bots.cpp:

Code:
min_hit = min_hit * (100 + itembonuses.MinDamageModifier + spellbonuses.MinDamageModifier) / 100;
is giving this error:

Code:
bot.cpp(7696): error C2110: '+' : cannot add two pointers

My affected files are unmodified revisions (including mob.h and .cpp)

The properties referenced are arrays and I don't know the proper index position(s) to add to fix this... (Is it suppose
to sum the array?)

Adding the array index corrects this error, but I just don't know what the appropriate context is...
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #2  
Old 07-25-2012, 01:09 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Looking at how it's used in attack.cpp, it appears you use skillinuse as the index. I'd have to look at it a little bit more in depth tonight, but it should be an easy fix. I'll have to look over the other changes to see if there's anything else that needs to be changed for bots.
Reply With Quote
  #3  
Old 07-25-2012, 01:23 PM
werebat's Avatar
werebat
Hill Giant
 
Join Date: Oct 2010
Posts: 143
Default

I got it too.
Reply With Quote
  #4  
Old 07-25-2012, 01:46 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

That fix appears to work..no errors, no failure on zone build.

Here is the line (7696 in bots.cpp):

Code:
min_hit = min_hit * (100 + itembonuses.MinDamageModifier[skillinuse] + spellbonuses.MinDamageModifier[skillinuse]) / 100;

Hopefully that is the intended use..thanks B_C!!

(That was the only error that came up for me on this revision..and if I had looked up a few more lines of code, I would have seen that defined...)
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #5  
Old 07-25-2012, 06:13 PM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

For this revision I implemented the skill index to this effect, which it naturally uses.

I added this function for doing the calculations.

Code:
sint16 Mob::GetMeleeMinDamageMod_SE(int16 skill)
{
	int dmg_mod = 0;
					
	dmg_mod  = itembonuses.MinDamageModifier[skill] + spellbonuses.MinDamageModifier[skill] +
				itembonuses.MinDamageModifier[HIGHEST_SKILL+1] + spellbonuses.MinDamageModifier[HIGHEST_SKILL+1];

	if(dmg_mod < -100)
		dmg_mod = -100;

	return dmg_mod;
}
Replace that line of code with something like this.

Code:
min_damage += min_damage * GetMeleeMinDamageMod_SE(skill) / 100;
Reply With Quote
  #6  
Old 07-27-2012, 12:49 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I have this fixed as Kayen suggested on my local server, but also merged in most of his other changes that affected bots (special skills, attack speed, etc.) I hope to have it tested and committed this weekend. Until then, you can use his suggested fix to get it to compile and run.
Reply With Quote
  #7  
Old 07-31-2012, 02:13 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I'm going to have to check my code over again. My bots were bashing and kicking for 2-3k damage. Everything else looks good though.
Reply With Quote
  #8  
Old 07-31-2012, 01:05 PM
louis1016
Hill Giant
 
Join Date: Dec 2009
Posts: 157
Default

EDIT - Nevermind
Reply With Quote
  #9  
Old 08-01-2012, 01:39 AM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

Make sure your code for DoSpecialAttackDamage has all the fields put in. Else, your kick/bash will be 2-3k.

I had that error in one of my revisions where it looked like this, which is bad cause it uses ReuseTime for min damage. causing what you describe.

Code:
DoSpecialAttackDamage(ca_target, KICK, dmg, ReuseTime);
Should look like this

Code:
DoSpecialAttackDamage(ca_target, KICK, dmg, 1,-1, ReuseTime);
Kayen
GM Storm Haven
Reply With Quote
  #10  
Old 08-01-2012, 10:21 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Thanks for the heads up. I set up some debugging last night but didn't have time to actually test. I'll check that call and hopefully get it committed.
Reply With Quote
  #11  
Old 08-01-2012, 11:14 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

This should be fixed in Rev 2175.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:22 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3