coziboy Posted February 15, 2014 Author Share Posted February 15, 2014 Hello everyone :)I will share my simple mod to answer my friend thread ( [http://www.eclipseorigins.com/community/index.php?/topic/135149-how-to-force-player-update/](http://www.eclipseorigins.com/community/index.php?/topic/135149-how-to-force-player-update/) )This mod just to save bandwith from the player when there is an update from your game…normally, when you want to force player to update their client, you change the version from client.exe from source and server.exe too...then you must upload your client.exe to updater to make player can play the game...but how if your update isn't update your client.exe? in example just update some resource...then this mod will help your player to save their bandwith...this mod make a new configuration for client version with .ini formatclient will read this configuration then send to the server to check if client is updated, if not it will show message box that their client isn't updated...so here is the code :lol:**CLIENT SECTION**open```modClientTCP```search for```Public Sub SendLogin```add```Dim filename As StringDim version As Long```under```Dim buffer As clsBuffer```under```If Options.Debug = 1 Then On Error GoTo ErrorHandler```add```filename = App.path & "\Data Files\version.ini"If Not FileExist(filename, True) Thenversion = 1Elseversion = Val(GetVar(filename, "Version", "Version"))End If```in the same sub search for```buffer.WriteLong App.Majorbuffer.WriteLong App.Minorbuffer.WriteLong App.Revision```and replace it into```buffer.WriteLong version```**SERVER SECTION**open```modHandleData```search for```If Buffer.ReadLong < CLIENT_MAJOR Or Buffer.ReadLong < CLIENT_MINOR Or Buffer.ReadLong < CLIENT_REVISION Then```and replace to```If Buffer.ReadLong < CVERSION Then```next open```modConstants```add```Public Const CVERSION As Byte = x```'change x with your server versionunder```Public Const CLIENT_REVISION As Byte = 1```**How to change version**in client folder, open data files foldermake / edit a file with name "version.ini" (without **""**)inside a Version.ini, copy this code```[Version]Version= x```#change x with your server versionthen if you upload your client, remember to update version.ini too :P**Optional**You can encrypt your version.ini so player can't change their client version with easy way :biker:Download [attachment=1132:encrypter.rar]open it's source codelook for **billymaho**then replace it to your special key :Pgo to client codereplace```version = Val(GetVar(filename, "Version", "Version"))```with```Open filename For Input As #1Line Input #1, txtClose #1version = DecryptWithClipper(txt, "billymaho")```changebillymaho with your special keythen include **modEncrypt.bas** from attachment to your client sourcelast,, open version.ini, clear entire data then insert your Encrypted Version from Encrypt - Decrypt.exe ;) Link to comment Share on other sites More sharing options...
abhi2011 Posted February 16, 2014 Share Posted February 16, 2014 Why not just use VB6's inbuilt versioning control? i.e```app.majorapp.minorapp.revision```And for the updating of resources: Just make a new version for the update and update it. Don't change the client versioning and make the player open the client via the updater. Link to comment Share on other sites More sharing options...
coziboy Posted February 16, 2014 Author Share Posted February 16, 2014 > Why not just use VB6's inbuilt versioning control? i.e> > ```> app.major> app.minor> app.revision> > ```> And for the updating of resources: > > Just make a new version for the update and update it. Don't change the client versioning and make the player open the client via the updater.nah, some player sometimes open the client directly from client.exe, not from the updaterif they do that, for example i make an update of some paperdolluser A has updated client, and he use the new equipmentuser B hasn't update his clientwhen user B meet user A, he will got an 'unrecoverable DX8' errorso it's recommended to make an force update for every updateback to main problem, some player sometimes open the client directly from client.exe, not from the updaterso this is the function of this mod, to warn a player if they don't open from updater :D(sorry for bad english) Link to comment Share on other sites More sharing options...
Growlith1223 Posted February 17, 2014 Share Posted February 17, 2014 You can still use what Abhi said. I believe you can grab the version of an external application with a bit more coding. Try messing around with a couple APIs and such. see what you get. Link to comment Share on other sites More sharing options...
DeathKnight Posted February 17, 2014 Share Posted February 17, 2014 Also, if it's saved client side in a .ini file, wouldn't they be able to just go in and change it ayways? Like if you release a major exploit fix, they could bypass it by just updating the version so the server thinks the client is updated. Link to comment Share on other sites More sharing options...
coziboy Posted February 17, 2014 Author Share Posted February 17, 2014 > Also, if it's saved client side in a .ini file, wouldn't they be able to just go in and change it ayways? Like if you release a major exploit fix, they could bypass it by just updating the version so the server thinks the client is updated.thats why i make optional code to encrypt the version stringand the encrypter program use a special keyso if the player want to bypass the version, i think they must hack the scripter mind :mellow: Link to comment Share on other sites More sharing options...
PVJsquad Posted February 18, 2014 Share Posted February 18, 2014 would not if app.major, app.minor or app.rev not the same as the server, then the client will not run?btw nice i like encrypt system Link to comment Share on other sites More sharing options...
coziboy Posted February 18, 2014 Author Share Posted February 18, 2014 > would not if app.major, app.minor or app.rev not the same as the server, then the client will not run?> btw nice i like encrypt systemlook, at client sectionreplace```buffer.WriteLong App.Majorbuffer.WriteLong App.Minorbuffer.WriteLong App.Revision```with```buffer.WriteLong version```so client will not send it's app.major minor and revision to serverand why i made this function?the reason is [here](http://www.eclipseorigins.com/community/index.php?/topic/135161-another-client-versioning-system/#entry918586)this is just simple modification to save bandwith if you don't make any change to your client.exe after update…just upload 1KB for version.ini, not 1MB for client.exe just to use app.major minor revision :)btw, that encrypt system i found from google :lol: Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now