1/256 miss glitch: Difference between revisions

From Glitch City Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
(Rewrote the introductory paragraph, explained the mechanic, and talked about the implications for speedruns.)
 
Line 1: Line 1:
The '''1/256 miss glitch''' is a [[glitch]] in {{RBY}}, in which all moves (with the exception of a few moves like Swift in English versions, see [[Swift miss glitch]]) have a hidden 1/256 chance to miss. Although there are various moves with '100%' accuracy, these moves can still miss and are stored with 255(/256) accuracy in the data structure.
The '''1/256 miss glitch''', also known as the '''Generation I miss''', is a phenomenon in {{RBY}} where moves that are supposed to have "100%" accuracy actually have a hidden 1/256 chance to miss. The only exceptions to this are moves that bypass the accuracy check altogether, such as [[bp:Swift|Swift]] or moves under the effect of [[bp:X Accuracy|X Accuracy]].

The reason this happens is that the accuracy of a move is stored as a 1-byte integer (i.e. in the range 0–255), where 255 corresponds to 100%. Even when the user's Accuracy stat and the target's Evasion stat are factored in, the calculated probability to hit is still represented as a 1-byte integer (denoted ''acc'' below). However, the game then generates a random number ''rng'' in the full range 0–255, and the move misses if ''rng'' is greater '''or equal to''' ''acc'', which means if ''rng'' is 255, then the move will miss even if ''acc'' is 255 too. In general, this causes the probability of a move hitting to be ''acc'' / 256 instead of the more "reasonable" ''acc'' / 255.

This glitch is not banned even in "glitchless" speedruns, since it is out of the player's control, and will happen randomly no matter what the player does. Therefore, "glitchless" TASes (which usually follow the same ruleset as RTA runs) can take advantage of Generation I misses for significant time saves, although [[Luck manipulation|manipulating]] such a rare event, especially if it needs to happen together with other rare events (e.g. the enemy's move needs to miss while the player's move needs to critical hit), may cause difficulties even for a TAS. On the other hand, in RTA runs, the player will usually encounter ''detrimental'' Generation I misses much more than beneficial ones<ref group=note>Since overall the player makes more moves than the opponent does!</ref>, and an untimely Generation I miss can easily kill the run altogether.


{{YouTube|KF6Icb9JYns|Werster}}
{{YouTube|KF6Icb9JYns|Werster}}

{{stub}}
== See Also ==
* [[Swift miss glitch]]

== Notes ==
<references group=note/>

[[Category:Generation I glitches]]
[[Category:Generation I glitches]]

Latest revision as of 06:21, 26 January 2022

The 1/256 miss glitch, also known as the Generation I miss, is a phenomenon in Pokémon Red, Blue, and Yellow where moves that are supposed to have "100%" accuracy actually have a hidden 1/256 chance to miss. The only exceptions to this are moves that bypass the accuracy check altogether, such as Swift or moves under the effect of X Accuracy.

The reason this happens is that the accuracy of a move is stored as a 1-byte integer (i.e. in the range 0–255), where 255 corresponds to 100%. Even when the user's Accuracy stat and the target's Evasion stat are factored in, the calculated probability to hit is still represented as a 1-byte integer (denoted acc below). However, the game then generates a random number rng in the full range 0–255, and the move misses if rng is greater or equal to acc, which means if rng is 255, then the move will miss even if acc is 255 too. In general, this causes the probability of a move hitting to be acc / 256 instead of the more "reasonable" acc / 255.

This glitch is not banned even in "glitchless" speedruns, since it is out of the player's control, and will happen randomly no matter what the player does. Therefore, "glitchless" TASes (which usually follow the same ruleset as RTA runs) can take advantage of Generation I misses for significant time saves, although manipulating such a rare event, especially if it needs to happen together with other rare events (e.g. the enemy's move needs to miss while the player's move needs to critical hit), may cause difficulties even for a TAS. On the other hand, in RTA runs, the player will usually encounter detrimental Generation I misses much more than beneficial ones[note 1], and an untimely Generation I miss can easily kill the run altogether.

YouTube video by Werster


See Also

Notes

  1. Since overall the player makes more moves than the opponent does!