News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: FF1 Dynamic Action Patch Re-Jiggered  (Read 8551 times)

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #40 on: September 02, 2019, 06:12:58 pm »
Awesome. Anything else you have in mind or are you going to submit the patches at this point?

Jiggers

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #41 on: September 04, 2019, 04:02:02 am »
Mostly waiting for a day where I feel energized enough to make the addendum patch on the original, and re-write bits of the readme to explain that it needs to be patched on top of that one, then re-figure out how all the other submission rules work...

But meanwhile, has anyone tried to use an item that casts a spell on the character using it? Like, the White T shirt does RUSE, I think? I'd like to confirm that the message says its casting on the character and not an enemy.
I know exactly what I'm doing. I just don't know what effect it's going to have.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #42 on: September 22, 2019, 11:23:52 pm »
I'm going through the game yet again and will tell you when I get the white shirt.

Speaking of spell items, something that has annoyed me absolutely forever: the fact that the color of the spell effect when using an item is always the color of the last spell that character had cast. Would it take much asm to have each spell item create an effect of the equivalent color if you had cast that spell? I know what they all do after what... 50+ playthroughs (I have a problem, don't I?) But I imagine this has to be annoying for a new player, trying to figure out what element an attack spell is when the colors are constantly changing. Definitely seems more like a bug than a legitimate design choice to me.

Jiggers

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #43 on: September 22, 2019, 11:55:09 pm »
I also noticed there's no code to set the colour of an enemy's confusion attack. It will use the colour of the last spell/weapon used.

I can look into making a stand-alone patch for both things...

Gosh I hope I don't get carried away again. I kinda want to make it display the name of the spell the weapon/armour item is casting, too...



So--I'm not gonna make a bunch of patches for things... but I like pointing out ways to do things, so I did this.

In the disassembly, Bank C, look for "BattleSubMenu_Item:", and at the end...

Code: [Select]
  @GetSpellCast:
    STA $88                     ; store pointer to wep/armor data in $88,89
    STX $89
    LDY #$03                    ; Y=3 to index, since byte 3 in both wep/armor data is the "spell cast" entry
    LDA ($88), Y                ; get spell cast
   
    TAX                             ; put it in X
    DEX                             ; DEX to make it 0-based (FF becomes "no spell")
;    LDY btlcmd_curchar              ; Y=cur char -- default to targetting yourself

    JSR SetItemCastSpellPalette     ; <-- insert this in place of LDY btlcm_curchar
    LDA #$10
    JMP SetCharacterBattleCommand

And then, somewhere that fits...

Code: [Select]
   
SetItemCastSpellPalette:
    TXA                             ; bring spell ID back from X
    PHA                             ; back it up
    JSR GetPointerToMagicData
    STA $80                         ; $80,81 points to this spell's data
    STX $81
   
    LDY #$06                        ; 06 = spell's palette
    LDA ($80), Y                    ; get the palette and put it in X
    TAX
   
    LDA btlcmd_curchar              ; get current character to act
    ASL A                           ; double the ID and put in Y
    TAY
    TXA                             ; bring the spell palette from X
    STA btlcmd_magicgfx+1, Y        ; save it here--when walking forward, the variable palette will be updated to this
    PLA                             ; bring back the spell ID
    TAX                             ; put it in X
    LDY btlcm_curchar               ; Y=cur char -- default to targetting yourself
    RTS
   
This is like... 29 bytes. Its hard to find that much uninterrupted space when you want to use other patches alongside... FF Restored seems really popular. Wish I had time to disassemble that so I could make all kinds of battle system changes that support that patch. Then just shove code around willy-nilly and re-assemble Bank C. %50 of the time I end up with more free space to keep playing around with, too!
« Last Edit: September 23, 2019, 01:09:17 am by Jiggers »
I know exactly what I'm doing. I just don't know what effect it's going to have.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #44 on: September 24, 2019, 04:55:17 pm »
Thanks for looking at this! Would be so cool to plug it in to Restored but certainly not worth a separate disassembly. As far as why Restored is so popular, it has a lot of little aesthetic touches here and there but the reason I at least pretty much play it exclusively is for the bug fixes. I'm the type that wants something close to the original game, doesn't need a lot of modern conveniences, and just wants everything to work the way it's supposed to work. Restored scratches that itch, but it would be nice to at one point down the road have a bug fix compilation that's separate from Restored so that other projects can enjoy the benefit of a fully working game while going their own direction with other various elements. That being said, Restored has sort of functioned as that base but I can see purists rejecting some of the things it did.