EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::GeorgeS's Tools (https://www.eqemulator.org/forums/forumdisplay.php?f=674)
-   -   Item Editor Suggestion (https://www.eqemulator.org/forums/showthread.php?t=25552)

GeorgeS 06-29-2008 01:05 AM

Ok ran into a problem and need opinions

When one wants to choose a new spell (say for a click item), the program currently tries to load ~12000 spells which takes 40 seconds on my fast pc. Now this may be a problem on slower pc's. I cannot load the spells into memory and leave it there because it takes mucho memory. So my best option is for the user to search (partial name ok) for all matching spells and id's - that way it will only load those in memory and reduce processing time.


Does this sound plausable?

GeorgeS

trevius 06-29-2008 02:29 AM

Hmm, on the line editor window, it only takes my PC about 3 seconds to load all 12K spells. I have the latest version of the editor, but the new edit doesn't have the spell search in it yet for me to test that. I don't suspect it should take any longer though if it was done the same way.

Maybe a window that doesn't automatically populate all 12K spells would work. Like, if you popped up a window with the option to search by partial name and it would list them. But, also have a button that would just list them all if you wanted to wait for them all to load?

trevius 06-29-2008 02:52 AM

Here are some notes on the new editor in it's current state and what I think could be adjusted or moved for further enhancement. Keep in mind that I understand that you are only halfway done with it (at least on the version that I have) and I know that you still have many things to do. So, I figure you probably already have some of this in mind to do while working on it, but maybe some of the notes will help:

1. The Deities part could probably be moved to the Race/Class area, since I think that is probably where it fits best as far as organizing it goes.

2. Slots could either go at the top between Icon and Color, or if you made the fonts smaller on the race/class section to shrink that part up a bit, you might be able to make enough room to do a similar check box section (with select all) for slots that includes all 20 slots in it. I didn't realize when I made the photoshop image that I left slots out lol.

3. The select all buttons for race/class currently do an inverse select instead of actually selecting all. This should work ok, but I thought you might want to know in case that wasn't intended.

4. The IDFile could probably be moved to the first section under Color and Icon.

5. If possible, it might be nice to have a Copy Item button like you have on the Line Editor window.

6. You could make the input fields for Recommended Level (and the other req/rec fields) as well as the Accuracy/Avoidance/etc fields. This would mainly be so that the sections don't overlap the row to the right of them. None of those would need very long fields for input anyway.

7. Icon could use an input field unless you plan to make a popup to select an icon from your viewer or something.

That is all I have for now. But as long as you are interested, I will be glad to give more feedback :D

I really like how you set the pull downs so that you can either select one of the pull down options or actually type anything you wish in that field. Very nice!

There are a ton of fields, and keeping them organized to make editing as clear as possible is one of the goals I had in mind for this. For the most part, you have everything right on, and I don't want to sound like I am trying to control how it is done because ultimately the decisions are all up to you. But, if you wanted more feedback, now you got some :) I think this is going to be amazing when it is complete. I am surprised with how complete you already have it! Can't thank you enough for what you do for us, GeorgeS!

moydock 06-29-2008 09:23 PM

Very pretty, I'll start testing :).

knight1080 06-29-2008 10:37 PM

Question--where am I supposed to drop the files that come in the .zip?

trevius 06-29-2008 11:30 PM

Quote:

Originally Posted by knight1080 (Post 151763)
Question--where am I supposed to drop the files that come in the .zip?

Where ever you want. I use my c:/unzipped directory, so the item editor is in C:/unzipped/eqitems.

knight1080 06-29-2008 11:56 PM

Eh, all right. I ask because I unzipped 'em to my server folder, tried to open, and got an error regarding a MySQL connection error, the db.ini which I changed prior, and an inquiry about installing the ODBC drivers. I ran the batch app in the resources folder, but still getting the error.

moydock 06-30-2008 12:08 AM

Install this and reboot:
http://66.159.225.58/eqemu/ODBC_DRIVERS.ZIP

The file is off George's site, it's ODBC drivers.

knight1080 06-30-2008 12:17 AM

That did it--thanks a bunch!

GeorgeS 06-30-2008 09:13 PM

Thanks for the suggestions - graphic changes will wait. I spent hours on those. Regarding the spell loading, the 12K load in a split second, but putting them in a grid takes a loong time. That's the problem. I have not found a solution for it. I will have to do it by name search I'm afraid.

GeorgeS

trevius 06-30-2008 09:55 PM

Quote:

Originally Posted by GeorgeS (Post 151801)
Thanks for the suggestions - graphic changes will wait. I spent hours on those. Regarding the spell loading, the 12K load in a split second, but putting them in a grid takes a loong time. That's the problem. I have not found a solution for it. I will have to do it by name search I'm afraid.

GeorgeS

Oh, a grid to sort by name or ID by clicking columns? I think you could just do it the way the Line Editor does by loading from a file. Then just sort the file by name before adding it to the zip using excel the way I mentioned in another post. That way, it is easy for people to edit the spells.txt file so that they can have their own custom spells in it. A partial name search would be nice, but it would be good to have both options if possible.

nosfentora 07-01-2008 10:26 AM

GeorgeS,

I have the all 20k spells loading and displaying in a listview in +/-12s on a P4 3GHz machine. Seems to use about 15mb of memory

Probably not the most efficient way to do things, but it's fairly quick (depending on your point of view). It can be easily modified to allow searching by partial name too.

It could be done at load time so that there's no further waiting later on - or even threaded load so it's kinda invisible, and then you just show / hide the listview as need be.

Code:

    If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            Dim r As New IO.StreamReader(OpenFileDialog1.FileName)
            ListView1.BeginUpdate()
            While Not r.EndOfStream
                Dim s() As String = Split(r.ReadLine, "^")
                Dim lv As New ListViewItem(s(0))
                lv.SubItems.Add(New ListViewItem.ListViewSubItem(lv, s(1)))
                ListView1.Items.Add(lv)
                System.Windows.Forms.Application.DoEvents()
            End While
            ListView1.EndUpdate()
            r.Close()
            r.Dispose()
            r = Nothing
            GC.Collect()
        End If


GeorgeS 07-01-2008 01:45 PM

Excellent - a breakthru - Now the entire spellset loads in like 5 sec.!!!

Did a iterative run thru every statement and found which one took the longest to run. The additem equivalent of the grid was taking about 50ms per loop or so. Now it's down in the high uSec range! Go figure - a simple statement nearly broke this.

Ok, so the program is again moving fwd... progress is good.

nosfentora - thnxs for the code

GeorgeS

Update as of Jul 1th
Spell lists are completed. Sorting by id/name ok and works
The program now allows the adding of custom spells effects to click items
A copy current item button added, and the code works for it!!
Next is the code to save the entire dataset- may take a few days.. this is the last thing to do

nosfentora 07-01-2008 01:48 PM

No problem - hope it helps!

Cheers!

GeorgeS 07-03-2008 01:29 PM

Update as of Jul 3th
Managed to finish the save items, and also have the copy item working.
Also done is color editing within the new edit context.
Done also is the clicky items spell selection and verified they work

I'm going over the code and checking it in the db for errors. Plenty found and fixed, but imagine a few days left to fix the rest.

People always want to make clicky items, and with this tool, it takes some of the guesswork out by prefilling some fields so they work.

I'm pretty impressed that it was not so bad. Probably 2 weeks of total work.

GeorgeS


All times are GMT -4. The time now is 12:44 AM.

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