EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Crazy idea for spells... (https://www.eqemulator.org/forums/showthread.php?t=24193)

AndMetal 11-25-2008 02:28 AM

Got to talk to trev, and it appears there is a compiling issue when setting to NEW_LoadSPDat. Looks like I missed some +'s when I was copying from a diff (thanks again Google!):
zone/net.cpp
Code:

+              // May crash zone
+              /*
+              sp[tempid].nodispell=atoi(row[186]);
+              sp[tempid].npc_category=atoi(row[187]);
+              sp[tempid].npc_usefulness=atoi(row[188]);
+
+              for (y = 0; y < 18; y++)
+                      sp[tempid].spacing189[y]=atoi(row[189+y]);
+
+              sp[tempid].spellgroup=atoi(row[207]);
+
+              for (y = 0; y < 18; y++)
+                      sp[tempid].spacing208[y]=atoi(row[208+y]);
+              */

Took 'em out, recompiled with NEW_LoadSPDat, and works fine.

EDIT: This is in SVN as Rev 232.

KLS 11-26-2008 04:18 PM

Quote:

I've actually been using this code, successfully, for just shy of a month (since October 27th to be specific). The only thing that took a little time was the scripts to import/export the spells (having a kid in the middle of all that did slow things down a bit). Not only that, but the main thing it's doing is loading spells into the spells[] "array" from the database instead of the spells_us.txt file. There were also a few unknown values in the SPDat_Spell_Struct struct that I came across, but I made sure it worked with the spells_us.txt file before I even tested with the database (which caused problems with sharedmem a few months ago when I first started working on it). I personally don't consider it to be a "large feature", rather just a bunch of copying, pasting, & tweaking of existing code.
You don't, but I do. It interacts with a core part of the server functionality so I would consider it big even if it doesn't seem all that complex. Also given that there are no real benefits yet (it's all a idea for future expansion) I'd rather retain backwards compatibility right now. People who want to use the new system can use it but until we start getting applications that take advantage of it I'm not gonna force people.

I'm glad you guys got it all sorted out before I got back, kinda hard to fix stuff with svn when on the road =/ Keep working with this it has potential even if we haven't found it yet.

trevius 11-26-2008 05:55 PM

Probably the biggest benefit is that web-based tools could be made for editing spells online. It might also be useful that we can have code that is able to check the table for certain things. I am sure there is more potential out there for it. If there was a way to convert the Ailia/Bleh spell editor to work with the new table, I think it would leave little need for the spell file. But, unless that table is added into the PEQ and AX databases, we would also need directions in the server setup wiki for new admins to set this up for their server.

Hmm, I think I might have come up with a good use for it already lol. Would it be possible to add 1 more column to the end that will let us enable/disable the spell from loading (enabled by default)? So, instead of removing a spell or setting it to be unusable by all classes, we could simply disable it. Maybe even having an extra "comments" field next to that one for notes about the spell, if it has been changed or removed for any reason. Or, if you wanted to replace the spell, you could put the old Spell ID number in the comments field and then change it to an unused Spell ID so that you can reuse the one it was previously using for another spell. Although, I imagine that would make the import export stuff hard to do and stay sorted properly with the comments and enabled/disabled field.

The reason I mention this idea is because all classes are capped at 400 spells max (by the client as far as I can tell). I tried changing the settings in the source, but it didn't add more than 50 pages to the player spell books. Since I have spells up to level 75 on my server, Druids exceed the 400 cap and lose access to many of the high level spells due to lack of a slot in the spell book. If I could easily disable spells in the table like mentioned, I could just go through and disable a bunch of unused ones like ports to new/locked zones etc.

cavedude 11-26-2008 06:05 PM

Quote:

Originally Posted by trevius (Post 160555)
But, unless that table is added into the PEQ and AX databases, we would also need directions in the server setup wiki for new admins to set this up for their server.

It's already in PEQ CVS.

KLS 11-26-2008 07:19 PM

Yeah there's benefit but no one's tapped it yet + it's a new feature so I'm keeping it off by default.

AndMetal 11-27-2008 06:41 PM

Quote:

Originally Posted by KLS (Post 160557)
Yeah there's benefit but no one's tapped it yet + it's a new feature so I'm keeping it off by default.

I can agree to keeping it off by default. The main reason I turned it on by default was because I was getting the feeling from the feedback I was getting that, if I made the effort to make the spells relatively easy to import/export, that I should. However, I think the better way to do it (which is how I was leaning originally, but decided to take a little initiative) is what you recommend, which is to turn it off by default. If others start using it & it becomes more "mainstream", it's easy enough to change. At the very least, now everyone can use the same spells table for their tools :D

trevius 11-29-2008 02:48 AM

I run a custom spell file and when I ran the import script, I got this:
Code:

eqemu@muse:~/server$ perl import_spells.pl
Loading "Focus Ornate Spellcaster\'s Empowering Essence" (8447) Loading "Focus Runed Spellcaster\'s Empowering Essence" (8448) Loading "Focus Mass Elaborate Spellcaster\'s Empowering Essence" (8449) Loading "Focus Mass Ornate Spellcaster\'s Empowering Essence" (8450) Spells Loaded: 13373 of 13373
Highest ID: 19507

Do those messages mean it changed the name of the spells? Or are they anything to be concerned about?

AndMetal 11-29-2008 02:56 AM

Quote:

Originally Posted by trevius (Post 160617)
I run a custom spell file and when I ran the import script, I got this:
Code:

eqemu@muse:~/server$ perl import_spells.pl
Loading "Focus Ornate Spellcaster\'s Empowering Essence" (8447) Loading "Focus Runed Spellcaster\'s Empowering Essence" (8448) Loading "Focus Mass Elaborate Spellcaster\'s Empowering Essence" (8449) Loading "Focus Mass Ornate Spellcaster\'s Empowering Essence" (8450) Spells Loaded: 13373 of 13373
Highest ID: 19507

Do those messages mean it changed the name of the spells? Or are they anything to be concerned about?

The "Loading" info is more so you can see what the status is, although it goes so fast that you normally don't get to see pretty much any of it. I currently have it print the spell name after inserting the escape character (\) for the query to insert it into the database, mainly because it's the easiest, which is where the confusion about the name might be. Since it indicates it loaded all 13373 of the 13373 spells, it should be fine, although I'm not really sure why all of those ended up back-to-back on a single line instead of erasing each other. If there was an error loading 1 or more spells, it would output a line letting you know which one failed (1 line for each spell that failed to load).

Does that help to answer that question?

cavedude 11-29-2008 11:48 AM

That happens with the item import script too (of which this is based off of I guess) I've never had a problem with the items it named, and as long as it claims to have loaded all the data it's fine. I would assume the same goes for the spell script.

AndMetal 11-29-2008 02:16 PM

Quote:

Originally Posted by cavedude (Post 160631)
That happens with the item import script too (of which this is based off of I guess)

It was :-)

John Adams 11-30-2008 05:18 PM

After reading this whole thread, and being convinced this feature was "off by default", I updated to the latest SVN, did the SQL and import_spells.pl. Now my server is broken. Try to mem a spell and get a message "Unexpected error: spell id out of range" and now I cannot click on my spell book at all.

Without reverting to an earlier SVN, is there a way to disable this completely (for real) and use the spells_*.txt way?

Please don't remove the old way just because 3 people have tried it and think it works.

John Adams 11-30-2008 05:24 PM

Quote:

Originally Posted by John Adams (Post 160709)
Now my server is broken.

Ya know, the 30 second edit on this forum is bullshit, always hated it. :)

What I meant to say, "servers Spells are broken". The server itself appears ok.

Derision 11-30-2008 05:25 PM

I think you use Linux, so try a 'make clean' and then 'make'.

John Adams 11-30-2008 05:51 PM

Yes I do use linux for this server. I keep forgetting about the make clean (LE probably wants to hit me with a rotten tuna as well over this :))

I'll give it a try.

John Adams 11-30-2008 06:04 PM

Ugh... ~blush~ make clean once again makes a fool of me ;) Thanks Derision for the reminder. I need to nail a sticky to my forehead (though I still cannot understand the need to whack the old compile for new changes).

Spells do work with this new table, the import thingy, and "off by default" which I will eventually learn how to turn this on and give it a try. Just not today. :)

Thanks AndMetal, sorry if my initial post sounded all assy.


All times are GMT -4. The time now is 06:27 PM.

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