Skip to content

Commit

Permalink
Generate: Add skip progression balancing argument. (ArchipelagoMW#1876)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhar authored Jun 26, 2023
1 parent 1698c17 commit 71bfb6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...')

Expand Down

0 comments on commit 71bfb6b

Please sign in to comment.