• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Research: Pokemon data decrypting (asm code)

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
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.
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
If you do everything correctly, that is.

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?
 
Last edited:

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
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.
 

JPAN

pokemon rom researcher
104
Posts
15
Years
  • Seen Jul 2, 2016
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.
 
Last edited:

Korronensu

Scrap Punk
153
Posts
15
Years
  • Age 34
  • Seen Feb 28, 2010
To 0m3GA ARS3NAL

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:


And in the compiled version
Spoiler:


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:

Compiled and ready
Spoiler:


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:

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:


Ready to use version
Spoiler:


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:

Ready version
Spoiler:


Erasing all EV's
This last code receives nothing and returns nothing, changing only all EV's to 0.
Spoiler:

Ready version
Spoiler:


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".


Now HERE is some much needed info. Thanks so much for that. I hope Score_Under finds this.
 
28
Posts
14
Years
  • Seen Apr 28, 2021
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...
 
581
Posts
17
Years
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)
 
28
Posts
14
Years
  • Seen Apr 28, 2021
:) 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?
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
:) 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:

  1. Find the exact point when the Pokémon are fully healed after "game over".
  2. Immediately after that point, expand the routine and make it so it reset the HP/PP points all to 1.
 

NarutoActor

The rocks cry out to me
1,974
Posts
15
Years
Hey Jpan how would you go about making an asm routime where when you step on a tile the first pokemon in your party becomes paralyzed or poisoned?
 
Back
Top