Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lenophis

1531
Game Modification Station / Re: FF6 - possible bug
« on: February 02, 2008, 12:32:53 PM »
i also had a fear of this code happening in between some other character's Item input and their execution; i thought it would cause the used item to always be restored to inventory (because it's still held in $32F4), even when it should be consumed.  but after more thought, i realize i was wrong, as the other character won't have their $3A8C flag set until the actual turn execution..  so an intervening 62C7 call shouldn't wreck anything.
Yeah, the determining factor was $3A8C. It's also because of that is why an item may remain in limbo after death/revival. :tongue: This should fix it, and with the few tests I did it was fixed. I'm still waiting on some more verification though.

1532
I would imagine it's in the item data, half of the buying price. Although, FF2 had a large table of mess for it's buying and selling prices, so I'm not sure if it wasn't reused a couple more times.

1533
Game Modification Station / Re: FF6 - possible bug
« on: February 01, 2008, 12:13:38 PM »
Well, I have a feeling that it will need an update, but a patch is released. I tested a couple of ways to lose items, and so far I haven't lost any with it yet. I'm not sure if I tested all methods, though.

1534
Dbi News / Re: The glorious return of my contentless site!
« on: February 01, 2008, 12:06:04 PM »
:omg: Glad to see the return!

1535
Game Modification Station / Re: FF6 - possible bug
« on: January 31, 2008, 11:55:57 PM »
Ok, there is a fix in place. Kejar gave me concept code last night, and for some reason I didn't think to switch indexes with where I needed it. :tongue: However, it's not a perfect fix. The item will not be lost, but it can be.....misplaced. Explanation:

Character A uses item, but dies before item can be used. Character A gets revived, but since the item wasn't used, the "re-add to inventory" bit was never set. Therefore, the item remains on character's person. However, if character A uses a different item, the original will be re-added. In short, if character A uses another item, the original is returned. If battle ends, the original is returned. However, until one of those two (or steal/metamorph occur), the item will not be re-added back to inventory. This is especially annoying if there is 1 item left, and you desperately need to use it. Unfortunately, I don't think I can work around that, as that would drastically change how the battles flow.

Also, this fix needs to be applied to a few areas (steal and metamorph, specifically), so there's bound to be a few versions of this patch. Freaking bugs...

1536
Game Modification Station / Re: FF6 - possible bug
« on: January 31, 2008, 10:18:44 PM »
It's very difficult to address, because in the case of a character dying before they can use the item, there's no practical way to check, "Was their turn unable to execute?".  It's not like you know for a fact that their turn will have completed within X seconds if it's going to complete at all, as there are so many possible intervening factors.  Besides, a timer would be tedious and difficult to set up anyway.
Not to mention completely impractical.

--Edit--
But you said that already! Hooray for reading ability! :happy:
--/Edit--

