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

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

daman.tm

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #20 on: August 23, 2019, 02:44:17 pm »
I can sadly confirm this patch does not work well with Final Fantasy Restored. Got ambushed by 4 goblins and my character's turns never came up, shut the game off after the goblin's 30th attack in a row.

Or maybe a bug in general? If I find some time I'll try and get ambushed by a bunch of goblins on a clean rom with the rejiggered patch

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #21 on: August 24, 2019, 02:40:31 am »
I set up an ambush in my hack alone and didn't run into that bug.

I got IPS Peek and FF Restored to check if there's any overlapping changes. There are some.



The two big blocks are dealing with poison and regeneration. I don't know what Restored is doing with it. In my hack all the EAs are there to remove the code that loops through enemies, so that it only performs the regen/poison on one entity.

Above that might be the problem. It's just a one-byte change, but...

In mine:
LDA #$00
STA btl_strikingfirst

If FF Restored is overwriting just that one byte? It's not setting btl_strikingfirst to 0 after a round, but some other variable - one of the characters' battle stats.

It also changes 000323FF to $82 from $D0. That's part of the "try to run from battle" routine, I don't know what that might mess up.

What order did you patch it in? Like I said before, I don't really know what happens when you put two patches together, but if you put Restored first, then this one, maybe this one will overwrite the changes Restored does? However, even if it does, the poison/regeneration stuff will be messed up, because then my hack will just be scribbling all over the much larger edits Restored did to those routines.

I'd suggest making two patched roms then:
On one rom, patch Restored on first, then this hack.
On the second rom, patch just this hack.

Then edit them both in a hex editor. In the second rom, copy everything from 000321E8 to 00032340 and paste it over that area in the first rom.

That should fix the striking first flag not being set to 0, as well as making sure poison/regen doesn't go wonky.

And then make sure 000323FF is set to $D0 maybe.

Actually, that $82 is important, but its shifted over 5 bytes. 00032404 should be $82 instead of $80, to fix the running bug--

Quote
    ; The problem is... the game is BUGGED and reads the wrong value for the level.. it ends up reading
    ;  the ailment byte for 2 players after this one (for top 2 slots) or other garbage memory for the
    ;  bottom 2 players.

Hope that's not too confusing to try!
I know exactly what I'm doing. I just don't know what effect it's going to have.

Cyneprepou4uk

  • Full Member
  • ***
  • Posts: 161
  • Самый лысый ромхакер
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #22 on: August 24, 2019, 04:56:05 am »
You could just ask him for a hash of his rom and some save files
I am the baldest romhacker
NES Romhacking Guide

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #23 on: August 24, 2019, 02:13:25 pm »
Seeing as my last post might be too confusing... I tried doing what I was talking about in it.

https://drive.google.com/open?id=1-g3-sAyVGUrX_LIlaEGs8jM6jYjtEvYl - FF Restored + Dynamic Action ReJiggered

https://drive.google.com/open?id=1z424ihlDf-L71bOFQWpu2uew99pkkgLw - FF Restored + Dynamic Action ReJiggered, with Extra Enemy Regeneration

It turns out patching order is important! Doing the Action patch then Restored overwrites some bytes the Action patch needs.

Reading Restored's Read-Me file, it seems the other edits that overlap with the Action patch are just to make poison work on enemies. But without further patching to make spells actually afflict poison ailments on enemies, this seems pointless...?

I did some quick testing - not with poisoned or regenerative enemies, or poisoned players! - and got into a battle where the goblins had first turn. After all 3 took their turns, I was allowed to act. So I'm thinking its fixed!
I know exactly what I'm doing. I just don't know what effect it's going to have.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 281
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #24 on: August 24, 2019, 07:33:09 pm »
This patch has really reignited my FF1 love. I'm using the restored version which was applied before the rejiggered patch and I've had no problems at all.

Forgive me if this is off topic, but I've been fixing the last couple tiny things that bother me with the game and there's one thing I wanted to ask help with since there's a few of technical wizards on this thread. Does anyone know which data in the rom controls the accuracy growth rate for the thief / ninja? Boosting his growth rate from 2 to 3 per level would do a much better job balancing him out for me.
« Last Edit: August 24, 2019, 07:51:25 pm by Chicken Knife »

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #25 on: August 24, 2019, 07:44:20 pm »
Quoting the disassembly...

