PDA

View Full Version : All in one editor


Dispair2
01-16-2008, 01:51 AM
Instead of cluttering someone else's post i figured i would create my own for my little project, as of this moment i am putting together an all in one editor for items, Merchants, quests, characters, and items if their is anything you think i should add to this to make my life more interesting please drop me an email at rmiller@dnetpa.com (mailto:rmiller@dnetpa.com) and i will try to add the information.

TheLieka
01-16-2008, 07:39 AM
While I'm not against this idea, wouldn't it be easier to join an existing effort rather than having 500 tools being developed by 500 different devs? Create an elite task force of tool developers and take over the tool world! ;)

Dax

Dispair2
01-16-2008, 09:03 AM
However, that would involve everyone knowing the same languages. And so far it seams that out of the 100 devs working on these 5 projects their are 200 different programming languages. I know vb.net if anyone who knows vb.net has an interest in helping me or someone who knows java wants to help the guy doing spell editor in java, or anyone else then i am sure none would complain.:)

I listed my original needs for help decoding the spells files and apparently all the things involved in this project are going to require some deciphering i have spent all day trying to find a way to sort the items db by type however their are 56 types and if i search for item type X i get a list that spans all item types, maybe it is just me but when this was originally done item type 0 should have been one type and 1 another and so on maybe i am just missing the connection so far and when i find it that will be a good day.

Programming is 10% coding and 90% figuring how the last guy did it.

AndMetal
01-16-2008, 06:09 PM
I think a 1 stop shop utility would be great.

I started something like this using PHP, mainly to make it easier to maintain servers (especially my own). I haven't done much with it recently, but eventually wanted to turn it into a do everything utility, although that can be somewhat difficult for just 1 person :D Part of it will eventually incorporate a spell editor, which should make it easier to modify & distribute spell_us.txt spells on the fly.

