Get unit's item max uses via event?

Is there a way to get the MAX uses value of an item in a unit’s inventory via events?
The current GeUnitStatus patch only allows you to get the CURRENT uses. I need to get the MAX uses value.

1 Like

Essentially, I’m trying to make an item repair kit item event

1 Like

Use or reference the repair item(s) asmcs Zane and I both wrote.

2 Likes

I’ve seen your Repair ASm, and it’s great. However, what I want to achieve is to repair individual items, and only by a few uses. Rather than repairing all items to full

1 Like

This part:
https://github.com/Veslyquix/Pokemblem/blob/master/Patches/ASMCs/RepairItemsUnused/RepairItems.s#L80

ldrb r0, [r7, #0x06] @ Item id 
blh  0x08016540           @MakeItemShort RET=ITEMPACK 
strh r0, [r4, r5] 

MakeItemShort does exactly what you want in asm, so I think you should use asm.

Given an item id, it returns that same item with max durability in r0. One only needs to store it in unit struct.

1 Like

Here, test this for me:

https://github.com/Veslyquix/ASM/tree/main/GetCharClassItemData

Given item id in memory slot 1 and offset of the item table in slot 3, it puts the value for that field in the item table into memory slot C.

All I did was turn the decomp headers into an asmc for units, classes, and items to read their tables.

So for iron sword you’d put 1 in mem slot 1 and for durability you’d put 0x14 in memory slot 3 and then call the ASMC.

1 Like