PDA

View Full Version : Creating new spells


Aldest
03-05-2009, 03:52 PM
I'm trying to wrap my head around how creation of new spells would go. If someone would like to correct me that would be great.

Essentially if I want custom spells I need to do the following:

Create the spell in the MySQL database.
Edit the spells_us.txt to match the database and ensure it is the same reference number.
Distribute the spells to the clients.

For Titanium you'd still be limited by the max number of 8000 correct?

nosfentora
03-05-2009, 04:34 PM
I'm trying to wrap my head around how creation of new spells would go. If someone would like to correct me that would be great.

Essentially if I want custom spells I need to do the following:

Create the spell in the MySQL database.
Edit the spells_us.txt to match the database and ensure it is the same reference number.
Distribute the spells to the clients.

For Titanium you'd still be limited by the max number of 8000 correct?

yep - edit your spells_us.txt (server copy) and make sure any client connecting has the same copy.
the max spell id is 9999

for using/not using the spells_new table see this (http://www.eqemulator.net/forums/showthread.php?t=27263&highlight=spells_new).

*EDIT: Looking at the source code now, it looks like the spells_us.txt is no longer needed on the server - or is my c++ that bad?

nosfentora
03-05-2009, 04:41 PM
N/M - apparently my c++ is that bad =)

This (http://www.eqemulator.net/forums/showthread.php?t=27263&highlight=spells_new) is still valid.

Aldest
03-05-2009, 04:59 PM
Awesome, thank you!

To follow up then. I'm using the PEQ database, the newest one.

I have a spells_new table in MySQL.

It stops at id 8402 and my spells_us.txt continues well past that.

How would I reasonably reconcile that? Should I (after saving a copy) just go into the spells file and basically delete everything that isn't in my database and start from there or pass the database IDs that aren't yet used in the file and essentially lose all those IDs?

nosfentora
03-05-2009, 05:21 PM
Just off the top of my head - If you use NaviCat, you should be able to import the spells_us.txt file using the ^ character as a delimiter.

I think the original spells_us.txt file has 7,872 spells (max id of 8446)
The DB has 7,837 spells (max id 8402)

What's the easiest way to have them the same? Yea you could go through and delete 7800+ lines by hand.... if you know any programming you could create a script/app that'll do that for you - or compare what's in the db vs whats in the file and add it automatically...

Aldest
03-05-2009, 05:43 PM
I'm using the MySQL query browser. I didn't actually think about importing the spell list. That is really quite brilliant.

In that instance couldn't I just edit the spell file, important it to the database and then issue it to the players?

Andrew80k
03-05-2009, 05:54 PM
I'm using the MySQL query browser. I didn't actually think about importing the spell list. That is really quite brilliant.

In that instance couldn't I just edit the spell file, important it to the database and then issue it to the players?
You should be careful about what files you distribute. SOE has been known to have servers shut down for that. I doubt they would do it for just a spell file but you should be aware that it could happen...

nosfentora
03-05-2009, 07:28 PM
Yep - you could definitely do that, edit then import.

Andrew80k has a very valid point about what and how you are distributing.

Aldest
03-05-2009, 10:52 PM
Thank you for the advice and I'll give that a shot.

I understand about the spell distribution being an issue normally. I hope to avoid that in one of two ways.

The first is that I never intend for my server to leave my LAN. It is just for my buddies to play on.

The second though is if my friends have legitimate copies of titanium (with the spell file) and I just send them an update to that file does that constitute distribution of someone's material?

nosfentora
03-06-2009, 05:19 PM
I'd say that's grey area.... I'm sure SOE could give you trouble if they wanted - howevery I highly doubt that you'd ever get on their radar.

AndMetal
03-07-2009, 03:28 PM
What's the easiest way to have them the same? Yea you could go through and delete 7800+ lines by hand.... if you know any programming you could create a script/app that'll do that for you - or compare what's in the db vs whats in the file and add it automatically...

When I setup the database, I created 2 Perl scripts to accomplish either: /utils/export_spells.pl (http://code.google.com/p/projecteqemu/source/browse/trunk/EQEmuServer/utils/export_spells.pl) & /utils/import_spells.pl (http://code.google.com/p/projecteqemu/source/browse/trunk/EQEmuServer/utils/import_spells.pl). If you run them with the -h switch, they will output a usage statement, which you can also view in the script directly.

Aldest
03-12-2009, 09:34 AM
And,

So the first script will pull the files out of the DB and the second will put them back in?

Is that file readable by the spell editor?

I've been working with a friend on a PhP method of doing this but the main issue is that the file we get out isn't the same as what the editor wants. We're pretty close though.