PDA

View Full Version : Bots not following after zoning, definitely my database


provocating
12-21-2009, 01:51 AM
Okay since I am off for the holiday, I am finally updating my EqEmu after at least 6 months of no updates. I used the cvs as of last night of the database and EqEmulator. My bots do not follow after zoning.

I use Linux but just to make positive it is not my binaries I actually downloaded the Windows version, ran them off my machine, but using the database on my Linux server, I could see my guys log in, no errors until zoning. The exact same thing happens between Linux and the Windows binaries.

[Debug] Member of group 1 named 'Fujitsu' had an out of date pointer!!
[Debug] Member of group 1 named 'mybot1' had an out of date pointer!!
[Debug] Member of group 1 named 'mybot2' had an out of date pointer!!

If someone can help me with this, I will send them a nice fruit basket for Christmas. Oh, and yes I did source the
Rev1008.sql through Rev1052.sql

Also

1022_botadventuring.sql through 1040_whatever.sql

prickle
12-21-2009, 01:07 PM
Since it's the only sql file you didn't mention, did you source in the EQEmuServer/utils/sql/svn/bots.sql file?

Since it's not working for neither your SVN compiled build nor the downloaded Win binaries, the issue you're experiencing must be database related because that's the common denominator here.

provocating
12-21-2009, 04:08 PM
yes, I just sourced it, some errors but I made sure every line fired in the bots.sql

provocating
12-21-2009, 04:20 PM
I also want to point out with a new database and sourcing the players and bots tables, it does work. But I absolutely have to pull my characters and bots over, that is a must. My players will torch my house If I lose there gear and bots.

But while trying to update my database and sourcing every single sql I can find, my bots sit there at the zone line like state workers.

prickle
12-21-2009, 06:17 PM
I had similar problems for a while... however, the windows binaries would work while my Linux compiles would not. In my case it turned out that I needed to remove the -O flags from the zone/makefile and the world/makefile...

An earlier time I had the same problem it turned out I needed to source in the PEQdatabase/updates/rev1038-Bots.sql file.

WildcardX
01-07-2010, 02:16 AM
Try sourcing the bot database objects again from the bot.sql file i updated as of r1077.

provocating
01-07-2010, 11:29 AM
Well I did eventually get the BOTS to follow. The problem is that the retarded BOTS are not healing right. I mean I really liked the way the new BOTS work, I mean the grouping and all is fantastic, plus I could see the BOTS pet health....awesome. But the healing was a deal breaker to me. The Druid and Cleric bot was healing a pet to infinity. I just had to roll back to Debian 4 and the old BOT system.

WildcardX
01-07-2010, 11:37 AM
Odd, I don't see any pets getting healed at the expense of not healing a player or another bot.

provocating
01-07-2010, 11:40 AM
http://www.eqemulator.net/forums/showthread.php?t=30242&highlight=healing

WildcardX
01-07-2010, 11:42 AM
Are you saying that healing hasn't improved after r1075? Can you better articulate the issue and confirm what rev you are basing your observations on?

provocating
01-07-2010, 11:52 AM
Whatever build was around Dec 20th.

If the problem is fixed I may approach this again.

WildcardX
01-07-2010, 12:06 PM
Happy Holidays!

provocating
01-07-2010, 02:06 PM
So that means it is working ?

WildcardX
01-07-2010, 02:36 PM
That means go and download the latest code out of the repo and try to recreate the issue you are having and report back what you found. It's easy to say "my pet gets healed too much", but try to be more specific.. like What bots did you have, what levels were they, what was the situation (in combat or siting ass), did both bots go to no mana trying to heal even though the pet was at 100% health the whole time?

generally speaking, the more detail you can provide the easier it is for me to evaluate the problem and identify a solution.

gaeorn
01-07-2010, 02:52 PM
It is also very important to identify the revision you are using.

provocating
01-07-2010, 03:10 PM
Well it will take me a few days to duplicate the problem. I will have to wipe a computer and load it, I do not want to mess with the live server. The new EqEmu needs Debian 5, mine is running Debian 4.

I can tell you this that I do remember. It happened while in an instance. I sent my pet to attack, the pet got really far down and I have no idea what the bots were healing at the time. I had to bail from the instance because fear of dying....

