Talk:Experience: Difference between revisions

Line 2,601: Line 2,601:
I know somebody discussed this earlier, over five years ago even, but I'm trying to calculate Exp. in LibreOffice Calc and this is doing my head in. When I fight and defeat Blue's Eevee in Oak's Lab in Yellow, it yields 97 Exp. All my calculations lead to 98 Exp. Eevee is trained, my Pikachu has the same ID as Red, and Eevee's base experience is 92 and is Lv5, so according to the formula, 1.5 * 1 * 92 * 5 / 7 equals 98 when rounded down. Unless RBY uses a different formula, this makes no sense.
I know somebody discussed this earlier, over five years ago even, but I'm trying to calculate Exp. in LibreOffice Calc and this is doing my head in. When I fight and defeat Blue's Eevee in Oak's Lab in Yellow, it yields 97 Exp. All my calculations lead to 98 Exp. Eevee is trained, my Pikachu has the same ID as Red, and Eevee's base experience is 92 and is Lv5, so according to the formula, 1.5 * 1 * 92 * 5 / 7 equals 98 when rounded down. Unless RBY uses a different formula, this makes no sense.
[[User:BeyondTheHorizon|BeyondTheHorizon]] ([[User talk:BeyondTheHorizon|talk]]) 16:16, 17 March 2017 (UTC)
[[User:BeyondTheHorizon|BeyondTheHorizon]] ([[User talk:BeyondTheHorizon|talk]]) 16:16, 17 March 2017 (UTC)
:From a look at [https://github.com/pret/pokeyellow/blob/master/engine/battle/experience.asm the disassembly] I see no obvious reason it should do this. Even when rounding at different points in the calculation, the final answer comes out to 98. However, I don't fully understand the [https://github.com/pret/pokeyellow/blob/master/engine/multiply_divide.asm division routine] and it's possible I'm missing something obvious. I ''think'' it's saying, in effect, that the result of a division will be truncated to eight (binary places, I guess? can't call them decimal places), but I could be wrong. Someone with more knowledge of z80 assembly should probably take a look. --[[User:Felthry|Felthry]] ([[User talk:Felthry|talk]]) 19:00, 17 March 2017 (UTC)
314

edits