View Single Post
  #23  
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