Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStore hash-version map files for acquiring version number #1312
Comments
|
Hey I can do this one too! Seems similar to the manifest file one. |
|
@drs-11 Great :D In comparison to the manifest file task, the hashes do not need to be generated this time. The file is manually created by the openage team and read in by the converter into I can provide the SHA3-256 hashes for several older releases if you don't own them. |
|
Yes please, I do not currently own any of the releases right now. Ok so the file is need to be created and then |
|
The Conqueros: Version: 1.0c
Rise of Rome Version: 1.0B
Star Wars: Galactic Battlegrounds Version: GOG
Clone Campaigns Version: GOG
AOE1DE Version: Steam
AOE2DE Version: 36906
HDEDITION Version: 5.8
AFRI_KING Version: 5.8
|
|
Don't forget that pretty much all the user-patched exes have differend hashes depending on the selected userpatch features etc. That said, this version detection approach should only be an addition to the other methods, e.g. file discovery. |
|
We can store multiple hashes for a filename that all reference the same version. I'm pretty sure there is a build version in the DE2 exe, but I found none in the older games' exes. Maybe it's there but has no descriptive string in front of it. I don't think we can get away without hashing though because it's the only way I can think of to detect non-standard versions of the game (i.e. modded versions). We cannot detect a modded datfile otherwise. |
|
@heinezen the hashes you provided are different from the ones in And I'm not really sure what we are trying to do here. Are we using to toml map file to separate the version infos? So that it can be used to build up the |
The hashes currently in
Yes, we want to get them out of the Python code into regular files. That way, we can easily update them without changing code. This is important as otherwise we would have to create a new converter release for every patch of a game (in a worst case scenario). Having the data in an auxiliary file is much more convenient because they can be downloaded and read in without Python code changes. In the long run, we also want to get rid of the |
Oh okay of course. Silly me.
Hey since the aim is to get rid of |
That would be really awesome :D |
Required skills: Python
Difficulty: Easy
Motivation
Age of Empires 2 and other Genie games do not store their version number in a plaintext file or anything else that is easy to read. Therefore, openage uses the hashes of files to determine the version of a game. The idea behind this is that a file from a specific release will always have the same hash value. By calculating the hash for a file and looking up the hash in a dict of hash values and version numbers, we can find the release version the file belongs to.
Task
The dicts of hashes and version numbers should ideally be stored in a config file. TOML can be used as a format since we already use that elsewhere in the converter. There should be one config file for every game edition and game expansion.
Example (using TOML):
Every file that we want to hash should get its own table with a subtable for the hash-version map. The recommended hashing algorithms are SHA3-256 or SHA-512.