VincentASM Posted November 12, 2009 Share Posted November 12, 2009 I'll be honest, I don't like enemy stat compilations because they don't properly take into account that enemies have growth rates of their own. Even if they do factor in stat variations, it's usually just stuff like Hit: 80-81. Whilst I'm unable to nail down enemy stats with the proper precision, I am working on the next best thing. Basically, I've assumed an average RN of 1/1 during the enemy auto-levelling formula and applied the simple averages equation for enemies. Fortunately, most enemies have zero stat additions, so I can just use the class base stats (there are exceptions like non-Lyn Mode Thieves, who have 15 Speed addition). Right now, I have four classes done: Here If anybody wants to compare them to in-game enemies, feel free. I'm kind of lazy to find a HM save where a Paladin is around. I'll probably add the rest when I've gotten enough ideas from others. Since I rarely do this kind of thing myself : P Quote Link to comment Share on other sites More sharing options...
Fei Mao Posted November 12, 2009 Share Posted November 12, 2009 (edited) Examples of HM paladins Edited November 12, 2009 by Generic Officer Quote Link to comment Share on other sites More sharing options...
VincentASM Posted November 12, 2009 Author Share Posted November 12, 2009 (edited) I think that looks good. The Level 6 (+5) Paladin's Skill is a bit high, but the variations can get a little large. (5 + 19 + 5) * 30% = 870% Skill growth Maximum Skill growth is 9/8 * 870% = 978% Paladin's Skill base is 4, which gives 14 Skill at most and 12.7 on "average". Which reminds me, I'd like to do some kind of standard deviation thing, but I don't really know how it works in practice. Edited November 14, 2009 by VincentASM Screwed up before Quote Link to comment Share on other sites More sharing options...
Nitrodon Posted November 13, 2009 Share Posted November 13, 2009 The level 6 (+5) Paladin has average skill actually. Base = 4 19 * 40% = 760%: min=+6 (665%), max=+9 (855%), average=+7.6 (19 levels of Cavalier to promotion) 5 * 30% = 150%: min=+1 (131%), max=+2 (168%), average=+1.5 (5 levels of Paladin to level 6) 5 * 30% = 150%: min=+1 (131%), max=+2 (168%), average=+1.5 (5 levels of Paladin HHM bonus) Total: min=12, max=17, average=14.6 Quote Link to comment Share on other sites More sharing options...
Paperblade Posted November 13, 2009 Share Posted November 13, 2009 Wouldn't doing the calculations like that cause far more variation in enemy stats than actually exists? Quote Link to comment Share on other sites More sharing options...
VincentASM Posted November 13, 2009 Author Share Posted November 13, 2009 The level 6 (+5) Paladin has average skill actually.Base = 4 19 * 40% = 760%: min=+6 (665%), max=+9 (855%), average=+7.6 (19 levels of Cavalier to promotion) 5 * 30% = 150%: min=+1 (131%), max=+2 (168%), average=+1.5 (5 levels of Paladin to level 6) 5 * 30% = 150%: min=+1 (131%), max=+2 (168%), average=+1.5 (5 levels of Paladin HHM bonus) Total: min=12, max=17, average=14.6 I'm not sure if I ever mentioned it to you (I meant to), but I'm fairly sure promoted enemies only use their own class's growth rates (and not just in FE8). So that should be 19*30% in the beginning. I've tested in the past and just did it recently with a HHM Berserker with all 100% growth rates, but their Brigand/Pirate/Corsair growth rates were all 0%. I can do some different tests if you'd like (or maybe you can do some/show me some?). Wouldn't doing the calculations like that cause far more variation in enemy stats than actually exists? Where or why would it do that? I would just be using the enemy growth rate formula that the game uses, as Nitrodon posted above. Quote Link to comment Share on other sites More sharing options...
Nitrodon Posted November 14, 2009 Share Posted November 14, 2009 I'm not sure if I ever mentioned it to you (I meant to), but I'm fairly sure promoted enemies only use their own class's growth rates (and not just in FE8). So that should be 19*30% in the beginning. I've tested in the past and just did it recently with a HHM Berserker with all 100% growth rates, but their Brigand/Pirate/Corsair growth rates were all 0%. I can do some different tests if you'd like (or maybe you can do some/show me some?). I just checked again, and you're right. The game reads the unpromoted class number, but completely ignores it. The stats for the level 6 HHM male paladin are therefore as follows: min=10, max=15, average=12.7, SD=0.91 10: 0.002% 11: 9.069% 12: 32.585% 13: 39.452% 14: 17.413% 15: 1.480% Quote Link to comment Share on other sites More sharing options...
Paperblade Posted November 14, 2009 Share Posted November 14, 2009 Where or why would it do that? I would just be using the enemy growth rate formula that the game uses, as Nitrodon posted above. Was responding to Nitrodon. >_> Quote Link to comment Share on other sites More sharing options...
VincentASM Posted November 14, 2009 Author Share Posted November 14, 2009 (edited) I figured that after I posted, but I'm using more or less the same calculations o__o In any case, I didn't realise the game calculates the Levels separately like that. I'll need to change things to take that into account. EDIT How would you calculate the standard deviation? I kind of ignored learning statistics DX Edited November 14, 2009 by VincentASM Quote Link to comment Share on other sites More sharing options...
Tables Posted November 14, 2009 Share Posted November 14, 2009 Just out of curiosity, could you link/explain exactly how enemy stats are calculated? From what I can see it's based on a growth rate between 7/8ths and 9/8ths of their growth rate, but... then what? Is it something like 1 RN used to determine the growth, then this growth rate is used like a normal growth rate with another RN (so 665% gives +6 35% of the time and +7 65% of the time)? Quote Link to comment Share on other sites More sharing options...
VincentASM Posted November 14, 2009 Author Share Posted November 14, 2009 Here's what Nitrodon sent me a long time ago. I am a tool-assisted speedrunner who dabbles in ROM hacking. This is the result of some hacking I did about two years ago, but I haven't gotten around to revealing my findings until now. Some of the details are more recent, but the assembly hacking was done in 2006. Feel free to do anything you want with this information, as long as you give me credit. (My online name/pseudonym is Nitrodon.) The formula for enemies automatically leveling up is fairly simple. First, the class growth rate in a stat is multiplied by the number of levels gained. Then, a RN is generated between 7/8 and 9/8 of this value (as opposed to the usual 0-99 RNs). Finally, that random number is used as the total growth rate, and a second RN is used accordingly to determine how much that stat increases. This is then repeated for every stat (except FE7 luck). An enemy (at level N) gains levels as follows: 1) If the enemy is a promoted generic, it gains 9 levels (easy/normal mode) or 19 levels (hard mode, including all three FE7 hard modes) in its promoted class (FE8, due to branched promotion) or the corresponding unpromoted class (FE6/FE7) 2) If the enemy is a generic, it gains N-1 levels. 3) If it's FE6/FE8 hard mode or FE7 HHM, the enemy may gain some amount of levels. 4) If it's FE6 hard mode on chapter 5 or earlier, the enemy may gain some amount of levels again. Don't ask me why. 5) If the enemy is a generic in FE8 easy/normal mode (I haven't checked the Japanese version), throw away all of the stats gained up to this point. The enemy gains N-3 levels (and no promoted levels) from the class base stats. Level gains in different steps of this process are not combined into a single growth number. Instead, the "level up" routine is run multiple times per enemy, using 12-14 (depending on the game) RNs each time. The hard mode bonuses (steps 3 and 4) are as follows: FE6 (offset 0x13 in the chapter data): Chapters 1-2: 4 levels Chapters 3-4: 5 levels Chapters 5-6: 6 levels Chapters 7-8x: 7 levels Chapters 9-10: 8 levels Chapters 11-12x: 9 levels Chapters 13-14x: 10 levels Chapters 15-16x: 11 levels Chapters 17-18: 12 levels Chapters 19-20x: 13 levels Chapters 21-22: 14 levels Chapters 23-24: 15 levels Final Chapter: 16 levels FE7 (offset 0x14 in the chapter data): Prologue-Chapter 10: 3 levels (not that it matters) Chapter 11-Final Chapter: 5 levels FE8: I haven't checked yet. Some miscellaneous notes: 1) FE6 chapters 10 and 11 give different HM bonuses, which probably affects Klein and Tate. 2) If you use the cheat that sets all RNs to 0, the stat gain will be 1 more than the minimum in most cases, and exactly the minimum otherwise. This will explain the discrepancy between the HM bonuses listed here and the ones you determined for the later FE6 chapters. 3) FE8 promoted enemies were completely nerfed in easy and normal modes. A level 3 promoted enemy has the stats of a level 1/1 enemy. 4) I haven't checked, so I don't know which routine Ephraim, Eirika, Cormag, Amelia, Duessel, Innes, and Saleh use to level up when they appear at a higher level. They probably either use this routine or the usual 7 RNs/level. -Nitrodon Yeah, it's been a long time since I found time to do something practical with it ^^;;; Quote Link to comment Share on other sites More sharing options...
Tables Posted November 14, 2009 Share Posted November 14, 2009 Thanks, that's what I thought but in clearer terms. Any idea how the 7/8 to 9/8 RN is generated? I presume it's just from a normal RN (so 7/8 + RN/400, giving a value from 7/8th to just under 9/8ths). Quote Link to comment Share on other sites More sharing options...
Nitrodon Posted November 14, 2009 Share Posted November 14, 2009 Standard deviation: The average (expected value) of some random variable is denoted E[X]. The variance is defined as E[(X-E[X])^2], and can also be computed as E[X^2]-E[X]^2. The two expressions give the same number. The standard deviation is the square root of the variance. Randomizing the growth rate: The game generates a random number from 0 to (total growth/4 - 1) in the same way that it would generate the 0-99 RNs we all know and love. The "raw" RNs generated by the game are actually 0-65535. Quote Link to comment Share on other sites More sharing options...
Tables Posted November 14, 2009 Share Posted November 14, 2009 That makes sense. Another question then, do you know how the raw RNs are converted? Is it something like 0-654 becomes 0, 655-1309 becomes 1 etc? And if so, are RNs above 65,499 discarded? Or does the conversion favour certain numbers (by a fraction of a percent, admittedly)? Actually, while we're on the subject, do you know how the game generates the RNs? Since you can hard reset and get fixed numbers, it must follow a pattern but do you know what it is? Sorry for asking so many questions, I just like probability and maths in general, especially when applied to games :P Quote Link to comment Share on other sites More sharing options...
Nitrodon Posted November 15, 2009 Share Posted November 15, 2009 That makes sense. Another question then, do you know how the raw RNs are converted? Is it something like 0-654 becomes 0, 655-1309 becomes 1 etc? And if so, are RNs above 65,499 discarded? Or does the conversion favour certain numbers (by a fraction of a percent, admittedly)? Actually, while we're on the subject, do you know how the game generates the RNs? Since you can hard reset and get fixed numbers, it must follow a pattern but do you know what it is? Sorry for asking so many questions, I just like probability and maths in general, especially when applied to games :P In FE7 and 8, the raw RNs are converted by multiplying by 100/65536 and rounding down. As a result, the numbers 0, 2, 5, 8, 11, 13, 16, 19, 22, 25, 27, 30, 33, 36, 38, 41, 44, 47, 50, 52, 55, 58, 61, 63, 66, 69, 72, 75, 77, 80, 83, 86, 88, 91, 94, and 97 are favored by a fraction of a percent. (The FE6 RNG is slightly bugged and assigns a probability of 36/65536 to the value 100 instead.) As for how the values are generated in the first place, the RNG is a linear feedback shift register with taps at 21 and 47. Quote Link to comment Share on other sites More sharing options...
dondon151 Posted November 15, 2009 Share Posted November 15, 2009 (The FE6 RNG is slightly bugged and assigns a probability of 36/65536 to the value 100 instead.) Is this why 100 acc attacks can miss in FE6? Quote Link to comment Share on other sites More sharing options...
Tables Posted November 15, 2009 Share Posted November 15, 2009 (edited) Thank you, that makes sense as well (regarding the RN rounding). Once I'd gone to bed last night I figured that was probably how it was done :P. For the RN creation method, I'm confused... you said it's a number from 0-65535, so 16bit... so how can the taps be at anything above 16? Is the RNG number longer (e.g. 64 bit or 48 bit) and only the least/most significant 16 bits used? Edit: I checked the pdf attached to that wiki page, apparently 48 bits has taps at 47 and 21, but also at 48 and 20 - does it just not have the extra taps (and thus a smaller range, I guess), or does it have these two as well? Edited November 16, 2009 by I eat tables Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.