Skip to content

FF4 Advance (U): fix equipment row offset for items 278-312 - #32

Open
sonofskywalker3 wants to merge 1 commit into
everything8215:gh-pagesfrom
sonofskywalker3:fix/ff4a-equipment-rows
Open

sonofskywalker3 wants to merge 1 commit into
everything8215:gh-pagesfrom
sonofskywalker3:fix/ff4a-equipment-rows

Conversation

@sonofskywalker3

Copy link
Copy Markdown

Items 278-312 read their equipment stats from row item - 87. The game uses item - 85.

The stat routine at 0x0805566A picks the row base by item range:

Items Base literal Row
0-175 0x080E5A10 item
252-268 0x080E5680 item - 76
278-313 0x080E5614 item - 85
later 0x080E559C item - 95

(Each row is 12 bytes; 0x080E5A10 - 0x080E5614 = 1020 = 85 x 12.)

With -87 the first two items of the range read rows 191 and 192, the same rows as items 267 and 268,
and every later item in the range shows the stats of the item two places before it.

This changes the nine equipmentProperties[%i-87] references in ff4/ff4u-gba.json to %i-85. The
item ranges in the invalid conditions are unchanged (313 is a key item). ff4e-gba.json has the
same -87 references; I don't have that ROM to check, so it is not changed here.

Tested: loaded the definition against the US ROM with the editor's own rom/ code under Node and
listed the row each item resolves to. Before: items 278 and 279 resolve to rows 191 and 192. After:
rows 193 and 194, and items 278-312 cover rows 193-227 with no overlap.

The equipment stats of items 278-312 are at row (item - 85), not
(item - 87). The stat routine at 0x0805566A selects the row base by
item range: 0-175 use 0x080E5A10, 252-268 use 0x080E5680 (-76 rows),
278-313 use 0x080E5614 (-85 rows) and later items use 0x080E559C
(-95 rows). With -87 the first two items of the range also overlapped
the rows of items 267-268.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant