Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 04-30-2019, 05:38 AM
TigerFeet
Fire Beetle
 
Join Date: Feb 2019
Posts: 22
Default How is a mob flagged as "Undead"

I'm currently working on the PEQ database rebalancing spells for a more "classic era" feel. Some spells only work on: eg undead (target type 10 if I remember correctly).
How does the server code determine if an NPC is undead?
There isn't a "target_type" field in the npc_type table entry.

Is is done through the "race" field. Looking at the possible races there are many entries for skeltons, ghouls, mummies etc. Does the code check against all possible undead races rather than check a single table entry?

I feel I'm missing something here?

Can someone please point me in the right direction?

Thanks, Andrew
Reply With Quote
  #2  
Old 04-30-2019, 08:12 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

Looking for bodytype of 3 I believe

Update: https://github.com/EQEmu/Server/blob...on/bodytypes.h
Reply With Quote
  #3  
Old 04-30-2019, 10:14 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Just an added tip for those reading, who are looking for that "older skellie" look. Race=60, Bodytype=3, Gender=2, Texture=0, Size=6
Reply With Quote
  #4  
Old 04-30-2019, 11:00 AM
TigerFeet
Fire Beetle
 
Join Date: Feb 2019
Posts: 22
Default

Thanks to both of you .
I have found the code and can see the diff "body types" listed. I'm glad you all seem to understand the flow of control. It seems like a maze of different parts to me that I am slowly piecing together.

I will experiment with changing the body types, and the race types.

I want to change "a rodent", those annoying city vermin, to undead for testing purposes. Changing the body type from 21 to 3 will make it "undead" but it won't automatically inherit the "never run" ability. I presume I will have to edit the "special_abilities" field to give it (21,1) "immune to flee" property.