Quote
how about _before_ C2/4DB0, you preserve A, check the character's current $32F4,Y value, and if it isn't FFh, then call a routine to put its contents back into inventory?  (you'd want to code a custom version of C2/62C7
Ugh, I was hoping I could avoid making another 62C7. :sad:

Quote
to focus on one character, as calling the entire function would mess with other characters' $32F4 values.)  that oughta take care of any aborted Item usages from the character's previous turns.  as you said, you wouldn't be able to use $3A8C here, but i think that'll be alright, unless $32F4 somehow gets misleading garbage in it.
On the other hand, I may have no choice. And instead of looking at 3A8C or B1, I would check the item data directly, and if it's re-addable, re-add to inventory. I suspect I may need to make a duplicate of 54DC as well. :hmm:

Quote
still, there's the matter of if a character is killed while attempting to use Tonic, then they are revived, why should they have to wait til the end of battle to get that Tonic back into inventory?  it's not like the Tonic rolled meters away from them and they have to scour the ground for it.  obviously, the end-of-battle check serves as a catch-all, but there's no good reason that restoral shouldn't happen sooner/immediately.

at one point, i think Imzogelmo suggested cutting off all the ways a character can be taken out of commission (e.g. dying, being petrified, being Sneezed, etc, etc), and adding an item restoral call to each one.  if the character died before they can use an item, it's presumably still on their person, so the party shouldn't even have to wait for the character to be revived just so they can have access to the item -- rigor mortis aside.
All of this for one simple bug. :bah:

Oh well, planning begins.

1537
Game Modification Station / Re: FF6 - possible bug
« on: January 31, 2008, 05:17:27 PM »
Maybe it's just me, but there seems to be problems regarding when something updates (most of these bugs documented of course).
It appears this is one of those bugs.

Quote
The only thing I can think of is running some sort of trace to look for the item usage code.. or specifically command execution...
When you confirm to use the item, this code is run:

Code: [Select]
C2/4D89: DA           PHX
C2/4D8A: 5A           PHY
C2/4D8B: 9B           TXY
C2/4D8C: C9 17        CMP #$17   
C2/4D8E: D0 02        BNE $4D92   (Branch if not X-Magic)
C2/4D90: A9 02        LDA #$02    (Set command to Magic)

C2/4D92: C9 19        CMP #$19   
C2/4D94: D0 11        BNE $4DA7   (Branch if not Summon)
C2/4D96: 48           PHA
C2/4D97: EB           XBA
C2/4D98: C9 FF        CMP #$FF    (Check if no Esper equipped)
C2/4D9A: D0 03        BNE $4D9F
C2/4D9C: B9 44 33     LDA $3344,Y
C2/4D9F: EB           XBA
C2/4DA0: B9 18 30     LDA $3018,Y
C2/4DA3: 0C 2E 3F     TSB $3F2E   
C2/4DA6: 68           PLA

C2/4DA7: C9 01        CMP #$01
C2/4DA9: F0 04        BEQ $4DAF   (Branch if Item)
C2/4DAB: C9 08        CMP #$08
C2/4DAD: D0 05        BNE $4DB4   (Branch if not Throw)
C2/4DAF: EB           XBA
C2/4DB0: 99 F4 32     STA $32F4,Y (store as item to add back to inventory.  this can
                                   happen with:
                                   1) Equipment Magic that doesn't destroy the item
                                      [no items have this, but the game supports it]
                                   2) the item user's turn never happens.  perhaps the
                                      character who acted before them won the battle.)
C2/4DB3: EB           XBA

