Determining Item/Weapon type (from memory)

Greetings all!

So I've been modifying the output of Soly's [awesome] Item Reader to create a customized CSV file for dumping into excel. The idea would be to nearly automate bank dumps and generate a Trade List, etc. [I just recently saw Marcher's cool backpack addon and definitely like where that is going, but for now, I'm hacking Soly's great work :)...]

Based on Soly's code and lib stuff, I've been able to work out some logic for various CSV values; in the lib_items config files, much of it is hard-coded by color, which I've utilized.

But I'm at a loss when it comes to the item type; i.e., what determines a gun/sword/cane/frame/barrier/mag/etc icon in the menu. I looked around Qedit and Cheat Engine a bit, but I am not proficient...

Any help from those who know how to find this or point me in the right direction would be greatly appreciated!
 
The icon is determined by the animation type. Saber, Dagger, Sword, Partisan, Slicer, Claw, Twin, Fist, Katana, Swords have the saber icon. Handgun, Rifle, Shot, Mechgun, Launcher have the gun icon. Cane, Rod, Wand, Cards have the cane icon.
 
Just as Ives said, for another tool I did this, where the value the switch acts on is the animation of the weapon...
I don't remember if my addon reads the animation, I could look into that (although I have as backlog of things to look at in my addons)
Code:
switch (this._psod.attackAnimations[this.data[this.Off + 1]])
{
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 13:
    case 14:
    case 15:
    case 16:
    this.Icon = "sword";
    break;
    case 6:
    case 7:
    case 8:
    case 9:
    case 17:
    this.Icon = "gun";
    break;
    case 10:
    case 11:
    case 12:
    case 18:
    this.Icon = "wand";
    break;
    default:
    this.Icon = "unknown";
    break;
}
 
Thanks for the insight! I've gotten closer, or at least I'm understanding the addon files now.

I looked through pmt.lua in solylib, but I don't think the item data lookup includes this animation information. Am I correct in thinking that the information I seek is in "/ship/param/ItemPMT.bin"? Or "/login/ItemPmt.prs"? Or is it loaded into memory and viewable in Cheat Engine attached to psobb.exe? I don't do much with memory at this level in my computer knowledge, so not sure where to look.

I've also been unable to open those PMT files with Soly's PMT editor--something about 'Error parsing PMT data .. Index (startIndex) was out of range'. I see the structure is similar to what I found in pmt.lua, so maybe soly already is grabbing it?

So I'm definitely headed in a better direction. Any other insight is greatly appreciated, but no rush or worries... I'm just tinkering ;)
 
I am already reading the PMT data from the game.

No idea about the error opening the files, maybe you are using the gamecube version to open BB files which will not work.
 
Thanks Soly, I guess that's what it was. I've got Lee's version working.

So, at least, I think I know what I need to know. With your switch statement info and the ItemPMT editor, this is where I'm at:

View media item 1680
I don't know if Animation info is currently pulled into the addons (I think not?), or how to go about parsing for it--whether it's at the [item memory address + an offset], or somewhere else entirely.

Anyway, I'll keep messing with it. If that sparks any other insight, let me know; and thanks all!
 
Well, if anything it should just be implemented in the addon...
Would make no sense to hardcode it.

I'll see if I can look into it
 
Back
Top