Added after 36 seconds
All games (or almost all) store information about settings either in files with the .Ini extension in the same folder as the game or in the registry itself, where they can be easily changed.
True, in Heroes 4, the settings are in a hexadecimal system.
And how can this be done in reality?