øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=324.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index8092.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.360e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index8092.html.zx‘(h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ °V7*OKtext/htmlISO-8859-1gzip0|Ö7*ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 00:10:17 GMT0ó°° ®0®P®€§²ð®�(h^ÿÿÿÿÿÿÿÿŸ.7* FF6 misc ramblings

Author Topic: FF6 misc ramblings  (Read 13317 times)

Gil Galad

  • Siren
  • *
  • Posts: 80
    • View Profile
Re: FF6 misc ramblings
« Reply #15 on: March 10, 2008, 01:49:49 PM »
Thanks a lot for the answer.

Question for ya. Would you also NOP out C2/18F8: A9 20        LDA #$20 ?

Since you're loading A again as follows, right after the new NOP code.

C2/18FD: A9 08        LDA #$08

Ok, I'm going to try this out and see how it works.

EDIT:  Awesome, I just NOPed out the code that you had stated and now the spells casts from items can be reflected and also blockable. But now the high damage factor needs to be resolved. I'm reading the code again, right now.




« Last Edit: March 10, 2008, 02:02:23 PM by Gil Galad »

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: FF6 misc ramblings
« Reply #16 on: March 10, 2008, 02:17:13 PM »
Question for ya. Would you also NOP out C2/18F8: A9 20        LDA #$20 ?

Since you're loading A again as follows, right after the new NOP code.

C2/18FD: A9 08        LDA #$08
You can, but it isn't necessary.

Quote
EDIT:  Awesome, I just NOPed out the code that you had stated and now the spells casts from items can be reflected and also blockable. But now the high damage factor needs to be resolved. I'm reading the code again, right now.
I'm not sure where the power is coming from, but based on previous experience, the power is put into $11A6. It doesn't look like it's set here, unfortunately. However, it is entirely possible that it isn't using that variable for this function.

119 bugs fixed and counting.

Gil Galad

  • Siren
  • *
  • Posts: 80
    • View Profile
Re: FF6 misc ramblings
« Reply #17 on: March 10, 2008, 02:57:52 PM »
I'm not sure where the power is coming from, but based on previous experience, the power is put into $11A6. It doesn't look like it's set here, unfortunately. However, it is entirely possible that it isn't using that variable for this function.

I think that the following code has something to do with the damage modifier.  The first thing that I had done was NOP'd out the call to C2/2951.  I had varible damage results.

C2/2951: AD A2 11     LDA $11A2
C2/2954: 4A           LSR
C2/2955: BD 41 3B     LDA $3B41,X      (magic power * 1.5)
C2/2958: 90 03        BCC $295D        (Branch if not physical attack)
C2/295A: BD 2C 3B     LDA $3B2C,X      (vigor * 2)
C2/295D: 8D AE 11     STA $11AE
C2/2960: 9C 89 3A     STZ $3A89        (turn off random weapon spellcast)
C2/2963: 4C 21 2C     JMP $2C21

I would like to know how I would find out the contents of $3B41, X and what the contents of  X would be at the time this code is executed.

C2/2955: BD 41 3B     LDA $3B41,X      (magic power * 1.5)

Is this taken from RAM or ROM?








Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: FF6 misc ramblings
« Reply #18 on: March 10, 2008, 03:10:34 PM »
Ram. The nice thing about the indexes (and the battle engine in particular), is that they often hold attacker and target index. However, they get swapped back and forth so often it's hard to say which is which without digging into it. Based on the comments, X at that point will hold attacker index (0, 2, 4, and 6 for characters in slots 1, 2, 3, and 4 respectively, 8, A, C, E, 10, and 12 for monsters in slots 1, 2, 3, 4, 5, and 6 respectively).

To find out what's in what, I think you can just look at the monster data (FF3usME helps here), and look at the magic stat for the appropriate monster. Though if it's x1.5, it'll be slightly higher.

119 bugs fixed and counting.

Gil Galad

  • Siren
  • *
  • Posts: 80
    • View Profile
Re: FF6 misc ramblings
« Reply #19 on: March 10, 2008, 03:34:08 PM »
Magic stat is what? Mag Power or Magic Defense.  Right now I'm messing with enemy #137 which is the Harpiai.

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: FF6 misc ramblings
« Reply #20 on: March 10, 2008, 03:48:11 PM »
Magic power. Magic defense gets stored to....$3BB9,X/Y if I'm reading this right.

Code: [Select]
C2/2CA2: AA           TAX            (X = enemy # * 4 * 8.  Monster data block at $CF0000
                                      is 32 bytes)

C2/2CA3: BF 05 00 CF  LDA $CF0005,X (bottom = Defense, top = Magic Defense)
C2/2CA7: 99 B8 3B     STA $3BB8,Y
C2/2CAA: BF 0C 00 CF  LDA $CF000C,X (XP)
C2/2CAE: 99 84 3D     STA $3D84,Y
C2/2CB1: BF 0E 00 CF  LDA $CF000E,X (GP)
C2/2CB5: 99 98 3D     STA $3D98,Y
C2/2CB8: AD 46 3A     LDA $3A46
C2/2CBB: 30 27        BMI $2CE4     (branch if there was an enemy formation # switch, and
                                     it designates that the new enemies retain HP and Max HP
                                     from the current formation.)
C2/2CBD: BF 0A 00 CF  LDA $CF000A,X (MP)
C2/2CC1: 99 08 3C     STA $3C08,Y
C2/2CC4: 99 30 3C     STA $3C30,Y
C2/2CC7: BF 08 00 CF  LDA $CF0008,X (HP)
C2/2CCB: 99 F4 3B     STA $3BF4,Y
C2/2CCE: 99 1C 3C     STA $3C1C,Y
C2/2CD1: AD D4 3E     LDA $3ED4   (Battle formation)
C2/2CD4: C9 CF 01     CMP #$01CF 
C2/2CD7: D0 0B        BNE $2CE4   (Branch if not Doom Gaze's formation)
C2/2CD9: 8C FA 33     STY $33FA
C2/2CDC: AD BE 3E     LDA $3EBE   (Doom Gaze's HP)
C2/2CDF: F0 03        BEQ $2CE4
C2/2CE1: 99 F4 3B     STA $3BF4,Y (Set current HP to Doom Gaze's HP)
C2/2CE4: E2 21        SEP #$21    (Set 8-bit Accumulator, carry)
C2/2CE6: B9 1D 3C     LDA $3C1D,Y (High byte of max HP)
C2/2CE9: 4A           LSR         
C2/2CEA: C9 19        CMP #$19   
C2/2CEC: 90 02        BCC $2CF0   
C2/2CEE: A9 17        LDA #$17       (Stamina = (Max HP / 512) + 16. If this number
                                      is greater than 40, then the monster's stamina is
                                      set to 40)
C2/2CF0: 69 10        ADC #$10             
C2/2CF2: 99 40 3B     STA $3B40,Y    (Stamina)
C2/2CF5: BF 01 00 CF  LDA $CF0001,X
C2/2CF9: 99 68 3B     STA $3B68,Y    (Battle Power)
C2/2CFC: BF 1A 00 CF  LDA $CF001A,X
C2/2D00: 99 A8 3C     STA $3CA8,Y    (Monster's regular weapon graphic)
C2/2D03: BF 03 00 CF  LDA $CF0003,X  (Evade)
C2/2D07: 20 61 28     JSR $2861
C2/2D0A: 99 54 3B     STA $3B54,Y    (255 - Evade * 2 + 1)
C2/2D0D: BF 04 00 CF  LDA $CF0004,X  (MBlock)
C2/2D11: 20 61 28     JSR $2861
C2/2D14: 99 55 3B     STA $3B55,Y    (255 - MBlock * 2 + 1)
C2/2D17: BF 02 00 CF  LDA $CF0002,X
C2/2D1B: 99 7C 3B     STA $3B7C,Y    (Hit Rate)
C2/2D1E: BF 10 00 CF  LDA $CF0010,X
C2/2D22: 99 18 3B     STA $3B18,Y    (Level)
C2/2D25: BF 00 00 CF  LDA $CF0000,X
C2/2D29: 99 19 3B     STA $3B19,Y    (Speed)
C2/2D2C: BF 07 00 CF  LDA $CF0007,X  (Magic Power)
C2/2D30: 20 D6 47     JSR $47D6      (* 1.5)
C2/2D33: 99 41 3B     STA $3B41,Y    (Magic Power)
C2/2D36: BF 1E 00 CF  LDA $CF001E,X  (monster status byte 4?)
C2/2D3A: 29 82        AND #$82       (only keep float and enemy runic?)
C2/2D3C: 19 4C 3E     ORA $3E4C,Y
C2/2D3F: 99 4C 3E     STA $3E4C,Y    (turn them on in Retort/Runic/etc byte)
C2/2D42: BF 13 00 CF  LDA $CF0013,X
C2/2D46: 99 80 3C     STA $3C80,Y    (Special Byte 2)
C2/2D49: 20 C1 2D     JSR $2DC1      (load enemy elemental reactions, statuses and
                                      status protection, metamorph info, special info
                                      like human/undead/etc)
C2/2D4C: BE A8 33     LDX $33A8,Y
C2/2D4F: BF C0 37 CF  LDA $CF37C0,X  (get Enemy Special Move graphic) 
C2/2D53: 99 81 3C     STA $3C81,Y   
C2/2D56: E2 10        SEP #$10
C2/2D58: 20 99 2D     JSR $2D99
C2/2D5B: 7B           TDC
C2/2D5C: 6A           ROR
C2/2D5D: 04 B1        TSB $B1
C2/2D5F: 20 5A 4B     JSR $4B5A
C2/2D62: 29 07        AND #$07
C2/2D64: 18           CLC
C2/2D65: 69 38        ADC #$38
C2/2D67: 99 2C 3B     STA $3B2C,Y
C2/2D6A: BB           TYX
C2/2D6B: 20 50 26     JSR $2650   (deal with Instant Death protection, and Poison elemental
                                   nullification giving immunity to Poison status)
C2/2D6E: 28           PLP
C2/2D6F: FA           PLX
C2/2D70: 60           RTS

119 bugs fixed and counting.

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: FF6 misc ramblings
« Reply #21 on: March 10, 2008, 10:16:00 PM »
the instruction at C2/1897 is what enables "Ignore Damage Modification", which causes target (Magic) Defense and random variance to be skipped in the damage calculation.  you can't get rid of the instruction entirely, because it'll screw up plain Items too -- e.g. Tonic will no longer do the guaranteed 50 healing.  instead, you only want it to be executed conditionally.

it's sort of messy to handle.  as the comments indicate, 4 different types of attacks use the function: normal Items, Item magic, Tools, and Skeans (the last two enter at C2/189E rather than the top).  my best stab at it is to zap the "STZ $3414" at the start of the function, then add this code after the C2/18BF instruction:

Code: [Select]
BCS tool_or_skean  (branch if command # >=2.  iow, it's not 1.)
STZ $3414          (it's a plain Item, so Set ignore damage modification)
tool_or_skean:

of course, you'll need to find some free ROM space  (unless you come up with a way to shave 2 bytes from this function), and you'll need to shift around code and adjust at least one branch.  that is, if you go with this approach of moderating damage.

EDIT: i typoed.  C2/189F corrected to C2/18BF.
« Last Edit: March 11, 2008, 12:36:13 AM by assassin »

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: FF6 misc ramblings
« Reply #22 on: March 10, 2008, 10:23:08 PM »
Ahhh, crap. I forgot about the normal items. :blush: That's what I get for not realizing the full potential of a change. :sad:

119 bugs fixed and counting.

Gil Galad

  • Siren
  • *
  • Posts: 80
    • View Profile
Re: FF6 misc ramblings
« Reply #23 on: March 11, 2008, 08:01:27 AM »
Ok, going back to an earlier subjec for a moment.  I finally started messing with enabling and disabling Espers for certain characters. Celes' was a bit trickier since she has the Magic command. I simply used another piece of code and added it to my free space from looking at the C3 bank disassembly.

Code: [Select]
C3/F091: B90000  LDA $0000,Y    (load character index)
C3/F094: F011         BEQ $F0A8      (branch if character is Terra)
C3/F096: C907    CMP #$07       (is character Strago?)
C3/F098: F00D    BEQ $F0A8      (branch if so)
C3/F09A: C908    CMP #$08       (is character Relm?)
C3/F09C: F009    BEQ $F0A8      (branch if so)
C3/F09E: C90A    CMP #$0A       (is character Mog?)
C3/F0A0: F006    BEQ $F0A8      (branch if so)
C3/F0A2: C906            CMP #$06       <is character Celes?)
C3/F0A4: F004            BEQ $F0AA      <branch if so>
C3/F0A6: 38      SEC            (mark esper to keep disabled)
C3/F0A7: 60      RTS
C3/F0A8: 18      CLC            (mark esper to be enabled)
C3/F0A9: 60      RTS
C3/F0AA: A924    LDA #$24
C3/F0AC: A600    LDX $00
C3/F0AE: 9579    STA $79,X
C3/F0B0: E8      INX
C3/F0B1: E00700  CPX #$0007
C3/F0B4: D0F8    BNE $F0AA      (disable all commands for that character)
C3/F0B5: 60              RTS

(I'm tired of trying to get the formatting to look right for the code)

EDIT:  The downside to this is that I can't look at my Magic list for the character Celes. I will work on that later perhaps.  I'm going back to working on the items.

EDIT AGAIN: I decided to fix it right now.  Write #$24 to $79 and that fixes the problem.

As far as the item damage ignore problem, it is indeed messy. I haven't been able to figure this problem out without this effecting others like Tools and even Blitzes, so far.
« Last Edit: March 11, 2008, 02:48:17 PM by Gil Galad »

Gil Galad

  • Siren
  • *
  • Posts: 80
    • View Profile
Re: FF6 misc ramblings
« Reply #24 on: March 13, 2008, 09:51:54 PM »
Thanks a lot you guys for helping me out, everything seems to be working well with the item spell usage hack and specific Esper usage hack.

Now for a little bit of dry humor. 


Odbarc

  • Hell's Rider
  • *
  • Posts: 424
  • Gender: Male
  • FF6 obsessed
    • View Profile
    • Newage3.com, a text based web game RPG I Admin.
Re: FF6 misc ramblings
« Reply #25 on: March 23, 2008, 02:03:32 PM »
Quote
Ok, you'll need this. Drakkhen's page appeared to be down at the time, so I'll link it directly for now. Open it up, and click on the 14-byte button. Scroll down to W Wind. To use Aero's animation, make the following changes:

Gasp... a new program that lets me change things!
Is there a guide of any kind to help me figure out what I'm changing things to or must I test and figure it out for myself (which I'm willing to do.)

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: FF6 misc ramblings
« Reply #26 on: March 23, 2008, 02:13:34 PM »
That entirely depends on what you want to change. Given that you haven't stated what it is you are looking for, I can't give you any better of an answer. :tongue:

119 bugs fixed and counting.

Odbarc

  • Hell's Rider
  • *
  • Posts: 424
  • Gender: Male
  • FF6 obsessed
    • View Profile
    • Newage3.com, a text based web game RPG I Admin.
Re: FF6 misc ramblings
« Reply #27 on: March 23, 2008, 02:20:20 PM »
Me?
Well, the program is basically divided into 3 major columns. Animation 1, Animation 2, Animation 3, using hex code to alter what the spell (should) look like, right?
If for example it was 01 01 01, and I changed it to 01 01 02, how big of a difference would there be?
I'm not going to start trying it out just yet as I may need to go somewhere soon (:bah:) but I'm just curious on what to expect?

I mean, is it basically 'animation/color/movement' or something or would I need to figure out specific hex combinations to get specific looks changed?

Odbarc

  • Hell's Rider
  • *
  • Posts: 424
  • Gender: Male
  • FF6 obsessed
    • View Profile
    • Newage3.com, a text based web game RPG I Admin.
Re: FF6 misc ramblings
« Reply #28 on: March 23, 2008, 08:02:38 PM »
On the plus side, it's pretty easy to just copy existing formulas for spells that already work nicely and just copy them over other spells I don't like. ^_^

Gil Galad

  • Siren
  • *
  • Posts: 80
    • View Profile
Re: FF6 misc ramblings
« Reply #29 on: March 23, 2008, 08:31:38 PM »
On the plus side, it's pretty easy to just copy existing formulas for spells that already work nicely and just copy them over other spells I don't like. ^_^

Yeah, copying and pasting is about the safest way for spell animations. I haven't really delved into creating a new one yet myself. But from experience so far, mostly you'll be sacrificing one thing for another in the game when hacking.

Good luck with your hack.

« Last Edit: March 23, 2008, 08:39:12 PM by Gil Galad »