# Preliminary Notes

they will have version endpoint that returns a version file that just says the current version like `1002` for example and then it has `.inc` files per version that seem to tell you what files need to exist or not for a particular version.

note every single one of these is text files other than the patch contents itself.

So like `v-100.inc` will have a header that says:
```
# 902 1002 27033968
```
and a list of files and I havent discerned what this means but my guess is this set will let you update from 902 to 1002 and then it just has a bunch of lines that are like:
```
!78fb0446c5fee2c7116d2a238a180e8e /Y29uZmlncw==/YnVmZl9pY29uLnR4dA==
!4c8dff71d38b7ee408c41f8af06592c2 YnVmZl9zdHIudHh0
!28399910eac8b6c5f9d2c274c66ccec0 ZWxlbWVudF9jbGllbnQuY2Zn
!1a94e997ccf9ea21a25fb54d1f7bdd48 aW5zdGFuY2UudHh0
```
where theres an md5 of the file and a prefix that can be `!,+,-` and my best guess is that its a diff type thing where its like overwrite, add, remove? and then the end is a path with parts encoded as b64 to the file on the server *and* the path it belongs in the game. 

so the first line in my example is `configs/buff_icon.txt` so you would download it at `updateuri.com/update/${element || patcher || launcher}/Y29uZmlncw==/YnVmZl9pY29uLnR4dA==` and then patcher saves it as and compress it into the `configs.pck` at `configs/buff_icon.txt`

the files are zlib compressed.