Module parthia::rng[][src]

The data types required to work with randomness in Fire Emblem.

The most important thing to know about randomness in Fire Emblem is that the majority of the series does not display the true values underpinning the hit rate or level up systems. Most games use a system that attempts to match human psychology better by making unlikely events even less likely and making likely events even more so, so a 90% hit rate may actually represent a 99% chance to hit.

The other thing to know is that Fire Emblem is fundamentally deterministic: the same actions will result in the same outcomes. You can think of it as playing Monopoly where, instead of rolling new dice for each turn, you roll 1000 dice at the start of the game, and then every time you want to do something with a die roll you simply read off the next values from the list. You can see this with tools that let you save the game state during battles or rewind time (at least the Three Houses version that preserves RNG): if the next attack's critical number comes up as 1, then any attack you choose to do on that turn with a critical rate of 1 or higher will crit.

Different Fire Emblem games have different approaches to dealing with randomness, and so a unified approach is difficult. This file tries to make that easier.

Enums

RNSystem

One of the different RN systems used to compute hits and misses.