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

Reading and writing into the registry in Essentials

Savordez

It's time to end fangames.
115
Posts
10
Years
  • After noticing the MiniRegistry module (in SpriteWindow) I started looking for documentation of it, but couldn't find any. Looking at the instances where it is used in the code I'd say it's pretty simple, but I'm not sure if there is a way to write into the registry.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    You absolutely don't ever need to put anything in the Registry. Don't bother. Seriously. Even information like the screen size to use is put in the save file, despite that information being used prior to (officially) loading the saved game. You can do the same if you must.
     

    Savordez

    It's time to end fangames.
    115
    Posts
    10
    Years
  • Aw. I was looking for a way to save small data for the game to read (so I could save data across multiple saves quickly), and the registry was a good place to put them since most of the players won't mess with it. I am already using $PokemonSystem to save some data but it can be easily gotten rid of by removing the save file.
     
    Last edited:

    scotchkorean27

    Programmer/Pastry Enthusiast
    24
    Posts
    8
    Years
  • Oh dear god, please no. Avoid writing to the registry if at all possible. You're way better off saving everything to disk. If you want to save small data like user settings across save data, just create a separate config file.

    I think Unity by default also writes to the registry for its persistence module. It's...really bad practice.
     

    Savordez

    It's time to end fangames.
    115
    Posts
    10
    Years
  • Is there a reason why it's such a bad idea? I was only thinking of one of two registry entries, but I guess I could save files to the AppData folder instead.
     
    Back
    Top