Desert items and secondary RNs in FE6

Hey all,
[Edit: added some links]
Today I wanted to discuss a little about the secondary RN in FE6. Since the post is long, I put some of my asides in spoilers which you can skip!

Some of you might know that in FE6 and FE7, searching for desert items doesn’t use the primary RNs that combat calculations and path drawers use, but it uses a second RN that’s related to unit portraits. In FE7, there are many tricks to burning these second RNs that allows for one to easily pick up the scattered desert items. There is a method for FE6 documented by dondon/beamcrash and Irysa on SF that is also very useful and reliable:

  1. Reset the game. This resets the secondary RN seed.
  2. Check a unit’s portrait and quit out. This burns a consistent of 2RN’s each time, making it so that the next 2RN is 0 mod 11, which allows you to pick up the desert item.
  3. Let a unit wait on a tile with a desert item. Since you did steps 1 and 2, you will automatically pick up that item.

However, there isn’t a very consistent way to have your units do anything OTHER than wait. In FE7, there are methods to get the desert item while trading, while using an item, etc. So I decided to take a closer look at the 2RN system in FE6 to see if such a thing is possible in FE6 as well. I used a SF post by JudgeWargrave to locate the secondary RN in memory (0x3000008) and tested around.

First, an aside about secondary RN’s in chapters that aren’t 14, which is mostly useless.

spoiler

In every chapter BUT chapter 14, the 2RN system is incredibly simply manipulated. You burn a 2RN each time you bring up the mini-portraits (ie go to a unit’s action menu and enter the item menu). If you trade, it burns two. It’s incredibly easy then to manipulate the 2RN in any chapter BUT 14, you can just enter into the item menu however many times depending on how many 2RN’s you want to burn.

The developers wanted to scramble it a little more for chapter 14, Arcadia. First, they burn a fixed number of 2RNs right when you enter Chapter 14. Luckily for us, this is a consistent number so it doesn’t really matter. This burn also happens if you suspend and resume, as long as you enter chapter 14.

Next, every time you bring up a mini portrait (ie item menu), it burns a secondary RN PER FRAME that the portrait is up (two per frame if you’re trading). My hypothesis is that it’s related to the sand that covers a bit of the portraits maybe? Only in chapter 14 is there such sand that forces the portraits to update each frame.

If you instead check a unit’s status, no 2RN’s are burned UNTIL YOU PRESS B. Once you press B, the 2RN’s burn for each frame the unit’s portrait’s eyes are on the screen! Luckily this is always constant! This is what makes Dondon’s/beamcrashes’ technique work. It burns around 200 or so 2RN’s though, so it’s quite a lucky accident!

A small aside:

spoiler

For some reason, this is also true if you enter the “units” menu to bring up your list of units. If you press B on the “units” menu to exit out, it’ll burn exactly the same number of 2RN’s. So if you wanna be fancy, here’s an alternate dondon/beamcrash technique for you: replace the “check unit stats” step with “check units menu”.

Now how does one trade or use item while picking up a desert item? Here’s the technique I developed. We’ll be using an item for simplicity. Let’s say that the item is the LAST one in the unit’s item list. So in order to use it, we’ll use the following inputs once in the unit’s action menu:

  1. Press A to enter the item menu
  2. Press up to scroll to the last item
  3. Press A to select that item
  4. Press A to use that item.

The input sequence is A up A A.

On steps 2,3, and 4, the unit’s mini-portrait is up, so these steps will burn 2RN’s. However, if you press them in quick enough succession, you can make it so that steps 2, 3, 4 take 1 frame each, thus you can burn exactly 3 secondary RN’s with this sequence. The timing is a little tricky but not too hard actually. I practiced it on the no$gba debugger while having my eye on the secondary RNs and was able to get it semi-consistently.

You can also burn exactly 1 secondary RN at a time while in a unit’s action menu by

  1. Press A to enter the item menu
  2. Press B to exit it

Step 2 here has the mini-portrait, so if you press B quick enough after you press A, you can make it last exactly one frame and thus burn exactly 1 secondary RN. Note that after you press B, there is no mini-portrait so you can wait as long as you like to set up the next input sequence.
Using these two techniques, you can burn exactly the amount of 2RN’s you need to guarentee that you find the desert item!

Here’s a map of the first 40 2RN’s after resetting and starting Chapter 14 (which already burns many 2RN’s in the beginning of the chapter as I mentioned).

spoiler

Here 0xB is 11 in hex, and the numbers are in little endian (reverse the order) and then you drop off the first two bits (as mentioned by JudgeWargrave).

	2RN         	Mod 0xB
0.	92 86 86 21     5
1.	EB 4D F5 15     4
2.	7C 5C DF 13     5
3.	AD 3E 22 09     6
4.	06 3D DC 2A     3
5.	AF A1 BC 39     6
6.	F0 7E 45 15     2
7.	B1 FE 9F 1B     8
8.	FA D2 26 17     6
9.	73 8F 1E 24     4
10.	E4 83 EF 11     8
11.	B5 1F 5A 18     5
12.	6E F6 87 36     1
13.	37 2D 96 05     3
14.	58 69 B0 05     A
15.	B9 47 D7 2D     6
16.	62 F5 8C 00     3 STOP
17. FB B0 53 3C     0 
18.	4C CD 12 02     5
19.	BD 3C A9 17     3
20.	D6 BD 1A 0E     7
21.	BF 70 7C 17     9
22. C0 ED 2C 28	    3
23.	C1 E4 14 24     5
24. CA DD A9 3E     1
25.	83 E2 BA 2C     8
26.	B4 A8 C4 3A     A
27.	C5 45 0A 31     2
28.	3E 83 D2 36     8
29.	47 9C 1E 06     3
30. 28 7C C3 2E     A
31.	C9 85 6C 2E     9
32.	32 7C 28 36     7
33.	0B 54 4C 1E     8 STOP
34.	1C 86 FA 2F     0
35.	CD EA A9 23     7
36. A6 36 67 12     3
37.	CF DF FD 10     A
38.	90 84 36 20     9
39.	D1 DA A3 26     1
40.	9A C0 ED 35     4

So the 17th and 34th number let’s us pick up desert items!

From this we can see that if we use our item while burning exactly the 16th 2RN, our unit will automatically use the 17th 2RN to pick up the item! So finally our sequence goes as follows:

  1. We use the item menu technique (A B press) to burn 2RN’s one at a time 13 times.

  2. Then we select our item in quick succession (A up A A) to burn exactly 3 more secondary RN’s, landing us exactly on the 16th 2RN.

  3. Then as you use the item, the game automatically checks the very next 2RN if you are on a tile with a desert item, thus landing on the 17th 2RN, which gives us the item!

You can adjust this calculation with whatever inputs you have to do. Just remember that every frame that the mini-portrait shows up burns secondary RN’s (trading burns two per frame!), and to land on the secondary RN JUST BEFORE one that works (as the game will advance it one more time to check for the desert item).

This technique takes some practice and is probably causally unviable for the most part. But for planned playthroughs it might be some fun.

2 Likes