|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Development::Bots Forum for bots. |
|
|
|
06-06-2016, 08:55 PM
|
|
Sarnak
|
|
Join Date: Aug 2007
Location: NC, USA
Posts: 93
|
|
Bot problems: can't create (invalid name) and can't convert old bots to new system
It has been a while, around June 2015. I have tried to update a few times since then, but eventually gave up.
This time around:
I pulled the latest server files and made sure to check EQEMU_ENABLE_BOTS in Cmake. build seemed to go fine, moved the new files into the server directory and ran the update script. A few update files came up for selections 3 and 4 and I proceeded with the updates.
I had several bot errors and concluded that I was missing the new bot_data, bot_groups, etc... files. I did some searching and found the update files through this link:
https://github.com/EQEmu/Server/tree.../bots/required
I went ahead and ran the updates from those files. Now the tables exist, which I am assuming is a good thing, however, my old bot info in tables like: bots, botinventory, etc... did not get moved to the new bot tables.
So, my old bots are currently inaccessible.
Also, when I try to create any bot, I get the message:
'xxxx' is an invalid name. You may only use characters 'A-Z', 'a-z', and '_' So I also cannot create new bots. I always fudge something up when I update. But, I am hoping I can get it fixed this time around.
Can anyone give some guidance on these errors, especially with the one related to bot creation?
|
|
|
|
06-06-2016, 09:14 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
There was a 'bot creation' issue that came up in another thread and it was because they didn't have the later required updates.
But, before you add those...
The import code I wrote worked fine for me in both sql and perl using mysql and mariadb.
I really don't know why some people run into issues with it because I can't reproduce the condition...
Try manually deleting the tables (, functions and views) that were added by that '9_30' script and check your `db_version` table to see if there's a `bots_version`
If there is, set its value to '0' and try manually running eqemu_update.pl again.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
06-06-2016, 09:20 PM
|
|
Discordant
|
|
Join Date: May 2016
Location: Above Hell
Posts: 400
|
|
If you scroll to the bottom of this page, there is a link to download an sql file for updating
bot tables. (best used for installing new bot tables), so it's not meant to help with your
old ones.
http://www.eqemulator.org/forums/sho...t=40114&page=6
|
|
|
|
06-07-2016, 04:33 PM
|
|
Sarnak
|
|
Join Date: Aug 2007
Location: NC, USA
Posts: 93
|
|
Thanks for the suggestions.
This is pretty confusing. I tried ULeet's solution first, but the updater blew past any bot_XXX table creations, only doing updates from 2016.
I then nuked the tables again and tried DanCanDo's solution, but I came up with the same error about naming the bots while in-game.
Finally, I tried to just make a clean server + DB but, again, the updater went past any bot table creations, and had a I noticed an error adding a foreign key in another update (probably related to not having the bot_XXX tables). After proceeding past the update section the server quickly displayed a C++ error looking something like the following:
"Debug Assertion failed!" ... "File: f:\dd\vtools\crt\crtw32\lowio\close.c" ... "Expression: (fg >= 0 && (unsigned)fh < (unsigned)_nhandle)
That last bit was unexpected for sure. But maybe it gives a hint? Any more thoughts on this?
I definitely appreciate the help.
**Edit: Recompiled. Clean server now does not crash, but still having the bot name problem there, and on the original server as well. **
Last edited by Krran; 06-07-2016 at 05:35 PM..
Reason: More info
|
|
|
|
06-07-2016, 06:20 PM
|
|
Sarnak
|
|
Join Date: Aug 2007
Location: NC, USA
Posts: 93
|
|
This is one of those times where I want to stick a pencil in my eye....
So. I created a bot. The solution was to capitalize the first letter of the name of the bot. This is apparently mandatory, but I must have missed that note in my irregular attendance to this forum over the past year or so.
That problem is now solved on my end.
But, as for the second problem, is there a way to convert the old bots I have (I have like 150), along with their gear and stuff, to the new bot system so I can access them?
|
|
|
|
06-07-2016, 08:21 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
We're going to have to rewrite the bots portion of the update script. That is suppose to import the old data..but, I have no idea what is going on there...
These are the versioning ids for the required updates: https://github.com/EQEmu/Server/blob...anifest.txt#L1
I would start by manually running '9000' - this will give you the required base conversion schema.
You can import by manually running the appropriate queries in this function: https://github.com/EQEmu/Server/blob...pdate.pl#L1177
If you get a failure, you'll know that your schema doesn't match up..or there's some other problem.
Double-check these entries against your database: https://github.com/EQEmu/Server/blob...pdate.pl#L1096
There were some rule name changes.
Verify that your bots were imported, then apply version updates '9001' thru '9006'
Update `db_version`.`bots_version` to '9006'
That's essentially what will need to be done to manually import the bots.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
|
|
|
|
|
|
06-07-2016, 09:09 PM
|
|
Discordant
|
|
Join Date: May 2016
Location: Above Hell
Posts: 400
|
|
Sorry to hear your having these problems, but I'm not sure why you would with a clean
install. I just did a (test) sourcing with new database and it has no errors. But I'm not
dealing with an "old bot system" with the fresh install.
These are steps I do which, seriously only take me about 10 minutes to complete:
(from the mysql prompt)
mysql> source peq.sql (name of clean beta database)
mysql> source player_tables.sql
mysql> source load_login.sql
mysql> source bot_tables.sql (this is the name of the CUSTOM file I linked above)
I also had to source in the function table:
Code:
DELIMITER $$
CREATE FUNCTION `GetMobType` (mob_name VARCHAR(64)) RETURNS CHAR(1)
BEGIN
DECLARE Result CHAR(1);
SET Result = NULL;
IF ((SELECT COUNT(*) FROM `character_data` WHERE `name` = mob_name) > 0) THEN
SET Result = 'C';
ELSEIF ((SELECT COUNT(*) FROM `bot_data` WHERE `name` = mob_name) > 0) THEN
SET Result = 'B';
END IF;
RETURN Result;
END$$
CREATE FUNCTION `GetMobTypeById` (mob_id INTEGER UNSIGNED) RETURNS CHAR(1)
BEGIN
DECLARE Result CHAR(1);
SET Result = NULL;
IF ((select `id` from `character_data` where `id` = mob_id) > 0) THEN
SET Result = 'C';
ELSEIF ((select `bot_id` from `bot_data` where `bot_id` = mob_id) > 0) THEN
SET Result = 'B';
END IF;
RETURN Result;
END$$
DELIMITER ;
After that, I just run eqemu_update.pl and update everything from #3 to 10#
Everything works fine after boot up. (bots included)
|
|
|
|
|
|
|
06-09-2016, 10:38 AM
|
|
Sarnak
|
|
Join Date: Aug 2007
Location: NC, USA
Posts: 93
|
|
Uleet,
Thank you, so much. You have helped me leap my server forward a year and have helped fill in several other things that were not operating correctly in my server even before I started updating. Things now look like they are working as they should. Old bots now spawn with their gear and they can even move through zones (they bugged in my old setup whenever I zoned). Just awesome.
I had to chop up the convert_existing_bot_data script quite a bit because I was missing many of the old bot tables to begin with, but it ran fine, as far as I can tell, once that was done.
I also ran the third script you linked, modify_db_for_bots; none of those entries were in my tables.
I think I lost things and did not do proper upkeep over the 8 years or so that I have been dragging these characters along, which probably resulted in many of my issues. I am just now formally learning some basics in SQL, so that helped my understanding of things this time around.
Thank you, again.
Actually I am having still having some AA problems. I can spend AAs, but they won't save... mysterious.
and DanCanDo,
What you described was pretty much the process I used to setup the clean server too, so I don't know why the new bot tables were not created during the update script. It will remain a mystery for me, I think. Thanks for your input as I tried to figure this out.
Last edited by Krran; 06-09-2016 at 11:23 AM..
Reason: Found AA problems
|
|
|
|
06-09-2016, 07:34 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
There has been some discussion in the forums, I believe, about that particular issue with AAs. If I run across it (them?) I'll post a link.
EDIT:
http://www.eqemulator.org/forums/showthread.php?t=39802
I'm not sure if this is the sql that the person was missing or not: https://github.com/EQEmu/Server/blob..._aa_update.sql
Versioning should have caught the need..but, I haven't reviewed the trigger for it...
END EDIT
If you do server backups with bots, there could be an issue with either the views or functions not making it into the dump.
It shows up at re-sourcing..usually crashing the process.
Adding the missing item before re-source alleviates that issue.
Another one I'll post a link for if I find it..
EDIT: http://www.eqemulator.org/forums/sho...d.php?p=244321
__________________
Uleat of Bertoxxulous
Compilin' Dirty
Last edited by Uleat; 06-09-2016 at 08:13 PM..
|
06-09-2016, 10:53 PM
|
|
Sarnak
|
|
Join Date: Aug 2007
Location: NC, USA
Posts: 93
|
|
Thanks for that script for sourcing backups with functions. I filed that away for later.
It looks like the AA update related to charges was applied to the database. I am going to research this and do some tests on the database later to figure out what is going on in case I can't find any other threads on the issue.
I am falling a little behind where I want to be in classes for now though, so I need to tend to that first, unfortunately.
|
06-10-2016, 01:40 AM
|
|
Discordant
|
|
Join Date: May 2016
Location: Above Hell
Posts: 400
|
|
Quote:
Originally Posted by Uleat
If you do server backups with bots, there could be an issue with either the views or functions not making it into the dump.
|
Something I do with my db backups,
mysqldump --routines -uroot -ppassword > peq peq.sql
BUT, for now that seems to only keep the views, after resourcing, I still have
to source in the functions.
If I do a fresh db install, the update script adds the views and then I manually
add the function afterwards. I don't find this an inconvenience, (chuckle)
|
06-14-2016, 05:41 AM
|
|
Sarnak
|
|
Join Date: Aug 2007
Location: NC, USA
Posts: 93
|
|
OK, I picked up a few minutes to look into my AA problem and figured I would report back in case anyone else has similar issues.
In my case, I had an extra column in my character_alternate_abilities table named "slot".
Since I had screenshots of my old AA settings, I just dropped the table and sourced in a clean and updated one and manually have been resetting the AAs on the 4 characters that have them. No big deal for me, but probably not an ideal solution for a someone serving a larger audience much larger than themselves.
Thanks again friends for catching me up, for your work, and for the patience to help troubleshoot stuff like this. This reclusive weirdo appreciates it.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 08:29 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|