Page 1 of 2
5/15/2003 -- Structures
Posted: Wed May 14, 2003 5:44 pm
by Amadeus
Well, from what I've tested so far, it seems that most structures did not change this patch (the 5/14 or the 5/15 patch! *boggles the mind*
Tested so far by me:
* CHARINFO
* SPAWNINFO
* COMMON
* ITEMINFO
* SPELLINFO (New Structure Below)
Please feel free to make corrections/additions/changes to structures in this thread and I'll try to keep this initial post updated with any changes that need to be made.
Code: Select all
// 5-14-2003 Amadeus
#define SPELLLIST_STARTOFFSET 0x24
#define TOTAL_SPELL_COUNT 0x0FA0 // # of spells in game
typedef struct _SPELLLIST {
/*0x000*/ DWORD ID;
/*0x004*/ FLOAT Range;
/*0x008*/ BYTE Unknown0x008[12];
/*0x014*/ DWORD CastTime;
/*0x018*/ DWORD FizzleTime;
/*0x01c*/ DWORD RecastTime;
/*0x020*/ DWORD DurationType; //DurationFormula on Lucy
/*0x024*/ DWORD Unknown0x024[2];
/*0x02c*/ DWORD Mana;
/*0x030*/ DWORD Base[12]; //Base1-Base12
/*0x060*/ DWORD Max[12]; //Max1-Max12
/*0x090*/ DWORD BookIcon;
/*0x094*/ DWORD GemIcon;
/*0x098*/ DWORD ReagentId[4]; //ReagentId1-ReagentId4
/*0x0a8*/ DWORD ReagentCount[4]; //ReagentCount1-ReagentCount4
/*0x0b8*/ DWORD Unknown0x0b8[4];
/*0x0c8*/ BYTE Calc[12]; //Calc1-Calc12
/*0x0d4*/ BYTE Unknown0x0d4;
/*0x0d5*/ BYTE Deletable; // untested
/*0x0d6*/ BYTE Unknown0x0d6[2];
/*0x0d8*/ BYTE Attrib[12]; //Attrib1-Attrib12
/*0x0e4*/ BYTE Unknown0x0e4;
/*0x0e5*/ BYTE FizzLeadj;
/*0x0e6*/ BYTE Unknown0x0e6;
/*0x0e7*/ BYTE Unknown0x0e7;
/*0x0e8*/ BYTE Unknown0x0e8[3];
/*0x0eb*/ BYTE Level[15];
/*0x0fa*/ BYTE Unknown0x0fa[16];
/*0x10a*/ BYTE CastingAnim;
/*0x10b*/ BYTE Unknown0x10b[11];
/*0x116*/ BYTE Unknown0x116;
/*0x117*/ BYTE Unknown0x117[9];
/*0x120*/ DWORD Unknown0x120;
/*0x124*/ CHAR *Name;
/*0x128*/ CHAR *Target;
/*0x12c*/ CHAR *Unknown0x128;
/*0x130*/ CHAR *Unknown0x12c;
/*0x134*/ CHAR *Unknown0x130; // new struct that indicates casting sound possibly?
/*0x138*/ CHAR *CastOnYou;
/*0x13c*/ CHAR *CastOnAnother;
/*0x140*/ CHAR *WearOff;
/*0x144*/ CHAR *Unknown0x140; // new sprites animation struct?
/*0x148*/ DWORD spaindex;
/*0x14c*/ DWORD Unknown0x150;
/*0x150*/ DWORD SpellAnim;
/*0x154*/ DWORD Unknown0x154;
/*0x158*/ DWORD Unknown130; // This is Unknown130 from Lucy
/*0x15c*/ DWORD Unknown0x15c;
/*0x160*/ DWORD SpellIcon;
/*0x164*/ BYTE Unknown0x164[12];
} SPELLLIST, *PSPELLLIST;
EDIT: Added new SPELLLIST struct
EDIT: Fixed Level[15] location (was off by one byte)
Posted: Wed May 14, 2003 5:48 pm
by Mckorr
Don'tcha mean if DKAA has updated the CVS with all the changes posted here?
USE THE CVS LUKE! HELP US DKAA, YOU'RE OUR ONLY HOPE!
Posted: Wed May 14, 2003 5:49 pm
by dont_know_at_all
They are all in except for the latest offsets.
Amadeus, please confirm that I didn't miss any.
Posted: Wed May 14, 2003 6:19 pm
by vzmule
When doing a regular who in the current zone, the first letter of the guild tag is getting cut off since today's patch. Suppose the struct has changed a bit or is it the offset that's wrong?
Posted: Wed May 14, 2003 7:05 pm
by Amadeus
just posted that in the offsets thread, but Guilds should be 006F441C
I'll send DKAA a patch against the current CVS in a day or so once everything has been confirmed as correct with everything updated and documented. I like to keep DKAA's load as easy as possible as far as dealing with piddly stuff like structs and offsets so he can have more time to work on the more complex things that might come up like memory checkers,etc... We definately want to avoid burnout in any of our devs as I've seen that happen way too many times in this project and SEQ.
Posted: Fri May 16, 2003 2:53 am
by Burrick
I'm pretty new to all this, but when I tried to recompile using this "new" structure, I ended up with five errors. Four of them were referring to a structure member "DurationValue1" and one referred to "RecoveryTime".
These members were in the previous structure but do not exist in this one. Should the code in eqlib.cpp be referring to a different variable or variables?
Posted: Fri May 16, 2003 3:07 am
by Amadeus
The only problem with the MQ game is that you have to read all the threads :)
http://macroquest2.com/phpBB2/viewtopic.php?t=2232
Posted: Fri May 16, 2003 2:28 pm
by NealThorpayt
Greetings Constructs,
I have verified that there were not changes in the structs as posted by Am. And, I verified that the string pointers moved in the _SPELLLIST struct (PCHAR Name moved from 0x0120 to 0x0124, and the rest followed). However, I am unable to verifiy the new struct information for _SPELLLIST as I don't understand what the new components do.
Am, could you post what the new struct information is used for. And, could you explain how you found them.
End of line...
Posted: Fri May 16, 2003 4:35 pm
by Burrick
I have spent a week reading stuff, prior to posting. Sometimes hard to separate that which was, from that which is. Regardless, I re-read the post you pointed to Amadeus, and from that I gleaned that simply commenting out reference to "durawtion1" would do the trick. I also renamed "recoverytime" to "fizzletime" as you had renamed it in the structure.
I havn't tried more tha a few spells, so this isn't exhaustive testing, however.
$spell("spell name", mana, range, id, casttime, recoverytime and recasttime) all seem to be giving me valid data whereas they were not previously. Level is giving me 255 in most cases, but did return 1 on a level 1 spell. Duration gives me a value of 0, regardless of the spell.
Posted: Fri May 16, 2003 4:45 pm
by Amadeus
First, in answering your question, I fixed one little thing that I had incorrect in the structure above: Level[15] should start at 0xeb.
Actually, all of the information I got, I got from Lucy (
http://lucy.fnord.net/index.html). Essentually, I searched for patterns in the structure and then compared numbers to the information that I found for a particular spell at Lucy.
Here is an example:
Code: Select all
0:010> !c:\games\macroquest\mqext\release\mqext.pspell 025ddae8
ID = 32 (offset 0x0)
Range = 200.000000 (offset 0x4)
CastTime = 6100 (offset 0x14)
FizzleTime = 2500 (offset 0x18)
RecastTime = 2250 (offset 0x1c)
DurationType = 10 (offset 0x20)
Mana = 300 (offset 0x2c)
Base1 = 9 (offset 0x30)
Base2 = -55 (offset 0x34)
Base3 = -60 (offset 0x38)
Base4 = 0 (offset 0x3c)
Base5 = 0 (offset 0x40)
Base6 = 0 (offset 0x44)
Base7 = 0 (offset 0x48)
Base8 = 0 (offset 0x4c)
Base9 = 0 (offset 0x50)
Base10 = 0 (offset 0x54)
Base11 = 0 (offset 0x58)
Base12 = 0 (offset 0x5c)
Max1 = 0 (offset 0x60)
Max2 = 0 (offset 0x64)
Max3 = 0 (offset 0x68)
Max4 = 0 (offset 0x6c)
Max5 = 0 (offset 0x70)
Max6 = 0 (offset 0x74)
Max7 = 0 (offset 0x78)
Max8 = 0 (offset 0x7c)
Max9 = 0 (offset 0x80)
Max10 = 0 (offset 0x84)
Max11 = 0 (offset 0x88)
Max12 = 0 (offset 0x8c)
BookIcon = 2505 (offset 0x90)
GemIcon = 2050 (offset 0x94)
ReagentId1 = -1 (offset 0x98)
ReagentId2 = -1 (offset 0x9c)
ReagentId3 = -1 (offset 0xa0)
ReagentId4 = -1 (offset 0xa4)
ReagentCount1 = 1 (offset 0xa8)
ReagentCount2 = 1 (offset 0xac)
ReagentCount3 = 1 (offset 0xb0)
ReagentCount4 = 1 (offset 0xb4)
Calc1 = 100 (offset 0xc8)
Calc2 = 100 (offset 0xc9)
Calc3 = 100 (offset 0xca)
Calc4 = 100 (offset 0xcb)
Calc5 = 100 (offset 0xcc)
Calc6 = 100 (offset 0xcd)
Calc7 = 100 (offset 0xce)
Calc8 = 100 (offset 0xcf)
Calc9 = 100 (offset 0xd0)
Calc10 = 100 (offset 0xd1)
Calc11 = 100 (offset 0xd2)
Calc12 = 100 (offset 0xd3)
Deletable = 0 (offset 0xd5)
Attrib1 = 35 (offset 0xd8)
Attrib2 = 0 (offset 0xd9)
Attrib3 = 79 (offset 0xda)
Attrib4 = 254 (offset 0xdb)
Attrib5 = 254 (offset 0xdc)
Attrib6 = 254 (offset 0xdd)
Attrib7 = 254 (offset 0xde)
Attrib8 = 254 (offset 0xdf)
Attrib9 = 254 (offset 0xe0)
Attrib10 = 254 (offset 0xe1)
Attrib11 = 254 (offset 0xe2)
Attrib12 = 254 (offset 0xe3)
FizzLeadj = 0 (offset 0xe5)
Level(Class 1) = 255 (offset 0xeb)
Level(Class 2) = 255 (offset 0xec)
Level(Class 3) = 255 (offset 0xed)
Level(Class 4) = 255 (offset 0xee)
Level(Class 5) = 255 (offset 0xef)
Level(Class 6) = 255 (offset 0xf0)
Level(Class 7) = 255 (offset 0xf1)
Level(Class 8) = 255 (offset 0xf2)
Level(Class 9) = 255 (offset 0xf3)
Level(Class 10) = 49 (offset 0xf4)
Level(Class 11) = 52 (offset 0xf5)
Level(Class 12) = 255 (offset 0xf6)
Level(Class 13) = 255 (offset 0xf7)
Level(Class 14) = 255 (offset 0xf8)
Level(Class 15) = 65 (offset 0xf9)
CastingAnim = 44 (offset 0x10a)
Name = Plague (offset *0x124)
Target = PLAYER_1 (offset *0x128)
CastOnYou = You feel feverish. (offset *0x138)
CastOnAnother = Someone sweats and shivers, looking feverish. (offset *0x13c)
WearOff = Your fever has broken. (offset *0x140)
spaindex = 24 (offset 0x148)
SpellAnim = 149 (offset 0x150)
SpellIcon = 41 (offset 0x160)
Then, if you go to Lucy's and search for Plague, you'll come to this page:
http://lucy.fnord.net/spellraw.html?id=32&source=Live . If you compare the data, you'll notice it is identical.
I should point out that for classes that cannot use a particular spell at all, the structure records those as level 0xff (which is why you see 255 in the checklist here). Lucy must have determined somewhere that MAX_LEVEL in the game is 127, so they must be converting these to 127 in their database.
Since the function that prints out the checklist that I posted earlier here hasn't been added to CVS yet, you can double check all these values by looking through the memory with windbg.
Hope that answers it :) I will try adding more values to this as Lucy adds values to its database. I do notice a couple things there that wasn't there even before the last patch...
Posted: Fri May 16, 2003 4:50 pm
by Amadeus
$spell("spell name", mana, range, id, casttime, recoverytime and recasttime) all seem to be giving me valid data whereas they were not previously. Level is giving me 255 in most cases, but did return 1 on a level 1 spell. Duration gives me a value of 0, regardless of the spell.
Sorry, Level[15] was off by one byte..I just fixed the structure and what's posted now should work. Let me know if you still have problems.
Duration, as it was figured in MQ before, used some old structure value that I don't think is there anymore in the structure. I think it just requires a slight modification of EQLib.cpp and it will probably work as well or better than before. I'll try to isolate it and post a fix soon.
Re: 5/15/2003 -- Structures
Posted: Tue Jan 20, 2026 4:29 pm
by xyilla
Re: 5/15/2003 -- Structures
Posted: Tue Jan 20, 2026 4:30 pm
by xyilla
Re: 5/15/2003 -- Structures
Posted: Tue Jan 20, 2026 4:31 pm
by xyilla
Re: 5/15/2003 -- Structures
Posted: Tue Jan 20, 2026 4:33 pm
by xyilla