Page 1 of 1

Alternate Advancement struct

Posted: Wed Jul 22, 2009 4:49 pm
by Zcoretri
Here is a preliminary struct I have come up with for Achievement spells and CA's

Code: Select all

<Struct Name="WS_ExamineAASpellInfo" ClientVersion="1" OpcodeName="OP_ClientCmdMsg" OpcodeType="OP_EqExamineInfoCmd">
<Data ElementName="info_header" Substruct="WS_ExamineInfoHeader" Size="1" />
<Data ElementName="spell_info" Substruct="WS_AchievementSpellInfo" Size="1" />
</Struct>


<Struct Name="WS_AchievementInfo" ClientVersion="1">
<Data ElementName="aa_id" Type="int32" /> 
<Data ElementName="unknown1" Type="int16" Size="1" /> 
<Data ElementName="aa_icon" Type="int16" Size="1" /> 
<Data ElementName="aa_icon2" Type="int16" Size="1" /> 
<Data ElementName="current_rank" Type="int8" Size="1" /> 
<Data ElementName="max_rank" Type="int8" Size="1" /> 
<Data ElementName="rank_cost" Type="int8" Size="1" /> 
<Data ElementName="unknown2" Type="int8" Size="1" />
<Data ElementName="id" Type="int32" />
<Data ElementName="icon" Type="int16" Size = "1" />
<Data ElementName="icon2" Type="int16" Size = "1" />
<Data ElementName="icontype" Type="int16" Size = "1" />
<Data ElementName="version" Type="int16" Size = "1" />
<Data ElementName="sub_version" Type="int16" Size = "1" />
<Data ElementName="type" Type="int8" Size = "1" />
<Data ElementName="class_skill" Type="int32" Size = "1" />
<Data ElementName="mastery_skill" Type="int32" Size = "1" />
<Data ElementName="min_class_skill_req" Type="int16" Size = "1" OversizedValue="127" OversizedByte="127" />
<Data ElementName="spell_text_color" Type="int32" Size = "1" />
<Data ElementName="num_levels" Type="int8" Size = "1" />
<Data ElementName="level_array" Type="Array" ArraySizeVariable="num_levels">
	<Data ElementName="adventure_class" Type="int8" Size="1" />
	<Data ElementName="tradeskill_class" Type="int8" Size="1" />
	<Data ElementName="spell_level" Type="int16" Size = "1" />
</Data>
<Data ElementName="tier" Type="int8" Size = "1" />
<Data ElementName="health_req" Type="int16" Size = "1" OversizedValue="127" OversizedByte="127" />
<Data ElementName="health_upkeep" Type="int16" Size = "1" OversizedValue="127" OversizedByte="127" />
<Data ElementName="power_req" Type="int16" Size = "1" OversizedValue="127" OversizedByte="127" />
<Data ElementName="power_upkeep" Type="int16" Size = "1" OversizedValue="127" OversizedByte="127" />
<Data ElementName="req_concentration" Type="int16" Size = "1" />
<Data ElementName="cast_time" Type="int16" Size = "1" OversizedValue="127" OversizedByte="127" />
<Data ElementName="recovery" Type="int16" Size = "1" OversizedValue="127" OversizedByte="127" />
<Data ElementName="recast" Type="float" Size = "1" />
<Data ElementName="radius" Type="float" Size = "1" />
<Data ElementName="max_aoe_targets" Type="int16" Size = "1" />
<Data ElementName="friendly_spell" Type="int8" Size = "1" />
<Data ElementName="num_reagents" Type="int8" />
<Data ElementName="reagent_array" Type="Array" ArraySizeVariable="num_reagents">
	<Data ElementName="reagent" Type="EQ2_8Bit_String" Size="1" />
	<Data ElementName="consumed" Type="int8" Size="1" />
	<Data ElementName="qty_required" Type="int32" Size="1" />
</Data>
<Data ElementName="num_effects" Type="int8" />
<Data ElementName="effect_array" Type="Array" ArraySizeVariable="num_effects">
	<Data ElementName="subbulletflag" Type="int8" Size = "1" />
	<Data ElementName="effect" Type="EQ2_16Bit_String" Size="1" />
	<Data ElementName="percentage" Type="int8" Size = "1" />