Quote
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;  lut - Hit rate bonus for each class (assigned at level up)  [$9DDC :: 0x2DDEC]

lut_LvlUpHitRateBonus:
  .BYTE  3,  2,  3,  2,  1,  1,   3,  2,  3,  2,  1,  1
  ;     FT  TH  BB  RM  WM  BM   KN  NJ  MA  RW  WW  BW

Looks like it'd be 0x02DDED!
I know exactly what I'm doing. I just don't know what effect it's going to have.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 281
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #26 on: August 24, 2019, 07:57:30 pm »
Quoting the disassembly...

Looks like it'd be 0x02DDED!
Perfect! I also incremented 0x02DDF4 for Ninja.

Most people's selling point for the thief/ninja is the run boost but I'm not much of a runner and really struggle with how low his attack output is. Now he should be lower than the fighter/knight due to his strength but he'll finally have some kind of edge on the red mage!

Thank you!

redmagejoe

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #27 on: August 24, 2019, 09:58:18 pm »
I'm fairly certain I'm using Restored with Rejigger applied as my last patch, and other than the bug I reported earlier, I'm not encountering any issues...

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 281
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #28 on: August 25, 2019, 09:18:12 am »
Ok. I've had a major bug turn up. I took on Astos at a pretty low level and got a total party wipe. When that happened, it played the victory music as if I won and then returned me to the castle of Astos. I could walk around as well as view the status screen where it showed all my characters dead. I then walked out, a battle started, and the game froze.

Now I feel quite foolish for doing several sprite and stat modification tweaks on top of this restored / rejiggered rom instead of doing them separately. :P Back to the drawing board!

**EDIT

Ok, redoing those hacks wasn't bad at all. One more thing I'll say is: it's amazing how much *less* I'm enjoying the game with the old round based battle structure. Getting ineffectives isn't the issue at all tbh. I'm able to predict damage output and remaining enemy HP well enough that I almost never get them. It just feels far less elegant. I really do hope someone can eventually rework FF3 to have this same style of combat. It's such a marvelous game and it simply deserves it. Someone made the comment above that it's unneeded because the game doesn't allow ineffective attacks but removing those is only a small part of the improvement here. The change in mechanics simply makes the game feel far more modern and enjoyable and that would apply every bit as much to FF3. I suppose the same could be said about FF2, but until someone actually fixes the whole progression system in that game I'll continue to pretend it doesn't exist.  :laugh:
« Last Edit: August 25, 2019, 11:24:19 pm by Chicken Knife »

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #29 on: August 25, 2019, 04:05:12 pm »
Oh, yeah, that bug got fixed. I just found out about another bug when using level 5-8 spells (or even viewing the second spell box and pressing B) that will crash the game. I will try to get a fix out soon and update the links on the first post again.
I know exactly what I'm doing. I just don't know what effect it's going to have.

Disch

  • Hero Member
  • *****
  • Posts: 2717
  • NES Junkie
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #30 on: August 25, 2019, 04:25:59 pm »
Jiggers:

That bug is in the dynamic action patch.  I found a fix for it a while back:

http://www.romhacking.net/forum/index.php?topic=22591.0

redmagejoe

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #31 on: August 25, 2019, 10:00:10 pm »
Keep us posted Jigger. I've made a few changes to my version of Final Fantasy Restored in FFHackster (like reverting the peninsula of power removal and the 4000 Mythril Sword to 1500 Long Sword in the ElfLand shop), so I'd rather not have to repatch, but I might. If you have a version that you think makes Final Fantasy Restored and your patch play nicely without bugs, I hope you'll add that alongside your standalone patch in the first post! :thumbsup:

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #32 on: August 27, 2019, 03:36:56 am »
Jiggers:

That bug is in the dynamic action patch.  I found a fix for it a while back:

http://www.romhacking.net/forum/index.php?topic=22591.0

XD The very thread that alerted me to the bug's continued existence. Actually squashed it for someone else's hack and forgot to do it in this one 'til now. Wish I saw that thread then, would have saved me an afternoon.

