12,846
pages

A Random Number Generator, commonly abbreviated as RNG, is a mechanism in code to generate randomized values for a variety of purposes. They are frequently implemented in video games and other complex pieces of software.

## Overview

In the context of the Fire Emblem series, RNG plays a role in a variety of factors that affect gameplay. As a high-level explanation, a random seed value is generated during events such as when the game is launched. The game then references this value when calculating the chances of specific in-game events occurring. Examples of events that are affected by RNG include, but are not limited to:

• The chances of specific stats increasing when a unit levels up.
• A unit's hit chance, or the chance that an attack will strike the enemy.
• A unit's critical chance, or the chance that an attack will be a critical attack.

As an example of how RNG affects gameplay, the UI may state that a unit's hit chance is 75, meaning that they have a 75% chance to successfully strike the enemy. If the calculation using the RNG value results in any number between 1-75, the attack is a hit, but if the number calculated is 76 or above, then the attack will miss. To calculate the chance that an attack will be a critical attack, the hit calculation must succeed first.

Note that in all games starting from Fire Emblem: The Binding Blade, the random number generator generates two numbers instead of one for hit chance, and the average of the numbers is the true hit value; in other words, a displayed hit (hit shown on screen) of 75 will actually hit on any two numbers whose average is less than or equal to 75. The effect on overall accuracy of attacks makes a sigmoid effect: it becomes exceedingly rare for an accurate attack (90+ hit) to miss, while inaccurate attacks (Hit lesser than 50) will land far less often than its hit rate would suggest. This is beneficial to the player, as their units usually have higher hit rates while the enemy units tend to have lower hit rates.