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-11-2009, 01:40 AM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Ahhh, I see. That's tough sledding uphill both ways.
Reply With Quote
  #2  
Old 02-11-2009, 02:08 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I've got this now:


I've purposely filled it with strings lacking null terminators to try to find the name area, and succeeded... sorta I still gotta nail down which one it is but it's a start.

Anyone wants to inform me what that green background means I'd greatly appreciate it. I've obviously got slot correct, but the rest of the header seems to be hit and miss. I have a feeling it's very different from the live packet you linked.
Reply With Quote
  #3  
Old 02-11-2009, 02:23 AM
jenco420
Banned
 
Join Date: Jan 2006
Location: /dev/null
Posts: 99
Default

If i remember correctly it has something to do with evolving items.
Reply With Quote
  #4  
Old 02-11-2009, 03:52 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, I would look at how the Titanium items headers are and compare that with the live one I posted. I imagine it is somewhere in between. If you have the slot ID right, then it should just mean that you have to add an int 32 or int16 extra into the header, so it doesn't pick up part of the header where it thinks name should begin. I don't know where that * is coming from, maybe you are sending the number 42 as an int8 which as a string gets converted to a *?

Oh yeah, and before someone tries it and can't figure out what happened, I wanted to mention that right now, you need to keep your character level at level 75 or less when using SoF. Anything over 75 (via #level) will result in setting your character's hps to 5 for some reason, even though everything else like skills and others seem to be ok. Then, if you try zoning at any level over 75, it seems to crash the client every time right after the zone loads. I think it is actually crashing when the spawns are sent, so it is probably an issue with the spawn struct that is causing it. I really hope that there isn't a restriction on the client that is causing the level 75+ issue. The actual eqgame.exe was created before SoF was released and was ran on Live when the max level was still 75. But since one of the key features of SoF was a max level of 80, I am betting that it isn't a restriction of the client, and instead, an issue with a struct that can be fixed. Maybe there is just a new field that needs to be set to allow a player to exceed level 75. Though, I would think at least with GM mode on, it should work ok, but it doesn't. I am sure we can figure it out at some point.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 02-11-2009, 06:06 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I have some live packet traces from July 2008 when I was working on the Pet Buff window. Maybe they will have some Item packets that are closer to the SoF structs than the current live packets. I'll upload them when I get home tonight in case they are of any use.

EDIT: Here: http://www.rama.demon.co.uk/EQLive-Jul24-2008.rar

Inventory begins at:
Code:
Jul 24 2008 14:16:41:004 [Decoded] [Server->Client] [Size: 142031]
[OPCode: 0x1899]

Last edited by Derision; 02-11-2009 at 09:18 PM..
Reply With Quote
  #6  
Old 02-11-2009, 02:35 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Quote:
Originally Posted by KLS View Post
I've got this now:

Anyone wants to inform me what that green background means I'd greatly appreciate it. I've obviously got slot correct, but the rest of the header seems to be hit and miss. I have a feeling it's very different from the live packet you linked.
The green background was used for 2 things in EQ(at least) that I can think of. The first and the one you are interested in, is to indicate an evolving item. Matters not if it was fully evolved only that it does evolve. The second was in the bazaar in trader mode. Once an item was set with a price and added to the "selling" list the background turned green.

The "*" in the name indicated that is was a starting item given to you or something like that. The initial weapon, and backpack in the tutorial were like that and the burlap shirt given by the Guildmaster when you turned in your note all had the asterisk. There might be more, I think it had to do with making them not sellable to merchants, but I'm not 100% sure of that.
Reply With Quote
  #7  
Old 02-11-2009, 03:42 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yeah the * was just part of the string I was brute forcing. I'm pretty sure something in the header just wasn't getting set right. As I didn't actually change anything but the values in the header to get the name to show up... and no matter what I change icon seems to stay the same so I don't think I'm close to it yet.

And incidentally I found a packet log from a little after sof, but not same client version. It's pretty similar to derisions and both match up with my expectations of where things will be so we'll see.

Last edited by KLS; 02-12-2009 at 12:04 AM..
Reply With Quote
  #8  