Keep us posted Jigger. I've made a few changes to my version of Final Fantasy Restored in FFHackster (like reverting the peninsula of power removal and the 4000 Mythril Sword to 1500 Long Sword in the ElfLand shop), so I'd rather not have to repatch, but I might. If you have a version that you think makes Final Fantasy Restored and your patch play nicely without bugs, I hope you'll add that alongside your standalone patch in the first post! :thumbsup:

Yep, it is done. The link is a folder with all the patches and the edited .asm files I used to make it.

https://drive.google.com/open?id=14CImXsgmcxyqwl87ClSNJOZITlQxKxdQ - here it is again!

If you don't want to re-patch, you can just apply the Dynamic Action ReJiggered one to your edited rom and a second, fresh original FF rom, then use a hex editor to copy 000321E8 to 00032340 from the fresh rom to your edited rom, and then finally set 00032404 to $82 instead of $80. Heck if you bother with all that, you might as well not apply the new patch over your edited rom and just copy 00031418 to 000314DE from a fresh patched rom to your edited rom! In fact, why bother patching a fresh rom; just put this in at that address.

Code: [Select]
0C C9 5A 90 10 A9 22 CE AE 6B 4C 1A 94 A9 23 EE AE 6B 20 07 AA 4C 51 94 48 AD AE 6B C9 01 F0 1D 20 A4 BB 20 0C 98 A0 1C A9 00 8D 8C 6C 99 8E 68 88 D0 FA 68 48 4C 78 94 A9 02 20 0F F2 68 85 88 0A 0A A8 A9 00 8D F8 6A 60 20 69 A1 20 3B 93 4C 51 94 F0 10 48 AD 7A 6B 20 EB B5 A0 01 B1 92 29 40 D0 02 68 60 A9 03 20 F2 B0 68 68 68 4C AE 94 8D 7A 6B AD 7A 6B 20 45 A1 A0 01 B1 82 29 33 F0 19 29 03 48 AD 7A 6B 0A 0A A8 68 99 8F 68 4C 45 94 EA EA EA EA EA EA EA EA EA 20 12 F2 20 15 F2 AD 7A 6B 20 01 9E 20 2C 9A C9 02 F0 F9 AD AA 6A 29 01 F0 0B AD 7A 6B 09 80 A8 A9 20 4C 5D 93 AD AB 6A 29 03 0A 20 5A 94
But if you HAVEN'T used the links from a few posts ago already, enemy regeneration/player poison may behave unexpectedly, so definitely go the long way with it, or use the merged patches in the folder.
I know exactly what I'm doing. I just don't know what effect it's going to have.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 281
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #33 on: August 28, 2019, 02:05:04 pm »
Thanks for doing this! It's working great so far.

FYI, do you think it's possible to make your rejiggered patch that works with restored to be actually separate from the restored patch itself so it works more like an addendum to restored? Having your dynamic action code mixed together with a vanilla version of the restored patch alters a lot of minor things when put on top of a customized restored rom. Keep in mind that restored itself comes with lots of optional patches that become undone by your patch.
« Last Edit: August 28, 2019, 02:55:55 pm by Chicken Knife »

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #34 on: August 28, 2019, 02:56:17 pm »
I don't know... I'm getting pretty worn out now, for one... You're welcome, though! :D

What minor things are changed? And what do you mean by a customized restored rom? I don't think any of the optional patches in Restored's Settings folder conflict with the bits I changed...

All I know about is that enemies won't be hurt by poison. Which is something I can't undo because of the way patches work, I think. All I did was remove the part of the code that loops through enemies, leaving the original regeneration intact. If the bytes aren't changed, it won't overwrite the changes Restored does to the enemy regeneration/poison code, leaving it just a mess that might crash the game. So my combined patch pulls that part of Restored out.

Sorry if I just make things more confusing!

I know exactly what I'm doing. I just don't know what effect it's going to have.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 281
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #35 on: August 28, 2019, 05:49:23 pm »
I don't know... I'm getting pretty worn out now, for one... You're welcome, though! :D

What minor things are changed? And what do you mean by a customized restored rom? I don't think any of the optional patches in Restored's Settings folder conflict with the bits I changed...