</Data>
<Data ElementName="display_spell_tier" Type="int8" Size = "1" />
<Data ElementName="unknown1" Type="int8" Size = "1" />
<Data ElementName="minimum_range" Type="float" Size = "1" />
<Data ElementName="range" Type="float" Size = "1" />
<Data ElementName="Unknown28" Type="int32" Size = "1" />
<Data ElementName="duration1" Type="int32" Size = "1" />
<Data ElementName="duration2" Type="int32" Size = "1" />
<Data ElementName="unknown9" Type="int8" Size = "1" />
<Data ElementName="duration_flag" Type="int8" Size = "1" />
<Data ElementName="target" Type="int8" Size = "1" />
<Data ElementName="can_effect_raid" Type="int8" Size = "1" />
<Data ElementName="affect_only_group_members" Type="int8" Size = "1" />
<Data ElementName="group_spell" Type="int8" Size = "1" />
<Data ElementName="resistibility" Type="float" Size = "1" />
<Data ElementName="unknown11" Type="int8" Size = "6" />
<Data ElementName="hit_bonus" Type="float" Size = "1" />
<Data ElementName="unknown12" Type="int8" Size = "1" />
<Data ElementName="name" Type="EQ2_8Bit_String" Size="1" />
<Data ElementName="description" Type="EQ2_16Bit_String" Size="1" />
</Struct>
Hopefully I have come close to what is required for this struct, hehe. Some names may need adjusting and what not.

Re: Alternate Achievement struct

Posted: Wed Jul 22, 2009 6:20 pm
by John Adams
You are getting me all excited :)

Re: Alternate Achievement struct

Posted: Wed Jul 22, 2009 10:21 pm
by Zcoretri
All I can say is OMFG! We can parse AA data :mrgreen:

Well, it's a start anyway :D

Code: Select all

C:\EQ2 Log Data\PacketParser>packetparser.exe -achievements aaspellstructtest.lo
g
[Status] Using database 'eq2_rawdata' at 127.0.0.1
Warning: PacketStruct 'WS_RequestGuildInfo' uses an unknown opcode named 'OP_Req
uestGuildInfoMsg', this struct cannot be serialized directly.
Loading Data from Packet Log: aaspellstructtest.log
Loading Version Information...
Verifying Opcodes...
Using version '972', version_range1: 972 and version_range2: 972
Loading Language Type...
Could not determine language type.  Defaulting to US English!
Processing Achievements...
Took: 1 seconds. Processed file 'aaspellstructtest.log'
Parsed:
        0 items (0 unique, 0 new)
        0 spawns (0 unique, 0 new)
        0 spells (4 unique, 4 new)
        0 quests (0 unique, 0 new)
        0 factions (0 unique, 0 new)
        0 collections (0 unique, 0 new)

C:\EQ2 Log Data\PacketParser>packetparser.exe -achievements eq2packetlogaaspells
.log
[Status] Using database 'eq2_rawdata' at 127.0.0.1
Warning: PacketStruct 'WS_RequestGuildInfo' uses an unknown opcode named 'OP_Req
uestGuildInfoMsg', this struct cannot be serialized directly.
Loading Data from Packet Log: eq2packetlogaaspells.log
Loading Version Information...
Verifying Opcodes...
Using version '972', version_range1: 972 and version_range2: 972
Loading Language Type...
Could not determine language type.  Defaulting to US English!
Processing Achievements...
Took: 1 seconds. Processed file 'eq2packetlogaaspells.log'
Parsed:
        0 items (0 unique, 0 new)
        0 spawns (0 unique, 0 new)
        0 spells (5 unique, 5 new)
        0 quests (0 unique, 0 new)
        0 factions (0 unique, 0 new)
        0 collections (0 unique, 0 new)

C:\EQ2 Log Data\PacketParser>packetparser.exe -achievements eq2packetlog_examine
spells.log
[Status] Using database 'eq2_rawdata' at 127.0.0.1
Warning: PacketStruct 'WS_RequestGuildInfo' uses an unknown opcode named 'OP_Req
uestGuildInfoMsg', this struct cannot be serialized directly.
Loading Data from Packet Log: eq2packetlog_examinespells.log
Loading Version Information...
Verifying Opcodes...
Using version '949', version_range1: 942 and version_range2: 954
Loading Language Type...
Could not determine language type.  Defaulting to US English!
Processing Achievements...
Took: 4 seconds. Processed file 'eq2packetlog_examinespells.log'
Parsed:
        0 items (0 unique, 0 new)
        0 spawns (0 unique, 0 new)
        0 spells (0 unique, 0 new)
        0 quests (0 unique, 0 new)
        0 factions (0 unique, 0 new)
        0 collections (0 unique, 0 new)
