[FE7/FE8] Notes on item dropping

For Fe7:

$03000108 - Where item ID/durability of the item to be dropped is stored for text/icon purposes; the IID/durability is also stored in a variable memory address in the $02025--- range.

$0800A85A - Routine for finding dropped item's icon

$0800A8EC - Routine for writing "Got a/the X" from dropped item
    -If item has the "Unsellable" ability (Ability 1 0x10) or has Item ID 0x34-0x36, message reads "Got the ____" instead of "Got a ____"

$0800A9E0 - Another routine that reads dropped item's name text pointer

$0800EFB0 -Adds dropped item to the slayer's inventory at full uses.

$08012DD4 - Determines article to use for an item, using pointer table at $08012E0C; which then use ASCII text read from $8193E00. Only items of ID 0x34-0x75 use this table, all others always use "a/an".

$0802FA20 - After a unit has died, check if that unit had the 'last item droppable' flag set, that it has something in its inventory, and that the unit's killer is a player unit; if so, select the unit's last item in inventory to be dropped.

$080800E8 - Checks for 'last item droppable' in deployment data when viewing a unit's inventory page

For FE8:

$08010FAE: For dropped item, finds item icon to display

$08011044: For dropped items, finds type of text to display?
$08011132: For dropped items, finds type of text to display?

$08011524: For dropped item, stores its IID/durability to $030005F4
$08011538: Adds dropped item to the slayer's inventory at full uses.

$0801618C - Item acquisition routine that loads:
$080161B0 - Big pointer table that determines if an obtained item is "got a/an ____" or just "got ____" (for uniques)
Only for items with IDs 0x3C-B9; all others always use "got a/an ____"

$0803292C - After a unit has died, check if that unit had the 'last item droppable' flag set, that it has something in its inventory, and that the unit's killer is a player unit; if so, select the unit's last item in inventory to be dropped.
    -After finding last item in inventory, checks if item isn't a bag of Gold (IIDs 0x9B-A0,0xB8-B9)
    $080115BC: If it is a Gold item, adds its value directly to the party's gold count at $$0202BCF8 instead of adding the item to the slayer's inventory
1 Like

To make items dropped by enemies not refresh their uses when added to the slaying unit’s inventory:
FE7:
-Paste write 02 0A 00 2A 10 D1 24 23 43 43 02 1C 07 49 5B 18 at 0x16174

FE8:
-Paste write 02 0A 00 2A 10 D1 24 23 43 43 02 1C 08 49 5B 18 at 0x16542

This will make dropped items retain whatever uses they had when the enemy died.

5 Likes

I found a routine at 12DD4 that determines the article, and at 12F14 that “processes” an item name (it accepts boolean parameters saying whether to prepend an article and whether to capitalize it). Related?

So is there a way to get rid of the article? It’s a bit annoying to have it in a german hack.

The ‘table’ for that text is at offset 193e00 in the ROM according to my notes. But it’s only built to distinguish ‘a’/‘an’/‘the’, which is insufficient for German if you need to worry about masculine/feminine/neuter. Also that’s for the North American version, no idea what the Euro version does. That said, I would imagine that the Euro version already handles this? Isn’t there an actual German localization?

The german localization does “Erhalten: " so in english it’s "Got:”. I managed to get rid of it myself with help of the offset you just posted.

I mean I could definitely do an asm tweak that allows for more customization there, but you’d need some way to specify the gender for each item… (and the table would have to be repointed, although arguably it ought to use actual text items or something)

But muh dragonstone inf exploits

Yeah, 12F14 is called by several of the above FE7 routines; 12DD4 seems to be separate from the “Unsellable” check. I added it and its FE8 equivalent to the first post.

It seems that items given out by villages have their uses set to zero with my little ‘preserve uses’ hack, so I’ll have to come up with a more thorough solution.

EDIT: Okay, the new fix is in and it should work for any source of item giving. If you used the older fix on your ROM you’ll need to revert that change. In case you don’t have a backup:

FE7: 07F0DCF8 at 0xEFB8
FE8: 04F0FEFF at 0x11540