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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 10-27-2008, 07:38 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I finally had a chance to revisit this (I was using RunQuery as opposed to database.RunQuery, plus I fubar'd some stuff with shared memory) and it's working great. However, I wanted to get some additional feedback: should we make everyone do this (just change the source), or should we #define DB_LoadSPDat vs #define NEW_LoadSPDat, that way everyone can update as they wish?

I'm kinda thinking the latter, but I wanted to see what everyone else thought, especially since we'll probably want to make a Perl script (I only have a PHP script) to load a custom spell set into the database vs using the Titanium spell set.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #2  
Old 10-27-2008, 09:04 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

Could you make it so it loads the default titanium spells first and then loads additional spells later if they exist by checking some rule? That would be ideal to keep it compatible with the current way and then enable the custom stuff.
Reply With Quote
  #3  
Old 10-27-2008, 09:17 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Congdar View Post
Could you make it so it loads the default titanium spells first and then loads additional spells later if they exist by checking some rule? That would be ideal to keep it compatible with the current way and then enable the custom stuff.
I'm not sure I understand what you mean by "default titanium spells first".

This change allows the spells_us.txt file to be sourced into the database once & read from there instead of opening the spells_us.txt file each time the server (zone?) is loaded. The only thing that would change by the #define is whether or not you load from the spells_us.txt file (the "old" way) or load from the database (the "new" way).
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #4  
Old 10-27-2008, 10:16 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

I like the idea of making things faster, but the added problem of downloading a txt file that matches a particular servers emu code level would be a pain if you played on multiple servers with possibly different code levels(like the one you play on when your favorite is down, etc).

So there would need to be the 'default titanium spells first' list in the db that works with anybody that connects and doesn't have 'the latest custom spell list with all the fixes'.
Reply With Quote
  #5  
Old 10-27-2008, 10:49 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

Quote:
Originally Posted by Congdar View Post
I like the idea of making things faster, but the added problem of downloading a txt file that matches a particular servers emu code level would be a pain if you played on multiple servers with possibly different code levels(like the one you play on when your favorite is down, etc).

So there would need to be the 'default titanium spells first' list in the db that works with anybody that connects and doesn't have 'the latest custom spell list with all the fixes'.
from what I know most people who play on difirent custom servers simply have 2 or more EQ folders, rather than ever mess with continusly changing reqiured files
Reply With Quote
  #6  
Old 10-27-2008, 11:22 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Congdar View Post
there would need to be the 'default titanium spells first' list in the db that works with anybody that connects and doesn't have 'the latest custom spell list with all the fixes'.
I think there must be some confusion about the spells (or I'm completely misunderstanding what you're saying), because the client & server don't handle spells differently based on the client like we do with other things (opcodes, spawn structs, player profile structs, etc).

Quote:
Originally Posted by Congdar View Post
the added problem of downloading a txt file that matches a particular servers emu code level would be a pain if you played on multiple servers with possibly different code levels(like the one you play on when your favorite is down, etc)
That's the way it currently works (which is a pita, and why most, if not all servers, use either the straight Titanium spell file or slightly modified version), and I think that's why I'm confused about where you're coming from.

Here's the current flow of how the spells are loaded:
  1. main()
  2. LoadSPDat() called in main()
  3. FileLoadSPDat() called via a callback (extFileLoadSPDat) in LoadSPDat()
  4. Read from spells_us.txt as directed by FileLoadSPDat()

All I'm doing is changing the last step to this:
  1. main()
  2. LoadSPDat() called in main()
  3. FileLoadSPDat() called via a callback (extFileLoadSPDat) in LoadSPDat()
  4. Read from database as directed by FileLoadSPDat()

So instead of parsing through this:
Code:
3^Summon Corpse^PLAYER_1^^^^^^^10000^^0^0^5000^2250^12000^0^0^0^700^70^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^2512^2106^17355^-1^-1^-1^1^1^1^1^-1^-1^-1^-1^100^100^100^100^100^100^100^100^100^100^100^100^0^1^0^0^91^254^254^254^254^254^254^254^254^254^254^254^6^20^14^-1^0^0^255^255^255^255^51^255^255^255^255^255^35^255^255^255^255^255^43^^0^4^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^100^0^109^307^0^0^0^0^0^0^0^0^0^3^125^64^^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^5^101^49^52^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^1^0^0
we're iterating through this:
Code:
mysql> SELECT * FROM spells_new LIMIT 1 OFFSET 1;
+----+---------------+----------+---------------+----------+-------------+-------------+---------------+-------------+-------+----------+----------+--------+-----------+---------------+-------------+---------------------+--------------+------------+------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+----------------------+----------------------+----------------------+------+------+------+------+------+------+------+------+------+-------+-------+-------+------+---------+-------------+-------------+-------------+-------------+-------------------+-------------------+-------------------+-------------------+------------------+------------------+------------------+------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+------------+-----------+------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+------------+------------+------------+------------+----------+-------+----------+-----------------+-----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-------------+------------+------------+------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+----------+----------+----------+-----------+-----------------+------------+---------------------+------------+--------------+----------+----------+----------+----------------+---------+-------------+---------------+----------+----------+----------+----------+-----------+----------+----------+----------+-----------+-----------------+----------+----------+----------+----------+----------+-----------+-------------+----------+---------+---------------+---------------+--------------+----------------+----------+----------+----------+----------+---------+-----------+--------------+----------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+------------+----------+----------+----------+----------+----------+----------+----------+
| id | name          | player_1 | teleport_zone | you_cast | other_casts | cast_on_you | cast_on_other | spell_fades | range | aoerange | pushback | pushup | cast_time | recovery_time | recast_time | buffdurationformula | buffduration | AEDuration | mana | effect_base_value1 | effect_base_value2 | effect_base_value3 | effect_base_value4 | effect_base_value5 | effect_base_value6 | effect_base_value7 | effect_base_value8 | effect_base_value9 | effect_base_value10 | effect_base_value11 | effect_base_value12 | effect_limit_value1 | effect_limit_value2 | effect_limit_value3 | effect_limit_value4 | effect_limit_value5 | effect_limit_value6 | effect_limit_value7 | effect_limit_value8 | effect_limit_value9 | effect_limit_value10 | effect_limit_value11 | effect_limit_value12 | max1 | max2 | max3 | max4 | max5 | max6 | max7 | max8 | max9 | max10 | max11 | max12 | icon | memicon | components1 | components2 | components3 | components4 | component_counts1 | component_counts2 | component_counts3 | component_counts4 | NoexpendReagent1 | NoexpendReagent2 | NoexpendReagent3 | NoexpendReagent4 | formula1 | formula2 | formula3 | formula4 | formula5 | formula6 | formula7 | formula8 | formula9 | formula10 | formula11 | formula12 | LightType | goodEffect | Activated | resisttype | effectid1 | effectid2 | effectid3 | effectid4 | effectid5 | effectid6 | effectid7 | effectid8 | effectid9 | effectid10 | effectid11 | effectid12 | targettype | basediff | skill | zonetype | EnvironmentType | TimeOfDay | classes1 | classes2 | classes3 | classes4 | classes5 | classes6 | classes7 | classes8 | classes9 | classes10 | classes11 | classes12 | classes13 | classes14 | classes15 | classes16 | CastingAnim | TargetAnim | TravelType | SpellAffectIndex | field124 | field125 | deities1 | deities2 | deities3 | deities4 | deities5 | deities6 | deities7 | deities8 | deities9 | deities10 | deities11 | deities12 | deities13 | deities14 | deities15 | deities16 | field142 | field143 | new_icon | spellanim | uninterruptable | ResistDiff | dot_stacking_exempt | deleteable | RecourseLink | field151 | field152 | field153 | short_buff_box | descnum | typedescnum | effectdescnum | field158 | field159 | field160 | field161 | bonushate | field163 | field164 | field165 | EndurCost | EndurTimerIndex | field168 | field169 | field170 | field171 | field172 | HateAdded | EndurUpkeep | field175 | numhits | pvpresistbase | pvpresistcalc | pvpresistcap | spell_category | field181 | field182 | field183 | field184 | can_mgb | nodispell | npc_category | npc_usefulness | field189 | field190 | field191 | field192 | field193 | field194 | field195 | field196 | field197 | field198 | field199 | field200 | field201 | field202 | field203 | field204 | field205 | field206 | spellgroup | field208 | field209 | field210 | field211 | field212 | field213 | field214 |
+----+---------------+----------+---------------+----------+-------------+-------------+---------------+-------------+-------+----------+----------+--------+-----------+---------------+-------------+---------------------+--------------+------------+------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+----------------------+----------------------+----------------------+------+------+------+------+------+------+------+------+------+-------+-------+-------+------+---------+-------------+-------------+-------------+-------------+-------------------+-------------------+-------------------+-------------------+------------------+------------------+------------------+------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+------------+-----------+------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+------------+------------+------------+------------+----------+-------+----------+-----------------+-----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-------------+------------+------------+------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+----------+----------+----------+-----------+-----------------+------------+---------------------+------------+--------------+----------+----------+----------+----------------+---------+-------------+---------------+----------+----------+----------+----------+-----------+----------+----------+----------+-----------+-----------------+----------+----------+----------+----------+----------+-----------+-------------+----------+---------+---------------+---------------+--------------+----------------+----------+----------+----------+----------+---------+-----------+--------------+----------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+------------+----------+----------+----------+----------+----------+----------+----------+
|  3 | Summon Corpse | PLAYER_1 |               |          |             |             |               |             | 10000 |        0 |        0 |      0 |      5000 |          2250 |       12000 |                   0 |            0 |          0 |  700 |                 70 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                  0 |                   0 |                   0 |                   0 |                   0 |                   0 |                   0 |                   0 |                   0 |                   0 |                   0 |                   0 |                   0 |                    0 |                    0 |                    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |     0 |     0 |     0 | 2512 |    2106 |       17355 |          -1 |          -1 |          -1 |                 1 |                 1 |                 1 |                 1 |               -1 |               -1 |               -1 |               -1 |      100 |      100 |      100 |      100 |      100 |      100 |      100 |      100 |      100 |       100 |       100 |       100 |         0 |          1 |         0 |          0 |        91 |       254 |       254 |       254 |       254 |       254 |       254 |       254 |       254 |        254 |        254 |        254 |          6 |       20 |    14 |       -1 |               0 |         0 |      255 |      255 |      255 |      255 |       51 |      255 |      255 |      255 |      255 |       255 |        35 |       255 |       255 |       255 |       255 |       255 |          43 |          0 |          0 |                4 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |         0 |         0 |         0 |         0 |         0 |         0 |         0 |      100 |        0 |      109 |       307 |               0 |          0 |                   0 |          0 |            0 |        0 |        0 |        0 |              0 |       3 |         125 |            64 |        0 |        0 |        0 |        0 |         0 |      100 |        0 |        0 |         0 |               0 |        0 |        0 |        0 |        0 |        0 |         0 |           0 |        0 |       0 |             5 |           101 |           49 |             52 |        0 |        0 |        0 |        0 |       0 |         0 |            0 |              0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |        1 |        0 |        0 |        0 |        0 |        0 |       -1 |          0 |        0 |        0 |        1 |        0 |        0 |        1 |        1 |
+----+---------------+----------+---------------+----------+-------------+-------------+---------------+-------------+-------+----------+----------+--------+-----------+---------------+-------------+---------------------+--------------+------------+------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+--------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+----------------------+----------------------+----------------------+------+------+------+------+------+------+------+------+------+-------+-------+-------+------+---------+-------------+-------------+-------------+-------------+-------------------+-------------------+-------------------+-------------------+------------------+------------------+------------------+------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+------------+-----------+------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+------------+------------+------------+------------+----------+-------+----------+-----------------+-----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-------------+------------+------------+------------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+----------+----------+----------+-----------+-----------------+------------+---------------------+------------+--------------+----------+----------+----------+----------------+---------+-------------+---------------+----------+----------+----------+----------+-----------+----------+----------+----------+-----------+-----------------+----------+----------+----------+----------+----------+-----------+-------------+----------+---------+---------------+---------------+--------------+----------------+----------+----------+----------+----------+---------+-----------+--------------+----------------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+------------+----------+----------+----------+----------+----------+----------+----------+
1 row in set (0.00 sec)
I'm not trying to reinvent the wheel, I'm just trying to make it easier to work with (especially in tools & other editors)

EDIT: The main reason I started towards this in the first place is that different utilities, including the PEQ editor, EQBrowser (Allakhazam clone), etc, usually have you source a trimmed copy of the spells file into the database anyways. However, they have a tendency to step over each others' toes, because some use fewer fields than others. This was to A) help alleviate the conflict, and B) make it easier to customize spell files, including tweaking the vanilla Titanium spell file (since we all know it's not perfect).
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki

Last edited by AndMetal; 10-28-2008 at 07:31 AM..
Reply With Quote
  #7  
Old 10-28-2008, 12:01 AM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

It wasnt broke, so why are you fixing it?

Youre just adding an additional level of complication IMO.

Since there already exists Spells.txt editors so loading the spells into the DB for editing isnt needed and since the client has to have the same Spells.txt file as the server for spells to work correctly for both the client and server and since this list is loaded once upon booting the world and since your still going to want to load the spells into memory no matter which method you use,for these reasons and more there doesnt seem to be any point to doing this.
Reply With Quote
  #8  
Old 10-28-2008, 12:08 AM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

Quote:
Originally Posted by MNWatchdog View Post
It wasnt broke, so why are you fixing it?

Youre just adding an additional level of complication IMO.

Since there already exists Spells.txt editors so loading the spells into the DB for editing isnt needed and since the client has to have the same Spells.txt file as the server for spells to work correctly for both the client and server and since this list is loaded once upon booting the world and since your still going to want to load the spells into memory no matter which method you use,for these reasons and more there doesnt seem to be any point to doing this.
txt based editor are ULTRA slow and have ultra high tendency to break spell file complitly. I doubt that on LIVE they store server side spell data in a text file

puting them into DB will:
a) makes need of 1 spell editor LESS
b) keeps all server related things in one place
Reply With Quote
  #9  
