Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
I know, but Jpan states that you can modify the data (If you know how to access it (And I am pretty sure I do) And then use the second ASM code to encrypt it back to the original place, using the second ASM script. Would this work?
I know, but Jpan states that you can modify the data (If you know how to access it (And I am pretty sure I do) And then use the second ASM code to encrypt it back to the original place, using the second ASM script. Would this work?
Eventually, yes. To me, decrypting stuff, copying it somewhere unencrypted, then modify it, then encypt it and copy back where it was is quite a waste though.
Eventually, yes. To me, decrypting stuff, copying it somewhere unencrypted, then modify it, then encypt it and copy back where it was is quite a waste though.
If it is inserted into the RAM, can't I just use writebytetooffset to edit it, since the second ASM code will insert my edited RAM into it's correct location, and fix my checksum?
EDIT
I have been fiddling around with your Pokemon Data Decryption / Encryption codes, and noticed every time I try to encrypt, the pokemon turns into a bad egg.
Is there a problem with your ASM code?
If it is inserted into the RAM, can't I just use writebytetooffset to edit it, since the second ASM code will insert my edited RAM into it's correct location, and fix my checksum?
Yes but using writebytetooffset doesn't make a lot of sense then. You might just make an ASM routine that uses variables as inputs so it can be easily reused.
Yes but using writebytetooffset doesn't make a lot of sense then. You might just make an ASM routine that uses variables as inputs so it can be easily reused.
I can't seem to find a way to add an attachment in my first post, so here is the file with the code compiled.
Use: open up in hex editor, find the line where the character part says it starts, and copy from that line up to the one filled with FF (both codes should end in bd, no more after that)
Edit: an error in the file, where it is written "decryption code starts at 0x1b0" should read "encryption code starts at 0x1b0".
And on the edit button, I see no way to manage attatchments, so... I'm sorry.
While it is possible to make code that changes the amount of experience on a pokemon, I have no way of reproducing the level up routine without messing up some of the status gains, at the moment. As such, I give here a code that will allow you to give a pokemon experience, but for it to level up, it is necessary to fight a battle. Also, this code has several limits. First, you can only add up to 32767 exp points (0x7fff). Any bigger and the pokemon will crash your game. Also, if the experience surpasses that of the needed to gain a level, the pokemon will present, on the status screen, a full blue experience bar with a transparent middle, and the numbers will be mixed with question marks.
If you still want it, here it is.
Spoiler:
b507 push {r0-r2, lr}
4804 ldr r0, 0x0203f408 ;Growth block data storage address
6800 ldr r0, [r0]
4904 ldr r1, 0x020370C2 ;var 0x8005 used for storing the exp value
8809 ldrh r1, [r1]
2280 mov r2, 0x80
0912 lsl r2, 0x8
418a cmp r1,r2 ; checks if exp is between "safe" values
db02 blt add_exp
bd07 pop {r0-r2, pc}
6842 add_exp: ldr r2, [r0+0x4]
188a add r2, r2, r1 ; adds the experience
6042 str r2, [r0+0x4]
bd07 pop {r0-r2, pc}
Edit: As promissed, some more examples of what to do with this code
Catch the pokerus
This code here allows you to cure, immunize and catch the pokemon virus. To make it work, put in var 0x8005 a number between 0x1 and 0xf to give it, 0x0 to cure but not immunize and 0x10 or higher to immunize the pokemon, preventing him to ever catch the virus again (even with this code)
Spoiler:
b507 push {r0-r2, lr}
4806 ldr r0, 0x0203f414 ;Misc block data storage address
6800 ldr r0, [r0]
4906 ldr r1, 0x020370C2 ;var 0x8005, keeps pokerus new status
7802 ldrb r2, [r0]
2a0f cmp r2, 0xf ; if immune, do nothing
dc02 bgt end
8809 ldrh r1, [r1] ;time to remain, bigger than 10 to immunize
2910 cmp r1, 0x10
db00 blt infect
2110 mov r1, 0x10
7001 infect:strb r1, [r0]
bd07 end:pop {r0-r2, lr}
EV related material
Several codes that allow you to manipulate Contest stats and Effort values. This following "Stat table" is used in all the following examples
Value -> Stat
Spoiler:
0x0 -> HP EV
0x1 -> Attack EV
0x2 -> Defense EV
0x3 -> Speed EV
0x4 -> Special Attack EV
0x5 -> Special Defense EV
0x6 -> Coolness
0x7 -> Beauty
0x8 -> Cuteness
0x9 -> Smartness
0xa -> Toughness
0xb -> Feel (not used in Fire Red, so if needed, any new stat)
Any of the following EV codes only work correctly if the value is present on the table. Using others results in the unexpected.
Reading EV's/Contest stats
This one code reads the values of the stat placed on variable 0x8005, and places the result on that variable, a number from 0x0 - 0xff.
Spoiler:
b507 push {r0-r2, lr}
4803 ldr r0, 0x0203f410 ;Effort block data storage address
6800 ldr r0, [r0]
4903 ldr r1, 0x020370C2 ;0x8005 for effort type
880a ldrh r2, [r1]
5c82 ldrb r2, [r0 + r2]
800a strh r2, [r1] ;stores effort value on variable
bd07 pop {r0-r2, pc}
Adding to EV/Contest stats
This code allows you to change the values of both EV's and Contest Stats, but it works differently on both situations. Place the value to add, between 0x0 - 0xff on var 0x8006 and a table value on 0x8007.
Adding EV obeys the 512 limit, so only values up to a total of 512 will be accepted. On both the Contest and EV, adding a value that is bigger than the allowed will cause the code to add only up to that limit, meaning that adding efforts that surpass 512 after adding will add only up to 512, and adding values that exceed 0xff will make the value 0xff.
Spoiler:
b51f push {r0-r4, lr}
4811 ldr r0, 0x0203f410 ;Effort block data storage address
6800 ldr r0, [r0]
4911 ldr r1, 0x020370C4 ; use 8006 for storing given points and 0x8005 for effort type
6809 ldr r1, [r1]
040a lsr r2, r1, 0x10 ;value to increase effort-contest stats by
0c09 lsl r1, r1, 0x10 ;stat to increase
0c12 lsl r2, r2 0x10
2906 cmp r1, 0x6
db02 blt Effort
290c cmp r1, 0xc
db0d blt Contest
bd1f pop {r0-r4, pc}
And that is all for now. Feel free to ask for any other codes. Next time I post here I will bring a "teaching Attacks" code, a dumbed down "move tutor".
Because in order for the EV gain/loss ASM to work, you need to first decrypt the pokemon data wit the Decrypt ASM, then use the EV one, THEN use the encrypt one.
That is how those work.
Um.... I was told that this would probably be the right thing to use if I wanted to do this...
I'm trying to make a hack of fire red that implements the Shadow Pokemon features of XD - Gale of Darkness and Pokemon Coliseum.
So, I'm not sure how to make it so you can catch certain trainers' pokemon, or have pokemon you can't catch on the same team as someone with a pokemon you can catch.
Do you have an idea how I would go about doing this? It might be a good thing to include in a tutorial for other people who might want to do something like I do...
Um.... I was told that this would probably be the right thing to use if I wanted to do this...
I'm trying to make a hack of fire red that implements the Shadow Pokemon features of XD - Gale of Darkness and Pokemon Coliseum.
So, I'm not sure how to make it so you can catch certain trainers' pokemon, or have pokemon you can't catch on the same team as someone with a pokemon you can catch.
Do you have an idea how I would go about doing this? It might be a good thing to include in a tutorial for other people who might want to do something like I do...
Uhmm.... I don't think this is the right place, who told you that?
Now please don't be offended, but I think it's too big a job, for what you can handle. (Only juding by your post, sorry)
:) Probably. A lot of other people told me the same.
I'm working on a new thing... I need to edit the ASM routine for when you get a game over to heal your pokemon only back 1 health and 1 PP for each move, instead of a full recovery.
Would that be something more along the lines of what I could do? And if so, how would I do it?
:) Probably. A lot of other people told me the same.
I'm working on a new thing... I need to edit the ASM routine for when you get a game over to heal your pokemon only back 1 health and 1 PP for each move, instead of a full recovery.
Would that be something more along the lines of what I could do? And if so, how would I do it?
I can describe you the needed steps, as for actually making the things work, you'll have to read some ASM tutorials (e.g. the ones I posted in the Documents and Tutorials) and experiment yourself:
Find the exact point when the Pokémon are fully healed after "game over".
Immediately after that point, expand the routine and make it so it reset the HP/PP points all to 1.