Page 1 of 1

Item Type: 9 (Bauble) vs Sets issues

Posted: Fri Jan 04, 2013 8:06 am
by John Adams
Okay, I have a complex issue I need help sorting out. I'm sure it will be a simple answer though ;)

Substruct_ItemFooter ends like this for CoE -
<Data ElementName="locked_flag" Type="int8" Size="1" />
<Data ElementName="account_retricted" Type="int8" Size="1" />
<Data ElementName="footer_unknown6" Type="int8" Size="1" />
<Data ElementName="name" Type="EQ2_8Bit_String" Size="1" />
<Data ElementName="description" Type="EQ2_16Bit_String" Size="1" />
<Data ElementName="footer_unknown7" Type="int8" Size="1" />
There is a specific type of Bauble that throws an additional int32 in the footer ending, IF the bauble is a part of a set (Fear and Loathing) -
<Data ElementName="locked_flag" Type="int8" Size="1" />
<Data ElementName="account_retricted" Type="int8" Size="1" />
<Data ElementName="footer_unknown6" Type="int8" Size="1" />
<Data ElementName="footer_unknownJA" Type="int32" />
<Data ElementName="name" Type="EQ2_8Bit_String" Size="1" />
<Data ElementName="description" Type="EQ2_16Bit_String" Size="1" />
<Data ElementName="footer_unknown7" Type="int8" Size="1" />
However, this breaks all other item processing because now there is an int32 there, which chops up the item name element. So, I solved that by doing this:
<Data ElementName="footer_unknownJA" Type="int32" IfVariableSet="footer_set_name_0" />
That now works great for the baubles in a Set, and the other items that are not... except, now I've run into a new problem. Now, I have a regular item (type 3 - Armor) which is in a set (thus footer_set_name is set) and this int32 is now breaking the item Name up.
-- OP_ClientCmdMsg::OP_EqExamineInfoCmd --
11/2/2012 21:23:28
69.174.200.155 -> 192.168.1.101
0000: 01 3A F8 06 00 00 FF 7A 02 00 00 00 00 00 00 FE .:.....z........
0010: 3F 80 00 00 FF FF FF FF 1A BE 7D FB C1 DD 1A 13 ?.........}.....
0020: 22 0E 05 02 00 02 00 00 00 00 00 00 00 00 00 00 "...............
0030: 00 00 00 00 00 00 00 00 08 06 39 00 00 20 40 00 ..........9.. @.
0040: 00 06 3B 66 66 A6 3F 00 00 00 01 15 00 00 00 04 ..;ff.?.........
0050: 15 00 00 06 3E CD CC 2C 40 00 00 06 59 00 00 F8 ....>..,@...Y...
0060: 41 00 00 06 12 9A 99 39 40 00 00 07 07 2B 00 00 A......9@....+..
0070: 00 00 00 00 00 00 64 00 00 00 00 8C 5A F1 D2 8C ......d.....Z...
0080: 5A F1 D2 01 06 17 FF BC 02 18 FF BC 02 1A FF BC Z...............
0090: 02 1B FF BC 02 1D FF BC 02 1E FF BC 02 01 07 00 ................
00A0: 00 00 00 03 7F 94 00 7F 94 00 00 00 00 00 00 3B ...............;
00B0: 00 00 00 00 00 00 80 6D 00 00 00 00 49 46 01 00 .......m....IF..
00C0: 00 05 FF FF FF FF 0F 52 61 67 65 20 6F 66 20 44 .......Rage of D
00D0: 69 73 63 6F 72 64 06 02 00 02 00 19 00 41 70 70 iscord.......App
00E0: 6C 69 65 73 20 50 72 6F 77 65 73 73 20 6F 66 20 lies Prowess of
00F0: 57 61 72 20 49 2E 64 00 23 00 49 6E 63 72 65 61 War I.d.#.Increa
0100: 73 65 73 20 50 6F 74 65 6E 63 79 20 6F 66 20 63 ses Potency of c
0110: 61 73 74 65 72 20 62 79 20 30 2E 35 25 64 03 00 aster by 0.5%d..
0120: 02 00 1A 00 41 70 70 6C 69 65 73 20 50 72 6F 77 ....Applies Prow
0130: 65 73 73 20 6F 66 20 57 61 72 20 49 49 2E 64 00 ess of War II.d.
0140: 23 00 49 6E 63 72 65 61 73 65 73 20 50 6F 74 65 #.Increases Pote
0150: 6E 63 79 20 6F 66 20 63 61 73 74 65 72 20 62 79 ncy of caster by
0160: 20 30 2E 35 25 64 04 00 02 00 1B 00 41 70 70 6C 0.5%d......Appl
0170: 69 65 73 20 50 72 6F 77 65 73 73 20 6F 66 20 57 ies Prowess of W
0180: 61 72 20 49 49 49 2E 64 00 23 00 49 6E 63 72 65 ar III.d.#.Incre
0190: 61 73 65 73 20 50 6F 74 65 6E 63 79 20 6F 66 20 ases Potency of
01A0: 63 61 73 74 65 72 20 62 79 20 30 2E 35 25 64 05 caster by 0.5%d.
01B0: 00 03 00 1A 00 41 70 70 6C 69 65 73 20 50 72 6F .....Applies Pro
01C0: 77 65 73 73 20 6F 66 20 57 61 72 20 49 56 2E 64 wess of War IV.d
01D0: 00 23 00 49 6E 63 72 65 61 73 65 73 20 50 6F 74 .#.Increases Pot
01E0: 65 6E 63 79 20 6F 66 20 63 61 73 74 65 72 20 62 ency of caster b
01F0: 79 20 30 2E 35 25 64 00 26 00 49 6E 63 72 65 61 y 0.5%d.&.Increa
0200: 73 65 73 20 43 72 69 74 20 42 6F 6E 75 73 20 6F ses Crit Bonus o
0210: 66 20 63 61 73 74 65 72 20 62 79 20 30 2E 35 25 f caster by 0.5%
0220: 64 06 00 03 00 19 00 41 70 70 6C 69 65 73 20 50 d......Applies P
0230: 72 6F 77 65 73 73 20 6F 66 20 57 61 72 20 56 2E rowess of War V.
0240: 64 00 23 00 49 6E 63 72 65 61 73 65 73 20 50 6F d.#.Increases Po
0250: 74 65 6E 63 79 20 6F 66 20 63 61 73 74 65 72 20 tency of caster
0260: 62 79 20 30 2E 35 25 64 00 26 00 49 6E 63 72 65 by 0.5%d.&.Incre
0270: 61 73 65 73 20 43 72 69 74 20 42 6F 6E 75 73 20 ases Crit Bonus
0280: 6F 66 20 63 61 73 74 65 72 20 62 79 20 30 2E 35 of caster by 0.5
0290: 25 64 07 00 03 00 1A 00 41 70 70 6C 69 65 73 20 %d......Applies
02A0: 50 72 6F 77 65 73 73 20 6F 66 20 57 61 72 20 56 Prowess of War V
02B0: 49 2E 64 00 26 00 49 6E 63 72 65 61 73 65 73 20 I.d.&.Increases
02C0: 43 72 69 74 20 42 6F 6E 75 73 20 6F 66 20 63 61 Crit Bonus of ca
02D0: 73 74 65 72 20 62 79 20 30 2E 35 25 64 00 23 00 ster by 0.5%d.#.
02E0: 49 6E 63 72 65 61 73 65 73 20 50 6F 74 65 6E 63 Increases Potenc
02F0: 79 20 6F 66 20 63 61 73 74 65 72 20 62 79 20 30 y of caster by 0
0300: 2E 35 25 64 02 00 00 17 00 52 61 67 65 2D 46 75 .5%d.....Rage-Fu
0310: 73 65 64 20 42 61 74 74 6C 65 20 41 72 6D 6F 72 sed Battle Armor
0320: 00 00 26 00 52 61 67 65 2D 46 75 73 65 64 20 5A ..&.Rage-Fused Z
0330: 65 61 6C 6F 75 73 20 4D 61 72 61 75 64 65 72 27 ealous Marauder'
0340: 73 20 4C 65 67 67 69 6E 67 73 00 07 00 00 00 00 s Leggings......
0350: 00 00 00 00 00 00 00 00 00 00 26 52 61 67 65 2D ..........&Rage-
0360: 46 75 73 65 64 20 5A 65 61 6C 6F 75 73 20 4D 61 Fused Zealous Ma
0370: 72 61 75 64 65 72 27 73 20 4C 65 67 67 69 6E 67 rauder's Legging
0380: 73 00 00 00 00 00 28 7F 02 00 FF FF FF FF FF FF s.....(.........
.
.
.
Above, the set_name is set, and the item 'name' is truncated by the int32. Without this variable int32, Baubles in a set will not parse.

Question: How can I build a struct that covers both bases? I am trying to work with LE's new "Criteria" tag, like Criteria="header_item_type==9" (baubles), but so far no luck. Not sure if I can IfVariableSet AND Criteria in the same data element.


Thanks for your thoughts.

Re: Item Type: 9 (Bauble) vs Sets issues

Posted: Fri Jan 04, 2013 10:24 am
by John Adams
John Adams wrote:I am trying to work with LE's new "Criteria" tag, like Criteria="header_item_type==9" (baubles), but so far no luck. Not sure if I can IfVariableSet AND Criteria in the same data element.
I think I am labeling this criteria wrong. In the Footer, how do I reference something in the header?

I see the num_effects does it, like "header_info_header_unknown_0_0" for the first hex in that array. So I have tried

header_item_type==9
header_item_type_0==9
header_item_type_0_0==9

And I am still getting that int32 showing up even in non-item_type 9 items.

Re: Item Type: 9 (Bauble) vs Sets issues

Posted: Fri Jan 04, 2013 5:51 pm
by Zcoretri
That would be a good question for LE to answer, as I don't know if you can combine those together.

Know you now what I was going through to get items to parse in the first place :mrgreen:

Re: Item Type: 9 (Bauble) vs Sets issues

Posted: Sat Jan 05, 2013 9:01 am
by John Adams
Ok then, pretending for a moment that "Criteria" is not really an option (since parser and world do not yet support it anyway), how would you handle that extra int32 with current PacketStructs functionality?

I'm going to give this another run this morning. Maybe there is another element in the item packet I can use to differentiate between bauble set and item set (besides just item_type)

Re: Item Type: 9 (Bauble) vs Sets issues

Posted: Sat Jan 05, 2013 10:53 am
by Zcoretri
Try this...

Code: Select all

<Data ElementName="footer_unknownJA" Type="int32" IfVariableSet="footer_set_name_0, cast_0" />
or any other element that is always set for a bauble

Code: Select all

<Data ElementName="recovery" Type="int16" Size="1" OversizedValue="127" OversizedByte="127" />
<Data ElementName="duration" Type="int32" Size="1" />
<Data ElementName="recast" Type="float" Size="1" />
<Data ElementName="display_slot_optional" Type="int8" Size="1" />
<Data ElementName="display_cast_time" Type="int8" Size="1" />
<Data ElementName="display_bauble_type" Type="int8" Size="1" />
<Data ElementName="effect_radius" Type="float" Size="1" />
<Data ElementName="max_aoe_targets" Type="int32" Size="1" />
<Data ElementName="display_until_cancelled" Type="int8" Size="1" />
<Data ElementName="item_score" Type="int32" Size="1" />

Re: Item Type: 9 (Bauble) vs Sets issues

Posted: Sat Jan 05, 2013 11:52 am
by John Adams
oh ffs... duh me... haha. See? I was too close to the issue to think of the obvious :) thanks, Z.

Scratch that, because stacking those is an OR, it won't work. Need an AND, both of those need to be set for this to apply the int32. Back to seeing how to use the new Criteria option.

Re: Item Type: 9 (Bauble) vs Sets issues

Posted: Sat Jan 05, 2013 12:59 pm
by Zcoretri
Changes to footer struct...

Code: Select all

<Data ElementName="unknown_set_info2" Type="int8" Size="1" IfVariableSet="footer_set_name_0" />
<Data ElementName="unknown_set_info3" Type="int8" Size="1" IfVariableSet="footer_set_name_0" />
<Data ElementName="unknown_set_info3a" Type="int32" Size="1" IfVariableSet="footer_unknown_set_info3_0" />
<Data ElementName="unknown_set_info4" Type="int8" Size="1" IfVariableSet="footer_set_name_0" />