Old 02-11-2009, 09:12 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I wouldn't mind seeing that packet log if possible Or at least I need a single SendAA packet to see what I am doing wrong with AAs. I have tried many different variations on the struct and it should be setup right or very close to right. I haven't been able to get it to display anything. I am almost wondering if it may be an issue with the UI not having the correct version of the AA window to display tabs properly. Though, it looks like EQLive's AA window to me, so it should be the same. The base AA before any effects added onto it should be 104 bytes long for SoF (it is on Live). I can get it to log in with as little as 96 bytes long, but it seems to crash alot more. The issue may just be that I have to fill in the database with the expansion number and tab information that each AA is supposed to be from. On Live, they replaced the "type" field, which just tells the AA window which tab to display the AA on, into 2 fields. One field that tells it which tab to display on (1-4) and one field that tells it which expansion it is from. I think 0 means it is a tradeskill, but 3 to 15 are the other expansion values I see, so I am guessing they mean Velious to Current. It is pretty easy to read the packet for SendAA from Live, as little has changed from Titanium.

I am also working on the /who all struct and I think I know what needs to be done. I have the 3 related structs all built, but I need to get the encodes/decodes working correctly for them. I have the encodes/decodes basically built, but there are a couple issues with them. At least now I get the "search returned no results" messages or whatever.

For Icon to show up, I think it needs null terminators after strings for Item Name, Lore, and the ITxxx strings. Then, the few int8s after that should be correct. The only one I would wonder about is the Price field. It looks to me like it is actually an int64, but that is the first and only time I have seen anything that might use int64 in EQ, so I don't know if that is correct or not. Maybe the change to int64 came in more recently, so you might want to try it as an int32. I recall reading a recent EQLive patch message that says they corrected an issue with selling stacks of items that totaled over 4million PP or so. So, maybe that was when they changed it from an int32 to int64. That is all just speculation though. I imagine the older log files you guys have would confirm that pretty easily.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 02-11-2009, 09:33 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I've got this now:

I used Derision's packet as a start since his was a bit easier to read than mine. The one I wrote still has sequence # and size on it so it can get a little hard to read esp when you're reading a lot of hex etc etc.

Something in the item header if not set correctly makes the item not show up which was what was throwing me off.

Right now item is like this:

Code:
uint32 Stacksize
uint32 Some Zero Value
uint32 Slot
uint32 Somevalue, prob price as that's what it is in other
uint32 merchant_slot or 1
uint32 some zero value
uint32 unique identifier
uint32 SomeValue prolly nodropinst
uint32 SomeValue prolly potion or item type
uint32 some value 0xffffffff or 0x00000000
uint32 some zero value x5
3 bytes of 0x00 usually sometimes the last byte is 0x01, all bags seem to have the last byte as 0x01
c-string name
c-string lore
c-string idfile
uint32 itemid
Obv everything's not the same as middle of 2008 client but it was a bit closer than the current client.

Last edited by KLS; 02-12-2009 at 05:36 AM..
Reply With Quote
  #10  
Old 02-12-2009, 12:18 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Again:


I think the itemtype field has changed which is why it appears like that but I'm not sure. I get to start plugging in values all over and see what they do.
Reply With Quote
  #11  
Old 02-12-2009, 01:50 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I just noticed that your items are showing up in the old item UI window like Titanium. I prefer the old one (Titanium version) to the new window for item stats on Live. I thought it was already changed in SoF though. Or, is there an option somewhere that lets you decide which one to use? I know I saw a screenshot of an item from SoF when it was being beta tested, and it had the new item window. Maybe they still used the old one when that particular build was made?

Also, I looked at the SendAA packets from Derision's ShowEQ log and it looks like it lines up the same as EQLive does now. Same size and layout of the structure as far as I can tell. Here is an example of one of those packets without any extra effects on it:

Code:
Jul 24 2008 14:16:39:296 [Decoded] [Server->Client] [Size: 104]
[OPCode: 0x2c77]
000 | ba 00 00 00 01 ba 00 00 00 ba 00 00 00 ba 00 00  | ................ 
016 | 00 ba 00 00 00 3b 00 00 00 03 00 00 00 47 00 00  | .....;.......G.. 
032 | 00 01 00 00 00 00 00 00 00 00 00 00 00 03 00 00  | ................ 
048 | 00 d4 0a 00 00 07 00 00 00 07 00 00 00 00 08 00  | ................ 
064 | 00 01 00 00 00 ff ff ff ff ff ff ff ff 03 00 00  | ................ 
080 | 00 00 00 00 00 00 00 00 03 00 00 00 ff ff ff ff  | ................ 
096 | 00 00 00 00 00 00 00 00                          | ........
One thing to help alot with items is the 13th floor:
http://eqitems.13th-floor.org/

Just search for the item you are trying to break down and then look at the raw data. It should help a ton when lining up the fields.

I also use HexVis alot or Windows Calculator for converting the hex easily to see if it matches 13th floor.

