This library provides various methods for fetching releases from SWTOR’s patch server CDN and installing them. You can use it to write your own patch program. If you just want to install patches without having to do any programming, use the command-line tools from the [ssn-tools](/swtor/ssn-tools) repository.
SWTOR’s patcher uses technology licensed from Solid State Networks (SSN). However, SWTOR does not use the GUI software from SSN; instead the developers wrote their own patch deploy pipeline which interfaces with the command line tools from SSN.
Also, SWTOR does not use all features offered by SSN. Notably, for public-facing products they do not use the peer-to-peer download of patches; instead all patches are downloaded from a CDN. In addition, they do not use the `upcoming` feature where you can preload a future patch before it is released.
Instead of the SSN patcher, the live game (but not the PTS) can also be installed via BitRaider. We do not cover BitRaider since understanding SSN is enough to install all patches.
- __`product`__: SWTOR is split into multiple products. That way, you can choose to only install part of SWTOR. For example, if you install the products `assets_swtor_main` and `assets_swtor_en_us`, you only have the English-language live client files and no other languages and no PTS.
- __`release`__: Colloquially, this is known as a “patch” or “Game Update”. For example, release `264` in product `assets_swtor_main` refers to Game Update 5.2.0. However, not every release can be mapped to a “patch”; sometimes there are multiple releases between two actual “patches”, e.g. because of build errors or because after a release is built, an urgent issue crops up that requires a hotfix before the “patch” can be pushed to the live servers. A release is always an integer starting at `0`.
- __`patch`__: In the SSN sense, a patch refers to the difference between two releases. For example, `263to264` is a patch that can be used to update a product from release `263` to release `264`. The first number is called `from` while the second number is `to`. In order to install a patch, the release given in the `from` number must already be installed on your disk, with one exception: If the `from` number is `-1`, e.g. in patch `-1to0`, the patch does not store the differences but it has the full file contents to allow for a fresh install.
- __`environment`__: An environment consists of multiple products. For example, the live environment (`swtor`) has products like `assets_swtor_main` while the PTS environment (`publictest`) has `assets_swtor_test_main`.
- __`manifest`__: Each product has a manifest, a single file that lists all releases and all patches, and specifies which release is the current release (that the launcher must install).
All files used by SSN are password-protected .zip files with a .exe header. The files are stored in the .zip section, while the .exe header (and the signatures at the end) are used to verify the integrity of the file. We are not interested in checking the integrity, so we only look at the .zip sections. Check the [.zip specification](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) for more information on the .zip format.
For each file, the extra field contains the following information:
- For password protected files, the password needed to decrypt the file. The password itself is encoded and even if you have decoded it, it is usually in binary. Most .zip software only accepts textual passwords, so I recommend writing a custom .zip reader.
- Whether this file is stored in full, or whether only the differences are stored in vcdiff/xdelta3 encoding. Also flags whether a file was deleted, and it includes the hashes of both the old and the new file.
## Manifests (`.patchmanifest`)
A .patchmanifest SSN file contains a single file `manifest.xml` which includes a list of releases and patches, and specifies which manifest is the current one.
## Patches (`.solidpkg`)
A .solidpkg file contains a single file `metafile.solid`, which is in Bencode format (similar to .torrent files) and includes the names, sizes and hashes of all files with the patch data (.zip, .z01, .z02 etc.).
## Version files (`.version`)
Once a patch is installed, you can look into the .version file to figure out which release it is, and use the hashes to verify that the installation is correct.
Manifests are hosted on manifest.swtor.com, while patches are hosted on cdn-patch.swtor.com. They can only be downloaded via HTTP (port 80) but the lack of HTTPS is not an issue since the files are integrity-checked via their included signatures.
In cases where the environment is part of the product name, the URL is slightly different since there is a folder for the environment: `http://cdn-patch.swtor.com/patch/${environment}/${product}/${product}_${from}to${to}.solidpkg`
- __`swtor`__: The live game, including the European and North American servers. Open to all players and the default environment when logging into the launcher.
- __`publictest`__: The Public Test Server to allow players to test upcoming content. Open to players most of the time, unless the testing is under NDA, in which case only accounts invited to the test have access.
- __`biomon_{environment}`__: The `Biomongoose` tool, possibly to monitor performance like CPU and memory usage.
- __`byftools_{environment}`__: Unknown tools `ByfTools` and `iPen`, might be related to Photoshop or other designer tools.
- __`heroblade_{environment}`__: The IDE used for editing the game, either by placing new objects into the game world or editing scripts.
- __`morpheme_{environment}`__: Morpheme is a middleware used for character animations. Only available in the `cstraining` and `liveqatest` environments.
- __`patcher`__: The old launcher before the 2014 revamp. No longer in use.
- __`playerclient_{environment}`__: A client to play the game, used by the devs instead of `retailclient`. Has a console and integrates with HeroBlade.