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!
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!