Friday, January 27, 2012

Final Fantasy IV: Bugs

One of the interesting things I've been learning as I've been playing through the Final Fantasy games is just how many weird bugs exist in the games. Final Fantasy had a lot of bad pointer related bugs. It had some local variable bugs. Final Fantasy II had a pretty brutal cancel bug. Final Fantasy III had a dupe bug for sure (though I played on the DS which seemed pretty decent). Did they get any better for Final Fantasy IV? Of course not!

Perhaps my favourite of the FFIV bugs has more to do with not enough edge case testing... Here's the situation:

In combat you can change which weapon/shield you have equipped in each hand. You go into your item menu, select a hand, and then choose what you want to put in that hand. But how are you, the player, to know what you could equip? Well, the system iterates over all items in your inventory when you pick a hand to swap. Anything you could equip gets highlighted. Anything you can't equip gets faded out. Then when you go to select a faded out item you get an error. This seems like a reasonable system, right?

When you select a highlighted item should it recheck if the item is a legal option? If you're coding robustly it probably should but then you're adding an extra check in which seems unnecessary. You already validated every item in your inventory seconds earlier. Why bother revalidating? We're talking about a game that had to have plot cut out to fit it onto the cartridge! Any extra checks are probably unwise...

Now, what if you wanted to unequip an item? Well, you'd 'equip' a blank slot in your inventory. This seems like a reasonable case to build in. Let's just flag the empty slots as valid equips. No sense treating them any differently, right?

How about when we derive our current stats? Should we validate our gear then? Seems wasteful. As long as we're robust in only allowing valid gear to be equipped in the first place this should never come up.

So, what's the bug? Well, it's a timing bug. Get into a fight with a monster which drops a weapon or a shield as its common drop. Have Edge input the steal command (which will steal the weapon or shield). Then quickly get to the person who can't legally equip that item. Have them go into the item menu and start switching items. This will cause a validation of your inventory as it stands when you start. While doing this the steal command will resolve and you'll get a new item. It will go into a blank slot in your inventory. A blank slot that has already been validated as a legal equip. Pick the new item! Huzzah! Rydia can put on a shield! Rosa can use a spear.


There's a similar timing bug which lets you use berserk while unequipping arrows which results in duplicating any item you can legally equip. You end up with 255 copies which is great for making cash or for throwing with Edge.

Berserk is also buggy with Edward and his auto-hide ability. Apparently you can set it up so he can't be attacked but is berserked and beating down.

A final timing bug revolves around the spell stop. It takes out all other timers on the person, completely. Have a temporary paralyze? If you get stopped it will never wear off. A virus? There forever. Unless you reapply it then the timer will get fixed. And if you screw with the timers on monsters with stop? The game will often freeze. (I'm glad I never used that spell!)


In the inexplicably weird category... The sylph spell is free if you put it in one spot (upper right hand corner) in the spell list.

In the mad cheats category... At one point you're in a fight in the dwarven castle underground. You fight some dolls and then you fight Golbez. He almost kills you when Rydia shows up and saves the day. Golbez still manages to run off with the crystal. A future plot point is to go get the last dark crystal from the sealed cave... If the first thing you do after Rydia joins your party is cast warp you'll get warped back to the dwarven crystal room. Complete with dark crystal for the taking. Which counts as the dark crystal from the sealed cave! So you can skip that dungeon!


Now for a bug I think I was hit by... The moon is circular and you can find a path to do a complete circuit. But your spaceship only exists exactly where you landed it. So if you do a full circle around the moon? You lose your spaceship. You need to go back the other way the exact number of times to get back to the precise spot you left your spaceship.


There are a bunch of fights with conditional triggers to do things. The biggest example of this is when you fight the 4 fiends in one fight. You beat up Milon for a while and then when he dies Rubicant steps up. They coded these triggers as counter attacks. So if you kill Milon off with attacks that don't trigger a counter attack, he won't tag in Rubicant. You'll just win. One way to do this is to cast wall on your team and then bounce attack spells off the wall and onto him. Cheats!


Finally there's a bug that certainly afflicted me on probably every playthrough but which I didn't really notice. Thinking about it in retrospect I can see it happening but I didn't notice at the time... Weapons have flags on them. Metallic, so they paralyze you in the magnetic cave. Back row, so you do full damage from the back row. And, for some reason, no-crit. These weapons simply can't get a critical strike. The metallic flag works fine but the other two are buggy. If they ever get set on your character they are never removed. So if you ever put on a whip, for example, you can never get a crit again for the rest of the game. And you do full damage from the back row with any weapon. Axes, whips, and the best paladin sword all have the no-crit flag.

That's not the only way to lose the ability to crit. Apparently if you ever start a fight dead you lose the ability to crit. And sometimes the game has battles which run without player input. Tellah vs Edward in the 'YOU SPOONY BARD!' scene. Tellah vs Golbez. FuSoYa and Golbez against Zemus. If in one of those fights the team on the left dies then everyone in your party which occupies an 'empty' slot for the right hand team loses the ability to crit. So after the FuSoYa and Golbez vs Zemus fight at most two of your characters can still crit. The other 3 will permanently lose their ability to crit if they somehow kept it up to that point!

How... Dumb.

No comments: