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-17-2009, 12:56 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Uh oh, something happened with corpses?

I'm gratified to see that you're on it, KLS!

What was it that broke existing corpses?
Reply With Quote
  #2  
Old 05-17-2009, 01:59 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I'm prolly just gonna build it into the server on 2nd thought. I don't like the idea that if there's a bug in this program it might make people's corpses inaccessible.
Reply With Quote
  #3  
Old 05-17-2009, 02:49 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Sigh it took me a fraction of the time to write the server check than to write the utility to convert all the data too.
Reply With Quote
  #4  
Old 05-17-2009, 02:55 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Thanks for the fix KLS. I didn't mean for you to be forced to do that. At least the feature work should be done for good soon. Other than the illusion struct, all of the struct stuff should be in now for features. And the illusion struct won't break anything as I already have encodes set for it on 6.2, Titanium and SoF. Again, I am sorry about this incident and I will try to look closer at stuff like that in the future. I don't know how I missed seeing that blob.

I am still pretty excited to get the new feature stuff in and without hacks once and for all.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 05-18-2009, 04:45 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I now have all of the feature fields identified in the illusion struct as well, and added commands to use them. It seems like eye color is not in the illusion struct as far as I can tell. I searched all through it and couldn't find it. Right now, I only have all fields identified for SoF, but if someone wants to do it for Titanium, this encode worked for SoF and wouldn't be hard to modify into the Titanium one:

Code:
ENCODE(OP_Illusion) {
	ENCODE_LENGTH_EXACT(Illusion_Struct);
	SETUP_DIRECT_ENCODE(Illusion_Struct, structs::Illusion_Struct);
	OUT(spawnid);
	OUT_str(charname);
	OUT(race);
	OUT(unknown006[0]);
	OUT(unknown006[1]);
	OUT(gender);
	OUT(texture);
	OUT(helmtexture);
	OUT(face);				// face
	OUT(hairstyle);			// hairstyle
	OUT(haircolor);			// haircolor
	OUT(beard);				// beard
	OUT(beardcolor);		// beardcolor
	OUT(drakkin_heritage);
	OUT(drakkin_tattoo);
	OUT(drakkin_details);

	if (emu->race == 522) // Test NPC!
	{
		uint8 ofs;
		uint8 val;
		ofs = emu->texture;
		val = emu->face;

		((uint8*)eq)[ofs % 256] = val;
	}
	FINISH_ENCODE();
}
Basically, at the end of the Titanium Illusion encode, you add this section like above:

Code:
	if (emu->race == 522) // Test NPC!
	{
		uint8 ofs;
		uint8 val;
		ofs = emu->texture;
		val = emu->face;

		((uint8*)eq)[ofs % 256] = val;
	}
You will also need to change the "256" to match the total size of the struct and will probably want to change the 522 at the top, since Titanium doesn't have race 522. You could probably test it on race 1 just fine (human).

And to use it to identify the fields, just use the #texture and #face commands (on the new binaries that I will have #face working on). Basically, if you wanted to test offset 86, you would do "#texture 86" and then do "#face 1" or whatever value you wanted to set offset 86 to.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-18-2009 at 01:54 PM..
Reply With Quote
  #6  
Old 05-18-2009, 05:28 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

For anyone who doesn't keep up with the changelog, here is some stuff that I added last night that is related to this topic.

Quote:
==05/18/2009==
Trevius: New Commands added: #face, #helm, #hair, #haircolor, #beard, #beardcolor, #heritage, #tattoo, #details
Trevius: Adjusted the #fixmob command to use all features. The new format is "#fixmob featurename prev/next"
For Titanium to take full advantage of these new commands, the spawn struct for Titanium will need to have the hairstyle, haircolor, beard, and beardcolor fields identified. All fields are already identified for SoF.

I am excited to finally have these commands in. It should allow for considerably more customization at the time of spawning NPCs. I would like to get armor tint working too as a customize option, but that will probably be a bit hard since I don't think it exists in the illusion packet. I think that means the only way we could adjust armor tint would be to make a new command that will change the armor tint setting in the database and then repop that single NPC to show the changed effect.

I also could not find eye color in the illusion packet, but it appears that eye color stays at the same setting when the illusion packet is sent. So, if you have an NPC set to eye color 2 and change another feature like face or even race, it would still be using eyecolor 2.

Another thing that annoys me a bit is that I can't figure out how to make the illusion packet turn off helms on player race NPCs after you make a change to them. So, if they are wearing plate as their texture and you change something, they will have a helm on, which covers up half of the stuff I am trying to set! At least helm can be disabled in the database easy so that after changing them, a simple repop should correct it. The spawn structure shows helms on or off as they are set, so at least that is good.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-19-2009 at 01:32 AM..
Reply With Quote
  #7  
Old 05-18-2009, 06:22 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I will probably try to get the Titanium fields identified myself later, since it shouldn't take much time at all. Here is the structure with offsets numbered properly for Titanium_structs.h:

Code:
struct Illusion_Struct {
/*000*/	uint32	spawnid;
/*004*/	char	charname[64];
/*068*/	uint16	race;
/*070*/	char	unknown070[2];
/*072*/	uint8	gender;
/*073*/	uint8	texture;	
/*074*/	uint8	helmtexture;
/*075*/	uint8	unknown075;
/*076*/	uint32	face;
/*080*/	char	unknown080[88];
/*168*/
};
And here is the encode that I will be using in Titanium.cpp for testing:

Code:
ENCODE(OP_Illusion) {
        ENCODE_LENGTH_EXACT(Illusion_Struct);
        SETUP_DIRECT_ENCODE(Illusion_Struct, structs::Illusion_Struct);
        OUT(spawnid);
        OUT_str(charname);
        if(emu->race > 473){
                eq->race = 1;
        }
        else {
                OUT(race);
        }
        OUT(gender);
        OUT(texture);
        OUT(helmtexture);
        OUT(face);

	uint8 ofs;
	uint8 val;
	ofs = emu->texture;
	val = emu->face;

	((uint8*)eq)[ofs % 168] = val;

        FINISH_ENCODE();
}
I figured I would post this here for reference later when working on it, or for anyone who might want to find the fields before I can get time to do it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-19-2009 at 02:24 AM..
Reply With Quote
  #8  
Old 05-19-2009, 02:36 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I got the Titanium illusion struct fields for hairstyle, haircolor, beard and beardcolor all identified. I also found that it seems like the rest of the struct is somehow armor related. It seems like I am seeing helms for a bunch of the fields, which may be due to equipment structure or something. Perhaps if it was identified and set properly, we could set any armor type and maybe tint that we wanted. Though, I would mostly only be interested in Tint. I would still like to figure out how to turn helm on and off in the illusion struct too.

Code:
struct Illusion_Struct {
/*000*/	uint32	spawnid;
/*004*/	char	charname[64];
/*068*/	uint16	race;
/*070*/	char	unknown070[2];
/*072*/	uint8	gender;
/*073*/	uint8	texture;	
/*074*/	uint8	helmtexture;
/*075*/	uint8	unknown075;
/*076*/	uint32	face;
/*080*/	uint8	hairstyle;
/*081*/	uint8	haircolor;
/*082*/	uint8	beard;
/*083*/	uint8	beardcolor;
/*084*/	char	unknown080[84];
/*168*/
};

// 84 int32 small in ground
// 91 sideways male iksar bone helm
// 92 sideways halfling chain helm
// 93 sideways female iksar helm?
// 120 erudite cloth hood
// 121 erudite leather helm
// 122 erudite helm
// int32 123 no armor?
// 128+ plate armor
// 134 female DE helm???
// 136 no helm?
// 137 Halfling leather helm?
// 138 Chain woodelf or halfling helm?
// 164 woodelf custom helm?
// 165 no helm?
// 167 woodelf leather helm?
__________________
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 09:22 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