Author Topic: New patch: Color Wheel tweak  (Read 361 times)

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 624
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
New patch: Color Wheel tweak
« on: October 05, 2017, 06:59:07 AM »
Hey-o! Here's an interesting new tweak patch: a rotation system for the outline colour-changing statuses in battle. Normally, if a party member possesses multiple statuses that would change their outline colour, the game only shows one of those colours. Now, with this patch applied, the outline colours will rotate.

This patch allocates a new location in RAM, so I'm sure someone will tell me it's already taken by some other patch. Maybe someone will even tell me it conflicts with another patch. But until that day comes, this patch is free for anyone to use.

:edit: October 5, 2017
Holy cow, there were a bunch of errors in both patches! They are now fixed.

:edit: October 6, 2017
It suddenly occurred to me that if a party member starts a battle with Poison or Zombie status along with one of the outline colour statuses, the game only changes skin colours for Poison or Zombie and skips the outline colours altogether, meaning the "wait" bit will not be cleared. This update corrects that oversight. BTW, an alternative would be to not have the game skip the outline colour changes; all that's required is to change the branches (see the included code documents) to branch to the start of the outline colour check function instead of the end.

:edit: October 15, 2017
Xenovant reported a crash bug that occurs when one of those characters receives Vanish status. This has now been fixed.

:edit: October 15, 2017
Fixed a bad byte that caused the free space to be added in the wrong place. Please apply the reverse patch to fix this error before applying the updated tweak patch.

:edit: October 15, 2017
Fixed ANOTHER bug (sigh): characters posing as enemies would still show up in the party lineup.
« Last Edit: October 15, 2017, 07:59:45 PM by 13375K31C43R »
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

assassin

  • Bane of Retards
  • *
  • Posts: 1,020
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Color Wheel tweak
« Reply #1 on: October 05, 2017, 02:15:59 PM »
sounds spiffy.. the SoE makers will be flattered. ;)

trying to follow along, and a few questions:
- what is the wait bit?  i don't see mention of it in your vanilla disassembly.  and why once cleared, is it apparently never set again?
- why do you rotate $2EA9,Y in two different loops?
- sort of a combo of above two: you normally won't clear the wait bit until in the second loop, but will do it after the first loop when reaching "reset_rotation:".  is it assumed that once you've iterated that much, whatever reason there was for the initial wait has subsided?

if the patch users had true mastery of the Almighty Color Wheel, you should have been able to simply mix the applicable colors, and let them interpret the result.  but i guess that one will need to wait until humanity is further evolved. ;)

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 624
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Color Wheel tweak
« Reply #2 on: October 05, 2017, 02:32:54 PM »
- what is the wait bit?  i don't see mention of it in your vanilla disassembly.  and why once cleared, is it apparently never set again?

The outline colours always rotate in this order: Rflect, Safe, Shell, Stop, Haste, Slow. I tested on a character that started a battle with all four of the beneficial statuses, expecting Rflect to be shown first, but instead Safe was. The reason for this is because the game pre-renders the outline colours even during the entrance animations, making it possible that the player does not see one of the colours right away as they should. To correct this, I had to have a wait bit which simply delays rotation once.

- why do you rotate $2EA9,Y in two different loops?

I'll admit there's probably some redundancy here, but I wanted to ensure the rotation was always timely, i.e. no delays or periods of no outline colouring. The first loop checks to make sure the character actually has one of those statuses, and the second loop finds the next one of those statuses the character has.

- sort of a combo of above two: you normally won't clear the wait bit until in the second loop, but will do it after the first loop when reaching "reset_rotation:".  is it assumed that once you've iterated that much, whatever reason there was for the initial wait has subsided?

Basically. If it reaches that point during the first loop, then that's because that party member does not have any outline colour changing statuses, meaning we don't need to delay the rotation at all in the event that that party member gains one of those statuses.

if the patch users had true mastery of the Almighty Color Wheel, you should have been able to simply mix the applicable colors, and let them interpret the result.  but i guess that one will need to wait until humanity is further evolved. ;)

I thought about doing a much quicker rotation cycle, where it still pulses at the same speed but changes colours rapidly. I ended up not doing that because I figured it wouldn't look very pretty. However, I might still add it in a future update.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

assassin

  • Bane of Retards
  • *
  • Posts: 1,020
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Color Wheel tweak
« Reply #3 on: October 05, 2017, 02:58:23 PM »
- thanks; i follow better now.
- yeah, some of the SoE status colors aren't too visible on certain terrain backgrounds to begin with, so when things speed up with multiple statuses, it gets harder yet to tell what i'm seeing.  not to mention, some individual status indicators involve multiple colors, iirc.  the 4 status per entity cap limits the madness some, but it's still not fun.

