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 02-05-2005, 12:43 PM
Cailin
Sarnak
 
Join Date: Dec 2004
Posts: 30
Default Character "profile"

Could someone please explain to me how data in the profile column (in the character_ table) is stored? I'm interested in building a tool that will allow modification of characters while outside of the game (in PHP), and I need to know what's going on in here. I took a look at the code of the emulator itself, but C++ was never my strong point - even though I found functions pertaining to storing/retrieving the data, I couldn't figure out how to decode it.

Can someone please help me out?
Thanks
Reply With Quote
  #2  
Old 02-05-2005, 12:56 PM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

The struct definition for the player profile blob is in one of the header files. I think it might be called player_profile.h or something to that effect, but I don't know for sure until I get my test server booted up :P

I really don't know what to say other than you WILL need to know C++ data types and structs well before you can make any sense of the binary data in there. If you're still inexperienced to the point that you wouldn't understand what you were looking at when you were looking at that struct definition, you're going to have to either change that or accept that the profile blob is a bit out of your league.

*Edit* The definition is in common/eq_packet_structs.h
Look for the definition for struct PlayerProfile_Struct.

Another thing to be aware of before you begin investing any significant amount of time into a profile editor: this struct was not setup by the devs, but rather it's what the client receives when it expects the server to send it info about the player. In other words, it's defined by the network code. The network structures were defined by SOE. In other words, this entire struct could be rearranged at any time at SOE's whim, simply by putting out a patch that totally the player profile packet structure. In fact, as we speak, EQ2's network engine has been ported to EQLive, so a WHOLE bunch of stuff is changing. You might wanna hold out on that till things settle down.
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.

Last edited by RangerDown; 02-05-2005 at 09:06 PM..
Reply With Quote
  #3  
Old 02-05-2005, 01:26 PM
Cailin
Sarnak
 
Join Date: Dec 2004
Posts: 30
Default

OK, thanks for that. I'll keep it all in mind.
Reply With Quote
  #4  
Old 02-06-2005, 07:53 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

yes, this structure changes nearly every patch. Normally it is just expanded with unknown stuff, but sometimes it changes more dramatically.

If you wanna edit it in php, you going to have to get framiliar with 'unpack' in php.. and write a VERY long unpack description based on the struct ranger pointed out.

on the other hand, people would love to have this tool. I hear requests for things like it all the time. (expecially by rangerdown )
Reply With Quote
  #5  
Old 02-06-2005, 08:39 AM
Rogean's Avatar
Rogean
Administrator
 
Join Date: Jul 2003
Location: Massachusetts
Posts: 708
Default

Code:
$Query = mysql_query("SELECT id,name,guild,guildrank,zonename, 
	 (ascii(mid(profile,117,1)))+(ascii(mid(profile,118,1))*256)+(ascii(mid(profile,119,1))*4096)+(ascii(mid(profile,120,1))*65536) as level,
	 (ascii(mid(profile,105,1)))+(ascii(mid(profile,106,1))*256)+(ascii(mid(profile,107,1))*4096)+(ascii(mid(profile,108,1))*65536) as race,
	 (ascii(mid(profile,109,1)))+(ascii(mid(profile,110,1))*256)+(ascii(mid(profile,111,1))*4096)+(ascii(mid(profile,112,1))*65536) as pclass,
	 (ascii(mid(profile,101,1)))+(ascii(mid(profile,102,1))*256)+(ascii(mid(profile,103,1))*4096)+(ascii(mid(profile,104,1))*65536) as gender,
	 (ascii(mid(profile,164,1))) as gm,
	 (ascii(mid(profile,165,1))) as anon,
	 mid(profile,69,30) as lastname,
	 profile
	 FROM character_ WHERE id = $charid");
	 
$Char = mysql_fetch_array($Query);
Theres something that should help you out a bit. Took it from the Raid Addicts panel I made.
__________________
EQEmulator Developer / Administrator
Reply With Quote
  #6  
Old 02-06-2005, 11:22 AM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

LOL FNW. I don't request a profile blob editor so much as I request getting entirely rid of the blob from the database and save character data in relational db fields/tables like the Good Lord intended a relational db to be used

(And for anyone who takes that seriously, there are issues around doing it that way -- not the least of which are possible impact on server performance, reliably saving multiple fields/tables, and just the sheer amount of work that would go into overhauling that.)

Rogean, that's a clever way of using the blob. For the same reasons I mentioned earlier though, don't necessarily expect the fields he's extracting to be in the same positions they were when that was written. He said that was from his RaidAddicts... so it was... some time ago :P
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
Reply


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 05:23 AM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3