C2/4DB4: C9 0F        CMP #$0F
C2/4DB6: D0 23        BNE $4DDB   (Branch if not Slot)
C2/4DB8: 48           PHA         (save command #)
C2/4DB9: EB           XBA           (get our Slot index)
C2/4DBA: AA           TAX
C2/4DBB: BF 4A 4E C2  LDA $C24E4A,X   (get spell # used by this Slot combo)
C2/4DBF: E0 02        CPX #$02
C2/4DC1: B0 0F        BCS $4DD2       (branch if it's Bahamut or higher -- i.e. neither form
                                       of Joker Doom)
C2/4DC3: 48           PHA             (save spell #)
C2/4DC4: BF 52 4E C2  LDA $C24E52,X   (get Joker Doom targeting)
C2/4DC8: 95 B8        STA $B8,X       (if X is 0 [7-7-Bar], mark all party members in $B8
                                       if X is 1 [7-7-7], mark all enemies in $B9)
C2/4DCA: A5 B8        LDA $B8
C2/4DCC: 4D 40 3A     EOR $3A40     
C2/4DCF: 85 B8        STA $B8         (toggle whether characters acting as enemies are targeted.
                                       e.g. Shadow in Colosseum or Gau returning from Veldt leap)
C2/4DD1: 68           PLA             (restore spell #)
C2/4DD2: C9 FF        CMP #$FF
C2/4DD4: D0 03        BNE $4DD9   (branch if not Bar-Bar-Bar)
C2/4DD6: 20 DC 37     JSR $37DC   (Pick random esper)
C2/4DD9: EB           XBA
C2/4DDA: 68           PLA         (restore command #)

C2/4DDB: C9 13        CMP #$13
C2/4DDD: D0 0D        BNE $4DEC   (Branch if not Dance)
C2/4DDF: 48           PHA
C2/4DE0: EB           XBA
C2/4DE1: 99 E1 32     STA $32E1,Y
C2/4DE4: 8D 6F 3A     STA $3A6F
C2/4DE7: 20 9C 05     JSR $059C   (Pick dance and dance move)
C2/4DEA: EB           XBA
C2/4DEB: 68           PLA

C2/4DEC: C9 10        CMP #$10
C2/4DEE: D0 0A        BNE $4DFA   (Branch if not Rage)
C2/4DF0: 48           PHA
C2/4DF1: EB           XBA
C2/4DF2: 99 A8 33     STA $33A8,Y (Which rage is being used)
C2/4DF5: 20 D1 05     JSR $05D1   (Picks a Rage [when Muddled/Berserked/etc], and picks
                                   the Rage move)
C2/4DF8: EB           XBA
C2/4DF9: 68           PLA

C2/4DFA: C9 0A        CMP #$0A
C2/4DFC: D0 15        BNE $4E13   (Branch if not Blitz)
C2/4DFE: 48           PHA
C2/4DFF: EB           XBA
C2/4E00: 48           PHA
C2/4E01: 30 0D        BMI $4E10   (If no blitz selected)
C2/4E03: AA           TAX
C2/4E04: 20 57 1E     JSR $1E57
C2/4E07: 2C 28 1D     BIT $1D28
C2/4E0A: D0 04        BNE $4E10   (Branch if selected blitz is known)
C2/4E0C: A9 FF        LDA #$FF
C2/4E0E: 83 01        STA $01,S   (replace spell/attack # with null)
C2/4E10: 68           PLA
C2/4E11: EB           XBA
C2/4E12: 68           PLA

C2/4E13: A2 04        LDX #$04
C2/4E15: DF 3C 4E C2  CMP $C24E3C,X   (does our command match one that needs its
                                       spell # calculated?)
C2/4E19: D0 0B        BNE $4E26       (branch if not)
C2/4E1B: EB           XBA
C2/4E1C: 18           CLC
C2/4E1D: 7F 41 4E C2  ADC $C24E41,X   (add the first spell # for this command to our
                                       current index.  ex - for Pummel, Blitz #0, we'd
                                       end up with 55h.)
C2/4E21: 90 02        BCC $4E25       (branch if the spell # didn't overflow)
C2/4E23: A9 EE        LDA #$EE        (load Battle as spell #)
C2/4E25: EB           XBA             (put spell # in top of A, and look at command # again)
C2/4E26: CA           DEX
C2/4E27: 10 EC        BPL $4E15       (loop for all 5 commands)

C2/4E29: 48           PHA
C2/4E2A: 18           CLC             (clear Carry)
C2/4E2B: 20 17 52     JSR $5217       (X = A DIV 8, A = 2 ^ (A MOD 8) )
C2/4E2E: 3F 46 4E C2  AND $C24E46,X   (compare to bitfield of commands that need to retarget)
C2/4E32: F0 04        BEQ $4E38       (Branch if command doesn't need to retarget)
C2/4E34: 64 B8        STZ $B8   
C2/4E36: 64 B9        STZ $B9         (clear targets)
C2/4E38: 68           PLA
C2/4E39: 7A           PLY
C2/4E3A: FA           PLX
C2/4E3B: 60           RTS

When the item is used, this code is run:

Code: [Select]
Item
C2/1897: 9C 14 34     STZ $3414   (Set ignore damage modification)
C2/189A: A9 80        LDA #$80
C2/189C: 14 B3        TRB $B3     (Set Ignore Clear)
C2/189E: BB           TYX
C2/189F: A9 01        LDA #$01
C2/18A1: 8D 12 34     STA $3412
C2/18A4: AD 7D 3A     LDA $3A7D
C2/18A7: 20 C1 19     JSR $19C1
C2/18AA: A9 10        LDA #$10
C2/18AC: 14 B1        TRB $B1     (clear "don't deplete from Item inventory" flag)
C2/18AE: D0 05        BNE $18B5   (branch if it was set)
C2/18B0: A9 FF        LDA #$FF
C2/18B2: 9D F4 32     STA $32F4,X  (null item index to add to inventory.  this means
                                    the item will stay deducted from your inventory.)
C2/18B5: BD 18 30     LDA $3018,X
C2/18B8: 0C 8C 3A     TSB $3A8C      (set this character's "add item to inventory" bit)
C2/18BB: A5 B5        LDA $B5    (Command #)
C2/18BD: 90 24        BCC $18E3  (Carry is set (by the $19C1 call) for:
  - Skeans/Tools that don't use a spell
                                  - normal Item usage
                                  which means it isn't set for:
                                  - Equipment Magic or Skeans/Tools that do use a spell )
 
C2/18BF: C9 02        CMP #$02   (Carry will be set if Command >=2, which means it'll
                                  be set for Throw and Tools, but not plain Item --
                                  or apparently Item Magic, which also uses Command 1)

C2/18C1: AD 11 34     LDA $3411
C2/18C4: 20 37 2A     JSR $2A37
C2/18C7: AD AA 11     LDA $11AA
C2/18CA: 89 C2        BIT #$C2    (Check if Dead, Petrify or Zombie attack)
C2/18CC: D0 12        BNE $18E0   (if so, branch)
C2/18CE: C2 20        REP #$20    (Set 16-bit Accumulator)
C2/18D0: AD 74 3A     LDA $3A74
C2/18D3: 0D 42 3A     ORA $3A42
C2/18D6: 25 B8        AND $B8
C2/18D8: 85 B8        STA $B8
C2/18DA: E2 20        SEP #$20    (Set 8-bit Accumulator)
C2/18DC: A9 04        LDA #$04
C2/18DE: 14 B3        TRB $B3
C2/18E0: 4C 7B 31     JMP $317B

C2/18E3: C9 01        CMP #$01    (is command Item?)
C2/18E5: D0 07        BNE $18EE   
C2/18E7: E6 B5        INC $B5     (if so, bump it up to Magic, as we've reached this
                                   point thanks to Equipment Magic)
C2/18E9: AD 10 34     LDA $3410
C2/18EC: 85 B6        STA $B6
C2/18EE: 64 BD        STZ $BD
C2/18F0: 20 51 29     JSR $2951
C2/18F3: A9 02        LDA #$02
C2/18F5: 0C A3 11     TSB $11A3   (Set Not reflectable)
C2/18F8: A9 20        LDA #$20
C2/18FA: 0C A4 11     TSB $11A4   (Set unblockable)
C2/18FD: A9 08        LDA #$08
C2/18FF: 14 BA        TRB $BA     (Clear "can target dead/hidden targets")
C2/1901: 9C A5 11     STZ $11A5   (Set MP cost to 0)
C2/1904: 4C 7B 31     JMP $317B

My first attempt to fix it was at the item use, but that turned out to be less than successful.

1538
Gaming Discussion / Re: Movies of playthrus
« on: January 31, 2008, 02:46:37 PM »
This is something I meant to post yesterday. Question, has anybody ever experienced the following:





The game is stuck at that point, but that probably appears obvious. To show it in action, I've made a movie of how to do it. Requires Sonic & Knuckles attached to Sonic 2, and Gens+. This bug is also much more difficult to pull off with Sonic, so don't attempt it unless you have some patience. :tongue:

1539
Game Modification Station / Re: FF6 - possible bug
« on: January 31, 2008, 01:01:27 PM »
Ok, I found where the item is initially being adding to the reserve.

Code: [Select]
C2/4DA7: C9 01        CMP #$01
C2/4DA9: F0 04        BEQ $4DAF   (Branch if Item)
C2/4DAB: C9 08        CMP #$08
C2/4DAD: D0 05        BNE $4DB4   (Branch if not Throw)
C2/4DAF: EB           XBA
C2/4DB0: 99 F4 32     STA $32F4,Y (store as item to add back to inventory.  this can
                                   happen with:
                                   1) Equipment Magic that doesn't destroy the item
                                      [no items have this, but the game supports it]
                                   2) the item user's turn never happens.  perhaps the
                                      character who acted before them won the battle.)
C2/4DB3: EB           XBA

Simply adding a hook there wouldn't work though. As Kejar pointed it out to me last night, it'd make all items bottomless. $3A8C isn't tweaked until the item is actually used though. It seems like this is where it needs to be done, but I'm currently unsure as to how. Any ideas?

1540
Game Modification Station / Re: FF6 - possible bug
« on: January 31, 2008, 01:57:05 AM »
Ok, my attempt to fix the bug instead caused it to occur more frequently (maybe even 100%, I dunno, what's 1/1?) :tongue: This is where I tried to put it:

Code: [Select]
Item
C2/1897: 9C 14 34     STZ $3414   (Set ignore damage modification)
C2/189A: A9 80        LDA #$80
C2/189C: 14 B3        TRB $B3     (Set Ignore Clear)
C2/189E: BB           TYX
C2/189F: A9 01        LDA #$01
C2/18A1: 8D 12 34     STA $3412
C2/18A4: AD 7D 3A     LDA $3A7D
C2/18A7: 20 C1 19     JSR $19C1
C2/18AA: A9 10        LDA #$10
C2/18AC: 14 B1        TRB $B1     (clear "don't deplete from Item inventory" flag)
C2/18AE: D0 05        BNE $18B5   (branch if it was set)
C2/18B0: A9 FF        LDA #$FF
C2/18B2: 9D F4 32     STA $32F4,X  (null item index to add to inventory.  this means
                                    the item will stay deducted from your inventory.)
C2/18B5: BD 18 30     LDA $3018,X
C2/18B8: 0C 8C 3A     TSB $3A8C      (set this character's "add item to inventory" bit)

My hook was at C2/18B5, and C2/18B8 was NOP'ed out and included in the hook. After that, I saved the indexes and processor, then called $62C7.

*currently out of ideas*

1541
General Discussion / Re: The official "Happy Birthday" thread!
« on: January 31, 2008, 12:08:48 AM »
Leno, you're old.
Fix'ed. :wink:

Quote
Happy Bday to you and the others I missed.
Uh... Happy birthday
:cycle:

1542
Game Modification Station / Re: Temporal Flux 2.75 Release.
« on: January 30, 2008, 11:18:07 PM »
Still no monster, item, and character editor?
Apparently he doesn't think too highly of those. :sad: They are too simple to not add, so I see no reason or excuse as to why they aren't there yet.

1543
General Discussion / Re: Minnesota + trading = bad
« on: January 30, 2008, 12:17:46 PM »
:laugh: Oh man. I don't know how to respond to that.

1544
General Discussion / Re: The official "Happy Birthday" thread!
« on: January 30, 2008, 12:10:15 PM »
Thanks. :cycle:

1545
General Discussion / Re: Minnesota + trading = bad
« on: January 30, 2008, 03:00:42 AM »
Boston thanks Minnesota for David Ortiz too.  :happy:
Ugh, I didn't need to be reminded of that again. :sad:

Quote
A wild cap?
Our hockey team. The northwest division is so tightly packed, the analysts are predicting 4 of the 5 teams to make it into the playoffs this year. That's insane. :tongue: