You are not logged in.
Pages: 1
Hey is there a way to remove the 999 stat limit? I want to know for the (small) hack I've made where you can level to 250, and with some pokemon, it's kind of a must that this be in effect. I'd also like to know if it's possible to stop the stats from overlapping on the HP Screen? Like once it hits 4 digits it starts freaking out graphics wise.
Thanks for any info!
Offline
~/pokecrystal $ git grep -n "\<999\>"
battle/core.asm:7039:; Cap at 999.
battle/core.asm:7041: sub 999 % $100
battle/core.asm:7043: sbc 999 / $100
battle/core.asm:7046: ld a, 999 / $100
battle/core.asm:7048: ld a, 999 % $100
battle/core.asm:7164:; Cap at 999.
battle/core.asm:7166: sub 999 % $100
battle/core.asm:7168: sbc 999 / $100
battle/core.asm:7170: ld a, 999 / $100
battle/core.asm:7172: ld a, 999 % $100
battle/effect_commands.asm:4195:; Minimum neutral damage is 2 (bringing the cap to 999).
battle/effect_commands.asm:6154: sub 999 % $100
battle/effect_commands.asm:6157: sbc 999 / $100
battle/effect_commands.asm:6890: cp 999 % $100
battle/effect_commands.asm:6892: sbc 999 / $100
battle/effect_commands.asm:6895: ld a, 999 % $100
battle/effect_commands.asm:6897: ld a, 999 / $100
Stats are printed in Function50b7b (main.asm). You'll want to change the following:
ld bc, $0203
This is passed into PrintNum for each stat. The top half ($02) is how many bytes are in a stat. The bottom ($03) is how many digits to print. Change this to 4 if you want to max it out at 9999, and so on.
ld bc, $0014
This determines where the stats are printed. It's 3 tiles away from the edge of the screen, so printing 4 digits will push the last digit off the screen. Subtract 1 to shift it to the left.
Offline
Wow, thanks Comet. I was beginning to think this wasn't possible. But this really helps :P
Offline
So to be clear, Just replace all the 999's with the stat I want to? What about the 100? Does that represent level or something?
For the ld bc, $0203 part, it should look like $0304 if I wanted to accomplish this?
For the last part, should it be ld bc, $0011 or ld bc, $0013?
Thanks!
Offline
999 / 0x100 equals the higest byte of 999 (0x03) while 999 % 0x100 equals the lowest byte of 999 (0xE7). It's just a cleaner way to represent the otherwise less meaningful values of 0x03 or 0xE7.
For the ld bc, $0203 part, it should look like $0304 if I wanted to accomplish this?
I don't know the context of that instruction, but telling by comet's reply, it would be $0204. You can fit any value between 0 and 65535 (0xFFFF) in two bytes.
For the last part, should it be ld bc, $0011 or ld bc, $0013?
$0013 to keep the stats aligned to the left of the screen.
Offline
Okay so believe it or not, I'm still trying to figure this out. I got all the way down to that last part, where Comet told me to look for this: ld bc, $0014
Well, my problem is, which one in Main.asm do I change? There are a few and I don't want to screw the game up by changing the wrong one. Could someone maybe just edit those files he said to edit (Battle/core.asm, effect_commands.asm, and Main.asm) and reupload here? I'm having some seriouss difficulty with this. :/
Offline
Stats are printed in Function50b7b (main.asm). You'll want to change the following:
Offline
Pages: 1