• 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?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • 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.

[Other] Hex editing

  • 4
    Posts
    12
    Years
    • Seen Sep 8, 2017
    Okay to start off im not sure if this is the correct section for this question but I couldn't find one that was more appropriate.

    Okay I have a stupid question to which I think I know the answer but I just wanna be sure.
    Is there a way to bypass the 255 limit in ds pokemon games (let's take base stats as an example) .
    Before you immediatly say no, in pokemon conquest the base hp stat for some pokemon is higher than 255, and in a hex editor they use 2 bytes, with that said I know how to edit the 2 byte (16 bit) values to 510 but not past that.
    The same thing goes with the values that are 1 byte I can get them up to 255 but not past that.
    I already tried adding a new byte to the hex file but that as expected completely screws up the game.
    Sorry if this sounds confusing I'm not exactly sure how to explain this.

    Any ideas/suggestions (No I am not capable of rewriting the game with that extra byte).

    Thanks in advance
     
    Adding an extra byte for a stat doesn't work because the game thinks the stat is a one-byte value and would so only load a byte for the stat and not two even if you added one in. The reason why the game breaks after doing so is the fact that all the data pointing gets messed up (= there are things called pointers that are used to point to addresses. If you add one byte in the rom, all the pointers pointing to addresses after that byte in rom data would have to be moved to point one byte further ahead). Even after doing so, the game wouldn't probably work.

    Some other values that are stored in two bytes can be edited to exceed limits of 511 for instance (= 0x1FF). However, there can be code that tells to use only one of the bits from that other byte and not all eight of them for stat calculation. If this is the case, maximum value is indeed 511 because there are 9 bits used for it (and 2^9 - 1 = 511).

    With values that are stored with one byte, you can't exceed the limit of 255 unless you recode the game to function in a different way.
     
    Thanks for the quick answer, knowing that it is not possible (atleast within my capabalities ) to go past the 255 limit, I still have another way to achieve what I want.
    But for this I have to figure out which offset refers to the level cap of a certain pokemon ((in the case of pokemon conquest link limit) also I know it is possible to increase that limit because I have dont it before, but in that instance I replaced all 64 values (100 in decimal) with FF in the narc file that works with the link limits, but I want to do it for a specific pokemon this time).
    I don't know how to figure out pointers and I can't do backwards engeneering (if that is required then don't bother explaining me how to do it because I will most likely not understand it my knowledge of computers is still pretty basic).

    Well thanks in advance
     
    Thanks for the quick answer, knowing that it is not possible (atleast within my capabalities ) to go past the 255 limit, I still have another way to achieve what I want.
    But for this I have to figure out which offset refers to the level cap of a certain pokemon ((in the case of pokemon conquest link limit) also I know it is possible to increase that limit because I have dont it before, but in that instance I replaced all 64 values (100 in decimal) with FF in the narc file that works with the link limits, but I want to do it for a specific pokemon this time).
    I don't know how to figure out pointers and I can't do backwards engeneering (if that is required then don't bother explaining me how to do it because I will most likely not understand it my knowledge of computers is still pretty basic).

    Well thanks in advance
    Not sure if I understood properly your post here, but if there is such limitation byte (it could be handled in a different way too!), it is very likely stored only once. It wouldn't make any sense to limit all the in-game pokemon to some same limit, Gamefreak would much rather build a code that is universal and makes all the pokemon use the same limit.

    I haven't heard of pokemon conquest before so I may mistake something because of that too :)

    Anyways, did you mean you decided to check out with rom corruption (= changing data somewhere like all 64 -bytes to FF -bytes) whether the change takes place? Doing things like this can easily lead into bugs in your hack unless you remember always to undo the changes later on. Best way for undoing is simply using backups.
    Anyway, like I mentioned there, only one "64" byte would stand for this limit unless it is implemented in another way.

    Pointers are pretty basic stuff actually. Especially in GBA games but you're hacking one for DS right? Not sure how these work but Google will probably provide some information. But in the simplest cases, pointers are just small sets of bytes that together refer to a rom address. For example in GBA, an example of pointer could be "2A 66 14 08" which points to rom address 0x14662A (see how this contains the bytes rotated around and 08 taken off of it).
     
    Thanks for the reply again, in response to what you said: instead of 1 level limit (in normal pokemon games 100) different pokemon have different level limits.
    But I already figured out how to edit those.
    What I'm trying to do now is edit the base stats (I have found a site that lists the base stats), but the problem is the base stats aren't listed together so it isn't like hp-atk-def-speed-spatk-spdef, but the base stat values are actually scattered troughout the file, so I don't know how to find where a certain pokemons base stat is stored.
     
    Thanks for the reply again, in response to what you said: instead of 1 level limit (in normal pokemon games 100) different pokemon have different level limits.
    But I already figured out how to edit those.
    What I'm trying to do now is edit the base stats (I have found a site that lists the base stats), but the problem is the base stats aren't listed together so it isn't like hp-atk-def-speed-spatk-spdef, but the base stat values are actually scattered troughout the file, so I don't know how to find where a certain pokemons base stat is stored.
    Can't help you much with that I'm afraid. But hopefully I happened to be of some help at least :)


    There could be a "header" for each pokemon out there where the base stats could be pointed from and this might even be located in a different file.
    I'm not really familiar with NDS rom file structure at all so it's hard to say anything expect for throwing some wild guesses.
     
    Well I seriously appreciate the help you gave me, and at least you kept from wasting my time at trying to pass the 255 limit XD
     
    Back
    Top