I called the compilation "custom" and just recently got it onto Sourceforge (https://sourceforge.net/projects/customeqemu).

Dispair2
01-17-2008, 03:55 AM
yes it is allot of work, i am trying save some time by salvaging and upgrading different things from this site http://66.159.225.58/eqemu/eq.html however that is proving to be very difficult because i do not have a copy of vb6 and i believe their are control arrays in some of the code that prevent me from upgrading to vb.net 2k8 not to mention other things that 2k8 does not like. :cool:

Dispair2
01-19-2008, 09:59 AM
I promised to have something by yesterday or today so here it is, it is not much but it will let you search the items table and shows some what how the interface will look when complete, i am waiting on sourceforge so i put it on my own hosting until sourceforge approves me.

Download link is:

EQ Editor (http://www.dnetpa.com/eqeditor/EQEditor.msi)

This does require .net 2.0 and ODBC 3.51, ODBC is included in the install directory of the application

Dispair2
01-19-2008, 10:52 AM
Some other things that you should know before you test this application out.

This program uses a XML file to store connection data much the same as EQEMU when you first run the application it will come up with a dialog box and ask for your settings, so their is no need to create the file by hand in fact you should NEVER touch the Settings.XML file that this application creates it is self managed and i have not created any error code yet that will fix the file if it becomes damages. You have to delete and start over creating a new XML file.

My new deadline for getting this application more functional will be 1 week out. So Jan 26 08, ANYONE that wants to help with this project please email me at the above link.

Dispair2
01-20-2008, 05:30 AM
Just so everyone who is downloading this knows, this application had an error i was unaware of when i pushed it out. When you close the application it continues to run in the back ground, the only explanation i have for this is that it must be an error in vb.net 2008. I tried very hard for the rest of the night after discovering it only to find that the one function that would resolve this was removed in 2008.

Well after some playing with the code i was able to fix this issue by starting a separate class and branching from there, anyone demoing the current version please be advised that the error will not be resolved until the next publish Jan 26 2008.

sesmar
01-21-2008, 12:35 AM
I just happen to of noticed this project today and I noticed that you are using ODBC for the DB connection. I was just wondering if you had a specific reason why you wanted to use ODBC over the ADO.Net MySql drivers you can get from http://dev.mysql.com/downloads/connector/net/5.0.html . In my experience ADO.Net is much faster and easier to work with than ODBC. Well, I will check this out and look forward to future versions.

Dispair2
01-21-2008, 12:21 PM
I didn't know about these drivers. Thank you for the information i will look into it. Also, It this a separate install like ODBC, or can it be included with the app build?

sesmar
01-21-2008, 12:34 PM
All you need to do is reference the MySql.Data.Dll in your project and when you create your install package it will include it as a dependency, all the clients need is the DLL for it to work.

GeorgeS
01-21-2008, 07:21 PM
Will MySql.Data.Dll also apply to VB6 as well?

GeorgeS

sesmar
01-21-2008, 10:51 PM
I do not believe so. It is a ADO.NET implementation of the MySql Data Connector.

Dispair2
01-22-2008, 10:02 AM
That sounds great i have not had time to test it yet as i just started a new job, however if it works as great as it sounds i will absolutely use it as it is one less thing that must be installed with applet nt to mention the faster access time.

Dispair2
01-26-2008, 12:50 PM
The newest version will be released tonight around 10 PM, it still has really no functionality short of search. I have however fixed all known errors and also changed to the ado.net drivers for mysql instead of odbc, So no second download to get it to work. Also i have changed around the gui to make it more user friendly and got all but the race's fields working, I have decided to remove the race field as their would be so many race's that this would not be practical.

The application has had to "Officially" move up to the .net 3.5 framework as even when set to 2.0 it still uses 3.5. When installing it prompts you to download 3.5 so this is not a big issue.

I have added some code that will create a table in peq database to read item types from, it simply reads an included excel file and then creates the table, if the table and the excel file are not available then the field is unusable.

The application still reads from and creates the settings.xml file and i plan to in the future read and make editable the eqemu settings file.

Please look over this application and let me know how you think it is comming along. any errors or suggestions please send me a PM here as that is the fastest way to get in touch with me. :D

Dispair2
01-26-2008, 02:16 PM
The current application is at this location.

EQ Editor (http://www.dnetpa.com/eqeditor/EQ Editor_1_0_0_10.exe)
I have given up on the msi files because they are too large and too hard to create with my current software.

Fynmun
01-28-2008, 06:39 AM
I might not have the "programmer" tag, but here's my 2 cents:

- On open:
- items_Types.xls error popped stating not there.

- Quest Tab:
- Fairly easy to make. Use the sub folders to separate by zone, then the title of the .pl files as the names of the quests. I believe there is a PERL plug-in for VB, though I'm not 100% on that. If there is, then that could add editing functionality inside the program.

- Visual Stuff:
- Name, AC, Haste, and HP all have a weird upper line that goes across the top of the box. (Obviously where the text box where the title is sitting.)
- Search button could use some breathing room so it is not flush with the box it is in.
- Main window (in my opinion) should not be resizable, instead make it flush with the tab set; upon maximize
- Use the bottom scroll bar of search results only as needed. Remove if not needed. (Makes it look cleaner.)

- Search Code:
- One thing I noticed. Does the code for the search rely on all the boxes? For example, Class == 'Bard', Level == 1, Price == 1, and Name == 'Chant', click search and nothing comes up. (Looking for 'Song: Chant of Battle'.) For flexibility, I'd suggest putting in a selectable search.
- Easiest way I can think of coding (though it'll make the UI kinda messy) is to have check boxes next to the Search options. Click on means it's used in the search, otherwise not used. This would probably make it clunky though, but this was really only off the top of my head.
- Other way is to have it detect a change in the box. But that'd get tricky because a person might look for a level 20 something and then go back to a level 1, thus breaking it.

That's all I got at first glance. I'll post more if you found this information useful.

Fynmun

narcberry
01-28-2008, 07:54 AM
Thanks anyone and everyone that makes doing anything easier for others. Seriously, thank you.


As far as a all in one tool goes, I'm not a fan of using VB. It's such a hacked language, requiring all users to jump through silly hoops. Plus, you're running things client-side usually so my devs end up waiting through ridiculous downtime between each action when working on the database (on the order of 5 seconds per line operation). It should be server side, since that is where the database is (probably) and that is where the spells file is and that is where all the quests are and that is where all the config files are and that is where all the logs are and that is where the ...

To me, the obvious solution would be a php based tool. It can be available to all your devs, as well as maintain security. php is very good at interfacing with databases and you only have to set it up once, on the server. It could easily be used to edit quests and spells, even make the latest spells file available for download. It could even interface directly with the server as it is running. All of this in a well designed tool. VB is so icky (no offense georges).

I have no intention of crushing your spirits, but I would hope before you get too far along you consider a redesign using a server-side all-in-one tool. If you do, I'd be willing to help. An all-in-one tool would just be too helpful.

Fynmun
01-28-2008, 08:28 AM
Keep in mind though, some servers are clients as well -- such as my case.

Yes, PHP would be useful for devs in remote locations because of its ease to interface and it can be made into a nice (and pretty) HTML page.

My only suggestion is that a check-out system should be implemented. Two or more devs working on the same thing can end up being disasterous.

I would say switching all the way to PHP has weaknesses, but I personally cannot think of one. The ease of making a nice and effecient page for editing is easily done using PHP/HTML. Database interface (like said above) is a breeze. Connection to the server can be restricted easily via passwords and other security measures. Etc. Etc.

As much as I praise this idea, I do not condemn the idea of making a non-PHP AiOE. Though the useage of this type of editor would be limited, it would be stronger for those in that group. This group being anyone who doesn't have a dev team for their project. For the people who just want to install n' run, a non-web based editor would probably be ideal -- instead of having to install PHP, install Apache, set up a server, configure the PHP, etc etc.

In essence:
1) If Dev Team Then PHP.
2) If Loner Then non-PHP.

In either case though, something like this would be unbelievably useful -- especially to the people who are using the EQEmu as a base for their own custom game.

Dispair2
01-28-2008, 11:12 AM
Thank you both for your input, unfortunately i do not know php and will have to stick to finishing the standalone vb.net. Also this application does connect to remote machines as i am using one of many machines in my domain to create it and the sql server is stand alone windows 2003 server. this application would also be very easy to implement "check out" as all i would have to do is create a filename.chk file and then when trying to open the file check for that. It is not something i thought about but it is a GREAT idea and will put it on my list. As far as updating the spells files client side, that would have to be done by a client and a simple asp or php or even html page could accomplish this just by having an updates page.

As an update for the actual application, i missed a file in my last publish and have put it on the web server.

The XLS file (http://www.dnetpa.com/eqeditor/item_Types.xls)

Dispair2
01-28-2008, 11:16 AM
I just read through all the posts and that is some great feed back, I hope to hear more so that i can make this application more user friendly. I will take into consideration ALL input let here for me.

AndMetal
01-28-2008, 03:57 PM
I have no intention of crushing your spirits, but I would hope before you get too far along you consider a redesign using a server-side all-in-one tool. If you do, I'd be willing to help. An all-in-one tool would just be too helpful.

Not trying to hijack the thread, but I have put some work into an all-in-one PHP-based editor (http://www.eqemulator.net/forums/showthread.php?t=23892). It's still quite pre-alpha, but does have some decent functionality. The most functional part is the character viewer (semi-Magelo, but is based on the default UI of the Titanium client).

Of course, the downside about an all-in-one editor is it takes forever to get everything working right, because there are so many things you want to be able to do. If anything, maybe something based on a plug-in system would be best, where you can add the components you need, which is where I'd ultimately like to take the one I've been working on.

Fynmun
01-28-2008, 04:15 PM
It depends on what you want the AiOE to do. Dispair2's is only 4 tabs, the one I'm creating is only 3.

In any case... My view is simplicity rules the day. If you've got so many things you want it to do, then break it down into, like you said, plug-ins and packages. Time is only an issue if you work on a bunch of different ones at once. Get the base down, then work on one package at a time until it works as intended, or close to intended.

Dispair2
01-29-2008, 02:54 AM
Those are all brilliant ideas, however i would not know where to begin with plugins and the simplest way i can see moving forward on this is that we complete one section at a time, i was able to find somone else to help me with this application and hope that will drop production time agreat deal.

Dispair2
01-29-2008, 07:00 AM
Yes my SQL statement is a little funny because i have also noticed sme non functional parts of it however i was able to see that the warrior part does work.

This is how the SQL statement looks inside the application:

SQL = "Select id, name, ac, haste, hp, reqlevel from items where reqlevel >= 1 and id = 25462 and classes like %5% and price >= 1 and name = 'itemname' and itemtype = 'something'"

of course i edited it to make it easier to read and post but you can see how it works.

This is alot buggy and will be fixed in the future but it is as functional as i need it to be for testing purposes rigt now.

What happens on the back end is that when you click search it goes through and if a value is present then it adds it to the SQL statement. So above is not always how it looks as it is dynamic and when you type in the id field i believe it disables the rest of the box's. I am not at the actual dev machine now so i can not say definatively.

AndMetal
02-01-2008, 10:37 AM
What happens on the back end is that when you click search it goes through and if a value is present then it adds it to the SQL statement. So above is not always how it looks as it is dynamic and when you type in the id field i believe it disables the rest of the box's. I am not at the actual dev machine now so i can not say definatively.

That's how I ended up doing it on mine (http://customeqemu.cvs.sourceforge.net/customeqemu/customeqemu/items/search.php?view=markup), otherwise you run into problems.

On a side note, if you already know the item ID (it is a unique value, no 2 items have the same item id), the other fields don't matter. MySQL ignores the rest because they are redundant. However, you don't usually want to make exceptions in your code if at all possible (HUGE PITA to change later down the line), and since it doesn't usually cause problems to leave it in, you should be fine.

I am a little curious about the Select statement:
Select id, name, ac, haste, hp, reqlevel from items where reqlevel >= 1 and id = 25462 and classes like %5% and price >= 1 and name = 'itemname' and itemtype = 'something'

You mentioned that it's buggy but functional. There are a few things to be aware of (unless you already are) about some of the data types:

First of all, classes requires a bitwise operation (http://dev.mysql.com/doc/refman/5.0/en/bit-functions.html) because of how it is stored in the items table, because multiple classes can use it, and adding a column for each class can be very hard to read. When I went through discovering the information initially, I put my findings in the Wiki (http://www.eqemulator.net/wiki/wikka.php?wakka=EQEmuDBSchemaitems):
classes

* The class or classes can use the item. Remember to add up the results.
o 0 = None
o 1 = Warrior
o 2 = Cleric
o 4 = Paladin
o 8 = Ranger
o 16 = Shadow Knight
o 32 = Druid
o 64 = Monk
o 128 = Bard
o 256 = Rogue
o 512 = Shaman
o 1024 = Necromancer
o 2048 = Wizard
o 4096 = Magician
o 8192 = Enchanter
o 16384 = Beastlord
o 32768 = Berserker
o 65535 = Any/All
* IE, Monk (64) + Shaman (512) = 576

So, instead of using LIKE, you should use & (bitwise AND).

Secondly, name should only be = if you know exactly what the name is, and if you're searching for an item, you typically don't. That is why you normally want to use LIKE (http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like). I usually put a little spin on it, because running name LIKE '%Cloth%' can be pretty resource intensive (it searches all of the item names in the database to see if they contain the string "Cloth"). However, if you include an option to search using it as either the beginning or end of the name, it speeds up the results substantially (so name LIKE 'Cloth%', name LIKE '%Cap', or name LIKE 'Cloth Cap'). I usually do the same for the ID field, in case I don't know the exact item #.

In conclusion, this is how I would recommend to change the initial query:
SELECT id, name, ac, haste, hp, reqlevel FROM items WHERE reqlevel >= '1' AND id = '25462' AND classes & '5' AND price >= '1' AND name LIKE '%itemname%' AND itemtype = '0'

GeorgeS
02-16-2008, 05:24 AM
Not sure if anyone uses bitwise AND SQL, but I find this info extremely useful. It makes what would take lots of code oftherwise into 1 line.

Say you want to find all items for a mage , you would enter
SELECT classes,id, name FROM items WHERE classes & '4096'

In my job, things like this makes life easier.

GeorgeS

AndMetal
02-16-2008, 09:12 PM
Me too, George. I didn't even know about that little jerk until I started messing around with EQBrowser (http://www.eqemulator.net/forums/showthread.php?t=16772) (see page 4 for a working download) and checked out some of the queries. In reality though, I'm not sure how much info is really stored as a bitmask anymore :) It's just not scalable enough...

Dispair2
03-25-2008, 11:13 AM
I have been very busy with projects at work and sleep i have not done anything at all on this project but wanted to let everyone know it is not DEAD.

Kayot
04-14-2008, 12:44 AM
A ton of data is stored as bit masks in the peq database. Every class/race combo field. I use the bit mask to save me a ton of time and code. What used to be several thousand lines of code turned into JUST the sql statment and a few box fills.

Trust me, learn the bitmask. You'll be glad you did.

Also, Arrays are your friends. Don't forget that they count them selfs when doing math, store strings with those numbers and CAN be two dimensional (Even more if you need it, two is almost always enough though.)

John Adams
04-14-2008, 01:31 PM
Not sure this will help any, but I built some arrays in php for these bitwise comparisons. It was so long ago, I am not really sure why I did it this way, but here it is nonetheless.

// Gear slots
$a = 1;
$gear_slots=array(
"Charm" => $a << 0,
"Left Ear" => $a << 1,
"Head" => $a << 2,
"Face" => $a << 3,
"Right Ear" => $a << 4,
"Neck" => $a << 5,
"Shoulder" => $a << 6,
"Arms" => $a << 7,
"Back" => $a << 8,
"Left Bracer" => $a << 9,
"Right Bracer" => $a << 10,
"Range" => $a << 11,
"Hands" => $a << 12,
"Primary" => $a << 13,
"Secondary" => $a << 14,
"Left Ring" => $a << 15,
"Right Ring" => $a << 16,
"Chest" => $a << 17,
"Legs" => $a << 18,
"Feet" => $a << 19,
"Waist" => $a << 20,
"Ammo" => $a << 21
);

//foreach($gear_slots as $row=>$val) {
// echo $row.$val."<BR>";
//}

// Char Inventory slots (8)
$s=1;
for($i=22;$i<=29;$i++) {
$inv="Inventory$s";
$inv_slots[$inv]=$i;
$s++;
}

// Char Inventory bag slots (8bags * 10slots)
$b=1; // bag 1
$s=1; // slot 1
for($i=251;$i<=330;$i++) {
if($s>10) {
$s=1;
$b++;
}
$bag="Bag$b";
$bagslot="Slot$s";
// echo "$bag-$bagslot<br>";
$inv_slots["$bag-$bagslot"]=$i;
$s++;
}

// Char Bank Slots (16)
$s=1; // slot 1
for($i=2000;$i<=2015;$i++) {
$inv="BankSlot$s";
$inv_slots[$inv]=$i;
$s++;
}

// Char Bank Bag slots (16bags * 10slots)
$b=1; // bag 1
$s=1; // slot 1
for($i=2031;$i<=2190;$i++) {
if($s>10) {
$s=1;
$b++;
}
$bag="BankBag$b";
$bagslot="Slot$s";
// echo "$bag-$bagslot<br>";
$inv_slots["$bag-$bagslot"]=$i;
$s++;
}


// Create Classes Array
$a = 1;
$classes=array(
"Unknown" => 0,
"Warrior" => $a << 0,
"Cleric" => $a << 1,
"Paladin" => $a << 2,
"Ranger" => $a << 3,
"Shadowknight" => $a << 4,
"Druid" => $a << 5,
"Monk" => $a << 6,
"Bard" => $a << 7,
"Rogue" => $a << 8,
"Shaman" => $a << 9,
"Necromancer" => $a << 10,
"Wizard" => $a << 11,
"Magician" => $a << 12,
"Enchanter" => $a << 13,
"Beastlord" => $a << 14,
"Berserker" => $a << 15
);

// Create Races Array
$a = 1;
$races=array(
"Unknown" => 0,
"Human" => $a << 0,
"Barbarian" => $a << 1,
"Erudite" => $a << 2,
"Wood Elf" => $a << 3,
"High Elf" => $a << 4,
"Dark Elf" => $a << 5,
"Half Elf" => $a << 6,
"Dwarf" => $a << 7,
"Troll" => $a << 8,
"Ogre" => $a << 9,
"Halfling" => $a << 10,
"Gnome" => $a << 11,
"Iksar" => $a << 12,
"Vah Shir" => $a << 13,
"NPC" => $a << 14,
"PET" => $a << 15,
"Froglok" => $a << 16
);
I used these arrays to build the combo boxes on my lookup page. Something like this:
<select name="searchClass" class="advSearch">
<option value="-1">Pick a Class</option>
<?php
foreach($classes as $key=>$val) {
if(isset($_POST['searchClass']) && $val==$_POST['searchClass']) {
$selected=" selected";
} else {
$selected="";
}
echo '<option value="'.$val.'"'.$selected.'>'.$key.'</option>';
}
?>
</select>
Again, kinda barbaric, but it works. Good luck with the app. I like the idea.