Skip to content
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

Allow passing in sc2_version to all legacy host and launch methods #213

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dysonreturns
Copy link

When launching SC2 in latest version, the minimap isn't clickable and buttons are greyed out for most users.
This behaviour started happening sometime during 5.0.x.
Everyone should be able to opt into launching v4.10.

Sharpy is currently held back, because the old launch methods (bot vs ai, bot vs bot) do not all allow passing in sc2_version.

To demonstrate what this change does, if we were to update the example like bot_vs_bot.py where you play against yourself/custom scripted enemy:

 result: list[Result] = run_game(
        maps.get("AcropolisAIE"),
        [
            Bot(Race.Protoss, WarpGateBot()),
            Bot(Race.Zerg, ZergRushBot()),
        ],
        realtime=False,
        game_time_limit=2,
        save_replay_as="Example.SC2Replay",
        sc2_version="4.10"
    )
    logger.info(f"Result: {result}")

The added sc2_version param will now propagate through the legacy host- and join- commands.
This obviously works for single-player (bot vs ai) too.

It is safe and does not interfere with the new launcher (run_multiple_games and GameMatch).
Omitting it launches the latest version as per usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant