Skip to content

Generate: Add skip progression balancing argument. #1876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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