PDA

View Full Version : EQEmu_Update System - Bots and AA's


Huppy
11-28-2015, 11:42 AM
I've been vigorously trying to sort these little details out, but not much success. I've scrolled
through the changelog to see if there was anything I missed.
First of all, I have went all through the database trying to find a rulevalue, etc to set the
number of bots allowed. I can't find anything. Definately nothing in the rule values and
actually not much in there at all regarding bots.
The bots are working, for the most part, they don't zone with client. I remember having
a fix for that a long time ago, before all this new updating system came along.
As you will see below, I have ran the updates (twice even to make sure).


Enter numbered option and press enter...

> 4
Retrieving latest bots database manifest...
o URL: (https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/git/bots/bots_db_update_manifest.txt)
o Saved: (db_update/db_update_manifest.txt)
Reading manifest...

DB up to date with: 9000 - '2015_09_30_bots.sql


I was also trying to find out the problem with the AA system. After clients spend their AA's
when they zone, they lose all of the spent AA's. Any points that are not spent are still there,
but showing the number of spent AA's as well. Just the whole spent AA's are reset back to zero

This morning, just to make sure, I ran every entry in the eqemu_update twice. The source
code is totally up to date as well. These are just a couple little quirks I'm trying to work out.

AFTER POST EDIT : Found a post with this fix to get the AA's working :
http://www.eqemulator.org/forums/showthread.php?t=40152

RENAME TABLE `character_alternate_abilities` TO `character_alternate_abilities_old`;
DROP TABLE IF EXISTS `character_alternate_abilities`;
CREATE TABLE IF NOT EXISTS `character_alternate_abilities` (
`id` int(11) unsigned NOT NULL DEFAULT '0',
`aa_id` smallint(11) unsigned NOT NULL DEFAULT '0',
`aa_value` smallint(11) unsigned NOT NULL DEFAULT '0',
`charges` smallint(11) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`,`aa_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Now to have some lunch and work on the bot quirks :)

Uleat
11-28-2015, 03:07 PM
I'm not sure on that AA's issue..especially since the owner of that thread acknowledged that he didn't have the renamed table. (He probably had an error that he didn't catch.)


On the bot issues, that '9000' script is designed to be an initial schema loader as well as a conversion script.

If you have an existing bots database, then the new schema will be created and the old data imported.

