Wednesday, May 26, 2010

Progress toward menu automation

After a few hours of searching through memory and playing around with different strings that look related to the map name, I found two offsets in memory that control which map Starcraft loads and plays on (at least in single player games). As of the latest revision (r2262) you can now edit the bwapi.ini config file and set 'map' to the name of the map you want to play on and set menu = 1, then you just need to click 'Start' on the Chaoslauncher to start a single player game on that map. So far it looks like it works every time, though there is room for improvement.

In order to select a particular map, BWAPI right now has to enter the Create Game screen, then cancel out, and then re-enter the Create Game screen. While this repetition is automated, it does add a second or two to the setup time which could be avoided if I can find a way to make it work correctly the first time BWAPI enter's the Create Game screen.

Also it only works for single player games, not replays or multiplayer games, so I will keep looking to find a way to automate map/replay file selection for those game types.

No comments:

Post a Comment