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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #16  
Old 10-23-2009, 01:33 AM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

this is after zoning:

mysql> select * from group_id;
+---------+--------+-------------+
| groupid | charid | name |
+---------+--------+-------------+
| 109002 | 1 | Nunyscleric |
| 109002 | 6 | Nunyas |
| 109002 | 11 | Pusher |
| 109002 | 17 | Tanku |
| 109002 | 27 | Rogue |
| 109002 | 32 | Punchy |
+---------+--------+-------------+
6 rows in set (0.00 sec)

mysql> select * from group_leaders;
+--------+------------+---------+--------------+
| gid | leadername | marknpc | leadershipaa |
+--------+------------+---------+--------------+
| 109002 | Nunyas | | |
+--------+------------+---------+--------------+
1 row in set (0.00 sec)
Reply With Quote
  #17  
Old 10-23-2009, 01:34 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

There's been an issue with group leadership for a bit from what I know. Like, EQEMU related bug. Losing group leader is a common occurance from what I've seen, reforming and creating groups is typical.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #18  
Old 10-23-2009, 02:06 AM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

Pricke,

Did you also add -DBOTS to your world\makefile?
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #19  
Old 10-23-2009, 02:23 AM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

Prickle,

What is the makeup of your group in the example you posted? Was it 2 characters and 4 bots?
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #20  
Old 10-23-2009, 02:48 AM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

hmmmmm.... I was only aware of needing to add -DBOTS to the zone/makefile ... I didn't know about the world/makefile

I'll add it, recompile, and report back tomorrow...

The group is 1 player (me --Nunyas) and 5 bots
Reply With Quote
  #21  
Old 10-23-2009, 11:48 AM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

well, just added -DBOTS to my world/makefile and then followed that up with 'make clean' and 'make' from the top level build directory.

I'm still getting the same results. bots still forget to follow me after zoning.

/confused
Reply With Quote
  #22  
Old 10-23-2009, 12:37 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

Want to try re-applying this SQL to your group_id table just in case its not there?

Code:
ALTER TABLE `group_id` DROP PRIMARY KEY, ADD PRIMARY KEY  USING BTREE(`groupid`, `charid`, `name`);
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #23  
Old 10-23-2009, 12:46 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

Aside from checking your SQL, which sounds like you already have, the only thing I can offer is the following method that actually does the bot zoning:

Code:
// Load and spawn all zoned bots by bot owner character
void Bot::LoadAndSpawnAllZonedBots(Client* botOwner) {
	if(botOwner) {
		if(botOwner->HasGroup()) {
			Group* g = botOwner->GetGroup();
			if(g) {
				uint32 TempGroupId = g->GetID();
				std::string errorMessage;
				std::list<uint32> ActiveBots = Bot::GetGroupedBotsByGroupId(botOwner->GetGroup()->GetID(), &errorMessage);

				if(errorMessage.empty() && !ActiveBots.empty()) {
					for(list<uint32>::iterator itr = ActiveBots.begin(); itr != ActiveBots.end(); itr++) {
						Bot* activeBot = Bot::LoadBot(*itr, &errorMessage);

						if(!errorMessage.empty()) {
							safe_delete(activeBot);
							break;
						}

						if(activeBot) {
							activeBot->Spawn(botOwner, &errorMessage);

							g->UpdatePlayer(activeBot);
							
							if(g->GetLeader())
								activeBot->SetFollowID(g->GetLeader()->GetID());
						}

						if(activeBot && !botOwner->HasGroup())
							database.SetGroupID(activeBot->GetCleanName(), 0, activeBot->GetBotID());
					}
				}

				// Catch all condition for error messages destined for the zone error log
				if(!errorMessage.empty()) {
					// TODO: Log this error message to zone error log
				}
			}
		}
	}
}
The fact that you can see your bot after it zones with you and it has spawned tells me you have gotten to this part of the code...

Code:
if(activeBot) {
							activeBot->Spawn(botOwner, &errorMessage);
so i think for you, its just a matter of something not coming together as expected for the next two statements:

Code:
g->UpdatePlayer(activeBot);
							
							if(g->GetLeader())
								activeBot->SetFollowID(g->GetLeader()->GetID());
If you know how to debug this, then I'd recommend making sure that GetLeader() isn't returning a null value. if it is not, then I'd make sure that the same object returned by GetLeader() isn't returning a value from GetID() that is 0 .

I'll keep thinking on this for you.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #24  
Old 10-23-2009, 02:06 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

I just noticed this line in the 1030_botzoningsupport.sql file

Code:
DROP TABLE IF EXISTS `botactives`;
The 1027_botactives.sql file creates this table, and then the 1030 update removes it. Is this correct? From looking at the bots.sql file, this seems correct too me, because the latest bots.sql file does not create the botactives table, but I thought I'd check to make sure this is correct.


I looked through the bot.cpp file and all of the bits of code that you mentioned are in there.


I was just digging through the diffs on the bots.sql file in SVN over the changes from 1027 to current and I noticed this was added to the bots.sql file but not to the 1027 update sql file:

Code:
75 	DELIMITER $$
	76
 	77 	DROP FUNCTION IF EXISTS `GetMobType` $$
  	78 	CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)
  	79	BEGIN
  	80 	    DECLARE Result CHAR(1);
  	81
 	82 	    SET Result = NULL;
 	83
 	84     IF (select count(*) from character_ where name = mobname) > 0 THEN
 	85 	      SET Result = 'C';
 	86 	    ELSEIF (select count(*) from bots where Name = mobname) > 0 THEN
 	87 	      SET Result = 'B';
 	88 	    END IF;
 	89
 	90 	    RETURN Result;
 	91 	END $$
 	92
 	93 	DELIMITER ;