maybe FF6 could get away with half the length of vanilla periods or so, but it's probably not worth the work.  for a status to take any appreciable toll on you, it needs to last awhile.  if it's gone by the time its color is due for showing and you never get to see it, no harm no foul.

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,681
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: New patch: Color Wheel tweak
« Reply #4 on: October 05, 2017, 11:50:45 PM »
Oh man, I was looking to make a patch like this for a long time. How difficult was this to pull off?

119 bugs fixed and counting.

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 624
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Color Wheel tweak
« Reply #5 on: October 06, 2017, 12:47:37 AM »
Not terribly difficult. All I had to do was:

1. Create a variable for each party member to indicate the current state of the rotation
2. Add the initialization of that variable to the battle startup method (this was the most difficult part, it took a fair amount of ingenuity)
3. Replace the static series status checks with a check against the variable
4. Add a function to make the colour change between pulses using a status finding loop for the rotation
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Xenovant

  • Tunnel Armor
  • *
  • Posts: 153
  • (ಠ_ಠ)
    • View Profile
Re: New patch: Color Wheel tweak
« Reply #6 on: October 15, 2017, 08:50:45 AM »
I like this tweak, but I have found a serious bug with the invisible/clear effect. The game crashes when you cast Vanish while you are under "quick" effect, sometimes at the start of the battle (if you start with invisible status), sometimes when the game removes this effect, etc.

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 624
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Color Wheel tweak
« Reply #7 on: October 15, 2017, 11:33:39 AM »
Interesting. I can confirm that this doesn't happen without the patch, and it doesn't have anything to do with Quick. I'll get right on this.

:edit: Fixed! The problem was that the second rotation loop, the one that finds the next status, was too volatile and had the potential to cause an infinite loop, which it did in this case.
« Last Edit: October 15, 2017, 12:17:17 PM by 13375K31C43R »
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Xenovant

  • Tunnel Armor
  • *
  • Posts: 153
  • (ಠ_ಠ)
    • View Profile
Re: New patch: Color Wheel tweak
« Reply #8 on: October 15, 2017, 02:57:26 PM »
Tested, now instead of crashing the game, restarts it :P

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 624
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Color Wheel tweak
« Reply #9 on: October 15, 2017, 05:12:24 PM »
Whoops, a bit of neglect on my part. Now it's fixed again.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Xenovant

  • Tunnel Armor
  • *
  • Posts: 153
  • (ಠ_ಠ)
    • View Profile
Re: New patch: Color Wheel tweak
« Reply #10 on: October 15, 2017, 07:16:42 PM »
It's working now :P

 :cookie:

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 624
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Color Wheel tweak
« Reply #11 on: October 15, 2017, 07:22:48 PM »
Not quite. Now in the battles where you fight Kefka and the game shows his character sprite, he appears on your side instead of as an enemy. Once again I have traced it back to this patch, and now I have to find out what's causing that. :sad:
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Xenovant

  • Tunnel Armor
  • *
  • Posts: 153
  • (ಠ_ಠ)
    • View Profile
Re: New patch: Color Wheel tweak
« Reply #12 on: October 15, 2017, 07:39:30 PM »
Not quite. Now in the battles where you fight Kefka and the game shows his character sprite, he appears on your side instead of as an enemy. Once again I have traced it back to this patch, and now I have to find out what's causing that. :sad:




Judging by his clothes, I guess he likes the rainbow of colors the characters might have now, and wants to join them :P

13375K31C43R

  • Magus Sisters
  • *
  • Posts: 624
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: New patch: Color Wheel tweak
« Reply #13 on: October 15, 2017, 07:57:57 PM »
Found the problem. At C2/30B2 I grab the wrong value from the stack. This is now fixed. Thanks Assassin! :cookie: :childish:
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

assassin

  • Bane of Retards
  • *
  • Posts: 1,020
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: New patch: Color Wheel tweak
« Reply #14 on: October 15, 2017, 08:14:21 PM »
haha.. i had so much confidence in that post, i deleted it. :/  see, i missed your insight regarding C2/3079 thru C2/307C, whereby you turned the code into less of a stackgy (come on, square).  while i was suspicious of what you were loading at C2/30B2, it was probably for the wrong reasons.  all's well that ends well, though. :childish: