|
|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
| Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum) |

06-08-2009, 11:14 PM
|
|
Developer
|
|
Join Date: Apr 2009
Location: USA
Posts: 478
|
|
Although what you suggest would work, I had a thought of a different approach.
What if we have everything stored on the server side using the slot numbers that SoF uses. Then all we would have to do for Titanium is convert the slot numbers that are different. This moves the database engine forward to match SoF and new item data as it comes in.
Also, since Titanium has a subset of the SoF slots, it should simplify the code overall. Since some of the slot numbers are different for Titanium, we can convert the SoF slot numbers to Titanium slot numbers in the code for the Titanium client. But the main code and the SoF code would not require any conversion at all. And the item DB would have the proper slot numbers for the future.
Additionally, when we no longer wish to use Titanium, we simply drop that code. We wouldn't be carrying over historical slot number changes that no longer made any sense.
What do you think?
|
 |
|
 |
 |
|
 |

06-09-2009, 03:45 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Ideally, that would be a good approach, but it is also quite a bit more of a pain in the a$$! For one thing, everyone's inventory tables are already built around the Titanium slot layout. Which would mean everyone would have to run queries against their entire inventory table to convert the slots over. This would be no simple query either, so the risk of something going wrong is high and if something did go wrong, it would probably be pretty bad. Of course, as long as you had a backup ready to go, it could be corrected, but not everyone is smart enough to do a backup before making big changes like that.
Then, another issue is that we finally now have all of the encodes in SoF.cpp set to handle the slot conversions between the 2 clients. If we change everything to use the SoF slot order, we will have to take every one out of SoF.cpp and put the reverse into Titanium.cpp as well as adding a ton of encodes in there that don't currently exist. It wouldn't be insanely hard to do, but why waste the time?
Also, a large portion of the items table is already built around Titanium slots, so it would probably mean converting all slot 21s into slot 22s and then manually setting the Power Source items back to slot 21. This part wouldn't really be more work either way, because almost the same thing is going to have to happen no matter how it is done.
We are going to have to do conversions one way or another. As long as everything works perfectly in the end, I think it is all fine no matter how it is done. Since almost all of the conversion work is done from Titanium to SoF for slots and other stuff like Structures, I would really hate to have to undo all of that and start doing it over for Titanium.
The point of having multiple patch compatibility options like we do is that we can have a centralized system that the different client versions can use and make conversions to or from to make sure that they are all compatible with the server. I doubt that Titanium will ever be phased out. I also think it is unlikely that there will ever be another expansion past SoF that will be used by the emulator. Since SoF is almost done, there isn't much reason to go back now and redo everything like that as long as stuff can be easily fixed with little work-arounds.
I think by even starting this thread, I probably made the whole thing sound more complicated than it is lol. I will test it out and see how well the changes work.
|
 |
|
 |

06-09-2009, 12:24 PM
|
|
Developer
|
|
Join Date: Apr 2009
Location: USA
Posts: 478
|
|
Fair enough. You are much more familiar with the code base than I am. As long as it isn't going to cause regular problems in the future, I see no reason not to do it as you suggest.
|

06-09-2009, 12:35 PM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
From a database perspective converting either way will only be two easy queries since they are bitmasks. Just let me know what the final decision is, so I can get into PEQ 
|

06-09-2009, 03:14 PM
|
|
Developer
|
|
Join Date: Apr 2009
Location: USA
Posts: 478
|
|
I suspect Trevius is more concerned about others with custom DBs that are not as good at SQL queries. In any case, it's up to him since he's writing the code and I'm still a noob around here 
|
 |
|
 |

06-09-2009, 05:12 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Well, I got the actual slot stuff set in the SoF code last night to allow items set as slot 22 to show up as Power Source in SoF and items with Slot 21 to show up as Ammo like they currently do.
I did a DB check last night on my items table and it looks like they didn't add any new ammo slot items since SoF, because I didn't see anything set to use slot 22 at all. Maybe a fresh PEQ DB would show differently, but I think the last update I did on mine should have included them if there were any.
Basically, this means that only the Power Source items would have to be changed over to use slot 22 to work with the new slot arrangements. I tested it last night and setting them to slot 22 does make them equipable in the latest SVN, so it should be ready for a database change now. I don't think the change is as simple as a single query though, because both Ammo and Power Source items currently in the Database use slot 21. So, I think they have to be changed by hand. I used Navicat last night and sorted my items table by slot and was able to manually change all of the Power Sources from slot 21 to slot 22 very quickly with just copy and paste. There were only 50 or so of them and they were all right next to each other.
I would not advise for anyone to actually put an item into the Power Source slot right now unless they are testing it, because it will definitely delete the item after you do so. This is because I don't have the extra code in place to support the new inventory slot yet, but I will try to work on that further tonight. It will have to be added to be able to save to the database, and to be usable as a clicky if it has a click effect. Also, I noticed that if you set stats on a Power Source item, the client will definitely gain those stats, which means that I will need to add that slot in to calculate the bonuses from it so that the server factors them in properly. That's pretty cool, because I was not aware that Power Sources could actually give stats to the client directly. So, not only could the item be used for an extra clicky slot, but it could also be used for any other stat and probably even worn and focus effects, which is nice.
|
 |
|
 |

06-09-2009, 07:41 PM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
Quote:
Originally Posted by gaeorn
I suspect Trevius is more concerned about others with custom DBs that are not as good at SQL queries. In any case, it's up to him since he's writing the code and I'm still a noob around here 
|
I only replied because Trevius mentioned me by name asking my opinion.
In PEQ's case, the change actually should only take one query with the way you set it up. If I remember from the last time I played around with ammo vs power source items there was a column or two that identified the two right off the bat for me other than slots. I probably should have bumped power slot items when I changed ammo slots to work on Titanium but I didn't think ahead.
|
 |
|
 |

06-09-2009, 09:57 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Ahh, I see! So, that makes sense why I didn't see anything set to use Slot 22 when I checked my items table after recently updating it to PEQ. I didn't know that you had already done that conversion to make them compatible with Titanium. Good to know
If there is another field to help you identify Power Source items, then that should make it fairly simple. And yes, I was referring directly to Cavedude, because IMO, his database is the most important for current items that would include new stuff like Power Sources. For custom servers, it doesn't really matter much, because if they haven't updated to add in new items from the PEQ DB, then they probably don't have Power Source items in the first place. For custom servers, they would most likely just be creating new items and would then just set them to slot 22 if they wanted them to be usable in the Power Source slot.
It sounds like the DB change should be really quick and simple. I will probably mention the new slot 22 to GeorgeS so he can update his tools to add in the new slot if possible.
Hopefully I can get all or at least most of the new slot stuff worked out tonight so it can be saved in the database and can be handled just like any other worn slot. While I am doing that, I am also going to see if I can get Cursor added to the nukeitem() function so we will finally be able to delete items from player's cursors. I don't know why cursor wasn't added to that long ago, but since I am adding another slot in that for Power Source, I might as well get cursor added in there too.
|
 |
|
 |
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:54 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |