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-19-2009, 01:24 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I recall most food/drink stuff being in bonuses.cpp, so you might check there.

For stamina, I would need to know exactly what to look for to find it. I know ShowEQ has an opcode listed as Stamina, so I assume it is the same thing. I am not really sure what that even means anymore, since Stamina was replaced by Endurance. Is food supposed to help regain Endurance?

I doubt that structure changes much/often, so we can probable get it from EQLive easily.

Here is an example I have from a Live collect I did recently:

Code:
Feb 16 2009 04:50:17:123 [Decoded] [Server->Client] [Size: 10]
[OPCode: 0x02d6]
[Name: OP_Stamina][Updated: 10/21/08]
000 | 96 02 00 00 96 02 00 00 3d 55                    | ........=U
I can easily figure out the SoF Opcode that relates to whatever this actually is (if it isn't actually stamina like it is labeled). With a struct size of 10, it shouldn't be too tough to figure this out.

Without even looking at the struct, this is how I would break it down:
Code:
96 02 00 00 - int32 
96 02 00 00 - int32 
3d 55 - int16
Now, lemme look at the struct that is set in SoF:

Code:
struct Stamina_Struct {
/*00*/ int32 food;                    // (low more hungry 127-0)
/*02*/ int32 water;                   // (low more hungry 127-0)

};
So, since the struct is size 8 and the packet in Live is 10, then most likely, we just need to adjust the structure and do an encode.

SoF_structs.h
Code:
struct Stamina_Struct {
/*00*/ int32 food;                     // seen 96 02 00 00 
/*04*/ int32 water;                   // seen 96 02 00 00
/*08*/ int16 unknown08;            // seen 3d 55
};
SoF_ops.h
Code:
E(OP_Stamina)
SoF.cpp
Code:
ENCODE(OP_Stamina) {
	ENCODE_LENGTH_EXACT(Stamina_Struct);
	SETUP_DIRECT_ENCODE(Stamina_Struct, structs::Stamina_Struct);
		OUT(food);
		OUT(water);
		//eq->unknown08 = 21821;
	FINISH_ENCODE();
}
Then try that and see if that seems to work. It may be that the last 2 bytes are actually 2 int8s for food/drink hunger/thirst level. I don't know why they would use int32s if the value doesn't exceed 127 as noted in the comments of the struct in Titanium. But, it wouldn't be the first time that things would work that didn't seem to be accurately documented. I think the problem is that often things will change and people don't update the comments, so it is hard to know what to trust sometimes.

Either way, I read through my logs from Live and had quite a few of these stamina packets over the 6 minutes or so that I logged. But, oddly, every packet was exactly the same values as I posted above. It never changed once.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #2  
Old 02-22-2009, 06:27 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I got doors almost working now. It looks like there are a few more fields in the doors struct and 2 of them have to be set to 1 for the door to be clickable. Now, I am getting the clickdoor opcode when clicking them and also getting the too far away message when clicking at a door from out of range. So, the client is seeing the doors as clickable now at least. I also changed the clickdoor struct slightly, because it seems like doorid is now int8 instead of int32. I haven't tried it yet, but I bet a Titanium client would now actually see a door open when a SoF client clicks on them, even though the SoF client doesn't see them open just yet.

I am pretty sure that the only thing left to do for doors is to adjust the movedoor struct and get the opcode and then they should be fully functional. I imagine that click portals like in PoK probably work already, since they don't need the movedoor packet, but I haven't tested that yet. I will test it out tonight and try to finish doors too so that they work. I haven't updated anything onto the SVN yet, but I will get this added tonight if I can get it working. I will also be adding some more opcodes that one of my players has been helping to find/identify.

Once doors are done, that will leave AAs as the last really major issue that needs to be take care of. Most of the rest of the issues should just be things that need minor adjustments here and there. I have been working on getting AAs to work, but still have had no luck yet. I am 99% sure that the opcodes are correct, because they are really easy to verify in IDA. Also, I know that if you change the AATable packet structure, that it will crash the client if it is too wrong. So, it has to be the right opcode and probably the right structure too. I think we are just missing some new packet that needs to be sent to allow the AAs to list. As far as I can tell, the client isn't even making use of any AAs (no stat bonuses, etc), so it isn't that it is just not listing them in the window, it is more like it is just ignoring them completely.

I went through and re-aligned the player-profile as best as I could and I think it is pretty accurate now. There are only a couple of sections that I am not very sure about. But, since almost everything I can verify already seems to line up, it really narrows down areas that might be a bit wrong. One of those unsure areas is where the AA Array is loaded. From looking at Live, it looks like the AA Array struct is now 12 bytes instead of 8 bytes. I adjusted for that, but it didn't seem to make a difference.

I can't stress enough how nice it would be to have a single packet collect of a character logging into live on 9/7/07 lol. Almost everything is fairly well worked out, but it would be nice to have info to make everything perfectly aligned. Ahh well, we will get it eventually either way I am sure lol.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 02-23-2009 at 04:19 AM..
Reply With Quote
  #3  
Old 02-22-2009, 07:38 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I still have Titanium - I did order a couple of SoFs, should be in soon, and I'll have that running so I can help you out at least with reports.

For anyone that's interested - SoF Expansion is for sale at Amazon.com , very cheap - the used ones are like 6.00 each. Better grab some while thery're there, cause when trevius finishes this work, you won't find them as easily anymore .
Reply With Quote
  #4  
Old 02-22-2009, 08:02 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

They are still available brand new from Newegg for $5.99 with free shipping:
http://www.newegg.com/Product/Produc...20of%20faydwer
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

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

Just got armor tint from Dyes working lol. I just had to swap the color field to near the end of the packet. I should hopefully have doors opening and portals working later tonight. I will get this new stuff on the SVN before I go to bed along with quite a few new opcode additions that Xinu found.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 02-23-2009, 03:33 AM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Quote:
Originally Posted by trevius View Post
They are still available brand new from Newegg for $5.99 with free shipping:
http://www.newegg.com/Product/Produc...20of%20faydwer
I couldn't tell from the description, but does that SoF expansion include all the previous expansions like Titanium does?
Reply With Quote
  #7  
Old 02-23-2009, 04:56 AM
xinu
Sarnak
 
Join Date: Jan 2008
Posts: 67
Default

Yup it includes Everquest Classic and all 14 Expansion packs.
Reply With Quote
  #8  
Old 02-23-2009, 08:34 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

The new fixes have been completed and are now on the SVN. Doors and clickable portals now work. Also, armor tint seems to be working great now. And many new opcodes were added by Xinu to help fill in ones that were missing. I also got another looting related opcode added so now looting seems to be flawless too.
__________________
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 03:24 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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3