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

Update to patch 5.0.13 #198

Merged
merged 18 commits into from
Aug 2, 2024
Merged

Conversation

raspersc2
Copy link
Contributor

Further investigation required to get bane morphs to work correctly with Unit.train() method
But the ids here are correct AFAIK for patch 5.0.13
Please let me know if I missed anything out

Added a bane example bot, to aid in debugging bane morphs.

# DOESN'T WORK
# lings.random.train(UnitTypeId.BANELING)

# WORKS
lings.random(AbilityId.MORPHTOBANELING_BANELING)

@BurnySc2
Copy link
Owner

BurnySc2 commented Aug 2, 2024

I tried adding banesbanesbanes.py to https://github.com/BurnySc2/python-sc2/blob/develop/test/run_example_bots_vs_computer.py however I'm getting an error inside the docker container. Probably an issue with the 4.10 linux client?

> File "/root/python-sc2/sc2/main.py", line 156, in run_bot_iteration
    await ai.on_step(iteration)
          │  │       └ 924
          │  └ <function BanesBanesBanes.on_step at 0x7fc17baf89d0><examples.zerg.banes_banes_banes.BanesBanesBanes object at 0x7fc17bafdb40>

  File "/root/python-sc2/examples/zerg/banes_banes_banes.py", line 58, in on_step
    lings.random(AbilityId.MORPHTOBANELING_BANELING)
    │     │      │         └ AbilityId.MORPHTOBANELING_BANELING
    │     │      └ <enum 'AbilityId'>
    │     └ <property object at 0x7fc1a53b4540>
    └ [Unit(name='Zergling', tag=4364959745), Unit(name='Zergling', tag=4364697601)]

  File "/root/python-sc2/sc2/unit.py", line 1472, in __call__
    expected_target: int = self._bot_object.game_data.abilities[ability.value]._proto.target
                           │    │           │         │         │       └ <types.DynamicClassAttribute object at 0x7fc1cf9714e0>
                           │    │           │         │         └ AbilityId.MORPHTOBANELING_BANELING
                           │    │           │         └ {1: AbilityData(name=Smart), 2: AbilityData(name=Taunt), 4: AbilityData(name=Stop), 5: AbilityData(name=HoldFireSpecial), 6: ...
                           │    │           └ <sc2.game_data.GameData object at 0x7fc179c06200>
                           │    └ <examples.zerg.banes_banes_banes.BanesBanesBanes object at 0x7fc17bafdb40>Unit(name='Zergling', tag=4364697601)

KeyError: 4119

@BurnySc2 BurnySc2 merged commit 702edd5 into BurnySc2:develop Aug 2, 2024
22 of 26 checks passed
@raspersc2
Copy link
Contributor Author

I tried adding banesbanesbanes.py to https://github.com/BurnySc2/python-sc2/blob/develop/test/run_example_bots_vs_computer.py however I'm getting an error inside the docker container. Probably an issue with the 4.10 linux client?

> File "/root/python-sc2/sc2/main.py", line 156, in run_bot_iteration
    await ai.on_step(iteration)
          │  │       └ 924
          │  └ <function BanesBanesBanes.on_step at 0x7fc17baf89d0><examples.zerg.banes_banes_banes.BanesBanesBanes object at 0x7fc17bafdb40>

  File "/root/python-sc2/examples/zerg/banes_banes_banes.py", line 58, in on_step
    lings.random(AbilityId.MORPHTOBANELING_BANELING)
    │     │      │         └ AbilityId.MORPHTOBANELING_BANELING
    │     │      └ <enum 'AbilityId'>
    │     └ <property object at 0x7fc1a53b4540>
    └ [Unit(name='Zergling', tag=4364959745), Unit(name='Zergling', tag=4364697601)]

  File "/root/python-sc2/sc2/unit.py", line 1472, in __call__
    expected_target: int = self._bot_object.game_data.abilities[ability.value]._proto.target
                           │    │           │         │         │       └ <types.DynamicClassAttribute object at 0x7fc1cf9714e0>
                           │    │           │         │         └ AbilityId.MORPHTOBANELING_BANELING
                           │    │           │         └ {1: AbilityData(name=Smart), 2: AbilityData(name=Taunt), 4: AbilityData(name=Stop), 5: AbilityData(name=HoldFireSpecial), 6: ...
                           │    │           └ <sc2.game_data.GameData object at 0x7fc179c06200>
                           │    └ <examples.zerg.banes_banes_banes.BanesBanesBanes object at 0x7fc17bafdb40>Unit(name='Zergling', tag=4364697601)

KeyError: 4119

You need to run it on a map that has been patched with the latest (5.0.13) balance changes

Currently they are run on Acropolis:
https://github.com/BurnySc2/python-sc2/blob/develop/test/run_example_bots_vs_computer.py#L131

Latest maps: https://aiarena.net/wiki/maps/#wiki-toc-current-map-pool-sc2-ai-arena-2024-season-2-version-2

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.

2 participants