From 71bfb6babd10dea46fe9136bfae387b5aa194ced Mon Sep 17 00:00:00 2001 From: Zach Parks Date: Mon, 26 Jun 2023 16:14:01 -0500 Subject: [PATCH] Generate: Add skip progression balancing argument. (#1876) --- Generate.py | 7 +++++-- Main.py | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Generate.py b/Generate.py index ab8eab22d66b..bd265879fa31 100644 --- a/Generate.py +++ b/Generate.py @@ -7,8 +7,8 @@ import string import urllib.parse import urllib.request -from collections import Counter, ChainMap -from typing import Dict, Tuple, Callable, Any, Union +from collections import ChainMap, Counter +from typing import Any, Callable, Dict, Tuple, Union import ModuleUpdate @@ -53,6 +53,8 @@ def resolve_path(path: str, resolver: Callable[[str], str]) -> str: help='Output rolled mystery results to yaml up to specified number (made for async multiworld)') parser.add_argument('--plando', default=defaults["plando_options"], help='List of options that can be set manually. Can be combined, for example "bosses, items"') + parser.add_argument("--skip_prog_balancing", action="store_true", + help="Skip progression balancing step during generation.") args = parser.parse_args() if not os.path.isabs(args.weights_file_path): args.weights_file_path = os.path.join(args.player_files_path, args.weights_file_path) @@ -140,6 +142,7 @@ def main(args=None, callback=ERmain): erargs.race = args.race erargs.outputname = seed_name erargs.outputpath = args.outputpath + erargs.skip_prog_balancing = args.skip_prog_balancing settings_cache: Dict[str, Tuple[argparse.Namespace, ...]] = \ {fname: (tuple(roll_settings(yaml, args.plando) for yaml in yamls) if args.samesettings else None) diff --git a/Main.py b/Main.py index c43c08047ab1..78ae39e9527f 100644 --- a/Main.py +++ b/Main.py @@ -285,8 +285,10 @@ def find_common_pool(players: Set[int], shared_pool: Set[str]) -> Tuple[ AutoWorld.call_all(world, 'post_fill') - if world.players > 1: + if world.players > 1 and not args.skip_prog_balancing: balance_multiworld_progression(world) + else: + logger.info("Progression balancing skipped.") logger.info(f'Beginning output...')