1291
Game Modification Station / FF6 - possible bug
« on: January 27, 2008, 04:02:57 AM »
Ok, there's a potential bug out there to crush. If you set an item to cast a spell in battle, and turn off the "break after use" flag, there's potential that the item will not ever get re-added to your inventory. From the sounds of it, number of them remaining hasn't mattered, so it sounds like it could just happen at random. This is the function that re-adds items:
If memory serves, any items will also be added when the person that used gets gets their ATB refilled. Not 100% on that. In any event, that's about all the info I have, provided from Gil. This is posted in case anybody may know anything. I, for one, have no clue what could be causing it.
Code: [Select]
(Add/restore characters' items to inventory. This function is called:
- At the end of a character's turn when they Steal or Metamorph something.
- At the end of battle for all characters, to account for items they tried to use
during the battle, but were thwarted by being killed/etc (the game depletes items
upon *issuing* the command, so it'll be gone from inventory even if the command
never executed).
- It can also be used to restore a "bottomless" item at the end of a character's
turn. [The game does support equipment that doesn't deplete when you use it as
an Item, though no such equipment exists.])
C2/62C7: A2 06 LDX #$06
C2/62C9: BD 18 30 LDA $3018,X
C2/62CC: 1C 8C 3A TRB $3A8C (clear this character's "add my items to inventory"
flag)
C2/62CF: F0 19 BEQ $62EA (if it wasn't set, then skip this character)
C2/62D1: BD F4 32 LDA $32F4,X
C2/62D4: C9 FF CMP #$FF (does this character have a valid item to add to
inventory?)
C2/62D6: F0 12 BEQ $62EA (branch if not)
C2/62D8: 20 DC 54 JSR $54DC
C2/62DB: A9 01 LDA #$01
C2/62DD: 8D 75 2E STA $2E75
C2/62E0: A9 05 LDA #$05
C2/62E2: 20 11 64 JSR $6411
C2/62E5: A9 FF LDA #$FF
C2/62E7: 9D F4 32 STA $32F4,X (null the item to add to inventory)
C2/62EA: CA DEX
C2/62EB: CA DEX
C2/62EC: 10 DB BPL $62C9 (loop for all 4 party members)
C2/62EE: 60 RTSIf memory serves, any items will also be added when the person that used gets gets their ATB refilled. Not 100% on that. In any event, that's about all the info I have, provided from Gil. This is posted in case anybody may know anything. I, for one, have no clue what could be causing it.



Yeah, Strago's not getting healed...