Skip to content

Description of patch creation process #10

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,34 @@ Modifies map files to replicate behavior of the live version of Starcraft 2 in p

Intended for use with latest Sc2 linux binary 4.10.0 to speed up AI competition & training

## Download Maps
### Latest Maps
https://aiarena.net/wiki/maps/#wiki-toc-current-map-pool
## How the patch data is created

A version manager should no longer be required to adjust IDs between game versions.
The patch data includes all game data changes between version 4.10.0 and the target version of StarCraft II.
By applying all the changes to a map, a game client at version 4.10.0 running this map will behave as if the game is at the target version.

To detect these maps query map name through the Sc2 API and all map names will end with "AIE"
1. Game data changes are taken from the Casc storage of the game. One way to do it is by comparing the extracted files at https://github.com/Ahli/sc2xml. The history of this github repo - https://github.com/Ahli/sc2xml/commits/master/ - gives the deltas between individual versions.

## How to apply
https://www.youtube.com/watch?v=lTBFy-R01Wo
1. Game data changes for the target version are applied on top of the patch data for the previous version so that the patch data always contains all game changes since version 4.10.0. This is not a trivial task because:
* Game changes in a later version may affect changes of a previous version. The affected changes of the previous version are removed from the patch data.
* Game changes may be based on features of version 5.x which are not present in version 4.10.0 of the game. These are manually translated to features available in version 4.10.0, so that the game client can process them.

1. The patch data is tested by applying the patch to maps and testing them in the environments for bot-vs-bot and human-vs-bot.

## How to apply the patch to a map

1. Get a local copy of the map to be patched
* If the map is already used in AI Arena, download it from from https://aiarena.net/wiki/maps/#wiki-toc-map-downloads

1. Launch StarCraft II Editor either from "Launch Editor" button in Battle.net application, or by running the executable in the installation folder of the game

1. Open the map in the editor like this - https://www.youtube.com/watch?v=lTBFy-R01Wo

1. Make sure the name of the map ends in "AIE" because some bots and bot frameworks will reject maps with names not ending in "AIE"

1. Get the patch data by downloading the corresponding folder from https://github.com/shostyn/sc2patch/tree/master/Patch

1. Launch an MPQ editor (Download from http://www.zezula.net/en/mpq/download.html)

1. Open the map in the MPQ editor and apply the files from the patch data

1. Test the changes by playing the map. Check if the changes from