Armor Tint Deluxe
Okay, I wasn't satisfied with a single armor_tint value for an NPC's entire outfit. I wanted the ability to specify colors for individual armor pieces, so I could create colored armor uniforms for guards and such, potentially replacing old low-poly guards with Luclin models.
It wasn't too horribly difficult. :D http://www.jondjackson.net/eq/emu/images/armortint2.png http://www.jondjackson.net/eq/emu/images/armortint3.png SQL change: Code:
ALTER TABLE `npc_types` ADD COLUMN `armortint_id` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `drakkin_details`; Code:
CREATE TABLE `npc_types_tint` ( - I don't know if the table specs (engine, row_format, etc.) are the best ones to use. They were just the defaults used with my MySQL installation. - Field numberings are Helm, Chest, Arms, Bracers, Gloves, Legs, then Face. The letters after the numbers can help if you're editing the table data directly. 8 and 9 are for Primary and Secondary weapon slots, and as far as I can tell are unused by the client at this time. They can be left at 0. Server Code changes: eq_packet_structs.h - Line 1868 Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... Code:
... |
Forgot to clarify. This is the order of priority for armor tints:
1. armortint_red, _green, and _blue in npc_types. If any of these values is non-zero, the tint is applied to all armor pieces, ignoring armortint_id and individual armor piece coloring. 2. armortint_id. If the RGB values in #1 are all 0 but armortint_id is specified, the values from the npc_types_tint table with the corresponding id are used. 3. armor piece tint. If the RGB values in 1 are zero and armortint_id is 0 (or a corresponding record in npc_types_tint cannot be found), or if the red/grn/blu values for a particular armor piece in npc_types_tint are all 0, the tint on the actual armor piece item is displayed. Hope that clears up any potential confusion. |
AWSOME...
stupid question but to say to truly replicate the old felguard - he actual needs to wear CHAIN arms - how would you achieve that? ALSO: "Helm, Chest, Arms, Bracers, Gloves, Legs, then Face." Face? but no Boots? |
Err... I actually typed that? LOL.
Feet. The 'F' is for feet. And really, mixing armor types doesn't work out well. The armor meshes were designed to match up together, and they look out of place when mixed and matched. Better to stick with all chain, all plate, all leather, or all cloth. |
That is really awesome, Shendare! ChaosSlayer, I think Shendare meant to say "foot", not "face", since helm was already listed and that would be the same as face.
I will try to get this added ASAP. One thing I wanted to mention is that I don't think armor tint can be sent with an illusion packet, but it should be able to be sent with a wearchange packet. So, I need to go through and write a command or 2 that will use the wearchange packets for changing armor tints or weapons without having to repop the zone/NPC. I don't think it will be too hard to get that coded and I will probably start soon after I get AAs for SoF all figured out and finalized. I will probably try to add in a quest command or 2 for handling armor changes Then we would be able to change out armor on playable races, or we could even swap out weapons on other races mid-fight. Might be cool to have guards that normally have no weapons showing and then they whip them out when they aggro on something, or anything along those lines. I really like how you made a separate table for handling the new armor settings. I am surprised Live doesn't have anything like this, but maybe they will steal the idea when they see it :P I do think we could also include a material field for each slot in that table. Then, we could have it send the material for each slot so you could have NPCs with mismatched set pieces like ChaosSlayer suggested. This is some nice stuff, Shendare :) I don't know why, but I have been really happy with the illusion and spawn struct stuff we have figure out so far. I guess they are just things that have always bothered me just enough to stay on my radar. It is really nice to finally be working all of this stuff out so it never has to be messed with again other than maybe adding in more commands to use them. |
yeah I kind of figured it was a mistype, since helm was allreday listed, and for a moment I was wondering - "what? he managed to tint the FACE too?" :D
As far as diffirent materials go - didn't just recently someone wrote a perl script which can ultra randomize npc when it spawns? Like face, hair, and specificly armor by slot? Or it was just something someone wanted to do? Quote:
|
Yeah, it's cool, Trev!
I'm not sure exactly what you're unsure of regarding the illusion packets, but the code there in mob.cpp from lines 1164-1350 or so is in SendIllusionPacket(). I can change an NPC's race and gender in-game and the armor tints carry over to the new model, and it was my understanding that you use SendIllusionPacket when changing these in-game. |
Shendare, I added the armor tint stuff to that command because there is a large part of the illusion packet that we don't have identified yet and I assume that part of it may for armor and tint. I tried to identify those parts and was able to find some helms (some of which showed up as sideway), but I could never exactly figure out what was going on. It is probably because the test I was using is your test code, but it is in int8 and I assume armor would need int32 instead. I just never tried it to see if that was the case.
On a side note, I also noticed that most races cannot change their hair style when using illusion packets. I have no idea why this is, but I can only get Drakkin, Humans, and Female Ogres to change their hairstyle using Illusion packets. The other races all just set their hair to 0 or something. This one has stumped me and may just be an issue with the client (I really only use SoF), so I just gave up on the hair thing. I will just have to mess with the wearchange packets and get something similar setup for them. I was able to get it to keep the current texture they had on by just not sending anything for the texture/helm fields of the illusion struct. To be able to change armor without repops, it would probably take wearchanges to do it. ChaosSlayer, it was me that recently added the #randomfeatures command. But, that command only randomizes facial features like hair, beard, haircolor, tattoo and so on. It doesn't randomize armor, but that is a command I would like to add at some point. I wouldn't want it to make completely random armor for entire sets, but maybe using some sort of logic that has chances to make certain random changes that might look good together. The basic idea would be for it to be able to make armor sets similar to the guard one that Shendare posted in the first post. It would definitely take some playing around to make it output halfway decent sets most of the time. I also really need to create a way to update an NPCs features and armor set/tint. Maybe the #npcspawn command can be expanded with a new option that would let you save the current race, gender, texture, features, armor and armor tint and so on of the current NPC you have targeted. So, you could use the randomizing commands until you found one that looked right and then just save it as it is. I really have to at least knock out the SoF AA stuff first and maybe the newly added SoF item stats as well. So, I am not sure when I will be able to get to that. I will definitely try to get this tested and added to the code soon if someone doesn't beat me to it. |
Quote:
Trev if this case, what we realy need is something like: quest::npcarmor(slot, material); so its not random, but rather specific by user wish. If you do want it random you just do RND on material for specific/all slots then we don't need to have to put it into DB |
ChaosSlayer, before I add another random command, I would definitely add the direct command for changing stuff like that. The random command would just be another bonus command to go along with it. First would be one for changing tint, then maybe one for changing the material of each slot, and yet another for changing weapons out. Last and most importantly is to create a command that let's a dev save the current looks from in game. Actual # commands would be added first and then those could be copied to create quest:: commands as well whenever.
|
This has now been added to Revision 702 on the SVN.
This feature is awesome BTW! Playing with it shows that it has a ton of potential. The only thing I might add in soon is a simple notes field for the table so you can name each armor set. This way, you can easily have different colored sets and just name them to use them anywhere. It would make managing a large amount of sets quite a bit easier. |
Agreed, a name field is a very good idea! Don't know how I missed it. :)
|
I just wanted to take a minute and chime in to say how amazing your work has been. Thanks for this splendid ability to add some real customization =)
|
Thanks, it's good to feel appreciated. :D
|
Quote:
|
All times are GMT -4. The time now is 08:49 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.