Final Fantasy Wiki
Register
No edit summary
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{sideicon|FFIV|FFV|FFVI|FFVII|FFIX|FFMQ|FFL3}}
 
{{sideicon|FFIV|FFV|FFVI|FFVII|FFIX|FFMQ|FFL3}}
{{images|the bug for FFIV|video=1}}
+
{{Image needed|the bug for FFIV|video=1}}
 
[[File:Beating Emerald Weapon the fastest in 07|320px|right|The Death Penalty glitch in action]]
 
[[File:Beating Emerald Weapon the fastest in 07|320px|right|The Death Penalty glitch in action]]
 
The '''overflow glitch''' is a [[List of bugs and glitches|glitch]] that has appeared in various games throughout the series. It often is a glitch that rolls damage over from the maximum damage to either low damage, or [[Instant Death|instantly killing]] an enemy, when the player hits a certain amount of kills, [[Ability Points]], or any other special requirements.
 
The '''overflow glitch''' is a [[List of bugs and glitches|glitch]] that has appeared in various games throughout the series. It often is a glitch that rolls damage over from the maximum damage to either low damage, or [[Instant Death|instantly killing]] an enemy, when the player hits a certain amount of kills, [[Ability Points]], or any other special requirements.
Line 6: Line 6:
 
== Appearances ==
 
== Appearances ==
 
=== ''[[Final Fantasy IV]]'' ===
 
=== ''[[Final Fantasy IV]]'' ===
 
In the [[Super Nintendo Entertainment System|SNES]] and [[PlayStation]] versions, when [[Curaja|Cure4]] heals more than 16,383 (2^14 - 1) damage on an enemy, the spell will heal the [[MP (stat)|MP]] of that target instead.
   
 
When the party meets the [[Magus Sisters]], if the player keeps defeating [[Mindy (Final Fantasy IV 2D)|Mindy]] and [[Sandy (Final Fantasy IV 2D)|Sandy]], letting [[Cindy (Final Fantasy IV 2D)|Cindy]] revive them over and over again, they will continue to give [[Experience Points|EXP]]. After 256 enemies have fallen, this number will loop back to 0. For example, if the party accumulates EXP from 258 kills in a [[Battle (term)|battle]], they will receive 2 EXP.
In the game's [[Super Nintendo Entertainment System|SNES]] and [[PlayStation]] versions, when [[Curaja|Cure4]] heals more than 16,383 (2^14 - 1) damage on an enemy, the spell will heal the [[MP (stat)|MP]] of that target instead.
 
 
When the party meets the [[Magus Sisters]], if the player keeps defeating [[Mindy (Final Fantasy IV)|Mindy]] and [[Sandy (Final Fantasy IV)|Sandy]], letting [[Cindy (Final Fantasy IV)|Cindy]] revive them over and over again, they will continue to give [[Experience Points|EXP]]. After 256 enemies have fallen, this number will loop back to 0. For example, if the party accumulates EXP from 258 kills in a [[Battle (term)|battle]], they will receive 2 EXP.
 
   
 
=== ''[[Final Fantasy V]]'' ===
 
=== ''[[Final Fantasy V]]'' ===
 
 
The maximum amount of damage a character can do in a single move is 65,535: (2^16 - 1) though it will always be capped to 9999. If a character were to do more damage than that, the overflow will cause the counter to start over from zero again. For example, if a character dealt 70,000 damage in one hit, the system will count up to 65,535 and roll over to zero, ending up doing 4,465 damage. The easiest way to trigger the glitch is by performing a [[Sword Dance (ability)#Final Fantasy V|Sword Dance]] after having maxed both Strength, Speed and Level via [[Sing (Final Fantasy V)|Sing]] while wielding either the [[Chicken Knife]] or a weapon with more than 105 attack wielded with [[Doublehand]].
 
The maximum amount of damage a character can do in a single move is 65,535: (2^16 - 1) though it will always be capped to 9999. If a character were to do more damage than that, the overflow will cause the counter to start over from zero again. For example, if a character dealt 70,000 damage in one hit, the system will count up to 65,535 and roll over to zero, ending up doing 4,465 damage. The easiest way to trigger the glitch is by performing a [[Sword Dance (ability)#Final Fantasy V|Sword Dance]] after having maxed both Strength, Speed and Level via [[Sing (Final Fantasy V)|Sing]] while wielding either the [[Chicken Knife]] or a weapon with more than 105 attack wielded with [[Doublehand]].
   
 
=== ''[[Final Fantasy VI]]'' ===
 
=== ''[[Final Fantasy VI]]'' ===
 
 
[[File:Final Fantasy 6 Glitches and Tricks|320px|right|The glitch in action]]
 
[[File:Final Fantasy 6 Glitches and Tricks|320px|right|The glitch in action]]
 
The maximum amount of damage a character can do in a single move is 65,535: (2^16 - 1) though it will always be capped to 9999. If a character were to do more damage than that, the overflow will cause the counter start over from zero again. For example, if a character dealt 70,000 damage in one hit, the system will count up to 65,535 and roll over to zero, ending up doing 4,465 damage. The easiest way to trigger the glitch is through casting [[Ultima (ability)#Final Fantasy VI|Ultima]] with a character who has over 140 [[Magic Power|Magic]]. There is a [http://www14.brinkster.com/assassin17/patches.htm#anchor4 bugfix patch] that players can use to fix it on the [[Super Nintendo Entertainment System|SNES]] version.
 
The maximum amount of damage a character can do in a single move is 65,535: (2^16 - 1) though it will always be capped to 9999. If a character were to do more damage than that, the overflow will cause the counter start over from zero again. For example, if a character dealt 70,000 damage in one hit, the system will count up to 65,535 and roll over to zero, ending up doing 4,465 damage. The easiest way to trigger the glitch is through casting [[Ultima (ability)#Final Fantasy VI|Ultima]] with a character who has over 140 [[Magic Power|Magic]]. There is a [http://www14.brinkster.com/assassin17/patches.htm#anchor4 bugfix patch] that players can use to fix it on the [[Super Nintendo Entertainment System|SNES]] version.
   
 
This glitch was fixed in the ''[[Finest Fantasy for Advance|Advance]]'' version.
 
This glitch was fixed in the ''[[Finest Fantasy for Advance|Advance]]'' version.
{{-}}
+
{{clear}}
   
 
=== ''[[Final Fantasy VII]]'' ===
 
=== ''[[Final Fantasy VII]]'' ===
 
 
[[File:FFVII - Gameshark Goodies - EXP, Gil and Battles Overflow|320px|right|The glitch in action]]
 
[[File:FFVII - Gameshark Goodies - EXP, Gil and Battles Overflow|320px|right|The glitch in action]]
 
All the integer numbers are encoded in 32 bits. Since they need to be signed integers, the two's complement representation is used. In this encoding the leftmost bit is negative weighted, while all the others have a positive value. Given 2^n, the sum of all the powers of 2 with the exponent in the range (0, n - 1) is equal to (2^n) - 1. This means the lower and upper bounds for in-game integers are
 
All the integer numbers are encoded in 32 bits. Since they need to be signed integers, the two's complement representation is used. In this encoding the leftmost bit is negative weighted, while all the others have a positive value. Given 2^n, the sum of all the powers of 2 with the exponent in the range (0, n - 1) is equal to (2^n) - 1. This means the lower and upper bounds for in-game integers are
   
<math>-2^{31} = -2,147,483,648</math>
+
:<math>-2^{31} = -2,147,483,648</math>
 
 
and
 
and
 
:<math>2^{31} - 1 = 2,147,483,647</math>
 
<math>2^{31} - 1 = 2,147,483,647</math>
 
   
 
If, at any point, the computation of some value results in a number which is out of those bounds, an overflow occurs and the game exhibits abnormal behaviors when this happens.
 
If, at any point, the computation of some value results in a number which is out of those bounds, an overflow occurs and the game exhibits abnormal behaviors when this happens.
Line 42: Line 36:
   
 
==== Other instances ====
 
==== Other instances ====
Other overflow-related bugs involve rolling over AP (only on the [[Independent Materia (Final Fantasy VII)#Underwater|Underwater Materia]]), [[Experience Points]] for characters, battle and [[Escape (command)|escape]] counters, the [[gil]] counter, the timer, and the chance to [[Cover (ability)#Final Fantasy VII|cover]] with the [[Independent Materia (Final Fantasy VII)#Cover|Cover Materia]]. The maximum amount of battles and escapes the counter will hold is 65,535, and once the player exceeds it, it will reset to 0. The [[Chocobo breeding (Final Fantasy VII)|chocobo breeding]] sidequest and [[Chocobo Sage]]'s advice are affected by the number of fought battles, and thus behave strangely at very high numbers of battles fought because the game suffers from a two-fold glitch from storing the number of fought battles as a signed 16-bit value. This means the number could be between -32768 to 32767. Thus, if a player who has fought 32767 battles fights one more, the number is saved as -32768 because of integer overflow.
+
Other overflow-related bugs involve rolling over AP (only on the [[Underwater (Final Fantasy VII)|Underwater Materia]]), [[Experience Points]] for characters, battle and [[Escape (command)|escape]] counters, the [[gil]] counter, the timer, and the chance to [[Cover (ability)#Final Fantasy VII|cover]] with the [[Cover (Final Fantasy VII)|Cover Materia]]. The maximum amount of battles and escapes the counter will hold is 65,535, and once the player exceeds it, it will reset to 0. The [[Chocobo breeding (Final Fantasy VII)|chocobo breeding]] sidequest and [[Chocobo Sage]]'s advice are affected by the number of fought battles, and thus behave strangely at very high numbers of battles fought because the game suffers from a two-fold glitch from storing the number of fought battles as a signed 16-bit value. This means the number could be between -32768 to 32767. Thus, if a player who has fought 32767 battles fights one more, the number is saved as -32768 because of integer overflow.
   
 
The timer will reset to 0 after roughly 136 years, 36 days, 6 hours, 28 minutes, and 16 seconds of playing the game. For EXP and gil, the maximum amount is 4,294,967,295 (2^32 - 1), and once over the limit, it will overflow. EXP cannot be overflowed normally unless set to the maximum amount outside of battle. Cover percentage doesn't have a cap and can be increased by equipping multiple Cover Materia at once. The Cover chance overflows at 256%, reducing the percentage back to zero.
 
The timer will reset to 0 after roughly 136 years, 36 days, 6 hours, 28 minutes, and 16 seconds of playing the game. For EXP and gil, the maximum amount is 4,294,967,295 (2^32 - 1), and once over the limit, it will overflow. EXP cannot be overflowed normally unless set to the maximum amount outside of battle. Cover percentage doesn't have a cap and can be increased by equipping multiple Cover Materia at once. The Cover chance overflows at 256%, reducing the percentage back to zero.
{{-}}
+
{{clear}}
   
 
=== ''[[Final Fantasy IX]]'' ===
 
=== ''[[Final Fantasy IX]]'' ===
Line 56: Line 50:
   
 
The maximum number of jumps in the [[jump rope]] [[minigame]] is 8,388,607 after which the next jump will overflow the counter to 0, and afterward the counter won't increase further.
 
The maximum number of jumps in the [[jump rope]] [[minigame]] is 8,388,607 after which the next jump will overflow the counter to 0, and afterward the counter won't increase further.
{{-}}
+
{{clear}}
   
 
=== ''[[Final Fantasy Mystic Quest]]'' ===
 
=== ''[[Final Fantasy Mystic Quest]]'' ===
 
 
[[File:FFMQ Overflow Glitch.png|right|thumb|After Benjamin cast Cure on Dark King.]]
 
[[File:FFMQ Overflow Glitch.png|right|thumb|After Benjamin cast Cure on Dark King.]]
The [[Cure (ability)#Final Fantasy Mystic Quest|Cure]] spell heals its target for a percentage of its maximum HP equal to 50 plus 1.5 times the caster's magic stat. Because of this, if [[Benjamin]] casts Cure on the [[Dark King]], it will overflow and cause damage instead. This does not work for [[Phoebe]]; because her magic stat is nearly twice as Benjamin's, her Cure overflows ''twice'' and recovers HP as normal.
+
The [[Cure (ability)#Final Fantasy Mystic Quest|Cure]] spell heals its target for a percentage of its maximum HP equal to 50 plus 1.5 times the caster's magic stat. Because of this, if [[Benjamin]] casts Cure on the [[Dark King]], it will overflow and cause damage instead. This does not work for [[Phoebe (Mystic Quest)|Phoebe]]; because her magic stat is nearly twice that of Benjamin's, her Cure overflows twice and recovers HP as normal.
{{-}}
+
{{clear}}
   
 
=== ''[[Final Fantasy Legend III]]'' ===
 
=== ''[[Final Fantasy Legend III]]'' ===
 
 
[[File:FFLIII Overflow Glitch.png|right|thumb|Dahak's sprite after his defeat.]]
 
[[File:FFLIII Overflow Glitch.png|right|thumb|Dahak's sprite after his defeat.]]
If [[List of Final Fantasy Legend III enemies#Dahak|Dahak]] uses [[Talent#Swallow|Swallow]] on the entire party, he will heal more then he needs. It has to be [[group-cast]] due to the way Swallow is calculated compare to the single target Swallow which the calculation caps the amount of HP gained from it. The bug is on the formula on the group-cast, it will overflow his HP and make it a negative number that instantly defeats Dahak. Unlike normal defeated enemies, Dahak's sprite remains on the screen during the [[Battle Results]].
+
If [[Final Fantasy Legend III enemies#Dahak|Dahak]] uses [[Talent#Swallow|Swallow]] on the entire party, he will heal more then he needs. It has to be [[group-cast]] due to the way Swallow is calculated compare to the single target Swallow which the calculation caps the amount of HP gained from it. The bug is on the formula on the group-cast, it will overflow his HP and make it a negative number that instantly defeats Dahak. Unlike normal defeated enemies, Dahak's sprite remains on the screen during the [[Battle Results]].
{{-}}
+
{{clear}}
   
 
== Why overflow happens ==
 
== Why overflow happens ==
Line 80: Line 72:
 
* [https://www.youtube.com/watch?v=J9k5OukD_HE Example of damage overflow caused by an enemy in ''Final Fantasy VII''.]
 
* [https://www.youtube.com/watch?v=J9k5OukD_HE Example of damage overflow caused by an enemy in ''Final Fantasy VII''.]
   
{{navbox FFIV}}
 
{{navbox FFVI}}
 
{{navbox FFVII}}
 
{{navbox FFIX}}
 
{{navbox FFMQ}}
 
{{navbox FFL3}}
 
 
{{navbox bugs and glitches}}
 
{{navbox bugs and glitches}}
   
[[Category:Final Fantasy VII bugs]]
 
[[Category:Final Fantasy IX bugs]]
 
[[Category:Final Fantasy IV bugs]]
 
[[Category:Final Fantasy VI bugs]]
 
[[Category:Final Fantasy Mystic Quest bugs]]
 
[[Category:Bugs and glitches]]
 
[[Category:Final Fantasy Legend III Bugs]]
 
   
 
[[it:Bug dell'overflow]]
 
[[it:Bug dell'overflow]]
 
[[ru:Ошибка переполнения]]
 
[[ru:Ошибка переполнения]]
 
[[Category:Bugs in Final Fantasy VII]]
 
[[Category:Bugs in Final Fantasy IX]]
 
[[Category:Bugs in Final Fantasy IV]]
 
[[Category:Bugs in Final Fantasy VI]]
 
[[Category:Bugs in Final Fantasy Mystic Quest]]
 
[[Category:Bugs and glitches]]
 
[[Category:Bugs in Final Fantasy Legend III]]

Revision as of 19:44, 7 April 2020

Template:Sideicon

FFVI Relm Arrowny Menu iOS
Relm: I couldn't miss the chance to practice my drawing!
This article is in need of a few pictures. Perhaps you can help by uploading a picture of the bug for FFIV.

The overflow glitch is a glitch that has appeared in various games throughout the series. It often is a glitch that rolls damage over from the maximum damage to either low damage, or instantly killing an enemy, when the player hits a certain amount of kills, Ability Points, or any other special requirements.

Appearances

Final Fantasy IV

In the SNES and PlayStation versions, when Cure4 heals more than 16,383 (2^14 - 1) damage on an enemy, the spell will heal the MP of that target instead.

When the party meets the Magus Sisters, if the player keeps defeating Mindy and Sandy, letting Cindy revive them over and over again, they will continue to give EXP. After 256 enemies have fallen, this number will loop back to 0. For example, if the party accumulates EXP from 258 kills in a battle, they will receive 2 EXP.

Final Fantasy V

The maximum amount of damage a character can do in a single move is 65,535: (2^16 - 1) though it will always be capped to 9999. If a character were to do more damage than that, the overflow will cause the counter to start over from zero again. For example, if a character dealt 70,000 damage in one hit, the system will count up to 65,535 and roll over to zero, ending up doing 4,465 damage. The easiest way to trigger the glitch is by performing a Sword Dance after having maxed both Strength, Speed and Level via Sing while wielding either the Chicken Knife or a weapon with more than 105 attack wielded with Doublehand.

Final Fantasy VI

The maximum amount of damage a character can do in a single move is 65,535: (2^16 - 1) though it will always be capped to 9999. If a character were to do more damage than that, the overflow will cause the counter start over from zero again. For example, if a character dealt 70,000 damage in one hit, the system will count up to 65,535 and roll over to zero, ending up doing 4,465 damage. The easiest way to trigger the glitch is through casting Ultima with a character who has over 140 Magic. There is a bugfix patch that players can use to fix it on the SNES version.

This glitch was fixed in the Advance version.

Final Fantasy VII

All the integer numbers are encoded in 32 bits. Since they need to be signed integers, the two's complement representation is used. In this encoding the leftmost bit is negative weighted, while all the others have a positive value. Given 2^n, the sum of all the powers of 2 with the exponent in the range (0, n - 1) is equal to (2^n) - 1. This means the lower and upper bounds for in-game integers are

and

If, at any point, the computation of some value results in a number which is out of those bounds, an overflow occurs and the game exhibits abnormal behaviors when this happens.

Final Fantasy VII has several instances of integer overflows. The most important and known one is the damage overflow glitch.

Damage overflow

Other instances

Other overflow-related bugs involve rolling over AP (only on the Underwater Materia), Experience Points for characters, battle and escape counters, the gil counter, the timer, and the chance to cover with the Cover Materia. The maximum amount of battles and escapes the counter will hold is 65,535, and once the player exceeds it, it will reset to 0. The chocobo breeding sidequest and Chocobo Sage's advice are affected by the number of fought battles, and thus behave strangely at very high numbers of battles fought because the game suffers from a two-fold glitch from storing the number of fought battles as a signed 16-bit value. This means the number could be between -32768 to 32767. Thus, if a player who has fought 32767 battles fights one more, the number is saved as -32768 because of integer overflow.

The timer will reset to 0 after roughly 136 years, 36 days, 6 hours, 28 minutes, and 16 seconds of playing the game. For EXP and gil, the maximum amount is 4,294,967,295 (2^32 - 1), and once over the limit, it will overflow. EXP cannot be overflowed normally unless set to the maximum amount outside of battle. Cover percentage doesn't have a cap and can be increased by equipping multiple Cover Materia at once. The Cover chance overflows at 256%, reducing the percentage back to zero.

Final Fantasy IX

If the player plays for 100 hours 256 times, the game's internal clock will reset. This can be used to obtain the Excalibur II without playing for less than 12 hours. However, the player would be required to play for 25,600 hours, 1,067 days, or 2.92 years. The in-game clock color changes whenever it "rolls over" 100 hours from white to red to yellow to cyan to purple, and finally green. At 600 hours (after the timer has been green for 100 hours) the timer changes into a glitchy font and continues counting for 1 hour. At 601 hours the timer reverts to a green 99:59:59 and stops counting and nothing happens until the 2.92 years pass by when it overflows, returns to white 00:00:00 and starts all over.

The time is counted by frames, not by actual seconds, so speeding up the framerate in an emulator will make the timer go faster. This is because of the PlayStation's hardware; since all PlayStations are designed to run at a specific frame rate, games can use that information to control their timing directly.

If one has a Tetra Master card that is at max stats (FAFF) and it is used to play, eventually the card will overflow reverting the card's power to, say, 0AFF. Although it says 0AFF, the card's attack power is that of a FAFF card.

The maximum number of jumps in the jump rope minigame is 8,388,607 after which the next jump will overflow the counter to 0, and afterward the counter won't increase further.

Final Fantasy Mystic Quest

FFMQ Overflow Glitch

After Benjamin cast Cure on Dark King.

The Cure spell heals its target for a percentage of its maximum HP equal to 50 plus 1.5 times the caster's magic stat. Because of this, if Benjamin casts Cure on the Dark King, it will overflow and cause damage instead. This does not work for Phoebe; because her magic stat is nearly twice that of Benjamin's, her Cure overflows twice and recovers HP as normal.

Final Fantasy Legend III

FFLIII Overflow Glitch

Dahak's sprite after his defeat.

If Dahak uses Swallow on the entire party, he will heal more then he needs. It has to be group-cast due to the way Swallow is calculated compare to the single target Swallow which the calculation caps the amount of HP gained from it. The bug is on the formula on the group-cast, it will overflow his HP and make it a negative number that instantly defeats Dahak. Unlike normal defeated enemies, Dahak's sprite remains on the screen during the Battle Results.

Why overflow happens

In computers, "overflow" is the condition that occurs when a calculation produces a result greater in magnitude than that which a given register or storage location can store or represent. 65,535 is a frequently occurring number in the field of computing because it is the highest number which can be represented by an unsigned 16-bit binary number. Some computer programming environments may have pre-defined constant values representing 65,535.

In binary, this number is represented as 1111111111111111 (16 digits, or "bits"), and in hexadecimal, whose values are from 0-9 and A-F, as FFFF. Values of 65,536 and above would require extra digits, or "bits", to represent (65,536 itself would be 10000000000000000 (1 followed by 16 0's), and 10000, respectively). In older computers and devices with processors operating with a 16-bit address bus, 65535 was the highest addressable memory location. In addition, many older game consoles, including the SNES and the PS1, used 16-bit processors and RAM, resulting in all single-address data being limited in value to 65,535.

Because of this, 65,535 is the limit for many player variables in older video games. This could be due to "oversights" in which developers would not anticipate a value requiring more than 16 bits of value, such as damage calculation (and indeed, in many cases it would not; many of these "glitches" require significant effort to generate, such as exploiting the calculation mechanics of certain equipment). This is less of a problem with modern consoles, which use 32-bit processors or higher, boosting this "limit" to a much larger 4,294,967,295, which is FFFFFFFF (eight Fs) in hexadecimal.

External links