This is just for testing out some undead only (and later summoned only spells. I've not decided whether to keep the pesky vermin in my game or not.

Thanks again for your help.

PS...

I have downloaded "The Code" from git hub and have a copy of Visual Studio Community 2019 but have never used it. I haven't written any C++ code for over 20 years and things have changed quite a bit since the DOS editior days.

If I wanted to make changes to some elements of the code (eg give halflings a racial hide of say 100) how would I go about recompiling the server code ?

I kow this is a biggie - should I post it as a separate question?
Reply With Quote
  #5  
Old 04-30-2019, 11:33 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

You would have to read the wiki here - https://github.com/EQEmu/Server/wiki...indows-Install to learn all about doing a manual install. That VS 2019 won't do you any good, the project currently requires Visual Studio 2017 Community. (and several other resources). Once you learn how, it's piece of cake compiling updated source, anytime you want. I was around back when DOS 5 was still being sold on the shelves, and I miss those days, lol
Reply With Quote
  #6  
Old 04-30-2019, 11:48 AM
TigerFeet
Fire Beetle
 
Join Date: Feb 2019
Posts: 22
Default

I have read the Akkadius set-up guide and got the dependecy programs (boost, libsodium etc).
My worry is mysql_x64.

The emu package came with MariaDB which starts a MySQL service, and I have only got Maria working with one peq database.
I don't want to mess up the dev server I am using atm to build my "live" family server.
Will the mysql that was installed be sufficient for a compilation of the source code? Or will installing mysql_x64 mess up my current server and Maria?

Thanks for pointing out I'm using the wrong version of VS - I will try and find the 2017 version you mentioned and downgrade.

Thanks, Andrew
Reply With Quote
  #7  
Old 04-30-2019, 12:05 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

If you have MariaDB/sql installed, you don't need to install another one. I have a 64-bit box and I'm running a 32 bit MySQL (5.1.72) If you go to that wiki link I posted, there is links and instructions for installing the resources needed. You can have as many databases as you want, or, like I have, couple of completely different server folders, just can't run more than one at a time.
Reply With Quote
  #8  
Old 04-30-2019, 12:24 PM
TigerFeet
Fire Beetle
 
Join Date: Feb 2019
Posts: 22
Default

Thanks for your help and reassurance.
I have tracked down a VS 2017 - MS seemed reluctant to install a "downgraded" version - but found something that worked. (now installed and licensed to my account - MS is weird sometimes)

So "all" I have to do is install the other dependencies (apart from mysql), put stuff in the right place, and let cmake control the show? It can't be that easy can it?
Reply With Quote
  #9  
Old 04-30-2019, 12:33 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Ya, I guess I should reiterate, the Akka's installer will already put the Mariah/sql and Perl on your system, so from there, the rest of the dependencies, vs 2017, and cmake is what you need. If you read on that guide, with the vs install, there is a C++ option you need. It's important to select that, as the guide states.
Reply With Quote
  #10  
Old 04-30-2019, 12:49 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Couple things I should mention about the source code, before you compile it. The folder named "dependencies" inside the main source code folder, should have all the dependencies put in it. (boost, etc.)

Also, before you compile if you want it to compile either the local login server or compile with bots enabled, you would have to go into the cmakelists.txt file (in main source code folder) and scroll down to find these lines. By default, they are set to "OFF". You will need to change either one to "ON" if you need them.

OPTION(EQEMU_BUILD_LOGIN "Build the login server." OFF)

OPTION(EQEMU_ENABLE_BOTS "Enable Bots" OFF)

EDIT - Sorry, I just had a brain fart, lol. We got talking about MySQL, but to clarify, that mysql_x64 zip file is a dependency that you need. (in your source/dependencies folder).
Reply With Quote
  #11  
Old 05-01-2019, 06:35 AM
TigerFeet
Fire Beetle
 
Join Date: Feb 2019
Posts: 22
Default

That's great advice thanks.

I'm almost ready to give it a try but I'm worried about 1 thing.

The standard peq installer placed the peq database into the Heidi folder.

Will this compilation do the same and, if so, how do I give it a different name.

Once the database has been created I assume I can use the "backup" program from peq to create the SQL, and then use the new compiled backup program to populate the new DB.

I used to be a very competant programmer (IBM MVS assembler development as a job way back) and haven't written anything in C for over 20 years and things have changed a lot since the DOS editor/compiler days.

Thanks again
Reply With Quote
  #12  
Old 05-01-2019, 10:22 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

When compiling the source, all you're doing is creating the binaries that run the server, without any direct effect on your database. You would simply be copying the new updated binaries into your server folder, overwiting the old ones. Then when you start your server up again, it will connect to the same peq, that you already have.

When you run the update script (eqemu_server.pl), it will recognize the version of the new binaries you compiled and make adjustments, if you wish to keep your server up to date. Here's an example: If your database was db_version 9136 today, and you ran the updates, after compiling new binaries, it would make adjustments to your database and set the db_version to 9139. (That db_version is a table in your peq database). Compiling updated source code, does not install a new database, the source code and the peq are two seperate things. The maps, the quests, the plugins, etc., are all seperate from each other, they simply all come together when you start your server up, but none of it gets altered, unless you allow it to, or choose to alter it yourself.

But a word of caution, (using the above example), An update was done to the source code which will use a slightly different faction schema/values. That update will also add new faction tables to your peq database, when you first run world.exe and will also make adjustments to quests in your quest folder, unless you opt out of it in the variables table in the database.

Updates are not a bad thing, the developers are constantly making adjustments to make things a little more on the correct side of values, etc. The only time updated source code will cause a problem, is maybe with a heavily customized server that someone has been doing all their own coding on, and one particular update might screw something up that they have done already. It's a good idea to keep an eye on the source code updates on the github, as well as the changelog. I use git pull to constantly pull updated source code from git hub, after reading the updates they do.

Something you can do, as far as having more than one peq database, for example, you can create a new one, called peqtwo (or whatever name you give it, without deleting your old database. Once you create that new one, it will be empty, but then you can opt to source in a backup of a database into it. The only thing you would have to do to run that new database, is go into your server folder and change the config files to all point to that new one (peqtwo), instead of the old one. But then if you wanted to go back to the old one, you would have to change the configs again. This is why I keep a seperate server folder for a test server, so I don't have to do that. I just simply copied the whole contents of the eqemu server folder into a new one and called it eqemutest. As long as you run the start script from the new server folder, then it will run the test peq database.

I do a lot of backups and running sql files in a dos(command window) The following, I put in a batch file (backup.bat) in a folder I created called peqbackup which backs up my entire database. (I have a shortcut on the desktop)
mysqldump --routines -u root -ppassword peq > peq_backup.sql

Usually what i do myself when manually creating a new database, First, I use navicat to access and edit the database in mysql. I create a new database with that, then I open a dos (cmd prompt window), cd.. to the folder where the sql is and then log into the mysql. I don't use Mariahdb, but I assume it's the same. This example below, I am logging into the mysql, and choosing to use the new database (peqtest) and then sourcing in the peq backup database dump:
>mysql -u root -ppassword
mysql> use peqtest <---IMPORTANT to tell mysql which database to use!!
mysql> source peq_backup.sql;

This does not get rid of your old peq database, it will still be there unless you decide to delete it. This example simply creates a second one. You could probably create hoards of new databases and keep them all, but you would only be using one at a time. It's the same with your main server folder where the binaries, maps, quest, etc. all are. You could have as many of those folders, as your hard drive could hold. I keep a fresh, vanilla test database, untouched, and run all updates when they are released. It comes in handy once in awhile.

By the way, you can also download the most current updated peq here: http://edit.peqtgc.com/weekly/peq_beta.zip (same updates as the peqtgc server)
There is a few files in there, but you only need to source in the peqbeta, player_tables and load_login (edit the load_login first, for user info)

You can also keep an eye on the changelog, to see what's been done with the peq: http://peqtgc.com/forums/index.php?f...change-log.80/

The updates to source code can be found here: https://github.com/EQEmu/Server

And of course, lots of info on the wiki here: https://github.com/EQEmu/Server/wiki
Reply With Quote
  #13  
Old 05-02-2019, 03:07 AM
TigerFeet
Fire Beetle
 
Join Date: Feb 2019
Posts: 22
Default

This is really helpful thanks. I am learning so much about the process here.

I use a 2 PC setup - one I use for dev and transfer the updated peq DB or Scripts etc to the Server PC. If I do use 2 diff peq databases I will definitely use different folders for the code and json files etc to keep things simple.

My db_version table tells me I'm running v9138 (bot v9022).

I don't plan on making any major changes to the code, but am making lots of DB changes to give the server a more classic feel. As my dev PC is not internet connected (no ports enabled I mean) I don't get any code or DB updates - which suits me fine atm. What I have been worried about is a new PEQ developer's update which will run when I start the "live" server and invalidate the work I have done on my dev server running an older version of the DB and code. So, for the moment, I would dearly love to turn off any updates when I run "t_start_server" on live and connect to the emu login server.

This is similar to the problem you wrote:

"But a word of caution, (using the above example), An update was done to the source code which will use a slightly different faction schema/values. That update will also add new faction tables to your peq database, when you first run world.exe and will also make adjustments to quests in your quest folder, unless you opt out of it in the variables table in the database."

I don't see anything in the variables table that would prevent such an update.
There is varname DBVersion = 070_pop, hotfix_name = undefined and new_faction_conversion = true, but nothing that looks right to me.

How do I turn auto-updates off? I can then only allow them for changes in the base code I re-compile. I have searched the wiki for this in the past but not found anything, and you have given me the first hint that I might be able to do this after all.

Hoping this is the last question ...

Thanks, Andrew
Reply With Quote
  #14  
Old 05-02-2019, 09:21 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Something I do, (for my own wants and needs) is use an "old school" set of start/stop scripts. Akka's scripts do a lot more for someone and I would encourage people to use what he has done, but I really don't need all those "automated" mechanics, I really don't mind doing things manually, (like clearing logs, etc), so I keep things simple on the startup, whether public or private launch. Here's what I have been using for years now: (I don't use queryserv on a local setup, so I comment that line out).

Start.bat
Code:
start loginserver.exe
shared_memory.exe
ping -n 4 127.0.0.1 > nul
start world.exe
ping -n 10 127.0.0.1 > nul
start eqlaunch.exe zone
start queryserv.exe
start ucs.exe
Stop.bat
Code:
taskkill /IM queryserv.exe /F
taskkill /IM ucs.exe /F
taskkill /IM eqlaunch.exe /F
taskkill /IM Zone.exe /F
taskkill /IM world.exe /F
taskkill /IM loginserver.exe /F
taskkill /IM shared_memory.exe /F
I have a similiar server scenario, where it's not feasible to risk automated updates, which I'm sure servers like P99, etc, have to be just as adamant about, because of the work gone into it. There is something I do for myself, to disable any updates on startup, but again, I would NOT encourage anyone to do this, unless you have the knowledge to know what you're doing.
When world is run, it will look for that eqemu_server.pl script. If it finds one, it will continue, and read from it. If it doesn't find one, it will install a new copy. That's where everything is scripted for grabbing any updates. So what I do, is rename the original to eqemu_server.pl-OFF (you can use bak, or whatever). Then I take a copy of that script and edit it, to comment out everything, except the following,(below). These lines shown are right near the top of the script. Then I save that as eqemu_server.pl for world to find it. If I run into a scenario where I want to run updates, then I simply rename it to eqemu_server.pl-disable Then rename the "OFF" one to normal again, to grab the updates. But in most cases, I will do the updates manually, by running the sql into the database.

eqemu_server.pl
Code:
use Config;
use File::Copy qw(copy);
use POSIX qw(strftime);
use File::Path;
use File::Find;
use Time::HiRes qw(usleep);
Reply With Quote
  #15  
Old 05-02-2019, 09:42 AM
TigerFeet
Fire Beetle
 
Join Date: Feb 2019
Posts: 22
Default

This is EXACTLY what I need right now.

I take your caution notes seriously, and will review the changelog of the server regularly and apply changes when I need them, either manually or using the "rename the bat file" technique.

You have been so helpful I don't know how to thank or express it enough. What started out as a relatively simple DB table entry answer has led me to ask more and more questions and you have always taken the time to answer them in such a clear and comprehensive manner.

For people who have spent many many hours writing this emulator, then releasing it and packaging it in such a way as to make it easy to get it running, and also have the patience to answer question from folk like myself is utterly amazing.

Again, thankyou so much for sharing your knowledge and techniques, and taking the time to answer so many follow on questions.

I now feel confident to compile the code (with the very few changes I have in mind at the moment) and have a way to "freeze" the version of code I am currently developing.

Thanks, Andrew
Reply With Quote
Reply

Thread Tools
Display Modes

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:47 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