Item Struct offset 28 (0x1C) - item icon??

05/29/2018 16:34 3vangelist#1
Hey all,

Just did some nosing around the item structure in GWA2, specifically in trying to identify rare weapons in some other way than to attempt to collect all of the viable Model ID's. I think I might have found some loose reference to the item's icon?

I've got a few frog sceptres left over from some old SC's I used to do, so started with those. I noticed that even though all 3 of my sceptres have different ModelIDs...

Code:
 MsgBox(0,'ModelID',DllStructGetData($lItemStruct,'ModelID') ; This is different for all 3 frog scepters

; ~~~ Worked Examples (ModelID=Description)
; 1953=Froggy (Domination)
; 1956=Froggy (Fast Casting)
; 1957=Froggy (Illusion)
; 2421=Amethyst Aegis (Motivation)
; 2423=Amethyst Aegis (Tactics)
; ~ Inscriptions
; 15542=Inscription "Strength and Honor"
; 15542=Inscription "Dance with Death"
; 15541=Inscription "Riders on the Storm"
; 15541=Inscription "Leaf on the Wind"
; ~ Dyes (note ModelID change!)
; 24888=Vial of Sadie's Dye [Pink]
; 146=Vial of Dye [Pink]
; 146=Vial of Dye [White]
...if I look at "unknown2" in the struct (offset 28 or 0x1C), they're all the same...

Code:
 MsgBox(0,'IconID ???',DllStructGetData($lItemStruct,'unknown2') ; This is THE SAME for all 3 frog scepters

; ~~~ Worked Examples (unknown2=Description)
; 0x33370500=Froggy (Domination)
; 0x33370500=Froggy (Fast Casting)
; 0x33370500=Froggy (Illusion)
; 0x239B0400=Amethyst Aegis (Motivation)
; 0x239B0400=Amethyst Aegis (Tactics)
; ~ Inscriptions
; 0x44240300=Inscription "Strength and Honor"
; 0x44240300=Inscription "Dance with Death"
; 0x43240300=Inscription "Riders on the Storm"
; 0x43240300=Inscription "Leaf on the Wind"
; ~ Dyes
; 0xA7240000=Vial of Sadie's Dye [Pink]
; 0xA7240000=Vial of Dye [Pink]
; 0xA7240000=Vial of Dye [White]
This appears to be a bit more consistent than the ModelID - dyes all have the same unknown2 value aswell, but I'm guessing some other variable tells GW "version" or color of the icon to use.

Questions:

Has anyone else checked this out, and can it be confirmed for other rare items like Bone Dragon staff?

Can anyone figure out exactly what data type this is supposed to be, and is it really 4 bytes in size?
05/29/2018 19:05 DerMoench14#2
You're right ... the ItemModelID isn't unique for all Items. It can vary for different Attributes, Requirement, Location where it dropped and so on ...
Furthermore there are hundrets of ItemModelId which are shared by different Items:

Code:
"Lump of Charcoal",    "922"
"Kaineng Axe",         "923"
Code:
DWORD ModelFileID;	// 0x1C
Sadly this is neighter a good identifier as it can vary, too (eg the "real" Eternal Blade and the "Fake" (Quest Reward) share the same ModelFileID).

It doesn't really matter what Solution you prefer ... i recommend to stay on ItemModelID as it is way more common.
05/29/2018 19:15 3vangelist#3
Quote:
Originally Posted by DerMoench14 View Post
You're right ... the ItemModelID isn't unique for all Items. It can vary for different Attributes, Requirement, Location where it dropped and so on ...
Furthermore there are hundrets of ItemModelId which are shared by different Items:

Code:
"Lump of Charcoal",    "922"
"Kaineng Axe",         "923"
Code:
DWORD ModelFileID;	// 0x1C
Sadly this is neighter a good identifier as it can vary, too (eg the "real" Eternal Blade and the "Fake" (Quest Reward) share the same ModelFileID).

It doesn't really matter what Solution you prefer ... i recommend to stay on ItemModelID as it is way more common.
Thanks, but you miss what I'm trying to achieve (or maybe I misunderstand your point).

I know items share the same ModelID, and yes it is way more common in many circumstances.

If I want to write a bot that only loots and stores a certain rare skin (e.g. a Frog Scepter of any req/dmg/etc for a Bogroots bot), then instead of looking at the ModelID I can look at the ModelFileID?

It sounds like you're confirming my suggestion about this method and that in the above example, it would be the best way of doing it?
05/29/2018 19:37 DerMoench14#4
Quote:
Originally Posted by 3vangelist View Post
Thanks, but you miss what I'm trying to achieve (or maybe I misunderstand your point).

I know items share the same ModelID, and yes it is way more common in many circumstances.

If I want to write a bot that only loots and stores a certain rare skin (e.g. a Frog Scepter of any req/dmg/etc for a Bogroots bot), then instead of looking at the ModelID I can look at the ModelFileID?

It sounds like you're confirming my suggestion about this method and that in the above example, it would be the best way of doing it?
Well .. i'm almost sure that the ModelFileID (0x1C) is unique for the same Item with different Attribut-Requirements ... but i can not guarantee.
I collected Ten-Thousands ModelIDs ... but only have a very limited Collection about ModelFileIds.
But for me it should be fine!
05/30/2018 06:25 savsuds#5
Are you removing the mods/inscriptions when looking at the "unknown 2" values?
05/30/2018 06:50 3vangelist#6
Quote:
Originally Posted by savsuds View Post
Are you removing the mods/inscriptions when looking at the "unknown 2" values?
No - the weapons I'm using are lifted from my heros; they're not modded in the same way.

As an example, one of them has no inscription and an imperfect memory (19%) mod, and another only has a "Have Faith" inscription with no other mods attached.