I zoned back into Fay and the bots were out of mana, they were healing the enchanter pet that was at 100%.

I have no problem getting you particulars especially if you can work on it. I really want my server on newer Debian but i need the emulator at 100 percent before I can do that. Give me a few days, maybe this weekend and I will start a VM with it or something.

prickle
01-09-2010, 09:47 PM
The healing bug was definitely happening in Rev1052. I've not tried it with the most recent Rev's yet, because I've just returned from vacation...

provocating
01-10-2010, 12:57 AM
Well maybe I can help you out and let you know how it goes. So far so good, Debian 5 loaded....compiling is going okay. Just running all of these patches....I never seem to get it right.

provocating
01-10-2010, 01:17 PM
Okay I am back to the pointer error.

[Debug] Member of group 1001 named 'Provocating' had an out of date pointer!!
[Debug] Member of group 1001 named 'Wundred' had an out of date pointer!!

I went back through my notes and I have no idea how I solved it last time.

This is what is working and what is not.

WORKING
Bots have inventory.
All bots converted over from old system.
Bots are now zoning.

NOT WORKING
Bots do not follow after zoning, noticed an out of date pointer error during zone.
Cannot create any new bots, always says the name is in use.

Patches I recently went back through to make sure they are there.

1022_botadventuring.sql
1027_botactives.sql
1030_botzoningsupport.sql
1036_botbuffs.sql
1038_botpetstatepersists.sql
1040_DeprecatedBotRaidsSystems.sql
1077_botgroups.sql still not following

provocating
01-10-2010, 01:42 PM
Also I wanted to add I am using r1086 of the source.

I just compiled and added my -DBOTS and bots.o to the makefile / makefile.common and recompiled, all went well but still the bots are not following, cannot create new bots and the out of date pointer error.

provocating
01-10-2010, 02:08 PM
Well I thought I had it fixed, false call.....still broken.

Derision
01-10-2010, 02:44 PM
The issue with getting the 'Bot name is already in use' message may be a case sensitivity thing on Linux.

The query that is being used to check if the name is available is:

SELECT COUNT(id) FROM vwbotcharactermobs WHERE name LIKE '%s'

But the view name is actually mixed case:

CREATE VIEW `vwBotCharacterMobs` AS ...


You could try changing the query on line 928 in bot.cpp to:

SELECT COUNT(id) FROM vwBotCharacterMobs WHERE name LIKE '%s'

and recompiling.

provocating
01-10-2010, 02:53 PM
Thank god that part is over. You are a master at your craft.

Anyone have an idea on the bot following thing ? I can call it a day and maybe even be able to squeeze in play time tonight if I can get this fixed.

WildcardX
01-10-2010, 02:53 PM
Derision is correct. I just tried that query under the same version of MySQL but with one running on a windows server and the other on a linux server and to my surprise, the query works fine for MySQL running on Windows, but fails on MySQL running on linux. Looks like I get to look at all the queries now to make sure the case sensitivity matches to the actual SQL create statements.

provocating
01-10-2010, 02:54 PM
Yeah it fixed my problem too.

Any idea on the bots following thing ?

prickle
01-10-2010, 03:24 PM
Also I wanted to add I am using r1086 of the source.

I just compiled and added my -DBOTS and bots.o to the makefile / makefile.common and recompiled, all went well but still the bots are not following, cannot create new bots and the out of date pointer error.

Did you also add -DBOTS to your world/makefile file as well?

Sounds like you've got all the necessary sql patches in, but you're bots aren't cooperating properly.

Here are a couple of things that I had to do to get mine working:

.add -DBOTS to BOTH the world/makefile AND the zone/makefile
.add bots.o to zone/makefile.common
.remove the "-g" and "-O" flags from BOTH the world/makefile and the zone/makefile

hope this helps

WildcardX
01-10-2010, 03:26 PM
I checked all the other bot queries and this one case appears to be the only query that needs to be changed to be case sensitive to its database object. I'll commit this fix later when I am ready to commit some other code I am working on now.

provocating
01-10-2010, 03:38 PM
World makefile section