yeah...there is a bug in there I have to fix with the total # of achievements display

Re: Alternate Achievement struct

Posted: Thu Jul 23, 2009 7:15 am
by John Adams
You ever going to check in your changes? Bogart.

Re: Alternate Achievement struct

Posted: Thu Jul 23, 2009 3:04 pm
by Zcoretri
Oh...you want me to share? :mrgreen:


\Yeah, let me touch up some stuff and I will commit the changes.

Re: Alternate Achievement struct

Posted: Thu Jul 23, 2009 3:43 pm
by John Adams
Btw, gratz on acquiring the Tome of Enigmatic Structs Knowledge and taking this on. Even if we don't use the data immediately, it'll be nice to study.

Nice work, Z1 ;)

Re: Alternate Achievement struct

Posted: Thu Jul 23, 2009 4:32 pm
by Zcoretri
I have commited the changes...hopefully I didn't break anything in the process :oops:

Database structure here
CREATE TABLE /*!32312 IF NOT EXISTS*/ "raw_spells_aa" (
"aa_spell_id" int(10) unsigned NOT NULL,
"spell_id" int(10) unsigned NOT NULL default '0',
"tier" tinyint(3) unsigned NOT NULL default '0',
"unknown" smallint(5) unsigned NOT NULL default '0',
"icon" smallint(5) unsigned NOT NULL default '0',
"icon2" smallint(5) unsigned NOT NULL default '0',
"current_rank" tinyint(3) unsigned NOT NULL default '0',
"max_rank" tinyint(3) unsigned NOT NULL default '0',
"rank_cost" tinyint(3) unsigned NOT NULL default '0',
"unknown2" tinyint(3) unsigned NOT NULL default '0',
"language_type" tinyint(3) unsigned NOT NULL default '0',
"log_file" varchar(255) default NULL,
PRIMARY KEY ("aa_spell_id")
);
Would like to have LE look it over, some packets do not parser correctly and its because when you mouse over AA's you get two (2) examine windows, unless you have not acquired your first spell for a particular AA line, you only get one (1) examine window...will need to resolve that issue, but otherwise things parse fine from my tests.

Feel free to massage fields and such, I'm not that good any naming stuff, hehe.

Re: Alternate Achievement struct

Posted: Thu Jul 23, 2009 5:05 pm
by John Adams
Only thing I would change in your table struct is to have a plain old `id` PK, int(10) auto-increment.

Are aa_spell_id's completely different than regular spell_id's? If so, then aa_spell_id should be fine.

Other than that, as long as your field names match the structs you created, we can track down bad data if we need to. Looks great! Can't wait to try it out.

Re: Alternate Achievement struct

Posted: Fri Jul 24, 2009 12:27 pm
by LethalEncounter
Zcoretri wrote:I have commited the changes...hopefully I didn't break anything in the process :oops:
You removed some of my struct changes and added the parser-only changes to the main struct file, but other than that it was good :P Don't worry about it, I'll fix World to make use of the latest structs, spells will just appear funky until it is uploaded. I had planned to do it soon, but you made me do it sooner :)

Not sure why it wouldn't parse correctly if two windows pop up instead of 1, but I'll take a look.

Re: Alternate Achievement struct

Posted: Fri Jul 24, 2009 5:41 pm
by John Adams
Yeah Z1, something is messed up good. If I use your Structs, spells just hangs there not doing anything for eons. It's probably the WorldStructs.xml thing, or opcodes I do not yet have. I did update to the newest Opcodes I just downloaded today, but I still can't parse shait again :(

Why me! Weekend is here, I'm all about parsin'!

Re: Alternate Achievement struct

Posted: Fri Jul 24, 2009 7:03 pm
by Zcoretri
It is probably opcodes you don't have yet, because I have no problems parsing, hehe. But the behaviour you are seeing I saw before I got my opcodes in the DB right.

You have to make a new set for data version 972. Opcodes 509 and below stay the same and opcodes 510 and above you have to add 4 to the opcode. Thought I had saved the SQL query to do that but I cannot find it :(

Re: Alternate Achievement struct

Posted: Fri Jul 24, 2009 7:08 pm
by John Adams
If these are the new opcodes LE just sent down, then I got em. I'll be parsing like a mad dog all night!

Re: Alternate Achievement struct

Posted: Fri Jul 24, 2009 7:14 pm
by Zcoretri
Yep, LE probably made those updates for us :)