Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

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

Reply
 
Thread Tools Display Modes
  #1  
Old 05-13-2009, 04:27 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Identified the Drakkin portion of the Character Select Struct:

Code:
struct CharacterSelectEntry_Struct {
/*0000*/	uint8 level;				//
/*0001*/	uint8 haircolor;			//
/*0002*/	uint8 gender;				//
/*0003*/	char name[1];				//variable length, edi+0
/*0000*/	uint8 beard;				//
/*0000*/	uint8 hair;					//
/*0000*/	uint8 face;					//
/*0000*/	CharSelectEquip	equip[9];
/*0000*/	uint32 secondary;			//
/*0000*/	uint32 primary;				//
/*0000*/	uint8 u15;					// 0xff
/*0000*/	uint32 deity;				//
/*0000*/	uint16 zone;				//
/*0000*/	uint16 instance;
/*0000*/	uint8 gohome;				//
/*0000*/	uint8 u19;					// 0xff
/*0000*/	uint32 race;				//
/*0000*/	uint8 tutorial;				//
/*0000*/	uint8 class_;				//
/*0000*/	uint8 eyecolor1;			//
/*0000*/	uint8 beardcolor;			//
/*0000*/	uint8 eyecolor2;			//
/*0000*/	uint32 drakkin_heritage;	// Drakkin Heritage
/*0000*/	uint32 drakkin_tattoo;		// Drakkin Tattoo
/*0000*/	uint32 drakkin_details;		// Drakkin Details (Facial Spikes)
};
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 05-13-2009, 11:15 PM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

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:
	/*
	if (fc->face == 0)       {m_pp.face = 99;}
	if (fc->eyecolor1 == 0)  {m_pp.eyecolor1 = 99;}
	if (fc->eyecolor2 == 0)  {m_pp.eyecolor2 = 99;}
	if (fc->hairstyle == 0)  {m_pp.hairstyle = 99;}
	if (fc->haircolor == 0)  {m_pp.haircolor = 99;}
	if (fc->beard == 0)      {m_pp.beard = 99;}
	if (fc->beardcolor == 0) {m_pp.beardcolor = 99;}
	*/
Drakkin features excluded from full functionality, of course, until we can get the fields added to the DB.
Reply With Quote
  #3  
Old 05-14-2009, 03:45 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 05-14-2009, 07:40 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-14-2009 at 04:17 PM..
Reply With Quote
  #5  
Old 05-14-2009, 11:22 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

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.
Reply With Quote
  #6  
Old 05-14-2009, 09:31 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:50 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3