PDA

View Full Version : #bot botgroup load problem


uwill
11-11-2014, 04:30 AM
I've created a full bot group, but they aren't saving. When I use #bot botgroup load <botgroup name> I am summoning just the leader and no one else. Is this a known problem?

uwill
11-11-2014, 05:11 AM
I am manually entering the bot groups now, I used Uleat's updated load_bots.sql in my newer DB. I don't know if it's just my server or others.

https://github.com/EQEmu/Server/blob/f805ddf319a7062828d77329f86fe5d569f73c2f/utils/sql/git/bots/load_bots.sql

lerxst2112
11-11-2014, 02:16 PM
Do you see any query errors in your logs?

uwill
11-11-2014, 05:53 PM
No, I created a whole new group and looked at the logs, nothing. Just a bunch of successful bot creations, nothing about the group from what I can tell. Here is the log text, hopefully this is what you were talking about:

[11.11. - 15:55:42] Saving Currency for character ID: 3, done
[11.11. - 15:55:42] ZoneDatabase::SaveCharacterBindPoint for character ID: 3 zone_id: 106 instance_id: 0 x: -189.000000 y: 1027.000000 z: 73.000000 heading: 0.000000 ishome: 0
[11.11. - 15:55:42] ZoneDatabase::SaveCharacterBindPoint for character ID: 3 zone_id: 106 instance_id: 0 x: -189.000000 y: 1027.000000 z: 73.000000 heading: 0.000000 ishome: 1
[11.11. - 15:55:42] ZoneDatabase::SaveCharacterData 3, done... Took 0.006000 seconds
[11.11. - 15:55:42] Saving Currency for character ID: 3, done
[11.11. - 15:55:42] ZoneDatabase::SaveCharacterBindPoint for character ID: 3 zone_id: 106 instance_id: 0 x: -189.000000 y: 1027.000000 z: 73.000000 heading: 0.000000 ishome: 0
[11.11. - 15:55:42] ZoneDatabase::SaveCharacterBindPoint for character ID: 3 zone_id: 106 instance_id: 0 x: -189.000000 y: 1027.000000 z: 73.000000 heading: 0.000000 ishome: 1
[11.11. - 15:55:42] ZoneDatabase::SaveCharacterData 3, done... Took 0.006000 seconds
[11.11. - 15:56:13] Succeeded in setting inventory version to EQClientUnderfoot(5)
[11.11. - 15:56:13] Character not in a group: Greenmist
[11.11. - 15:57:33] Member Disband Request from Greenmist

[11.11. - 15:58:19] Saving Currency for character ID: 3, done
[11.11. - 15:58:19] ZoneDatabase::SaveCharacterBindPoint for character ID: 3 zone_id: 106 instance_id: 0 x: -189.000000 y: 1027.000000 z: 73.000000 heading: 0.000000 ishome: 0
[11.11. - 15:58:19] ZoneDatabase::SaveCharacterBindPoint for character ID: 3 zone_id: 106 instance_id: 0 x: -189.000000 y: 1027.000000 z: 73.000000 heading: 0.000000 ishome: 1
[11.11. - 15:58:19] ZoneDatabase::SaveCharacterData 3, done... Took 0.005000 seconds
[11.11. - 15:58:19] Saving Currency for character ID: 3, done
[11.11. - 15:58:19] ZoneDatabase::SaveCharacterBindPoint for character ID: 3 zone_id: 106 instance_id: 0 x: -189.000000 y: 1027.000000 z: 73.000000 heading: 0.000000 ishome: 0
[11.11. - 15:58:19] ZoneDatabase::SaveCharacterBindPoint for character ID: 3 zone_id: 106 instance_id: 0 x: -189.000000 y: 1027.000000 z: 73.000000 heading: 0.000000 ishome: 1
[11.11. - 15:58:19] ZoneDatabase::SaveCharacterData 3, done... Took 0.006000 seconds

Uleat
11-11-2014, 08:20 PM
After you assign a bot leader, then add bots to that group..

..are you saving that group as well?

https://github.com/EQEmu/Server/blob/master/zone/bot.cpp#L13944

uwill
11-11-2014, 10:48 PM
Yeah, on my first build I was able to successfully build botgroups but for some reason it's not working with my new server, etc. Systematically:

1. #bot spawn bot1, bot2 (etc.)
2. #bot botgroup create bot1
3. #bot botgroup add bot2 bot1
4. #bot botgroup save <name> bot1
5. #bot botgroup load <name>

Then only the botgroup leader, bot1, spawns alone.

Uleat
11-12-2014, 01:30 AM
Ok, I'll look at that tonight..might have to review all of the bot code for table name and collation issues.

Thanks for the feedback!

uwill
11-12-2014, 01:01 PM
No problem Uleat! And thanks for all your help!

dfusion111
01-24-2015, 04:20 PM
I noticed this myself then checked code for Bot::SaveBotGroup and noticed botGroupId always returns 0 then the script exits, so it never gets to the part where it saves the groupmembers.

To fix this bug replace: (in latest source as of 1/24/15)
if(botGroupId == 0)
return;

with this:
botGroupId = GetBotGroupIdByBotGroupName(botGroupName.c_str(), errorMessage);
if(botGroupId == 0)
return;

In bot.cpp>Bot::SaveBotGroup

Now it will properly check the groupid, then save the members, tested and it works.

pballgi2
07-21-2015, 02:20 PM
Is this still happening? It appears the code is still the same on GitHub

https://github.com/EQEmu/Server/blob/master/zone/bot.cpp#L3483