Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::GeorgeS's Tools

Development::GeorgeS's Tools A forum just for GeorgeS's tools

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2009, 07:27 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

ChaosSlayer - I'll add those to the to do list.

I started the profile editor and have it read only so far.
I will release it as read only until the bugs are figured out (Don't want to destroy toon's profiles).

What I still have not figured out is the :
'/*5508*/ SpellBuff_Struct buffs[BUFF_COUNT]; // Buffs currently on the player
'/*4796*/ uint32 skills[MAX_PP_SKILL]; --update -- Completed!
'/*2552*/ uint8 languages[MAX_PP_LANGUAGE];
'/*2584*/ int32 spell_book[MAX_PP_SPELLBOOK]; --update -- Completed!
'/*4632*/ int32 mem_spells[MAX_PP_MEMSPELL]; --update -- Completed!
'/*0432*/ AA_Array aa_array[MAX_PP_AA_ARRAY];


All other's are in.

Now, does any programer here know how to calculate a float from 4 bytes?


For uint32, I do
Code:
conversion 4 bytes => 4byte int
0A 0B 0C 0D
0D*16777216  + 0C*65536 + 0B*256 + 0A*1
I used little endian byte order

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//

Last edited by GeorgeS; 05-24-2009 at 10:48 AM..
Reply With Quote
  #2  
Old 05-24-2009, 12:08 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

So I'm still working on the 4 byte Hex to float. I am trying to figure out if the format used is little endian byte order - AABBCCDD = DDCCBBAA .
Since the location of the toon is stored as a float, I need to convert the 4x8 bits (32 bits) to float..., but the byte order is important

edit
some progress. Looks like little endian format - low byte to hi byte order AABBCCDD = DDCCBBAA
Thus a 4 hex byte of '00 00 C7 41' decodes to '24.875' if my code is good.

Code:
'/*4700*/    float               y;                  // Player y position
'/*4704*/    float               x;                  // Player x position
'/*4708*/    float               z;                  // Player z position
'/*4712*/    float               heading;            // Direction player is facing

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)

Public Function Hex2Float(ByVal tmpHex As String) As Single
Dim TmpSng As Single
Dim tmpLng As Long
tmpLng = CLng("&H" & tmpHex)
Call CopyMemory(ByVal VarPtr(TmpSng), ByVal VarPtr(tmpLng), 4)
Hex2Float = TmpSng
End Function
..and my float to hex (32bits) converter
Code:
Public Function Float2Hex(ByVal TmpFloat As Single) As String
Dim TmpBytes(0 To 3) As Byte
Dim TmpSng As Single
Dim tmpStr As String
Dim X As Long
TmpSng = TmpFloat
Call CopyMemory(ByVal VarPtr(TmpBytes(0)), ByVal VarPtr(TmpSng), 4)
For X = 3 To 0 Step -1
If Len(HEX(TmpBytes(X))) = 1 Then
tmpStr = tmpStr & "0" & HEX(TmpBytes(X))
Else: tmpStr = tmpStr & HEX(TmpBytes(X))
End If
Next X
Float2Hex = tmpStr
End Function

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//

Last edited by GeorgeS; 05-24-2009 at 08:38 AM..
Reply With Quote
  #3  
Old 05-24-2009, 12:54 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

I've never messed with encoding/decoding floats, but you piqued my curiosity. Maybe this article will be helpful, GeorgeS?

http://en.wikipedia.org/wiki/Single_precision
Reply With Quote
  #4  
Old 05-24-2009, 05:49 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

So far, here's the progress, almost done...




GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #5  
Old 05-24-2009, 07:37 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

Progress has been good, and the save profile has been coded and appears to work ok.
I have a few things to finish off before release.

edit - I just released the final version. I tested it as best I could and it works well. Just make a copy of yor toons first (with my copy toon button) and play around with the profile.
I also added a wipe all spells from spellbook button as reuested.

I have not figured out AA's yet, but that is next.

Everquest Item Editor and Character Inventory Editor
- 14.4.2 - Enabled editing of toon profile structs - click and look in load character - there click on profile editor. Back up your toons!



GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//

Last edited by GeorgeS; 05-25-2009 at 12:40 PM..
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 08:17 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3