Old 10-28-2008, 12:08 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ya, that would definitely be useful for web-based tools. And if a tool similar to the Ailia/Bleh Spell Editor was made to edit the Table version, I think it could really make a nice option for spell file management. Plus, this would give the option to use mysql commands to mass edit the spell file if people wanted to do that for any reason.

The only thing I would recommend for this system would be a really simple way to convert the spell file to the table and then the table back into the spell file. Otherwise, custom servers might have issues when trying to make sure that their custom spell files match the custom spell files that their players downloaded for their server. If a tool was made similar to the Ailia/Bleh one for the Table version, it would be very nice if the same tool would also convert the file to table and visa versa.

Since the spell data is loaded globally when the server starts, I doubt this would be possible. But, it would be really cool if we could have a command that would let NPCs use any spell effect with custom values at any time. Essentially making a custom spell in real time via Perl. I think the command could use the fields in the table and then also set a value for it, and then just use the effects from the source for those fields. So, maybe something like quest::spelleffect(type, value), or maybe an extended version like quest::spelleffect(type, value, range, target_type, duration_ticks, pet_name, icon, "description", "msg_cast_on_you", "msg_cast_on_other") or something like that. Kinda off-topic idea, but sounds like fun to me
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #10  
Old 10-28-2008, 08:51 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

Quote:
Originally Posted by AndMetal View Post
That's the way it currently works (which is a pita, and why most, if not all servers, use either the straight Titanium spell file or slightly modified version), and I think that's why I'm confused about where you're coming from.
Your very first post said something about modifying spells which seemed to me to be the pita way.
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 09:04 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3