If you have an existing database with no bots schema, then there is no need to run the old 'load_bots.sql' before applying the 9000 update. You will just create unneeded and
unused tables in your database. (That's why it has been moved to the deprecated folder.)


I know there are issues with applying the 9000 script in some cases. I'm not 100% why..but, it may be related to individual server settings - such as 'INNODB_STRICT_MODE'
being set to 'ON.' If that's the case, I can set that on a per-session basis..but, I'm waiting on a reply from a couple of people before I make that change.

What I would do is verify the actions of the script. By that, I mean double-check that all of the new tables were created, the two functions and the four views.

If they do not exist, you can basically run each of those queries manually to fulfill the update requirement.

Just follow the flow of the parent script, minus creating the actual 'LoadBotsSchema' procedure.

- Create the new table
- Import data from the old table (if it exists)
- Rename the old table (if it exists)

Then add the two functions..and finally, the four views.


If done manually, you will also need to check the `db_version` table to see if you have an existing `bots_version` column.

If not, then just create another column with the same criteria as the `version` one - naming it `bots_version,` of course.

Then set that to '9000.'

(If you want to troubleshoot the script, you can set `bots_version` to '0' and it should re-run when using 'eqemu_update.pl'.)


That should bring you up to date for bots.

If you're still having problems, just post back or pm me.

Huppy
11-28-2015, 03:44 PM
I will check all that out, thanks. In the mean time, I DID in fact try setting the bot db to 0,
then I ran the update script. Nothing came out of it, it still said it was up to date at 9000.
I went back in to db version table and it still said 0. So I changed it back to 9000.

Something thats really strange, I ran the following script that I got out of another one : (before I read your post)

INSERT INTO rule_values VALUES ('1', 'Bots:BotManaRegen', '3.0', 'Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players.');
INSERT INTO rule_values VALUES ('1', 'Bots:BotFinishBuffing', 'false', 'Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.');
INSERT INTO rule_values VALUES ('1', 'Bots:CreateBotCount', '150', 'Number of bots that each account can create');
INSERT INTO rule_values VALUES ('1', 'Bots:SpawnBotCount', '71', 'Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid');
INSERT INTO rule_values VALUES ('1', 'Bots:BotQuest', 'false', 'Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl');
INSERT INTO rule_values VALUES ('1', 'Bots:BotGroupBuffing', 'false', 'Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB.');
INSERT INTO rule_values VALUES ('1', 'Bots:BotSpellQuest', 'false', 'Anita Thrall\'s (Anita_Thrall.pl) Bot Spell Scriber quests.');

After I ran that script, I got all QUERY OK on it with no errors. Then when I checked the
rule values, none of it was there.

Uleat
11-28-2015, 04:23 PM
Hmm...

I really don't have an answer for that one :shock:

Huppy
11-28-2015, 04:35 PM
Hmm...

I really don't have an answer for that one :shock:

All of the tables, 4 views and 2 functions are there. I do know, when a client that I was
working with to do some testing, my GM client window would get a bunch of MySQL
errors whenever he spawned his bots. I got one myself "unknown column in gm.mob_type"

I'm going to try dropping any all bot schemas (tables, views, etc.) including the bot_data,
which will be an inconvienience, but then re-run the script and see if it loads everything.

Uleat
11-28-2015, 04:45 PM
Is your server code up-to-date for using the new bots schema?

Huppy
11-28-2015, 04:53 PM
Is your server code up-to-date for using the new bots schema?

I would think so, it was updated less than a week ago. I just tried a "git pull" this morning,
and it had nothing new.

Huppy
11-28-2015, 05:00 PM
Ok, this is what I am getting now, hahahaha I ran this 3 times (with "4")

It created the two functions, but nothing else, no tables or views

================================================== ==========
#::: EQEmu Update Utility Menu: (eqemu_update.pl)
================================================== ==========
1) [Backup Database] :: (Saves to Backups folder)
2) [Backup Database Compressed] :: (Saves to Backups folder)
3) [EQEmu DB Schema] :: Check and stage pending REQUIRED Database updates
4) [EQEmu DB Bots Schema] Run pending REQUIRED updates... (1)
5) [OPCodes] :: Download latest opcodes for each EQ Client
6) [Maps] :: Download latest map and water files
7) [Plugins (Perl)] :: Download latest Perl plugins
8) [Quests (Perl/LUA)] :: Download latest PEQ quests and stage updates
9) [LUA Modules] :: Download latest LUA Modules (Required for Lua)
10) [DB Data : Alternate Advancement] :: Download Latest AA's from PEQ (This overwrites existing data)
20) [Update the updater] Force update this script (Redownload)
0) Exit

Enter numbered option and press enter...

> 4
Running Update: 9000 - 2015_09_30_bots.sql
ERROR 1062 (23000) at line 675: Duplicate entry '1-Bots:CreationLimit' for key 'PRIMARY'
ERROR 1146 (42S02) at line 735: Table 'peqdb.bot_data' doesn't exist
ERROR 1146 (42S02) at line 755: Table 'peqdb.bot_groups' doesn't exist
ERROR 1146 (42S02) at line 768: Table 'peqdb.bot_data' doesn't exist
ERROR 1146 (42S02) at line 779: Table 'peqdb.bot_guild_members' doesn't exist
Missing DB Update 9000 '2015_09_30_bots.sql'
o URL: (https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/git/bots/required/2015_09_30_bots.sql)
o Saved: (db_update/2015_09_30_bots.sql)

================================================== ==========
#::: EQEmu Update Utility Menu: (eqemu_update.pl)
================================================== ==========
1) [Backup Database] :: (Saves to Backups folder)
2) [Backup Database Compressed] :: (Saves to Backups folder)
3) [EQEmu DB Schema] :: Check and stage pending REQUIRED Database updates
4) [EQEmu DB Bots Schema] Run pending REQUIRED updates... (1)
5) [OPCodes] :: Download latest opcodes for each EQ Client
6) [Maps] :: Download latest map and water files
7) [Plugins (Perl)] :: Download latest Perl plugins
8) [Quests (Perl/LUA)] :: Download latest PEQ quests and stage updates
9) [LUA Modules] :: Download latest LUA Modules (Required for Lua)
10) [DB Data : Alternate Advancement] :: Download Latest AA's from PEQ (This overwrites existing data)
20) [Update the updater] Force update this script (Redownload)
0) Exit

