Users browsing this thread: 1 Guest(s)
Status Timers Hack

#1
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Status Timers Hack
by madsiur
version 1.0a
released on 02/16/2022
apply to FF3us 1.0 (no header)
wiki entry
download
readme

ROM info
Code:
Database match: Final Fantasy III (USA)
Database: No-Intro: Super Nintendo Entertainment System (v. 20210222-050638)
File/ROM SHA-1: 4F37E4274AC3B2EA1BEDB08AA149D8FC5BB676E7
File/ROM CRC32: A27F1C7A

Files
Code:
status-timers-nh.ips: IPS patch of this hack
status-timers.asm: bass assembly file of this hack

Description

This hack add timers for Slow, Haste, Safe and Shell when cast on characters or monsters. It use 4 free bits on the expired status byte ($B8) plus a byte per monster and character for each of the 4 new timers ($3E38, $3E39, $3E88 and $3E89). Right now, there is no easy way to know when those 4 timed status are lifted on a monster but that will be deal with in another hack. All 4 timers have a value of $1E, so they last longer than Reflect but shorter than Freeze. The new timer values can individually be edited in the bass asm file.

There are two hacks; "status-timers" is for vanilla ROM and fix the same bug as "Premature Continuation fix" by assassin (link below), only it does at a different place in the code. "status-timers-stop" implement the "Independent Stop" code by seibaby (link below) as well as the original "Premature Continuation fix" by assassin. Use "status-timers-stop" if you already have applied or want to apply those two hacks.

A note on timers and status with this hack: the low on HP equipment Safe/Shell cast will now work on timers, the same way it does with the unused low on HP Reflect flag. Also, if a character has Haste, Safe/Shell will wear of faster and if the character has Slow, Safe/Shell will wear off slower. This is the same behavior that the Haste/Slow status have on other timers such as Freeze, Reflect and Sleep in the vanilla game.

Both hacks use 202 ($CA) bytes of free space at $EEAF01. This free space offset can be changed in the bass asm file by changing the offset of the "seek($EEAF01)" macro call. Both hacks use no free space in bank $C2 but instead relocate the "check timers" routine from $C25B06 to $EEAF01 to make room for the new "set Slow/Haste/Safe/Shell" bank $C2 code.

To assemble the hack use bass v14 by typing a command such as "bass -o rom.smc status-timers.asm".

Links
Premature Continuation fix
Independent Stop


[Image: screenshot.png]
  Find
Quote  
[-] The following 2 users say Thank You to madsiur for this post:
  • Gi Nattak (02-14-2022), Lightning (02-14-2022)

#2
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
I am guessing relics still cause permanent effects, like haste?
  Find
Quote  

#3
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(02-14-2022, 02:51 PM)Lightning Wrote: I am guessing relics still cause permanent effects, like haste?

Yes, same for the monsters "start with" status. The Stop status also still stop every other active timers (Freeze, Sleep, Slow, Haste, Reflect, Shell, Safe I think) like vanilla, and those continue after Stop expires. I also fixed at the same time the small wrong behavior described at $C25AAF in the $C2 disassembly, so other timers are no longer checked on Stop timer last tick.

RotDS has different Stop timer checking code and the game was crashing when Stop expires but not on a vanilla ROM with the hack applied, so I'm wondering if RotDS has some related bugfix applied. I fixed the RotDS asm file but if I knew exactly what is different or which bugfix change this code then I could release a patch and a asm file that works correctly with that bugfix.
  Find
Quote  

#4
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
^ does RotDS by any chance include this patch:
http://assassin17.brinkster.net/patches.htm#anchor27
?
Quote  
[-] The following 2 users say Thank You to assassin for this post:
  • Gi Nattak (02-14-2022), madsiur (02-14-2022)

#5
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(02-14-2022, 03:56 PM)assassin Wrote: ^ does RotDS by any chance include this patch:
http://assassin17.brinkster.net/patches.htm#anchor27

It's possible and probably sure if your patch was part of FFVI improvement project, I'll look at your patch tonight or tomorrow. What I though fixed the crash fixed the crash but now triggered more problems. One thing is sure RotDS has changes in the $C25A83 function. I'll look at your documentation and do a debugger trace later. I'm kind of burnt out on it right now so I need to take a nap or something lol. Thanks!
  Find
Quote  

#6
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
(02-14-2022, 03:56 PM)assassin Wrote: ^ does RotDS by any chance include this patch:
http://assassin17.brinkster.net/patches.htm#anchor27
?

Ah yes! Thanks, it does, and then along the way this patch was also applied I see now upon further investigation: https://www.ff6hacking.com/forums/thread...ndent+Stop


We are born, live, die and then do the same thing over again.
Quote  

#7
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I updated the hack to version 1.0a. Original hack remain unchanged but somehow I left in v1.0 the test values ($0A) for new timers instead of $1E. This is now changed. I also added a compatibility patch that implement "Independent Stop" by seibaby since his thread has no ips (which also implement the "Premature Continuation fix" by assassin), otherwise there is a conflict with the original patch when using that hack.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite