Yeah, I am not quite sure why they have it changing the values at all, but it seems to change them to 99 or 255 in some cases. As far as I can tell, we shouldn't be changing anything and just save the actual value and call the actual value. The conversions it is doing is almost certainly the cause of baldness and why faces have had so many issues in the past.
I know KLS did quite a bit of work on facial features in the past and I am wondering if she has any input on why those values are changed like that before I start making changes so that it uses the actual value instead of all of this converting. Oh yeah, Drakkin NPCs look much cooler now that they aren't all exactly the same. Another thing I wanted to mention is that a while back, I got the illusion struct all identified other than the Drakkin specific stuff. It would be nice if we could get facechange and other facial features added into the illusion function since they currently are not. I think the problem is that Titanium doesn't have the illusion struct filled out fully, so no one bothered to finish the function for illusion to add in the other features. It would also be very cool to have armor stuff (texture and tint) in the illusion function. Then, when someone clicks off an illusion, they would actually look exactly like they did before the illusion was cast instead of just returning to the same race and armor texture. I am pretty sure everything is in the illusion struct and we just need to find the armor and Drakkin stuff to completely finalize it. It wouldn't be hard to finalize the struct, but the code to handle all of it might take a bit of work to do. It would be awesome to expand the #fixmob functionality to work with faces, hairstyle, haircolor, eyecolor, beard, beardcolor, armor tint, and the new Drakkin features. Then, you could really fine tune an NPC in realtime before creating it in the database. Otherwise, it means a database change and a repop to see how it looks. Much quicker and easier to just have hotkeys and spam through the different looks until you find one you like. |
Here are at least a couple places where we can try removing the 99 change for features set to 0 and see if that corrects the issues with bald players and features not showing up correctly once and for all:
zone/client_packet.cpp Code:
void Client::Handle_OP_FaceChange(const EQApplicationPacket *app) Code:
bool Client::OPCharCreate(char *name, CharCreate_Struct *cc) Code:
void WorldDatabase::GetCharSelectInfo(int32 account_id, CharacterSelect_Struct* cs) { Code:
void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) |
Changes needed to implement face changing in SoF:
Code:
// eq_packet_structs.h Code:
// client_packet.cpp - Client::Handle_OP_FaceChange() Code:
// SoF.cpp - ENCODE(OP_ZoneSpawns) |
Identified the Drakkin portion of the Character Select Struct:
Code:
struct CharacterSelectEntry_Struct { |
Sweeeeeet.
Just as a heads up, client_packet.cpp is still scrambling features that are set to 0. Commenting out these lines fixes the problem and allows all appearance settings set with the Face change button to stick between game sessions! client_packet.cpp, lines 4684-4691 Code:
/* |
Yeah, there are still a few places that do that conversion. I am trying to figure out a couple of things before I change anymore facial feature stuff on the SVN. As it is, the one change to stop them from setting to 0xFF that I put on is probably already causing feature issues again. I am not quite sure what the issue is atm, so holding off on more changes for now so that if a revert is required, it won't be hard to do it.
Between SoF and Titanium, it seems like features act a bit differently. I also noticed that Titanium does an encode on the spawn packet and it does that conversion from 99 back to 0 again. I may be wrong, but from looking at the code, it seems like the whole reason to do the 99 and 0xFF conversion stuff was because in the past it may have been required for NPCs to have those fields set to FF in the spawn struct if the race didn't get those features. I don't think that is the case anymore. As far as I can tell, NPC facial features work perfectly no matter if we use the 99 and 0xFF stuff or not. Anyway, I am still trying to figure out exactly what is happening to cause the weird issues with features. I still think things are being way overcomplicated and if they are simplified, should work just fine. So far in SoF, I think all features work perfectly with the exception of hair. For some reason, Hairstyle doesn't want to play friendly at the character select screen in SoF. Apparently when I create a character, no matter what I set hair to, it either isn't saving the field properly, or isn't pulling it properly. It may be something to do with the field being named "hair" instead of "hairstyle" in the character_select structure. That is the only field that doesn't match up with the names in the player profile structure and coincidentally is the only field that is giving me problems in SoF character select. If I can't make some good breakthrough on it tonight, I might just have to revert the change I already put into mob.cpp the other night, at least for now. |
Ok, I think I got it mostly figured out and working. So far, it seems like titanium character select is 100% accurate, but in game, beards aren't working quite properly though everything else seems good as far as I can tell.
On SoF, it is almost the opposite; character select shows all characters as bald (after they have logged in game at least once). But, in game on SoF, all facial features seem to be 100% and facechange also seems to work 100% as far as I have tested. I really have no clue yet why hair isn't working properly in SoF character select. It just doesn't make sense that it shows hair properly before logging in for the first time and then not again after that. In game is the most important part, so it is good that it is working properly at least. I find it interesting that beards are what seem to be having trouble in Titanium now. In the past, it was always hair issues, so for it to switch and now be a beard issue is pretty odd. My best guess is that some struct stuff must be off, causing the wrong values to get saved to the wrong place. If something is off on SoF, I think it almost has to be the hairstyle field in the character select (and maybe character create) struct. And if it is a struct issue on Titanium causing Titanium issues, it seems like it might be the facechange struct and maybe even the spawn struct. I have the changes I made so far up on the SVN. I did quite a few changes, but most of it was just renaming "hair" to "hairstyle" for the character select struct and cleaning up code a little here and there. The actual changes that effect how facial features work weren't that big of changes, so it would be easy to revert them if needed. I think as long as we keep looking into it, we can get this issue resolved the right way once and for all. Once the current features are working properly, we can start trying to get the new Drakkin features added in. I just didn't want to try to add in new stuff into a hack. Would rather have it done the right way :) ***EDIT*** Actually, after thinking about it, I noticed that sometimes hairstyle would show up in SoF on character select, but only if I set the hair color really low (light brown or so). I then noticed that one of them wasn't even using the right hairstyle that I had set. Figured out that the issue was with the character select struct on SoF having haircolor and hairstyle in the reverse positions. I swapped them and now SoF is working 100% for facial features as far as I can tell. I also had to swap them in character creation, but it all seems to work flawless now! Ready for Drakkin features now, I think. But, I am going to see if I can get Titanium fixed fully first if possible. |
LOL, exciting times.
I just wish there were more hours in the day. Work's been keeping me too busy to be able to mess with things for more than an hour or so a day. |
After what I have seen in my testing so far, and after thinking about it more last night before bed, I am suspecting that the issue with Titanium is that one of the facial feature fields are off in one or more than one of the Titanium structures. My biggest suspects are the Player Profile and the Spawn structure. I am 99% positive that SoF now has the proper field identification for all facial feature related structures. So, I should be able to use SoF as a reference for what NPCs should look like when the fields are correct. Then, if needed, I can use Shendare's test code for the Titanium spawn struct and see if we might have some fields backwards or in the wrong place. My guess is that beard and beard color might be reversed in the spawn struct or player profile or both.
|
All times are GMT -4. The time now is 07:56 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.