Enter numbered option and press enter...

>

Uleat
11-28-2015, 05:06 PM
Ok... You're getting the 'infamous' error of unknown origin...

Can you run this query and tell me what you get for a result?

SELECT `VARIABLE_VALUE` FROM `information_schema`.`GLOBAL_VARIABLES` WHERE `VARIABLE_NAME` LIKE 'INNODB_STRICT_MODE'

Huppy
11-28-2015, 05:14 PM
Ok... You're getting the 'infamous' error of unknown origin...

Can you run this query and tell me what you get for a result?

SELECT `VARIABLE_VALUE` FROM `information_schema`.`GLOBAL_VARIABLES` WHERE `VARIABLE_NAME` LIKE 'INNODB_STRICT_MODE'

+----------------+
| VARIABLE_VALUE |
+----------------+
| OFF |
+----------------+
1 row in set (0.00 sec)

Uleat
11-28-2015, 05:19 PM
Well..that's even more confounding...

If it had been 'ON,' I might have had a fix for that..back to web it is, then...


No one has been able to answer as to why that is failing on a few systems and not all - works fine for me.

Uleat
11-28-2015, 05:36 PM
Actually, I take that back...

ERROR 1062 (23000) at line 675: Duplicate entry '1-Bots:CreationLimit' for key 'PRIMARY'
is different and explains your sourcing failure.

It doesn't, however, explain why the code block is failing...

Huppy
11-28-2015, 05:44 PM
Good news/bad news
I just ran that old script drop_bots.sql I have no idea what it found, I had nothing in the
database involving bots, it was all gone and deleted.
Then I ran the update and it created ALL the tables, views, functions.
BUT, it did not update the rule values. Only thing in there is Bots:AAExpansion

Uleat
11-28-2015, 06:43 PM
Grr... (not at you..)

I wrote that in a procedure to prevent this exact thing from happening...


I may have to change the way that script works since my noted fail count is now 3.

Huppy
11-28-2015, 07:07 PM
I've got something going on now, that is way out there, hahaha
Since I dumped all the bot entries and let the script put it all back in, I logged on with my
own client just to see if bots would zone. But first I had to create a bot. Not so easy.

I tried this out several times to make sure it was not a coincidence, but everytime I tried
to create a bot, it would do nothing, then I would get a disconnected screen, then thrown
back to the character select.

I tried it with various scenarios. I could zone around, stay on for random amount of time,
but as soon as I try to create a bot, I end up back at the character select.

The bot command is there. I can type #bot list and tells me I have none.
I can type #bot help and it displays no problem.
But creating one .......different story, hahaha

Uleat
11-28-2015, 07:16 PM
Definitely check your logs - especially for query failures.

Huppy
11-28-2015, 07:43 PM
I cleared all the logs out of folder, then ran the scenario with my toon. It created a couple
new zone files, when I logged in and typed : create testorrbott 1 11 male
It threw me back to to character select. Nothing else showed up.
By the way, my toon was in Guild Lobby at the time.

From /logs/zone/log file :

[11-28-2015 :: 17:37:32] [Zone Server] CURRENT_VERSION: 1.1.3
[11-28-2015 :: 17:37:32] [Zone Server] Mapping Incoming Opcodes
[11-28-2015 :: 17:37:32] [Zone Server] Loading Variables
[11-28-2015 :: 17:37:32] [Zone Server] Loading zone names
[11-28-2015 :: 17:37:32] [Zone Server] Loading items
[11-28-2015 :: 17:37:32] [Zone Server] Loading npc faction lists
[11-28-2015 :: 17:37:32] [Zone Server] Loading loot tables
[11-28-2015 :: 17:37:32] [Zone Server] Loading skill caps
[11-28-2015 :: 17:37:32] [Zone Server] Loading spells
[11-28-2015 :: 17:37:32] [Zone Server] Loading base data
[11-28-2015 :: 17:37:32] [Zone Server] Loading guilds
[11-28-2015 :: 17:37:32] [Zone Server] Loading factions
[11-28-2015 :: 17:37:32] [Zone Server] Loading titles
[11-28-2015 :: 17:37:32] [Zone Server] Loading tributes
[11-28-2015 :: 17:37:32] [Zone Server] Loading corpse timers
[11-28-2015 :: 17:37:32] [Zone Server] Loading commands
[11-28-2015 :: 17:37:32] [Zone Server] 254 commands loaded
[11-28-2015 :: 17:37:32] [Zone Server] Loaded default rule set 'default'
[11-28-2015 :: 17:37:32] [Zone Server] Loading Perl Event Export Settings...
[11-28-2015 :: 17:37:32] [Zone Server] Loading quests
[11-28-2015 :: 17:37:32] [Quests] Tying perl output to eqemu logs
[11-28-2015 :: 17:37:32] [Quests] Creating EQEmuIO=HASH(0x26d2e00)
[11-28-2015 :: 17:37:32] [Quests] Creating EQEmuIO=HASH(0x26d34d8)
[11-28-2015 :: 17:37:32] [Quests] Loading perlemb plugins.
[11-28-2015 :: 17:37:32] [Quests] "my" variable $Item1 masks earlier declaration in same scope at plugins/quest_handin.pl line 19.
[11-28-2015 :: 17:37:32] [Quests] "my" variable $Item2 masks earlier declaration in same scope at plugins/quest_handin.pl line 21.
[11-28-2015 :: 17:37:32] [Quests] "my" variable $Item3 masks earlier declaration in same scope at plugins/quest_handin.pl line 23.
[11-28-2015 :: 17:37:32] [Quests] "my" variable $Item4 masks earlier declaration in same scope at plugins/quest_handin.pl line 25.
[11-28-2015 :: 17:37:32] [Quests] Subroutine vtell redefined at plugins/voicetell.pl line 6.
[11-28-2015 :: 17:37:32] [Quests] Subroutine Autovtell redefined at plugins/voicetell.pl line 56.
[11-28-2015 :: 17:37:32] [Quests] Subroutine CalcDestFromHeading redefined at plugins/path_tools.pl line 221.
[11-28-2015 :: 17:37:32] [Quests] Subroutine moelib_spawn_block redefined at plugins/spawn_utils.pl line 2.
[11-28-2015 :: 17:37:32] [Quests] Subroutine moelib_spawn_block_center redefined at plugins/spawn_utils.pl line 23.
[11-28-2015 :: 17:37:32] [Quests] Subroutine moelib_spawn_circle redefined at plugins/spawn_utils.pl line 45.
[11-28-2015 :: 17:37:32] [Quests] Subroutine GetMaxLoSDistFromHeading redefined at plugins/spawn_utils.pl line 71.
[11-28-2015 :: 17:37:32] [Quests] Subroutine FaceBestHeading redefined at plugins/spawn_utils.pl line 134.
[11-28-2015 :: 17:37:32] [Quests] Subroutine HeadingToShortestLoS redefined at plugins/spawn_utils.pl line 204.
[11-28-2015 :: 17:37:32] [Quests] Subroutine MoveAwayFromWall redefined at plugins/spawn_utils.pl line 268.
[11-28-2015 :: 17:37:32] [Quests] Subroutine MoveToFirstBestZ redefined at plugins/spawn_utils.pl line 340.
[11-28-2015 :: 17:37:32] [Quests] Subroutine SpawnZone redefined at plugins/spawn_utils.pl line 373.
[11-28-2015 :: 17:37:32] [Quests] Subroutine GetReverseHeading redefined at plugins/spawn_utils.pl line 456.
[11-28-2015 :: 17:37:32] [Quests] Subroutine ConvertHeadingToDegrees redefined at plugins/spawn_utils.pl line 477.
[11-28-2015 :: 17:37:32] [Quests] Unquoted string "false" may clash with future reserved word at plugins/Expeditions.pl line 375.
[11-28-2015 :: 17:37:32] [Quests] Subroutine RandomRange redefined at plugins/random_range.pl line 3.
[11-28-2015 :: 17:37:32] [Zone Server] Entering sleep mode
[11-28-2015 :: 17:37:32] [Zone Server] Starting EQ Network server on port 7009

From /logs/zone file:

[33m[Zone Server] Loading server configuration..[0m
[33m[Zone Server] Connecting to MySQL...[0m
[33m[Status] Starting File Log 'logs/zone_32076.log'[0m
[33m[Zone Server] CURRENT_VERSION: 1.1.3[0m
[33m[Zone Server] Mapping Incoming Opcodes[0m
[33m[Zone Server] Loading Variables[0m
[33m[Zone Server] Loading zone names[0m
[33m[Zone Server] Loading items[0m
[33m[Zone Server] Loading npc faction lists[0m
[33m[Zone Server] Loading loot tables[0m
[33m[Zone Server] Loading skill caps[0m
[33m[Zone Server] Loading spells[0m
[33m[Zone Server] Loading base data[0m
[33m[Zone Server] Loading guilds[0m
[33m[Zone Server] Loading factions[0m
[33m[Zone Server] Loading titles[0m
[33m[Zone Server] Loading tributes[0m
[33m[Zone Server] Loading corpse timers[0m
[33m[Zone Server] Loading commands[0m
[33m[Zone Server] 254 commands loaded[0m
[33m[Zone Server] Loaded default rule set 'default'[0m
[33m[Zone Server] Loading Perl Event Export Settings...[0m
[33m[Zone Server] Loading quests[0m
[33m[Zone Server] Entering sleep mode[0m
[33m[Zone Server] Starting EQ Network server on port 7009[0m

Huppy
11-28-2015, 08:11 PM
I just tried shutting the whole thing down, clearing all logs, then starting it all back up.
I logged in with toon, ran the scenario, but nothing different in logs.

Huppy
11-28-2015, 08:43 PM
Hahaha, here's something a little more narrowed down through some more testing.
All those times I was trying to create the bot, I was doing it with a GM toon.
I logged on with a regular non-GM acct, and was able to successfully create and spawn a bot.
The bot works great and even zones properly with me.
So the disconnect/character select throwback must have something to do with the GM # cmd
of creating the bot ?

Uleat
11-28-2015, 08:48 PM
That sounds very odd..I'll take a look at the code.

Huppy
11-28-2015, 09:24 PM
Not sure if this will help, but this is the dump my client gave when disconnected,
with GM toon. Have no idea what thay folder addy on second line is all about, it doesn't exist, haha

[Sat Nov 28 19:16:14 2015]07070:Networking: connection terminated [client:DisconnectReasonIcmpError,server:Disconnect ReasonNone]
[Sat Nov 28 19:16:14 2015]07071:disconnected at C:\p4\EverQuest\live\EverQuest\EverQuest.cpp:19122 (char. select) DisconnectReasonIcmpError

[Sat Nov 28 19:16:14 2015]07072:Character is Huppy.

[Sat Nov 28 19:16:14 2015]07073:YOU HAVE BEEN DISCONNECTED.

Huppy
11-28-2015, 10:29 PM
I went in to the db table and enabled logging for commands. It has over 20 very
strange warnings. I can't post them all on here, but one example :

11-28-2015 :: 20:00:34] [Commands] command_init(): Warning: Command 'shownumhits' defaulting to access level 0!

In the commands table the status value is where they should be for GM commands,
but most of the warnings (like above), are showing that for a lot of those gm cmds.
I shut my server down until I find out whats going on with that.

Uleat
11-28-2015, 11:03 PM
Wow! And ouch!

Huppy
11-28-2015, 11:49 PM
DEFINATELY !!! I just tested it out with a regular (non-GM) toon and it was able to enter
some cmds it's not supposed to. I wonder if this is something on other servers that hasn't
been noticed yet One cmd available is in the "world connect" area.

demonstar55
12-04-2015, 04:03 PM
Can you PM a list of commands and maybe a full log of commands getting defaulted to 0?