handler.applyPatch( 'happyVending' ) if( config[ 'patches' ][ 'FixMusicTransition' ] ): handler.applyPatch( 'fixMusicTransition' ) print( 'Writing to ' + outFile + '...' ) sys.stdout.flush() try: handler.write( outFile ) except Exception as ex: logger.logError( 'System error: {0}'.format(ex) ) print( 'An irrecoverable error occured' ) if( not logger.error ): print( 'Modifications completed successfully. See log file for details (Warning: spoilers!).' ) print( 'Seed was ' + str( handler.randomseed ) ) print( 'Enter this seed in settings file to produce the same ROM again.' ) else: print( 'Program ended with errors. See log file for details.' ) sys.stdout.flush() logger.logAlways( logger.getHeader( 'Seed' ) ) logger.logAlways( 'Seed was ' + str( handler.randomseed ) + '.' ) logger.close() logger.rename( 'randomize-' + str( handler.randomseed ) + '.log')
handler.randomizeMapSpawnItems( foodOnly=config['mapItems'].getboolean('FoodOnly')) if (config['evolution'].getboolean('Enabled')): handler.randomizeEvolutions() if (config['patches'].getboolean('FixEvoItemStatGain')): handler.applyPatch('fixEvoItems') if (config['patches'].getboolean('AllowDropQuestItems')): handler.applyPatch('allowDrop') if (config['patches'].getboolean('Woah')): handler.applyPatch('woah') print('Writing to ' + outFile + '...\n') handler.write(outFile) if (not logger.error): print( 'Modifications completed successfully. See log file for details (Warning: spoilers!).' ) print('Seed was ' + str(handler.randomseed)) print('Enter this seed in settings file to produce the same ROM again.') else: print('Program ended with errors. See log file for details.') logger.logAlways('End of log.') input('Press Enter to finish...')