python-sc2 icon indicating copy to clipboard operation
python-sc2 copied to clipboard

ERROR 4444

Open Yifei-Bi opened this issue 1 year ago • 5 comments

it can not run: for vespene in self.vespene_geyser: await self.build_gas(UnitTypeId.ASSIMILATOR, vespene)

Yifei-Bi avatar Dec 02 '24 14:12 Yifei-Bi

me too

hnuxxaqtp avatar Jan 14 '25 12:01 hnuxxaqtp

Calling self.build_gas should not work inside the step function body of a bot class. The only definition of build_gas is in the unit.py file. https://github.com/BurnySc2/python-sc2/blob/15fbac3f2645cc2641ce9a56d481f1f7a7f2a814/sc2/unit.py#L1299-L1325

The bot class defines a self.build() function which should work with gas structures. https://github.com/BurnySc2/python-sc2/blob/15fbac3f2645cc2641ce9a56d481f1f7a7f2a814/sc2/bot_ai.py#L941-L943

Can you give context to your example or show the error stacktrace?

BurnySc2 avatar Jan 14 '25 12:01 BurnySc2

111 222 333 444 555 666 777

hnuxxaqtp avatar Jan 14 '25 14:01 hnuxxaqtp

I recently updated the AbilityIds, but it only does up to Id number 4132: https://github.com/BurnySc2/python-sc2/blob/15fbac3f2645cc2641ce9a56d481f1f7a7f2a814/sc2/ids/ability_id.py#L1296-L1301 The issue is Id 4444 does not map to an ability in that list. Different maps may have different Ids, especially AIE maps.

Did you download the map 2000AtmospheresAIE from https://aiarena.net/wiki/maps/#wiki-toc-map-downloads or can you send me a download link ? Does the error appear on other maps too?

If not, you may have to generate the ids by running the id-generator: https://github.com/BurnySc2/python-sc2/blob/develop/generate_id_constants_from_stableid.py

BurnySc2 avatar Jan 14 '25 15:01 BurnySc2

yeah i get it i copy your ability_id.py code to my local ability_id.py and it works maybe i install it with "pip install --upgrade burnysc2 "dose not get the latest version thanks for you help

hnuxxaqtp avatar Jan 14 '25 15:01 hnuxxaqtp