Code:
3 bytes of 0x00 usually sometimes the last byte is 0x01, all bags seem to have the last byte as 0x01
That last uint8 is Item Type. It is 00 for normal items, 01 for bags and should be 02 for books. This should be done on the Serialization because I think it tells the client how treat the item when you right click it. Since you can't read books or use clickies if an item is inside a bag, it should be because the item type isn't sent when they are inside a bag, so the client knows only to show the item stats.


Just from looking at the log Derision posted, here is my best guess for item Serialization (pretty much matches with what KLS has so far):

Code:
35 00 00 00 - Not sure what this is.  Maybe a total items count?
//This field only got sent before the first item.  No other items have it.

01 00 00 00 uint32 stacksize;
00 00 00 00 uint32 unknown004;
1c 00 00 00 uint32 slot;
00 00 00 00 uint32 price;
01 00 00 00 uint32 merchcount;
00 00 00 00 uint32 unknown020;
1a b9 02 00 uint32 serialnumber;
00 00 00 00 uint32 instnodrop;
00 00 00 00 uint32 unknown032;
00 00 00 00 uint32 typepotion;
00 00 00 00 uint32 unknown040;
00 00 00 00 uint32 unknown044;
00 00 00 00 uint32 unknown048;
00 00 00 00 uint32 unknown052;
00 00 00 00 uint32 unknown056;
00 uint8 unknown060;
00 uint8 unknown061; 
01 uint8 itemtype; // this is a bag
Here is the best breakdown I can figure for the beginning of the Item Struct:
Code:
4a 6f 75 72 6e 65 79 6d 61 6e 27 73 20 42 6f 6f 74 73 00 | Journeyman's Boots - char Name
4a 6f 75 72 6e 65 79 6d 61 6e 27 73 20 42 6f 6f 74 73 00 | Journeyman's Boots - char Lore
49 54 36 33 00  | IT63 - char IDFile
fc 08 00 00 | 2300 - uint32 ID
19 | 2.5 - uint8 Weight
01 - uint8 NoRent
00 00 - uint16 NoDrop
01 - uint8 Size
00 00 08 00 | 524288 - uint32 Slots
00 00 00 00 - uint32 Price
fc 02 00 00 | 764 - uint32 Icon
01 - uint8 unknown0013
01 00 00 00 - uint32 unknown0014
00 - bool BenefitFlag
00 - bool	Tradeskills
00 - sint8	CR
00 - sint8	DR
00 - sint8	PR
00 - sint8	MR
00 - sint8	FR
00 - sint8	Corruption
00 - sint8	AStr
00 - sint8	ASta
00 - sint8	AAgi
00 - sint8	ADex
00 - sint8	ACha
00 - sint8	AInt
00 - sint8	AWis
00 00 00 00 - sint32	HP
00 00 00 00 - sint32	Mana
00 00 00 00 - uint32	Endur
01 00 00 00 - sint32	AC
00 00 00 00 - sint32	unknown0015
00 00 00 00 - sint32	unknown0016
00 00 00 00 - sint32	unknown0017
ff ff 00 00 - sint32	Classes
ff ff 00 00 - sint32	Races
00 00 00 00 - sint32	Deity
00 00 00 00 - sint32	SkillModValue
00 00 00 00 - uint32	unknown0038
ff ff ff ff - uint32	SkillModType
00 00 00 00 - uint32	BaneDmgRace
00 00 00 00 - uint32	BaneDmgBody
00 00 00 00 - uint32	BaneDmgRaceAmt
00 00 00 00 - sint32	BaneDmgAmt
01 00 00 00 - bool	Magic
00 00 00 00 - sint32	CastTime_
00 - uint8	ReqLevel
00 - uint8	RecLevel
00 - uint8	RecSkill
00 00 00 00 - uint32	BardType
00 00 00 00 - sint32	BardValue
00 - sint8	Light
00 - uint8	Delay
00 - uint8	ElemDmgType
00 00 00 00 - uint32	ElemDmgAmt
00 00 00 00 - uint32	Range
00 00 00 00 - uint32	Damage
00 00 00 ff - uint32	Color
0a - uint8	ItemType
01 00 00 00 - uint8	Material
00 00 00 00 - uint32	unknown0060
00 00 00 00 - uint8	unknown0061
00 00 c6 42 - uint32	SellRate
Most of the rest of it should line up with the structure breakdown I posted for EQLive items. I can work out the rest of it if needed. I will definitely check into these logs more later tonight.
__________________
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 10:59 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