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

[Script] [pokeemerald] Preventing Pokemon getting fully healed when put in PC

4
Posts
3
Years
  • Hi there. Quick disclaimer I'm very new at working with decomps so some of this may sound silly. I've only been able to implement pretty basic features so far and this one has me stuck. I also am using the battle engine, item expansion, and Pokemon expansion, in case that affects this (though I don't believe it would?)

    I'm wondering if anyone has any idea on how you could remove the feature where Pokemon get their HP/PP fully restored whenever they're put in a box, basically like how Gen 8 games do it. I don't need them to be healed when you talk to Nurse Joy, I'm just trying to figure out how they'll retain whatever HP and PP they had when they're put in the box and that's it.

    I initially tried this by just adding a u16 hp property to the BoxPokemon struct in berry_fix/payload/include/pokemon.h, and adding a call to SetBoxMonData for 'hp' along wiht the others in src/pokemon.c. Obviously it wasn't that simple (it kept telling me BoxPokemon doesn't have an hp property, so I didn't do that right I suppose). Just the fact that BoxPokemon doesn't have a "current HP" property like regular Pokemon do seems to complicate this. I also tried reading through src/pokemon_storage_system.c but it didn't look like this issue was being handled there, so I'm not really sure where to go.

    Any help/pointers would be appreciated. Thanks!
     
    247
    Posts
    6
    Years
    • Seen May 19, 2024
    I initially tried this by just adding a u16 hp property to the BoxPokemon struct in berry_fix/payload/include/pokemon.h, and adding a call to SetBoxMonData for 'hp' along wiht the others in src/pokemon.c.

    I believe that you should make changes to include/pokemon.h rather than berry_fix/payload/include/pokemon.h. I think the ROM compilation process looks at that folder rather than the berry_fix folder for the definition of BoxPokemon.
     
    4
    Posts
    3
    Years
  • I believe that you should make changes to include/pokemon.h rather than berry_fix/payload/include/pokemon.h. I think the ROM compilation process looks at that folder rather than the berry_fix folder for the definition of BoxPokemon.

    You were totally right, whoops. Thanks! Got it to compile with u16 hp in BoxPokemon, though it still doesn't work after adding the call to SetBoxMonData for hp. It's a step closer though.
     

    McPaul

    On my way to become a controversial and hated memb
    288
    Posts
    6
    Years
  • Have you found a solution?

    I'm not great with gen III but I think it might be because the Pokémon are stored in 100-bytes format in the player's party and take only 80-bytes in the storage system.

    Maybe the key would be to make storage system store your Pokémon in this 100-bytes format, but that would require some changes in the memory, which I don't know how to do, even more in gen III. 😅
     
    Back
    Top