ROMChooser
ROMChooser uses a number of logic steps to decide a best ROM from the list. These are things like region, language, priority, and various ROM category flags. For more details on how we choose a “best” ROM, see 1G1R.
For more details on the ROMChooser arguments, see the config file documentation.
API
- class romsearch.ROMChooser(platform, game, config_file=None, config=None, default_config=None, regex_config=None, logger=None, log_line_sep='=', log_line_length=100)[source]
ROM choose tool
This works per-game, per-platform, so must be specified here
- Parameters:
platform (str) – Platform name
game (str) – Game name
config_file (str, optional) – Path to config file. Defaults to None.
config (dict, optional) – Configuration dictionary. Defaults to None.
default_config (dict, optional) – Default configuration dictionary. Defaults to None.
regex_config (dict, optional) – Configuration dictionary. Defaults to None.
logger (logging.Logger, optional) – Logger instance. Defaults to None.
log_line_length (int, optional) – Line length of log. Defaults to 100
- get_best_rom(rom_dict)[source]
Get the overall best ROM using a scoring system
- get_best_roms(files, rom_dict)[source]
Get the best ROM(s) from a list, using a scoring system
- print_summary(rom_dict)[source]
Log out a nice summary of what ROM has been chosen here
- Parameters:
rom_dict (dict) – the ROM dictionary to summarize
- run(rom_dict)[source]
Run the ROM chooser
- run_chooser(rom_dict)[source]
Make a ROM choice based on various factors
This chooser works in this order:
Filter out dat categories we don’t want (e.g. demos, betas)
Filter out ROMs that don’t have any languages in the user preferences
Filter out ROMs that don’t have any regions in the user preferences
For the ROMs left, we then choose a best one, using a scoring system with this priority:
Achievements
Regions
Languages
Budget editions
Versions and revisions
Improved versions
We also demote ROMs, with this priority (most to least demoted):
Retool priority
Modern versions
Alternate versions
Demoted versions
- Parameters:
rom_dict (dict) – Dictionary of ROMs to choose between