DFLAGS=-DDEBUG=5 -DBOTS -DEQDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG -DFIELD_ITEMS -DIRC -Di386 -DAPP_OPCODE_SIZE=2

Zone makefile section

DFLAGS=-DEQDEBUG=5 -DBOTS -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386
#

Zone makefile.common - Note I think you mean bot.o, not bots.o

../common/guild_base.o bot.o \^M

On this part

.remove the "-g" and "-O" flags from BOTH the world/makefile and the zone/makefile

I had never done that before, but I tried it and it did not make any difference. The bots still hang around the entrance of the zone like a bunch of State workers.

prickle
01-10-2010, 03:58 PM
ok... hmmm... a lot has changed in the sources since this thread was originally posted...

Let me see if I have everything straight...

DOES WORK:
-Rev1052 Windows Binaries W/ NEW database
-Rev1086 Linux SVN compile W/ NEW database

DOES NOT WORK:
-Rev1052 Windows Binaries W/ OLD database that's been patched
-Rev 1086 Linux SVN compile W/ OLD database that's been patched

Is this correct?

provocating
01-10-2010, 04:00 PM
That was too long ago for me to remember. I am pretty confident though this is a database problem. The binaries seem to not matter on this issue.

What are you patched up to, what revision ?

prickle
01-10-2010, 04:06 PM
I'm currently on Rev 1085. It's working fine for me.

Do you still have the new database available?

I have an idea that may get you up and running with a new database and allow you keep your current player characters and bots.

provocating
01-10-2010, 04:27 PM
Well if you meant how I had it up and running before, no sure do not. I wiped and loaded Debian 5. I am so friggin close right now I just backed this guy up and waiting to figure out this last glitch.

prickle
01-10-2010, 05:13 PM
Well, here's my idea:

1) Create the new database
2) Source in the necessary files for the new database
3) Configure the server to use the new database
4) Log into the game and verify the bots are working properly

If the bots work the way then you should do the following:
.Log into MySQL (phpMyAdmin or commandline or use whatever database management tool you prefer)
.Access the OLD database
.Export the following tables as flat sql files:

Bot SQL file:
botinventory
bots

Character Data SQL file:
character_
character_activities
character_enabledtasks
character_tasks
inventory

.Access the NEW database
.Import the SQL files you exported above into the new database

Assuming everything works properly with a fresh database the above should achieve your end goal.

Hope this helps

provocating
01-10-2010, 06:00 PM
Yeah, yeah kind of working. I have a new DB and now they zone, cast, group, etc. Trying to get my guys over as we speak.

provocating
01-10-2010, 07:08 PM
Okay I think I have it all. I also moved the keyring and bot inventory over, took a while to get that going.

Other than the inventory, keyrings, etc....anything else need to be moved for the players ?

provocating
01-10-2010, 07:59 PM
Just and FYI for whoever does the bots. On Linux SQL since it is case sensitive it appears the bot code goes lower case but the view is in camel case so.

DROP VIEW IF EXISTS `vwbotgroups`;
CREATE VIEW `vwbotgroups` AS
select g.BotGroupId,
g.BotGroupName,
g.BotGroupLeaderBotId,
b.Name as BotGroupLeaderName,
b.BotOwnerCharacterId,
c.name as BotOwnerCharacterName
from botgroup as g
join bots as b on g.BotGroupLeaderBotId = b.BotID
join character_ as c on b.BotOwnerCharacterID = c.id
order by b.BotOwnerCharacterId, g.BotGroupName;


Is what I had to doctor to make the grouping work.

prickle
01-10-2010, 10:25 PM
Okay I think I have it all. I also moved the keyring and bot inventory over, took a while to get that going.

Other than the inventory, keyrings, etc....anything else need to be moved for the players ?

hmmmm... if you have multiple people that play on the server you'll want to copy over the following tables as well:

account
account_ip
account_rewards

Possibly the "mail" table as well.

provocating
01-10-2010, 10:29 PM
What goes in account_rewards ?

prickle
01-11-2010, 01:00 AM
i'm not entirely sure to be honest. Mine is empty. If yours is empty too, then there is no need to import that data into the new database.