Jump to content
SciresM

Fire Emblem Awakening Growth Rate Cipher Documentation

Recommended Posts

Hi there. 

As you may, or may not know, growth rates in Fire Emblem: Awakening are stored enciphered, so as to prevent easy datamining of growth rates.

As far as I can tell, the deciphering process has never been documented before.

Let's fix that, shall we? :)

As an example, I will be using Lissa's growth rates.

 

Unit Growth Rates

Growth rate data is stored, enciphered, as a sequence of 8 bytes, in the usual stat ordering (HP, Str, Mag, Skl, Spd, Lck, Def, Res).

Lissa's growth rates for example, are the highly inscrutable `20 BC AA D5 74 39 E8 BD`.

 

The conversion process is both simple, and fairly complex. To lookup the growth rate for the stat at index N (zero-indexing), we perform the calculation

INDEX = (ENCIPHERED[N]- (0x63 * ((CHARACTER_ID ^ 0xA7) - 0x21 * N) ^ 0xD9)) & 0xFF;

GROWTH_RATE = LOOKUP_TABLE[INDEX];

Where LOOKUP_TABLE is the following lookup table, found at 0x4001C in GameData.bin:

59 89 D2 D1 DE C6 47 21 BA DB C5 EC 35 BD 9F 9B 2D 7B B2 09 F7 53 99 8F C4 90 FA 34 F8 19 94 02 ED 56 40 6C F4 88 4F 2B B4 BB EB 74 B7 0D C2 A4 EE 93 CF 42 F1 17 BF F0 A5 BC 0F 6E 1B 73 8D A6 3B 50 33 E0 AF 9D DD FF FE AA CE 12 62 E2 FB C1 23 49 D6 CD 04 2F 41 15 1A 32 03 8A 14 58 0A A3 D0 71 7D D3 A0 52 BE D7 8B 48 37 13 A8 44 08 3C E3 63 F6 DF 16 7C 46 F3 07 CC 79 C3 6B 3F 81 00 20 28 AE EF 6D 8E 0E 1D 4B 95 A1 B6 D4 C7 3E E5 D8 5A 43 26 7A E4 4E 9C 30 4C C8 97 FD 54 68 C0 FC 36 1C 75 01 96 E9 1F 45 06 70 2C 29 67 2E F5 9E 92 60 3D E8 E7 66 2A 91 EA 57 A9 1E 5F 27 51 C9 65 18 AB 83 D5 85 61 0C 77 7E F9 7F 5E DC 84 5C 6A 39 4D 87 5B DA 69 E6 5D 11 82 10 55 D9 CB 8C 72 86 6F 64 80 CA A2 05 AC 4A B1 0B 38 E1 AD 31 B3 98 78 B8 22 76 9A 24 A7 25 B5 F2 B9 B0 3A

 

Okay, there's basically no chance that was clear. So let's do the calculations, to make it a bit clearer.

Suppose we want the HP growth rate. That's stat 0. Enciphered[0] is 0x20, and lissa's character ID is 4, so we calculate INDEX = (0x20 - (0x63 * ((4 ^ 0xA7) - 0x21 * 0) ^ 0xD9)) & 0xFF = 0x50. The value in the lookup table at index 0x50 is 0x23, or 35 -- Lissa's base HP growth rate.

Suppose we want the Lck growth rate. That's stat 5. Enciphered[5] is 0x39, and lissa's character ID is 4, so we calculate INDEX = (0x39 - (0x63 * ((4 ^ 0xA7) - 0x21 * 5) ^ 0xD9)) & 0xFF = 0x56. The value in the lookup table at index 0x56 is 0x41, or 65 -- Lissa's base Lck growth rate.

 

Class Growth Rates

As with unit growth rate data, class growth rate data is stored, again enciphered as a sequence of 8 bytes in the usual ordering.

Lissa's base class is Cleric, which has enciphered growth rate `11 A6 E5 D2 CF 01 67 A6`.

 

The conversion process for class growth rates proceeds much like the unit growth rate -- the formula is just different. We perform the calculation:

INDEX = (ENCIPHERED[N]- (0x23 * ((CLASS_ID ^ 0x46) - 0xF1 * N) ^ 0x78)) & 0xFF;

GROWTH_RATE = LOOKUP_TABLE[INDEX];

Where LOOKUP_TABLE is the same as it was for unit growth rates.

 

Again, walking through the calculations for Cleric:

Suppose we want the HP growth rate. That's stat 0. Enciphered[0] is 0x11, and cleric's class ID is 0x35, so we calculate INDEX = (0x11 - (0x23 * ((0x35 ^ 0x46) - 0xF1 * 0) ^ 0x78)) & 0xFF = 0x50. The value in the lookup table at index 0x50 is 0x23, or 35 -- Cleric's base HP growth rate.

Suppose we want the Lck growth rate. That's stat 5. Enciphered[5] is 0x01, and cleric's class ID is 0x35, so we calculate INDEX = (0x01 - (0x23 * ((0x35 ^ 0x46) - 0xF1 * 5) ^ 0x78)) & 0xFF = 0x7F. The value in the lookup table at index 0x7F is 0x00, or 0 -- Cleric's base Lck growth rate.

 

Hope this is clear, feel free to ask any clarifying questions, and have fun playing around with growth rates!

Edited by SciresM

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...