I’m writing a slideshow to present to my RL friends (it’s just a thing that we do) about “How Fire Emblem lies to its players about success rates” and realised that I don’t know how the early games’ RNG works. I believe the later games in the series use some weird sine function as well?
Does anyone have documentation they could share about how the RNG in each game works?
Edit: I’ve found this article here, which is fine, but I’m still after doc regarding RNG seeding. I’m also 99% certain that the GABFE games don’t actually roll 1-100 but some stupid number like 1-32768(?) and then scales that number to 1-100, but I can’t find documentation on this either.
Pre-GBA games use 1RN, in which the game will roll 1 ~ 99 numbers to decide whether an attack hits or not
Post-GBA games up until Awakening use 2RN, they will roll the number twice and use the average between the two.
Post Fates games use Hybrid RN, in which they will use 1RN for hits below 50% and 2RN for hits above 50%.
Not enough detail here. I know that some of the GBA games don’t actually use a number between 1-99 but between 1-37234 or something like that. I also know that the 2RN system in the later games is not an average of two numbers but uses a wacky function. As I said, I’m after documentation, not one-liners.
I’d also appreciate any documentation about RNG seeds, like how the DSFE games seed the RNG based on the NDS clock, etc.
FE1, 2 and 3 use largely the same formula, which is incredibly rudimentary and bad (in essence RNG is a single byte and is incremented by 55 every time a new rn is requested - it’s allowed to overflow once it reaches 255). In FE1 it is also improperly bounded (much like FE6) where (I assume) the compiler simplified x100 /256 to x10 /25 which actually allows RNs up to 102 (this was fixed in 2 and 3). This video explains it well if you wanted more info.
I have no idea how 4 or 5 RNG works but I assume Zane would know about FE5’s.
GBA uses a short (or halfword) instead of a byte, which is value 0-65535. There is actually just a set of values for RNs that gets sequentially advanced through, which is why by performing the same actions nets the same results (and why resetting the console can allow RNG manipulation by resetting the position in the list).
I don’t know anything about 9-13 or 16.
Fates and Echoes use a very interesting function as you mentioned which involves some trig functions and is only applied above 50% hit. In essence it is similar to GBA’s true hit though bounded a little more tightly around the true values of the RNs. You can read more about it on the wiki page. I don’t know how the RNs used are created or bounded, though.