EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bots (https://www.eqemulator.org/forums/forumdisplay.php?f=676)
-   -   Bot Binaries Update (https://www.eqemulator.org/forums/showthread.php?t=41191)

Uleat 03-09-2017 07:06 PM

Bot Binaries Update
 
The pre-compiled binaries for Akkadius's Installer package have been updated to the latest code.

If anyone has a sandbox that they are willing to test these on, I would appreciate any feedback.


-U


UPDATE:

For the most part the binaries appear to be functioning correctly.

There is, however, a slight snag in the update process.

You may need to manually run eqemu_server.pl once or twice to ensure that all update triggers are caught properly.


Running this query:
Code:

SHOW COLUMNS FROM `bot_spell_casting_chances`;
..should return 20 columns to be properly updated.


If a suitable fix for this can be found, I will update the binaries again.

This issue is only a minor update glitch and does not affect character data.

Jahosphat 03-09-2017 07:41 PM

We're updating to the new code now. Will report anything wonky :) Thanks for the work man

GRUMPY 03-10-2017 02:46 PM

I ran that bot setup on a test server (which was not bot enabled). Seems it all installed ok, created and spawned a bot.
Is 9017 the current update version ? If so, it's normal.
EDIT: Sorry forgot to add, I got 20 rows in that query.

Akkadius 03-10-2017 03:56 PM

Thanks for taking care of bots Uleat

Uleat 03-10-2017 05:50 PM

Aye, figured I would play nice and share :)

Uleat 03-10-2017 08:07 PM

There is a critical fix in the binaries.

If anyone has updated within the last 24 hours, you should download these new ones.

ionhsmith 03-12-2017 07:55 PM

How do I update the server pack from Akkadius? I thought it was made to auto update?

Uleat 03-12-2017 09:56 PM

Run 'eqemu_server.pl' manually, select 'assets' and you can download the latest pre-compiled binaries.

NostalgiaEQ 03-12-2017 10:07 PM

Quote:

Originally Posted by Uleat (Post 253361)
Run 'eqemu_server.pl' manually, select 'assets' and you can download the latest pre-compiled binaries.

I typed assets now what? windows_server_download or windows_server_latest?

Thanks

Uleat 03-12-2017 10:32 PM

Now, this is for BOTS-enabled binaries and you would want to use windows_server_download_bots for this particular update.


If you're not using BOTS, those stable binaries have not been updated as recently.

Downloading the 'latest' of those gives you access to the most recent changes without waiting..but, it also subjects you to the possibility of unvetted code
and the increased risk of bugs and server crashes.


I do plan on updating both 'stable' downloads in a week or so, after the recent changes have had some time accumulated on them.

kokey98 03-21-2017 07:59 PM

So i've run eqmu server.pl multiple times...

SHOW COLUMNS FROM `bot_spell_casting_chances`;

returns 6 col and 20 rows

i've used both updates through he auto-update system (assets/db). i even doubled and quadrupled, at this point Nth times updated bots db. i've also run the sql files that keep re-downloading by hand. (9010 and 9014)

description from log:

the first go-round it says i am missing 9010 - which then re-downloads 9010.... runs update 9010.

it starts going through manifest again (assume normal), but this time says i am missing 9014. which was not missing moment before (same process after "start server with LS.pl").

if i restart the server, it does the same 9010 missing alone, then 9014 missing alone. But, it's in reverse order. as i write this i am going to look inside and see what the loop is... but may still need guidance?


also, the manifest that is downloaded tops at 9015 - so i don't see 9017 like someone else did? 3 entries for 2-26 are the latest in the manifes that keeps re-downloading.

each time i start the server, it says bots database not up-to-date with binaries and does what i describe. my concern is that it performs a backup each and every time... and i'm not changing anything, lol.

server does work fine - i think, but i'd rather not have a 200mb write to an ssd for no reason each time i restart my server :p i assume it's quite wasteful to be re-downloading all the time too.

did i screw something up? what can i explore?... i'm good with google and probably won't need my hand held, but a little guidance is sought at this point... i've done what i can deduce on my own. i've been dinking around with it on my own for more than i care to admit... no mas

edit: tried starting from scratch completely, too (at least downloading binaries and fresh db... nothing lost... nothign put into server yet. so, anything along those lines is okay, too.

GRUMPY 03-21-2017 08:23 PM

Quote:

Originally Posted by kokey98 (Post 253651)
my concern is that it performs a backup each and every time... and i'm not changing anything, lol.

server does work fine - i think, but i'd rather not have a 200mb write to an ssd for no reason each time i restart my server :p i assume it's quite wasteful to be re-downloading all the time too.

I use this to disable the script (and world) from force checking updates. Nothing wrong with it for people who use it.
I just rename the original to eqemu_server.OFF and save this one as the .pl script. Then run the main one when I am
in the mood for update checks (grin). But some people need automated things to compensate for a busy day.

Code:

#!/usr/bin/perl

###########################################################
#::: General EQEmu Server Administration Script
#::: Purpose - Handles:
#:::        Automatic database versioning (bots and normal DB)
#:::        Updating server assets (binary, opcodes, maps, configuration files)
#::: Original Author: Akkadius
#:::        Contributors: Uleat
#::: Purpose: To upgrade databases with ease and maintain versioning
###########################################################

use Config;
use File::Copy qw(copy);
use POSIX qw(strftime);
use File::Path;
use File::Find;
use Time::HiRes qw(usleep);

#::: Variables
#$install_repository_request_url = "https://raw.githubusercontent.com/Akkadius/EQEmuInstall/master/";
#$eqemu_repository_request_url = "https://raw.githubusercontent.com/EQEmu/Server/master/";

#::: Globals
#$time_stamp = strftime('%m-%d-%Y', gmtime());
#$db_run_stage = 0; #::: Sets database run stage check
#if($Config{osname}=~/freebsd|linux/i){ $OS = "Linux"; }
#if($Config{osname}=~/Win|MS/i){ $OS = "Windows"; }
#$has_internet_connection = check_internet_connection();
#($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime();

#::: Check for script self update
#do_self_update_check_routine();
#get_perl_version();
#read_eqemu_config_xml();
#get_mysql_path();

#::: Remove old eqemu_update.pl
#if(-e "eqemu_update.pl"){
#        unlink("eqemu_update.pl");
#}
#::: Create db_update working directory if not created
#mkdir('db_update');

#print "[Info] For EQEmu Server management utilities - run eqemu_server.pl\n" if $ARGV[0] eq "ran_from_world";

#::: Check if db_version table exists...
#if(trim(get_mysql_result("SHOW COLUMNS FROM db_version LIKE 'Revision'")) ne "" && $db){
#        print get_mysql_result("DROP TABLE db_version");
#        print "[Database] Old db_version table present, dropping...\n\n";
#}


kokey98 03-21-2017 09:06 PM

heh i was just looking though that .pl file, lol... Thank you.. i will back old pl script or edit it as yours is. i'll just run eqemu_server.pl to do updates manually on occasion. i prefer that anyway.

but i also might have useful info why update is snagging?

-- Update npc_spells_id to new values
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3002' WHERE `npc_spells_id` = '701';


that's the first 2 lines form one of the update sql's... believe it's 9014

set npcspell id to 3002 where npc spell id is 701... that' can't be right.. i assume this is supposed to be set npc spells id where "id" is 701?

"id" doesn't go past low-2000's is why i assume... not real familiar with this db structure at all, lol.

Uleat 03-21-2017 09:21 PM

I wasn't aware of any circular triggers..but, there is one that triggers late due to the way the criteria is specified - and only doesn't trigger the first time around if your
version is older than the first trigger. (That was a mistake on my part. I build triggers based on current conditions - not assuming that older updates are not in place.)


Since the bots update list is fairly small, you can run through its manifest really quick.

You can manually run the queries listed here: https://github.com/EQEmu/Server/blob...anifest.txt#L1

For instance, to check update 9000, run..
Code:

SHOW TABLES LIKE 'bot_data'
If the query return matches the criteria, in this case `empty` (zero results,) you would run the update sql `2015_09_30_bots.sql` located in the `required` sub-directory.

Just be sure that you don't update past the version of binary version that you are using..that would likely cause problems.

When you've finished manually updating, set the `db_version`.`bots_version`field to the last update that you applied.


If you can pin-point the update that is causing problems, I can look into fixing any problems with it.

Uleat 03-21-2017 09:28 PM

On that change in particular, that is correct.

I moved bots' npc_spells_id to the 3000 range.

In addition, the original grouping only included 12 of the 16 player classes allowed and were not in the order of the classes.

I re-organized that to sequentially list them, as well as add the 4 missing melee classes. This will allow future bot work to include aa-based abilities in the
AI_Spell processing.

The npc_spells_id is now determined by:
Code:

Bot::GetClass() + 3000

kokey98 03-21-2017 09:31 PM

well my file has some noticeable differences... i removed the nested-if os thing because i only use windows... but...

if(-e "eqemu_server_skip_update.txt"){
$skip_self_update_check = 1;
}

this looks like something simpler than 2 pl files.

kokey98 03-22-2017 12:10 AM

Quote:

Originally Posted by Uleat (Post 253659)
On that change in particular, that is correct.

I moved bots' npc_spells_id to the 3000 range.

In addition, the original grouping only included 12 of the 16 player classes allowed and were not in the order of the classes.

I re-organized that to sequentially list them, as well as add the 4 missing melee classes. This will allow future bot work to include aa-based abilities in the
AI_Spell processing.

The npc_spells_id is now determined by:
Code:

Bot::GetClass() + 3000

Woot, i didn't know there was a .bot version... that's definitely zero right now.

okay, good thing the previous values were all 3006 as i've changed the wrong thing... i see why the loop i saw happened since, their is crossover between 9010 and 9014... only a problem if it runs a second time without a version value, i assume, like me. i did do a complete new install and ran through them by hand after i saw the same errors...

i've run that 9015 sql containing:

-- Update npc_spells_id to new values
UPDATE `bot_spells_entries` SET `npc_spells_id` = '3002' WHERE `npc_spells_id` = '701';

as i pasted above... but this time i ran as it is read... it did not change the values for some reason? i will figure it out, i dont say it as a request, but in case it's useful info.

i totally missed this reply somehow, sorry it's belated even though i replied to other things previously.

Akkadius 03-22-2017 12:20 AM

Guys really shouldn't be disabling the eqemu_server.pl script from updating, that is what it is designed to do.

However if there is an update logic in a loop then obviously someone needs to address it and fix it (a dev)

If you need to disable update checking, there are ways to do it but not recommended.

The update routine should not be invasive at all, if it is please report what you're seeing

Uleat 03-22-2017 12:30 AM

What does..
Code:

SELECT `npc_spells_id` FROM `bot_spells_entries` GROUP BY `npc_spells_id`;
..return?


EDIT: Forgot the GROUP BY..

kokey98 03-22-2017 12:34 AM

already uncommented... i realized the mistake i caused... there wasn't a loop, the revision wasn't set, so when each time booted up, it thought i needed an update.

since 9010 and 9014 change some or all of hte same things, after 9014 was good to go, it came along to 9010 and the check for it was missing, so it went ahead and ran 9010 it removes the revision line from 9014 or whatever... sorry for bad vocab..

anyway, all user error....i may just go back to svn checkout, compile, move. although i never used the languages i learned, the familiarity makes that stuff easy enough.

Uleat 03-22-2017 12:37 AM

No, you are correct about the 2nd run trigger..I've already had someone report that.

The constant looping, however, is a completely different beast...

kokey98 03-22-2017 01:22 AM

well i used the setup_bots version with a new db. but i wasn't sure if the 9010/9014 thing get reversed on me, so...

then i went through and ran each update sql in order based on manifest file. i set db and bot version to 9107/9015 and everything seems fine.

if you can tell by that order of behaviour soemthing will be wrong, let me know.. otherwise, thanks for the help again.

edit: about the loop-ish thing -- "DROP TABLE IF EXISTS `bot_spell_casting_chances`;" is the cause i think, because it removes the versioning line from 9014.

can update #9010 - 2017-02-23_spell_casting_chances have a condition on that to check for the versioning entry with "255" etc from 9014?

that would prevent what is happening. or something besides "if exist, drop".

i learned sql 20 years ago in college... lol remember basic concepts only

Uleat 03-22-2017 02:13 AM

IIRC, I dropped the 'value' column in the newer table..and since it doesn't exist if the older table doesn't, the query errors out.

What I should do is just replace:
Code:

SHOW COLUMNS FROM `bot_spell_casting_chances` LIKE 'value'
..with an `information_schema` table check for that column and it shouldn't error out due to the table not being there.

SHOW COLUMNS is convenient to use..but, it doesn't play well when the table doesn't exist...


EDIT: Lol! I wish I had learned it 20 years ago..I was too busy loading 500/2000 pound munitions on F-15s/16s

Uleat 03-22-2017 03:47 AM

Ok...

I added a second trigger for that script file to be applied.

One or the other should catch depending on the versioning of the database being updated.

kokey98 03-22-2017 03:39 PM

they both "caught" for me. when i ran update, not sure if i am having same issue, then... or was...

no bot version, so it repeated proces... since they both edit that table and one drops it, after it gets dropped the 9014 has to run again.

it was only a problem that i saw because i went through he update multiple times without reason (i didn't have a version # for bots).

just making sure the info i gave was communicated properly. i only perceive a small portion of the picture.

you drop the whole table in the 9010 sql update, not just removing a column - but only a problem for a dummy who doesn't have the bot.version. otherwise, it wouldn't run back through sql updates that have already run properly 1 time.

* as you probably know, "learning" a language or something like sql in a classroom environment is not very thorough... the main benefit is organizational concepts, structure etc etc. you learn the "right" way before you develop bad habits.

what are there 7 tenets to a relational database? the first 4-5? are all that's important to all but the most sophisticated setups and are common sense. i couldn't recite them, but i would probably adhere to them in practice, because it's the logical way to make it.

so, i use "learn" very loosely. i am familiar enough to google and recall some voacb and find an example of the sql command. the order of some things is not a fresh memory at all. i know enough to be very dangerous to my server's health :p

Uleat 03-22-2017 03:56 PM

9011 and 9014 don't trigger off of the same table..are you sure that it's not 9015 and instead of 9014?


The trigger process searches for required updates from newest to oldest..then applies from oldest to newest.

Since update 9015 'assumes' that 9011 is in-place, and that it is possible for that case not to be true, I added the 9016 query.


If 9014 isn't triggering the first time around..but, is on the second..I'm not sure what's going on there.


EDIT:

Oh, I see now..I was stuck on the issue that someone else reported..and 9016 should fix that.

Yes, I do see where 9010 and 9014 are tied..lemme look at that now.

Uleat 03-22-2017 05:33 PM

That's a critical update for bot bard spells (songs) that must be done in a very specific order.

If 9014 is applied (as in actual changes/rows affected != 0) before 9010 makes its changes, there will be issues.


Update 9009 is the same as what's in the 'normal' database updates. This was done to keep both versions on the same page. (Otherwise, the normal version
would still have bot id's listed.)

Update 9010 only deletes entries for the old designation of bot bard spells id (711.) It then applies the new spells under the old designation.

Update 9014 changes all spells ids to the new format:
Code:

Bot::GetClass() + 3000

I'll mull this one over for a while...

kokey98 03-22-2017 07:33 PM

okay, i dropped it manuall (couldn't use drop bots schema sql in eqemu-server.pl due to primary key constrain error?) I couldn't copy/paste it into the query without errors, either.. so i just went through line by line and dropped those tables.

then, i went through and sourced each SQL from your online repository in order based on manifest file. i had to copy/paste a few of the sql files ... the manifest points to the same file for 9015-9016, if that's a concern.

i think anyone who made a fresh server like me in that time period, possibly still?, is probably running into a problem, like me. but, if you had an existing server and as long as the updates haven't piled up it wouldn't occur. if you had to do those 2 updates at same time, then they will run into a similar problem.

(right? during automated update process it cycles through manifest 2 times from what i see on the screen. so, if the versioning line is removed by a newer update, when it cycles through a second time it thinks it's missing, even though it's been run.. loop)

Anyway, i was wrong the last time about fixing it.. i think i got it now... if anythign below seems off let me know... otherwise, thanks again (again).

Bard works fine... casting ooc spells at least. i didn't get into combat.

i had to copy/paste a few of the sql files ... the manifest points to the same file for 9015-9016, if that's a concern.

anyway... if bard is the only class with working castable spells at the moment... I think i got it working properly, lol. i noticed the shaman still SoWs but that may be a different beast than healing and combat spells.

i saw a few "warnings" while sourcing the sql files, but i think everything loaded fine... the one that didn't went in and it had already placed bot classes at 3001 - warrior etc... (whichever update that is). so, the changes were present, but not sure how that's possible, lol.

Uleat 03-22-2017 08:31 PM

The 9009 update performs a move of all existing bot spells from the npc table to the bot table.

At this point nothing has changed but the location of existing bots spells in the database.


Update 9010 actually drops the old bot bard spells and inserts the new ones.

At this point, all classes that could cast before should still have spells - original or modified list.


If you happened to drop your `bot_spells_entries` table, then no bots will have spells except for when the new bard ones that are added in update 9010. You'll
need to re-acquire them from an old database and make the id adjustments - if that is the case.

kokey98 03-22-2017 09:52 PM

Cool beans, thanks.

what you said makes sense. thnk i got the whole picture, now.. i can dink around more later when motivated.

starting over from scratch isn't much of a problem, if it comes to that. one thing is for sure, those maps are up-to-date!

funny, when i've compiled in the past there's no problems, and that's the more complicated process... just my kind of luck.. worth the effort in long-run, though.

Uleat 03-22-2017 10:06 PM

Yeah, I tend to complicate things... (2 + 2 = SQRT(16))


If you run into any problems with this, lemme know here or you can log into discord for a more immediate answer - if I'm online.

kokey98 03-23-2017 02:20 AM

Looks good so far... dropped entire peq db to start from scratch without bots and ran the individual bot sqls. .. added bot version in db before re-running eqemu-server.pl to update binaries and 9100+patches or whatever 1 was missing.... and it works. popped a few bots and they are casting and working as they should as far as i can tell.

any errors i saw in the eq-emu.pl process (initial new_server part only) i guess weren't too big of a deal. - some errors on a couple "has update" lines - i assume after the "|" in manifest part? (same 2-3 each time)

anythign i did by hand i double-checked the db for the changes... went slowly this time, lol.


(this time i exported any gridrows i've changed (merchants * 4 tabels etc) and saved a backup of the entire rules table... no mas on that crap. once i re-learn sql i'll make it an update of my own)

Thank you for the help.. where you pointed and what you explained to me saved tons of time.

* what's this discord thing.. is that like facebook ? LoL, kidding, i know what it is ... at least enough of what it is.

Uleat 03-28-2017 04:42 PM

Bots binaries have been updated to include the glm library update.

uberbeans 02-02-2018 06:59 PM

Hi all. Server installs great. Making my own offline great. But then once I setup_bots my start server will not open. Soon as I click it gets to world.exe and closes right away. Any help please thanks

Uleat 02-02-2018 07:36 PM

Give me a few minutes here.

There is a known issue regarding the new json config files and the current pre-built bot binaries.

uberbeans 02-02-2018 08:52 PM

Just can't figure it out. Just doing the eqinstall and changing ip's it works great. I did make a setup.bat file to run my own. Soon as I run setup bots. Run startup, world cmd opens n closes

Uleat 02-02-2018 09:26 PM

Try it now.

uberbeans 02-02-2018 09:43 PM

Try what? Should I start from scratch?

Uleat 02-02-2018 09:49 PM

Check for updated binaries and go from there :)


EDIT: I should say updated bots binaries.

uberbeans 02-02-2018 09:49 PM

Thank u so much for helping. Still can't get it but it's great that people are still out there keeping this alive. Not sure how but I'm getting further. Got bot commands but it won't make any botcreate gee 2 1 1


All times are GMT -4. The time now is 11:30 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.