Item Graphics
Would it be possible to add a field in the inventory table so a user can say wield an Epic Weapon, but choose from available graphics via Quest NPC options to change the look of their weapon? This would allow alternate graphics for the same weapon, without having to make a clone of all the items and giving them a different item id just to have a different graphic choices.
After all, armor has RBG color fields, right? This would be similar. Should be simple to implement. |
They have that on live already, and it is called ornamentation. I haven't actually used it myself since I quit before it was added, but I think the idea of it is fairly simple. You basically get an ornamentation item that has the icon and model of the graphics you want your current weapon to look like. Then you combine your weapon in the ornamentation container and it changes the look permanently to the new icon and model.
I have looked into adding them a couple times, but there are a couple of things that make them a bit complicated to add. Adding an icon field and model field to the inventory table wouldn't be too bad. It would probably need to be added to the corpse blob as well, which does complicate things a bit. But, the most complicated part is that I don't know how to deal with the actual combines yet. The ornamentations don't actually have a model number on them for the new look, only the icon of it. I am guessing that means we would rely on a combine script that has a list of every model that is associated with each ornamentation, and then use that to populate the inventory table field for the new look and icon. ***Edit*** Actually, it looks like they now include the model ID in newer ornamentions from Live based on what I see on the 13th floor website. Here is an example of one of the older ones: http://eqitems.13th-floor.org/itemraw.php?id=40692 As you can see, the idfile is IT63, which is just the generic model for a bag looking model. I searched my DB and all of the ornamentions I have are IT63 as seen here: Code:
mysql> SELECT id, Name, idfile FROM items WHERE name LIKE "%Ornamentation%"; http://eqitems.13th-floor.org/itemraw.php?id=124290 I didn't check any others, but I assume they switched to simplify things on their end a bit. I notice they have a charm file entry for the container to have a script associated with it. In this case it is ITEMTransfigShield, but it is different for different ones. I assume that they used to use the scripts to deal with the combine to make it take over the model of the current item. So, maybe I can do an items table update and see just how many items use the old way of setting the model by script. If it isn't too many, we can probably just make a list of what model IDs they are supposed to be and add a query to update everyone's DB to have the correct model that matches those older ornamentations. Then, it would be much easier to implement ornamentations. One minor problem is that not all DBs will have all of the old ornamentations, and some may have custom items using those IDs, so I am not quite sure which way is the best to deal with the SQL for that. Most likely, people would need to check their DB before running any update queries to fix the older ornamentations models. I could just leave that up to each admin to do and put the query to fix them in a post or something. If it was added to the SVN, it could potentially break items for people who aren't careful. Maybe just making a warning about that would be good enough though. Either way, I think this will require a change of the corpse blob struct data that will break any existing corpses that have items. I would probably have to hold off on working on this until that blob has been removed. I have been working on removing that blob anyway, so if I can get that done, I might be able to do ornamentations after that when I have time. Once the ornamention code is in place, we could even have quest commands that could let you update the model of any item on a character at any time without needing to do the ornamentation combine. This would allow you to do exactly what you are wanting, Hunter. |
If it helps, here is the output of the same query against the newest PEQ database:
Code:
mysql> SELECT id, Name, idfile FROM items WHERE name LIKE "%Ornamentation%"; |
While it seems simple to implement. I briefly looked into this and noticed that the ornamentations have a charm file script which adds another level of complexity to implementing what live has in place already as you figure out the variables involved with that. Otherwise sending a stored graphic packet from the database is fairly simple.
Sent from Droid |
Yeah, Akkadius, that is what I had mentioned. My bet is that they use that to call a script that has the correct model number to apply when doing the combine. We don't need to implement them the same as Live does, as long as we can find a way that works and is easy enough to manage after getting item dumps from 13th floor.
Seems to me that they realized using scripts to handle the combine is not a very smart way to handle it and made it so they can do it via the DB instead. Though, I am wondering if they have some kinda hash in the script that handles the part that deals with what ornamentation models can work with what type of weapon. Looking closer at their charm script file names, it appears they are categorized by the type of item, such as "ITEMTransfigShield" and "ITEMTransfig1HB" in the 2 examples I gave. Since I don't see anything else in the fields of those items that specify item type for the type that can be used, I assume that string is used to determine that. So, I still think we could get away with not having to use individual script files or anything funky like that. We should be able to just do a switch case on the type of item that is trying to be ornamented, and then to a string compare against the known charmfileids for each type to see if it matches the correct type for that ornamentation container. Yeah, Cavedude, that query is useful. Looks like it wouldn't take long at all to make a query to add the correct models for each of the ones set to IT63. I am still not sure of the best way to provide that query to people, other than giving a warning about being careful when you run it from the SVN as an optional update. Once we have the query in created, it wouldn't be too hard to just remember to update that whenever you do another 13th floor dump. It is kinda odd that they have some newer ones with the model numbers and some without. Could be that it is due to multiple people working on items and doing them differently I guess. Could also be that they still don't use the model numbers there, but that they add them in just for reference. Either way, I still have to work out the corpse blob stuff first I think. SQLDev01 was kind enough to help (he did most of the work lol) create the query to move the blobs out into individual fields of some new tables that will replace the existing one for player_corpses. Though, I will still need to check with devs about the old "classic_db" blob format to see if that needs to be dealt with as well, cause that could make things considerably harder to work out with a single query for all corpse blobs. I can leave that discussion for another thread though, heh. |
All times are GMT -4. The time now is 12:59 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.