Repository navigation
FF4 Advance (U): fix equipment row offset for items 278-312 - #32
Open
sonofskywalker3 wants to merge 1 commit into
Open
sonofskywalker3 wants to merge 1 commit into
sonofskywalker3 wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Items 278-312 read their equipment stats from row
item - 87. The game usesitem - 85.The stat routine at 0x0805566A picks the row base by item range:
(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 inff4/ff4u-gba.jsonto%i-85. Theitem ranges in the
invalidconditions are unchanged (313 is a key item).ff4e-gba.jsonhas thesame
-87references; 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 andlisted 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.