View Single Post
Old July 17th, 2012 (8:43 PM).
Ark_Silvanos's Avatar
Ark_Silvanos Ark_Silvanos is offline
    Join Date: Jan 2009
    Location: Texas
    Age: 26
    Gender: Male
    Posts: 150
    Originally Posted by redriders180 View Post
    I think I realize why this is. The Pokerus "flag" is part of the encrypted data subsection of the Pokemon's data. It doesn't get erased when the Pokemon is put in the PC. I assume that, when a Pokerus'd Pokemon is taken out of the PC, it checks if the Pokerus flag is set, and if it is, it'll reset the "Pokerus Remaining" byte.

    That's not to say this is a dead end...the Pokerus "flag" could be used as a "Hidden Ability flag", and when the Pokemon is taken out of the PC, it'll recalculate what the hidden ability is supposed to be.


    I'm going to need to do some research, to see if these bytes are actually used in the Firered games.

    Double Edit: At least with givepokemon, these bytes are zero, which means that they shouldn't be an issue.
    ah... haha ur right... it would make sense for it to reset it based on the flag and not randomly ... I dont know where my brain was when i was thinking that... but then we wouldn't be able to see the ability unless it was in our party, right? or is that how hidden abilites are supposed to work? Like ur not supposed to see em, they just work?

    Wouldn't it just be easier to use the pokerus flag itself? like if we use the upper 4 bits while keeping the lower 4 bits 0, then the pokemon would never contract pokerus (cuz i believe pokerus is coded in the game, it just is never used), and the upper 4 bits can be put to use.

    Originally Posted by redriders180 View Post
    Enemy Pokemon are stored in the same format as the team. There are 600 Bytes for the party Pokemon, and 600 bytes reserved for enemy Pokemon. In reality, you could make a "settrainerbattle" script, modify the data in it with writebytetooffset, and then use "repeattrainerbattle" to activate it.
    ah k... i didn't kno that... so when u encounter a pokemon (trainer or wild) the entire 100 bytes for the pokemon gets generated?

    If it's not too much to ask, would you share your routine for decrypting the "data" subsection?
    doesnt JPAN have a routine that decrypts it as part of his hacked engine? u could use that as a base...

    Originally Posted by Jambo51 View Post
    You need to tidy up the list of unencrypted data, it's very hard to read in the format you have it in.

    Anyway - For the creation of formes in FR, I actually used the upper half of the mark byte as storage for the forme ID. There are 4 marks, which can be set to on or off, which is, of course, a binary setting, which means they use a bit each.

    This leaves 4 bits in the upper half of that byte which are unused. After a minor rewrite of the decrypter and encrypter, I was able to gain these bits for my own use.

    4 bits allows for 16 possible combinations, which is actually quite a lot in terms of formes.

    The "upper half" of the byte refers to the leftmost bits in binary:

    128 64 32 16 8 4 2 1

    In more ROM hacking orientated terms, it means that of a mark byte 0x32, the 0x30 stands for the forme the Pokémon is currently in while the 0x2 stands for which marks is has assigned to it.
    With the forms, the routine your using loads all the pokemon data, right? like type and stats and stuff and not only graphics? So then a branch could be made in that routine using the pokerus data as a check to determine if a pokemon has a hidden ability as well?


    sorry bout all this, but i figured the easiest way to learn is just by asking you guys

    Reply With Quote