Not sure if this this will have an effect or not, but since it's not in my Database (i didn't source bots.sql, I thought the incremental update sql files would get me there) and I can't find anything else different, I thought I'd mention it...

gonna source it in right now and see if there's any difference...
Reply With Quote
  #25  
Old 10-23-2009, 02:28 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

Your right that the incremental SQL files are missing the creation of that function, but it isnt used for zoning bots. It is used primarily for supporting bots in ldon adventures.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #26  
Old 10-23-2009, 02:34 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

ah... well shoot... /sigh
Reply With Quote
  #27  
Old 10-23-2009, 07:14 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

To answer your original question...

Raiding seems ok... I've been 2 grouping in ToV all day. sometimes 2 full groups and sometimes 1 full group and 2 half groups...The raid stuff seems to be working pretty well for me..
Reply With Quote
  #28  
Old 10-24-2009, 12:18 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

More info on my bot zoning issue:

Updated to 1038 last night

Here are the log entries:

eqemu_debug_world.log - log in from char select to ToV:
Code:
6667 [10.24. - 09:06:44] [WORLD__CLIENT] Checking inbound connection 192.168.1.70 against BannedIPs table
6667 [10.24. - 09:06:44] [WORLD__CLIENT] Connection 192.168.1.70 PASSED banned IPs check.  Processing connection.
6667 [10.24. - 09:06:44] [WORLD__CLIENT] rvecchiolli: Logged in. Mode=(CharSel)
6667 [10.24. - 09:06:44] [WORLD__CLIENT] rvecchiolli: LS Account #1
6667 [10.24. - 09:07:28] [WORLD__CLIENT] rvecchiolli: Entering zone templeveeshan (124:0)
6667 [10.24. - 09:07:28] [WORLD__ZONE] [93] [templeveeshan] Setting to 'templeveeshan' (124:0) (Static)
6667 [10.24. - 09:07:28] [WORLD__CLIENT] rvecchiolli: Sending client to zone templeveeshan (124:0) at 192.168.1.135:7092
6667 [10.24. - 09:07:28] [WORLD__CLIENT] rvecchiolli: Client disconnected (not active in process)
eqemu_error_zone.log (still no group):
no entries made during log in

zone-templeveeshan.log first zone in (no groups):
Code:
[Debug] Nunyas has a 14 percent chance of successfully being saved from death. Caster UnfailingDivinityAA rank was 0.
[Debug] Nunyas has a melee rune spell buff with 650 points remaining.
Unable to get group id, char not found!
Unable to get raid id, char not found!
[Debug] [CLIENT__NET_ERR] Nunyas: Unhandled incoming opcode: [OpCode OP_WeaponEquip2 (0x63da) Size=8]
   0: 8D 01 00 00 40 00 00 00                            | ....@...
[Debug] [CLIENT__NET_ERR] Nunyas: Unhandled incoming opcode: [OpCode OP_WeaponEquip2 (0x63da) Size=8]
   0: 8D 01 00 00 80 00 00 00                            | ........
[Debug] [CLIENT__NET_ERR] Nunyas: Unhandled incoming opcode: [OpCode OP_WeaponEquip1 (0x6c5e) Size=12]
   0: 8D 01 00 00 00 00 00 00 - 00 00 00 00              | ............
Reply With Quote
  #29  
Old 10-24-2009, 12:32 PM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

What that log tells me is when you zone in (I presume your zoning into templeveeshan with a group with at least one bot in it), your server is unable to find your group id when it tried to execute this sql command:

Code:
RunQuery(query, MakeAnyLenString(&query, "SELECT groupid from group_id where name='%s'", name), errbuf, &result)
Its too bad we can't debug this for you.

Maybe you can edit your database.cpp file and change the logic that prints the error message "Unable to get group id, char not found!" to something like the following:

Code:
printf("Unable to get group id, char name %s not found!\n", name);
at least then you can be sure of what client or bot it is trying to get the group id for and then check to see if that exact name is in your group_id table.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #30  
Old 10-24-2009, 12:37 PM
prickle
Hill Giant
 
Join Date: Sep 2009
Posts: 147
Default

There are the log entries made for spawning my bot and adding to group

MySQL Tables after spawning bot and adding to group (bot is Nukesalot leader os PC Nunyas):
Code:
mysql> select * from group_id;
+---------+--------+-----------+
| groupid | charid | name      |
+---------+--------+-----------+
|   92004 |     16 | Nukesalot |
|   92004 |      6 | Nunyas    |
+---------+--------+-----------+
2 rows in set (0.00 sec)

mysql> select * from group_leaders;
+-------+------------+---------+--------------+
| gid   | leadername | marknpc | leadershipaa |
+-------+------------+---------+--------------+
| 92004 | Nunyas     |         |              |
+-------+------------+---------+--------------+
1 row in set (0.00 sec)
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 06:50 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