• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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] Need Help increasing save size

  • 13
    Posts
    1
    Years
    • Seen Jan 10, 2025
    Greetings! I have been working on a firered decomp that adds Johto, gym leaders trainers and pokemon. Had a good bit of sucess so far but have hit a road block. I would like to add more trainers! I have now reached the max trainers count from opponent.h. If anyone knows how to go about adding even more, and increasing the total save size, that would be great.
     
    Greetings! I have been working on a firered decomp that adds Johto, gym leaders trainers and pokemon. Had a good bit of sucess so far but have hit a road block. I would like to add more trainers! I have now reached the max trainers count from opponent.h. If anyone knows how to go about adding even more, and increasing the total save size, that would be great.
    I guess you would just have to increase MAX_TRAINERS_COUNT.
    It will take up space within saveblock1, but there's already some extra space there. If you get a compilation error due to running out of space, you can delete some of the unused members from the saveblock struct, or you could test if this modification also works in Firered.
     
    The saveblock modification does seem to work, though it does seem to still run into a hard limit of MAX_TRAINERS_COUNT of 992. For now I think that might work, but a solution where i can increase the total size would be ideal.
     
    The saveblock modification does seem to work, though it does seem to still run into a hard limit of MAX_TRAINERS_COUNT of 992. For now I think that might work, but a solution where i can increase the total size would be ideal.
    The code change Anon brought up makes some space in the SaveBlock1, which is one of the structs stored in a savefile and the one that contains the data of common flags such as the trainer flags,
    If you want even more space, you'll have to remove variables stored in the SaveBlock1 pertaining content that you may not use in your project.
    There's plenty to remove from there that the average person does not need, like for example the variable used by the E-reader based Enigma Berry, the pointer to the struct MysteryGiftSave used by Mystery Gifts, etc.
    If you need a reference point for that or a branch that you can merge, there's Ghoulslash's saveblock branch.
     
    Back
    Top