All I know about is that enemies won't be hurt by poison. Which is something I can't undo because of the way patches work, I think. All I did was remove the part of the code that loops through enemies, leaving the original regeneration intact. If the bytes aren't changed, it won't overwrite the changes Restored does to the enemy regeneration/poison code, leaving it just a mess that might crash the game. So my combined patch pulls that part of Restored out.

Sorry if I just make things more confusing!
Ok, so from your link I downloaded the patch FF1 Restored - Rejiggered. I assumed that all that patch would do is apply the dynamic action on top of my customized restored file. What it actually did in addition to the dynamic action is eliminate a few of my custom restored settings. For instance, the ship minigame was put back in and the extra music was removed. It also applied sprite graphic changes implemented by restored (swapping US sprites for Japan sprites) and overwrote custom sprite fixes that I had done (which were published today as a restored addendum patch). If all your restored rejiggered patch did was apply dynamic action in a way that's compatible with restored instead of altering other things, that would be a lot more convenient. I did work around the issue by reapplying my custom setting patches and my own rebalance and graphical touch-up patches after applying your patch but it would have been a lot more convenient had I not had to. I'm sure a lot of users are like me in the sense that they already have a custom restored rom that they wouldn't want to mess up by applying your patch.

I feel like the fix for you is pretty easy. Just take your restored rom with rejiggered and create a patch using an identical (all settings the same) restored rom *without* rejiggered as the unmodified base rom. That should produce a patch that will add dynamic action to a restored rom and won't alter anything else.
« Last Edit: August 28, 2019, 05:58:52 pm by Chicken Knife »

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #36 on: August 28, 2019, 07:34:45 pm »
Ohhh... okay, yeah, I see!

I need to do this with CaptainMuscle's original patch so I can submit it as an addendum as well... But when I tried that it didn't work. When I have time to play around with patching stuff again I'll give it a try.
I know exactly what I'm doing. I just don't know what effect it's going to have.

Cyneprepou4uk

  • Full Member
  • ***
  • Posts: 161
  • Самый лысый ромхакер
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #37 on: August 29, 2019, 12:14:47 pm »
Just to verify - when you add/delete some code in your asm file, does all code below get shifted down/up? If yes, how are you going to achieve compability between your patches?
I am the baldest romhacker
NES Romhacking Guide

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 281
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #38 on: August 31, 2019, 04:56:29 am »
Sorry for being a little off topic but after two consecutive playthroughs of FF1 Restored, the thing I'd most love to see someone add to this game:

The ability to cast Raise or Arise in battle and have it actually work!

And one more thing, It's a real shame Restored never actually "restored" Chaos's hexagon room floor pattern that the cutting room floor website displays. I'd also be very curious what kinds of enemies you would encounter there in the Japanese version before encounters were dummied out.
« Last Edit: August 31, 2019, 05:24:20 am by Chicken Knife »

Jiggers

  • Full Member
  • ***
  • Posts: 248
    • View Profile
Re: FF1 Dynamic Action Patch Re-Jiggered
« Reply #39 on: August 31, 2019, 10:13:07 pm »
Just to verify - when you add/delete some code in your asm file, does all code below get shifted down/up? If yes, how are you going to achieve compability between your patches?

It does get moved, but then I put in NOP instructions, which keep the rest of the code in place. When the game reads them it does nothing, treating them as empty space basically. I used a hex compare program to make sure the compiled rom matched the original outside of the areas I edited.

Sorry for being a little off topic but after two consecutive playthroughs of FF1 Restored, the thing I'd most love to see someone add to this game:

The ability to cast Raise or Arise in battle and have it actually work!

Aw man. That would be so simple for me to do, but FF Restored does a lot of changes around the same area I'd have to edit, so I can't, since I don't know what I'd be changing anymore. Not unless I spend a bunch of time disassembling that as well... Which I just don't wanna do. >.< Sorry!

I have updated the two +Restored patches in my google drive folder, to work as addendums. I hope I did it right; I'm about to test it now and see if its broken. If I don't edit saying "woops" a few minutes from this post, assume its good?

Edit: No "woops" here for me. I only tested one of the two variants, but it seems to work fine. Hurray?
I know exactly what I'm doing. I just don't know what effect it's going to have.