/VersionUtils

Obtain version data for VALORANT

Primary LanguagePythonMIT LicenseMIT

VersionUtils

VersionUtils is Python 3.8 script that allows the user to obtain information regarding VALORANT game versions, be it from the game's executable, from WhiteOwlBot's (WOB) public data or from VersionArchive.

Package usage

Installation

pip install git+https://github.com/NotToDisturb/VersionUtils.git#egg=VersionUtils

Documentation


get_wob_versions() -> list

Returns a list of dicts with the contents of WOB's public data. See the version structure.


get_va_versions() -> list

Returns a list of dicts with the contents of VersionArchive's data. See the version structure.


get_live_configs() -> dict

Returns a dict with the contents of Riot's Client Config API.


get_processed_wob_versions() -> list

Returns a list of dicts with the processed contents of WOB's public data, sorted in descending order by release_timestamp. See the processed structure.


get_versions() -> list

Returns a list of dicts with the combined versions from VersionArchive and the processed WOB's public data, sorted in descending order by release_timestamp. See the version structure.


get_latest_version() -> dict

Returns a dict with the processed contents of the latest version in WOB's public data. If you are just looking for the latest manifest, use get_latest_manifest. See the version structure.


get_manifests(version: str = "", branch: str = "") -> list

Returns a list with all the manifests for the specified version and branch.


get_latest_manifest() -> str

Returns a str containing the URL to the latest manifest.


extract_manifest_id(manifest_url: str) -> str

Returns a str containing the hexadecimal string that represents the manifest


get_game_version(game_path: str) -> str

Returns a dict containing version data present in the game's executable. See the game version structure.


get_ue_version(game_version: str) -> str

Returns a dict containing data about the Unreal Engine and UModel (from this fork) versions used in that version. See the UE version structure.


is_version_newer(version_a: str, version_b: str) -> bool

Returns a bool representing whether version_a is newer than version_b, where the versions are numbers separated by periods, such as 05.12.00.808353.

If both versions are of different lengths and are equal up to where the length differs, the newer will be the longer version. For instance 05.12.00.808353 is newer than 05.12.


Return structures

WOB version

Attribute Type Description
id str A hexadecimal string that identifies a patch
upload_timestamp int UNIX timestamp representing when Riot uploaded the version to their CDN
release_timestamp int UNIX timestamp representing when the version became available to players
build_info.branch str Either release-X.YY or pbe, where X.YY is an umbrella version number
build_info.version str The client version visible in-game
build_info.build_version int Unclear what this represents
build_info.build_date str The date of the build
build_info.client_version str A composition of the other build_info attributes

Processed version

Attribute Type Description
manifest str A hexadecimal string that identifies a patch
branch str Either release or pbe
version str The client version visible in-game
date int The date of the build
upload_timestamp int UNIX timestamp representing when Riot uploaded the version to their CDN
release_timestamp int UNIX timestamp representing when the version became available to players (0 if data unavailable)

Game version

Attribute Type Description
branch str Either release or pbe
version str The client version visible in-game
date int The date of the build in MM/DD/YYYY format

Unreal Engine version

Attribute Type Description
unreal_engine str An Unreal Engine version
umodel str The game argument to use when opening this version in UModel, assuming usage of this fork.

Example usage

Here is an example of how to use VersionUtils:

from versionutils import get_latest_version, get_game_version

GAME_PATH = "C:\\Riot Games\\VALORANT\\live\\ShooterGame\\Binaries\\Win64\\VALORANT-Win64-Shipping.exe"

print(get_latest_version()["client_version"])
print(get_manifests("5.12", "pbe"))
print(get_game_version(GAME_PATH))

Note: Replace GAME_PATH with the folder you installed VALORANT to

Standalone usage

It is also possible to use VersionUtils as a standalone script:

  1. Download the latest release
  2. Extract the zip file
  3. Open a console inside the extracted folder
  4. Install the required packages using pip install -r requirements.txt
  5. Run the script using python versionutils.py

Once executed, you will be faced with two options

Check for new manifests
Polls WOB's data every 10 seconds and notifies whether or not a new manifest is available


Query manifests for specific game version
After inputting a version and branch, the manifests available are displayed

Credits

floxay Go
Shiick Go
PixelButts Go