EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bots (https://www.eqemulator.org/forums/forumdisplay.php?f=676)
-   -   ReleaseBots Rev 2171 (https://www.eqemulator.org/forums/showthread.php?t=35575)

Uleat 07-25-2012 12:39 PM

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...

bad_captain 07-25-2012 01:09 PM

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.

werebat 07-25-2012 01:23 PM

I got it too.

Uleat 07-25-2012 01:46 PM

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...)

Kayen 07-25-2012 06:13 PM

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;

bad_captain 07-27-2012 12:49 PM

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.

bad_captain 07-31-2012 02:13 AM

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. :roll:

louis1016 07-31-2012 01:05 PM

EDIT - Nevermind

Kayen 08-01-2012 01:39 AM

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

bad_captain 08-01-2012 10:21 AM

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.

bad_captain 08-01-2012 11:14 PM

This should be fixed in Rev 2175.


All times are GMT -4. The time now is 04:34 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.