øAslickproductions.org/forum/index.php?PHPSESSID=so1iojs5ocdn0o2vf0tti7fbu6&topic=2339.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2e6a.htmlslickproductions.org/forum/index.php?PHPSESSID=so1iojs5ocdn0o2vf0tti7fbu6&board=8.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index2e6a.html.zx»ôg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿȰUÈ2OKtext/htmlISO-8859-1gzip0|ÖÈ2ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 20:29:05 GMT0ó°° ®0®P®€§²ð®ºôg^ÿÿÿÿÿÿÿÿ0È2 Remaining bugs in FF3us

Author Topic: Remaining bugs in FF3us  (Read 2489 times)

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #15 on: February 28, 2017, 03:00:30 PM »
Just gonna leave this here...
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

Madsiur

  • Tunnel Armor
  • *
  • Posts: 149
  • Gender: Male
  • FF6AE coder
    • View Profile
    • Madsiur's Lair
Re: Remaining bugs in FF3us
« Reply #16 on: March 18, 2017, 11:42:37 AM »
I'm not sure if someone else did, but this is my attempt to fix bug #5. It basically check if the party saw shadow (vanilla condition) or if vargas has been beat. If any of the two, NPC $15 creation is not happening. I had to do a little bit of event gymnastic to fit everything without using one or multiple FD(s), using 7 bytes of free space at $D1F9F8 and shifting shadow's queue of 2 bytes. I'd like to know if someone has a better fix or proposal before I test and make a patch.

Code: [Select]
CA/EBA1: C0    If ($1E80($1B6) [$1EB6, bit 6] is set), branch to $CA5EB3 (simply returns)
CA/EBA7: C1    If ($1E80($00A) [$1E81, bit 2] is set or $1E80($010) [$1E82, bit 0] is set), branch to $CAEBC1
CA/ECAF: B2    Call subroutine $D1F9F8
CA/EBB3: 45    Refresh objects
CA/EBB4: 15    Begin action queue for character $15 (NPC $15), 11 bytes long
CA/EBB6: 8E        Move vehicle/entity down 4 tiles
CA/EBB7: 99        Move vehicle/entity right 7 tiles
CA/EBB8: A1        Move vehicle/entity right/down 1x1 tiles
CA/EBB9: A1        Move vehicle/entity right/down 1x1 tiles
CA/EBBA: 86        Move vehicle/entity down 2 tiles
CA/EBBB: 95        Move vehicle/entity right 6 tiles
CA/EBBC: 92        Move vehicle/entity down 5 tiles
CA/EBBD: 89        Move vehicle/entity right 3 tiles
CA/EBBE: 80        Move vehicle/entity up 1 tile
CA/EBBF: D1        Make vehicle/entity disappear
CA/EBC0: FF        End queue

D1/F9F8: D0     Set event bit $1E80($00A) [$1E81, bit 2]
D1/F9FA: 3D     Create object $15
D1/F9FC: 41     Show object $15
D1/F9FE: FE     Return

 :edit: Tested and done!
« Last Edit: March 18, 2017, 04:32:03 PM by Madsiur »

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #17 on: April 02, 2017, 12:29:20 PM »
Madsiur: great work!

About the underwater palette problem, there is some very good detail here on how the transparency effect works on the beach water. From what I gather, it's colour averaging, and yes, it only seems to happen over sprites with palette index 4 or higher. As the linked page explains, Super Mario World has the same problem, which causes 1-Up mushrooms to be affected by the transparency in ghost houses.

This page also has good detail on how to actually control the colour math (via registers $2130-2132). Based on the Secret of Mana screenshot in the Transparency page, that tells me that the ideal scenario, wherein everyone has their heads above water and their legs under, might actually be achievable.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #18 on: April 05, 2017, 12:12:54 AM »
  • Setzer Hates Birds - possibly edit spell animation scripts (or the commands themselves) to make them aware of Slot-casted Esper attacks and adjust formation accordingly

I do not know this one. What's it about?
"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,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: Remaining bugs in FF3us
« Reply #19 on: April 05, 2017, 01:20:31 AM »
probably "Setzer resents bird-hating comrades" in Master ZED's Bugs Guide.

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #20 on: April 05, 2017, 02:07:15 PM »
OK, I think that would be further down your alley than mine. You know a lot more about formation errors than I do, and I don't think the problem has anything to do with animation scripts.

BTW, did you happen to see my comments about Fancy Walking?
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #21 on: April 08, 2017, 04:10:13 PM »
OK, I've done a little testing with Setzer casting Palidor via Slot, and the impression that I get, though I can't confirm it code-wise, is that when Setzer uses Slot, the game errantly decides that his turn is over and reverts him to his normal position, but then he takes an extra step back after he lands. I tried replacing the call to C2/37DC in the triple-BAR case with a call to C2/3FAD, which is the code for the Magicite item (which does essentially the same thing as triple-BAR), and Setzer did assume his correct position after the fact, but didn't take a step forward to begin with. Same happened with Phoenix (no steps forward instead of two), and with Golem as well, so I assume it would be the same case for all the other Espers. I, however, would prefer that Setzer takes exactly one step forward and returns to his normal spot.

For the record, all Magicite does over triple-BAR is store the randomly chosen Esper to $3400 (the spell ID, or whatever that means for Magicite or triple-BAR) and increase $3A70 (the number of attacks). I found a way to increase $3A70 with triple-BAR as well and nothing changed, so clearly $3400 has to have everything to do with it, but I can't say I know why.
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #22 on: July 31, 2017, 05:15:18 PM »
  • Zone Eater's Belly doorways - possibly convert event triggers to exit triggers

Fixed! :happy:
"Do not meddle in the affairs of wizards, for they are subtle and quick to anger." -Gildor from The Lord of the Rings

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #23 on: August 03, 2017, 01:00:42 PM »
About the beach water transparency problem, I already linked to the SFC wiki page on transparency and color math, but one thing that occurs to me is that there are some games that already seem to do it right, e.g. Final Fantasy IV and Secret of Mana. In both cases you see the characters' heads above water and their bodies under it. If there was some way to reverse-engineer one of those games to figure out its color math protocols, perhaps we could apply it to this game.

On the other hand, I think Final Fantasy V has a similar problem to this game; in the Ship Graveyard, your character appears fully submerged when you go underwater. Maybe that's intentional, because they're supposedly "swimming" through rooms of ships that are filled with water and don't have any air pockets, rather than just trudging through, but my only reservation about that is that it implies that they can hold their breath underwater indefinitely, which is not true for the sunken Worus/Walse Tower.

:edit: Actually, Final Fantasy V works a bit differently than I thought. While the Ship Graveyard sees you going all the way underwater in some places, there are other places where your head sticks above the surface. For example, in Walse/Worus Town, Istory Falls, the Castle Bal moat, or even in a couple areas of the Ship Graveyard. In fact, there was one room in the Ship Graveyard where I found that my head was above water walking around, until I went down the stairs. So clearly, there's a way to make it work for sprites in FF6.
« Last Edit: August 03, 2017, 07:25:08 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

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #24 on: August 04, 2017, 02:31:53 AM »
Here's some new info on the beach bug: I've been playing around in Zone Doctor. Turns out every map has a "priority set" byte that determines transparency for all of the layers of the map, and the Solitary Island beach uses priority set 14.

The info on priority sets is located at C0/FE00, and is three bytes per set. The first byte is written to register $2131, a color math register that specifies what color math function is used and which layers are subject to color math. The second and third bytes are written to registers $212C and $212D, the main and sub screen designation registers, respectively. Check out this page for details.

The problem with priority set 14 is that it enables transparency for the sprite layer and BG layer 1 (the sand underneath the waves), and transparency on the sprite layer only works on sprites using palettes 4-7 (which is why Cyan, Shadow, Setzer, Mog and Umaro appear fully submerged). I've tried all the others and found that the only alternative sets that correctly show translucent water are 1, 7, 8, 10 and 18. 7 and 8 show all sprites fully above the water (which is not good for the fish), while 10 submerges only the fish and any part of your character that is close enough to the fish (it's a little hard to explain, but it's also not correct). Meanwhile, 1 and 18 show all sprites fully submerged.

I think half of the fix for this bug will be changing the priority set to one of those two, and the other half will be finding a way to ensure that characters' torsos and heads are above water while the legs are below the surface.

:edit: Actually, priority set 10 has the same problem as priority set 14: it completely submerges certain characters.

:edit: Unfortunately, there's a major flaw: the game is set up so that layer 3, which shows the waves, will be displayed on any map either over all sprites or beneath all sprites, regardless of the sprite's priority. That makes it impossible to display different parts of different sprites both over and under the surface without enabling transparency on the sprite layer, which will force a full submerge on characters whose palette ID is 4+.
« Last Edit: August 04, 2017, 05:07:07 AM 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,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: Remaining bugs in FF3us
« Reply #25 on: August 20, 2017, 11:49:25 PM »
maybe write a specialized event function and command to copy the lead character's palette data into one of Palettes 0 thru 3 when entering that screen (and exiting the main menu)?  which palette numbers aren't claimed by Cid, fish, the bird, the raft, magicite, etc?

:edit: (9/14/17) to elaborate:

if (lead character's palette < 4) then begin
 copy palette data into a palette slot that's >= 4
 assign the higher palette slot to bottom sub-sprite
end
else begin  ; character's palette is >= 4
 copy palette data into a palette slot that's < 4
 assign the lower palette slot to top sub-sprite
end
 
iow, like the Transparency article said: "One way around this is to make palettes 4-7 mirrors of 0-3 so that you can select individually on each sprites".

Quote
Unfortunately, there's a major flaw: the game is set up so that layer 3, which shows the waves, will be displayed on any map either over all sprites or beneath all sprites, regardless of the sprite's priority.

how much of this area is broken should you disable the BG3 Priority flag there?
« Last Edit: September 14, 2017, 02:20:36 PM by assassin »

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: Remaining bugs in FF3us
« Reply #26 on: August 29, 2017, 06:38:40 PM »
random thoughts:

- maybe the BG3 Priority flag is set generally so text shows up on top of everything?  namely boxless text, as textboxes seem to clip (or delete?) sprites.
- on some screens (e.g. Albrook, Cid's house exterior), a portion of the party sprite will be moved between Priority 2 and Priority 3, depending on where you're currently standing.  the beach looks to be Priority 2 all the time (albeit tested without fish, bird, magicite, Cid, or raft present).  that could give some flexibility in using additional priorities for whatever fix is eventually pursued.
- something that poses a challenge before register access or hardware programming: there is low tide and high tide here.  conceptually, the "height" the water is relative to a character should vary.  having a constant portion of the sprite submerged might look better than having it all on top, but it'd still be at odds with the wave movement.

EDIT: come to think of it.. because the tide is fairly gentle and the absolute height of a character is pretty small, depth changes from tide would probably translate to just 1-2 pixels in water height.  so small enough to ignore without looking too off, and not worth the ungodly amount of effort it'd take to represent.
« Last Edit: August 29, 2017, 10:36:26 PM by assassin »

13375K31C43R

  • Ultros
  • *
  • Posts: 675
  • Gender: Male
    • View Profile
    • Leet Sketcher's Final Fantasy III Patches
Re: Remaining bugs in FF3us
« Reply #27 on: October 05, 2017, 07:08:22 AM »
Not sure if you could really call this a bug, but I just noticed this: if one of your party members is currently being subject to the Haste or Slow spell, and another party member tries to target them for another spell during that animation, they will be unable to do so.

There are multiple facets to this: one, if member 1 casts Haste on member 2 while member 2 is already pointing at himself to cast a spell, the pointer will return into the Magic menu.

Two, if member 2 tries to select a spell that targets himself by default, he will be unable to do so until the Haste/Slow animation finishes.

Three, if member 2 is preparing to cast a spell on the entire party, the flashing pointer will appear in front of every party member except member 2, until the Haste/Slow animation finishes. However, even if he confirms that selection before the animation finishes, he will still be hit by his own spell along with the rest of the party.

It is unknown at this point if there are any other spells that cause this issue, but I'd guess that it occurs with any other spell that animates some manipulation of the party member's sprite, such as Dischord.

:edit:
Apparently this isn't limited to spells; I just tried targeting a party member for Fight and it wouldn't let me do it while the animation was running.
« Last Edit: October 05, 2017, 01:37:36 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

Tenkarider

  • Guard Leader
  • *
  • Posts: 50
    • View Profile
Re: Remaining bugs in FF3us
« Reply #28 on: October 05, 2017, 10:28:36 AM »
i remember also Slash animation on an ally won't make him be available as target(of ally spells in particular) until that animation ends

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: Remaining bugs in FF3us
« Reply #29 on: October 05, 2017, 02:24:48 PM »
dude:
http://masterzed.cavesofnarshe.com/GameDocs/ff3bug.txt
"Prevent manual character targeting with certain attack animations"

this and the Chocobo thing make me think you're ignoring the best single source of bugs on this game (admittedly not complete, as Square programmers are somehow still adding bugs to FF6 -- some of them from beyond the grave -- but it's a superb starting point for any research).