PDA

View Full Version : New Spell Editor


BrainiacVince
06-27-2007, 03:50 AM
Hey all. I'm planning on trying to write a new spell editor (hopefully with a few nice features) and I'm taking suggestions. I mean no disrespect to the authors of the other spell editors, but they don't seem fully functional and I'm not familiar enough with any of those languages to be of help with the code. So, I'll preface this by telling you that it's going to be done in Java because I don't know any other language well enough to do GUI in it. Also, feature requests may or may not get added, depending on the amount of time it'll take me to code it vs. how useful I think it will be.

I can lay out the gui basically one of two ways (or possibly have both ways as options).
1. The first way will be similar to the two (that I know of, WindCather's and the other's author escapes me atm) existing editors in that it will pre-load a complete list of all the spells from the spell file and have it in a giant selectable list. Beside that will be tabbed panes for different spell options (again, very similar to the existing editors).
2. This way will be similar to how Kayot's DB editor works. Instead of loading the entire list into a window, it will load one spell at a time. It would still most likely load the entire list to memory first, just to make searching more feasible. Loading will most likely be done with a text field near the top that accepts a spell's ID number which then loads the fields into a few tabbed panes for the different spell options.

They aren't that dissimilar, which is why I think that they could both be selectable options, or possibly all in the same layout.

Another option I am considering is having the program create a new DB or a new table in an existing db and loading all of the spells into it. This would require a bit of research on my part, as I am not sure how to do DB connections with Java off the top of my head, but I'm not opposed to learning. This would allow for very nice searching and manipulation of spells, and the data could be read back into the program to be exported as spells_us.txt. The program itself could still be used to edit the spells (this would again require a bit of research for the db editing) or the program could just be used as a gateway between the db and the spells file.



So, let me know what you think, pros, cons, suggestions, anything else you can think of that I may have missed.

Kayot
06-27-2007, 10:35 AM
Suggestions:
Heres how I made my spell loader for the new editor.

1. Dim Textline(10000) as String
2. Do a line by line read, use a loop so that the spell end up in the array via spell id = array(spell id). This makes life easy when looking for a spell when all you have is a number. Also makes adding a spell into a joke because all you do is select the blank entry and save into it via selected index.
3. Don't delimit every line. Keep each line in its value^value format.
4. When loading a spell, delimit only the line you need. When searching, only delimit each line as necessary.

There are (I think) 202 values per line. Also, if you want them in alphabetical order, your best bet is to dim a listbox, fill in the values name and id with a tab in between. Then tell the listbox to sort itself and then have it load into another list box via delimiting each line and reversing the values.

a few notes,
after delimiting the line, array(2) is the pet summon and array (144) is the icon. Those were annoying to find.

BrainiacVince
06-27-2007, 11:33 AM
Thanks a lot for the help. I was going to try to go back through one of the other editors and pick out what each number was, so I appreciate a little heads up. As a side note, I remember seeing a post on the forums or the wiki somewhere about the schema for the spells file. Does anyone happen to have a link to that post or page? I can't find it for the life of me. ><

On the other hand, I didn't realize that you were already creating a new spell editor, so I might just wait for that if it isn't too far off. I already use your DB editor (great program, btw) for dang near everything it does.

GeorgeS
06-29-2007, 02:08 AM
I was not aware there was a spell schema online.. I was pondering wether to make a editor, but others have started, so I will just see what comes out of their progress.

GeorgeS

BrainiacVince
06-29-2007, 07:08 AM
I think the biggest thing I want to accomplish with my editor is having the schema as correct as I can, then posting that up on the wiki. Having some documentation for the spells file will be nice.

John Adams
06-29-2007, 07:39 AM
I was not aware there was a spell schema online.. I was pondering wether to make a editor, but others have started, so I will just see what comes out of their progress.

GeorgeS
The only spell schema I am aware of is what comes with the web based PEQ Editor site.

GeorgeS
08-13-2007, 01:54 PM
Actually what Kayot mentioned about splitting the long spell string later is an excellent idea. The memory to hold the entire spells list is huge. I will remember that when (if) I begin to code one myself.

Regarding the sorting, I would use a simple bubble sort or something similar.

But the biggest issue is decoding the spell array ---

GeorgeS

Runeblade
08-14-2007, 03:39 AM
Is there currently a way where u can make your own custom particle effects and import them to use with about any spell? Or i was thinking find a partice effect and swap it with one you made and have it the same name. If it doesnt work just replace the file with the old one?

BrainiacVince
12-08-2007, 03:46 PM
Hey all. Sorry for my complete lack of updates on this project. I've been swamped with college all semester and haven't even had time to play, let alone code. However, I have good news. I'm taking a database projects class next semester and the professor has already approved me working on this editor for my project. It's pretty nice to get college credit for working (and playing) on the Emu. =P Classes start around January 15th, and updates will be posted far more regularly. For what it's worth, I think he is going to have me code the program using AJAX (if memory serves). I'd be happy to post source code for the editor as well, so improvements can be made by those better versed in the language.

Also, I again ask for more suggestions as to layout, content, or usage. What are people looking for in a spell editor? I have a good idea of what I want, but since this is a major coding project, I'd also like other people to find it useful and easy to use.

AndMetal
12-10-2007, 07:08 AM
Fyi, I started a Wiki page a few months back that has some info about the structure of the spells_us.txt file here (http://www.eqemulator.net/wiki/wikka.php?wakka=SpellsUsTxt). The OpenSpell.xml file from OpenSpell (http://downloads.sourceforge.net/eqemulator/OpenSpell_1.1.zip?use_mirror=osdn) sheds a lot of light as to what fields mean what, even though it is a little out of date. I just did a little cleaning up on it to make it a little easier to read. I would encourage you to contribute any additional findings, so that way we (as a community) don't have to keep reinventing the wheel :)

I was personally working on a PHP-based spell viewer/possible editor, but because it involves so much, I put it on the back burner. I did however create a PHP script to parse the spells_us.txt file, and insert it into a database table. This at least allows me to get some of the more basic information from the database, like the spell name. The only downside is it required quite a bit of memory to do (somewhere between 128 & 256 MB of memory for the 4.55 MB file) and about 3-5 minutes. Then again, this was also on a pretty low-end server :D

soulshot
12-10-2007, 07:32 AM
I would like to be able to do the following with a spell editor :

-Really just a nice easy to use filter system for finding and editing entire spell lines per class.

-I'm not completely sure how it is currently set up but what if I want clerics to have a 10 percent decreased casting time and mana cost for healing and buff spells.

-Be able to search and sort spells by class and type of spell. (beneficial, detrimental, etc.)

-Increase or decrease mana cost, damage, duration by "class". (just an expanded wish of #2)

BrainiacVince
12-10-2007, 04:26 PM
AndMetal, you win one internet for providing convenient links, as well as for your work.

Soulshot, this will be easy to implement by executing SQL statements. However, this brings up a valid point that I (nor most people) actually have any idea what marks a spell as "beneficial" vs "detrimental" or what classes it is available for, etc. Having a few pre-set statements, as well as guidance in forming your own, will be amazingly useful. A special tab for SQL sounds like the optimal way of doing this so far, depending on how the GUI is actually implemented. Great suggestion.

Speaking of the GUI, any opinions on layout? Granted, all of the stuff I want to do has to be run by the professor (at least for the duration of the class), but I'm pretty sure he will approve.

Keep the suggestions coming, guys.

ChaosSlayer
01-07-2008, 01:58 PM
i realy like the spell editor writen by some german guy - you can find it around
i belive its prety much the only one besides openspell (i think)

if only its bugs could be fixed- it woudl be great - couse otherwise its very very easy to use

BrainiacVince
01-07-2008, 05:09 PM
I know which one you're talking about, and I liked it too. The odd thing, every bit of it was in English, except the Windows error messages it popped up. I found it comical to see the German equivalent of "Memory Segment Fault at address 0x320808234". Good times, good times. Honestly, mine probably won't be much different visually from either of the existing ones (heck, they aren't that much different from each other), just more complete in functionality.

ChaosSlayer
01-08-2008, 05:56 AM
Oh, that would be very nice to have =)
yes they are simular with OpenSpell, but OpenSpell is kind of all piled togther, while the "german" one is nicely broken into sub section, with icons preview and all.
If it wasn't for ocasinal corrupted save bug, and unability to properly change/save spell animation and descriotion- it would be all one would need.

But I am looking forward to your new spell editor =)

BrainiacVince
01-15-2008, 03:37 AM
Week 1, Update 1:
My class is every Monday so I will be posting updates either Monday evening or Tuesday sometime.

I am going back to my original plan of using Java to implement this. The AJAX idea is for a separate project the professor had in mind.
This week, I'm going to be working on the GUI layout, which is due next week. This is your last chance to suggest major GUI features that you'd like. Some changes can be made later, but I don't want to have to reinvent this project every other week.

TheLieka
01-15-2008, 07:11 AM
I don't know how easy or hard this would be for you, but it would be nice to be able to query and update spells in batch.

For instance, if we notice that fear is landing way too easily, we could update the Resist Level (if you could update it with a calculation rather than a value replacement - for instance +10, rather than setting them all to the same value - that would absolutely rock too) on all spells that contain effectid 34 (or maybe hard code the effect name for each value.

The main thing that most of these spell editors lack is the ability to query the spells and update in batch.

Also, ensure that it's possible to edit the spell effect fields, that's something that OpenSpell doesn't allow you to do very easily, so I find myself using excel for this (which is quite messy).

Also, if it helps, I have broken my spell file into an excel spreadsheet and labeled the columns by how the source reads them. I'll post a link to it if it'll help you (or anyone else).

Dax

TheLieka
01-15-2008, 07:19 AM
link below:
http://www.pwnedemu.com/downloads/Documentation/spells_us.zip

Dax

BrainiacVince
01-15-2008, 10:13 AM
This "batch" concept is incredibly easy. In fact, you could have already done it, to be honest. Instead of adding the data to a spreadsheet, you can add it to a new table in a database. You can create a new table in the existing database you use for your server, or start a new database with a table just for the spells. Since you already have the column headings, export the data to a .csv file, then import it into a table. (In OpenOffice, choose Save As, not export. Csv is one of the options in the drop down menu.) You should be able to use existing headings (the first row) as your field names for the database when you import the data from csv.

This allows you to execute SQL against it, which will give you batch capability. The only difference between doing it straight in a database editor vs a spell editor is that the spell editor will be able to have some nice drop-down boxes (like you suggested) with labels instead of numbers. Actually, I intend to use both in the GUI, so people can easily associate "Beneficial" with, say, a 2 in that field. I know that with Java, the JDBC (the Java DB driver) allows direct execution of SQL against a database, so it will be virtually no work at all to allow for that. The work will come from creating the drop down boxes in the GUI that associate Beneficial with 2, for example.

Your giant table, as well as some info that AndMetal posted a link to on the wiki, will greatly reduce that work, and I thank both of you again for that.

Dispair2
01-15-2008, 03:23 PM
I was also planning on working on a little project like this that would use vb.net to connect to a db and decode the .txt file to the db then you can easily update them then simply dump them back to a .txt file however you like when you are done. However i am not able to decipher the .txt formats at this point so any help you can give on this aspect (such as what the heck the field actually mean and how the values are determined) would be great.

BrainiacVince
01-15-2008, 08:08 PM
I haven't started decrypting the beast yet, but the links above will provide you good places to start. I'll post my findings to the wiki, and provide a link from this thread once there is a sufficient amount of data in a nice format. Actually, I'll most likely make a wiki page that will essentially be my project notes and will get changed, updated, etc, as the project goes along. That'll be a convenient way for people to see what I've done and what is left to do, as well as provide an outline for me to work from.

Dispair2
01-16-2008, 01:42 AM
Well sing as i do not have an idea where to start on a spell editor until I can get a list of what fields do what and how they are calculated in the spells files i am pushing the project to the side and going to add to the current editor that i have. I am going to setup an all in one edit that will do almost everything such as items mec edit and so forth and i hope while working on that project i can get a good break down of the spells files. so everyone knows i am using vb.net to program and using tabs to set different editor types, this will connect to the for now peq db and edit from there, I am starting the project at this very moment and how to have a Somewhat working model by Friday or Saturday.

until then if anyone can find or put together a comprehensive list of the spells files such as fields, field calculations and so forth please email me at rmiller@dnetpa.com (mailto:rmiller@dnetpa.com), what i really need it what fields are important, hat they are, and how to calculate the numbers such as is 2 = clr 3 = nec 4 = wiz then does it calculate 2 & 3 & 4 or 2 + 3 + 4.