Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Eric on December 20, 2003, 04:27 PM

Title: Version Bytes
Post by: Eric on December 20, 2003, 04:27 PM
Is there any way to retrieve the current version byte from Battle.net after a patch?
Title: Re:Version Bytes
Post by: UserLoser. on December 20, 2003, 04:31 PM
No, the only way would to be search the game's files that were extracted from the new MPQ after a new patch
Title: Re:Version Bytes
Post by: iago on December 20, 2003, 04:51 PM
You can [ugh, I hate myself for saying this] use BNLS's BNLS_REQUESTVERSIONBYTE
Title: Re:Version Bytes
Post by: UserLoser. on December 20, 2003, 04:56 PM
Actually what i have my client do is automatically increment the version byte by 1 (saved to registry).  Then it automatically downloads the MPQ - but that's pretty much useless :P  Then if the user adds the new game files for the patch to where they should be, and the user tries to connect to bot; if the bot gets unrecognized version, it adds 1, and does this process over and over to try and guess the version byte a few times - Good enough for me ;D
Title: Re:Version Bytes
Post by: Dark-Feanor on December 20, 2003, 05:36 PM
Packet log the client and manual find it
Title: Re:Version Bytes
Post by: DarkMinion on December 20, 2003, 05:57 PM
Unless you're doing a client-side version check, why download the MPQ?  DMBot 3.0.5 auto-downloaded the MPQ's, but only because it did all the version check stuff client side...
Title: Re:Version Bytes
Post by: Skywing on December 21, 2003, 01:17 PM
Quote from: UserLoser. on December 20, 2003, 04:56 PM
Actually what i have my client do is automatically increment the version byte by 1 (saved to registry).  Then it automatically downloads the MPQ - but that's pretty much useless :P  Then if the user adds the new game files for the patch to where they should be, and the user tries to connect to bot; if the bot gets unrecognized version, it adds 1, and does this process over and over to try and guess the version byte a few times - Good enough for me ;D
You should check the previous version code first before incrementing, otherwise your program won't handle patches that don't change the minor version number (e.g. 1.13a -> 1.13b).  In any case, I don't much see the use for this if you aren't going to automatically run the patches.
Title: Re:Version Bytes
Post by: UserLoser. on December 21, 2003, 01:22 PM
Quote from: Skywing on December 21, 2003, 01:17 PM
Quote from: UserLoser. on December 20, 2003, 04:56 PM
Actually what i have my client do is automatically increment the version byte by 1 (saved to registry).  Then it automatically downloads the MPQ - but that's pretty much useless :P  Then if the user adds the new game files for the patch to where they should be, and the user tries to connect to bot; if the bot gets unrecognized version, it adds 1, and does this process over and over to try and guess the version byte a few times - Good enough for me ;D
You should check the previous version code first before incrementing, otherwise your program won't handle patches that don't change the minor version number (e.g. 1.13a -> 1.13b).  In any case, I don't much see the use for this if you aren't going to automatically run the patches.

Well for that case that was War3, where the bot uses BNLS - Otherwise, oh well.  Maybe somehow i can figure something else out

Edit:  What you said about the minor version number gave me an idea. Looking at the exe's version minor matches the version byte, but only for d2/w3 - maybe all future patches, the exe minor version will be the version byte

Best i can do without knowing how to extract the mpqs or whatever you do~
Title: Re:Version Bytes
Post by: Skywing on December 21, 2003, 01:25 PM
Quote from: UserLoser. on December 21, 2003, 01:22 PM
Well for that case that was War3, where the bot uses BNLS - Otherwise, oh well.  Maybe somehow i can figure something else out
Quite a few other games have had these kinds of patches, such as Starcraft / Brood War and Diablo II / Lord of Destruction.