Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Another Client Versioning System


coziboy
 Share

Recommended Posts

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 format

client 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 String
Dim 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) Then
version = 1
Else
version = Val(GetVar(filename, "Version", "Version"))
End If
```
in the same sub search for

```
buffer.WriteLong App.Major
buffer.WriteLong App.Minor
buffer.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 version

under

```
Public Const CLIENT_REVISION As Byte = 1
```
**How to change version**

in client folder, open data files folder

make / edit a file with name "version.ini" (without **""**)

inside a Version.ini, copy this code

```
[Version]
Version= x
```
#change x with your server version

then 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 code

look for **billymaho**

then replace it to your special key :P

go to client code

replace

```
version = Val(GetVar(filename, "Version", "Version"))
```

with

```
Open filename For Input As #1
Line Input #1, txt
Close #1
version = DecryptWithClipper(txt, "billymaho")
```

change
billymaho with your special key

then include **modEncrypt.bas** from attachment to your client source

last,, open version.ini, clear entire data then insert your Encrypted Version from Encrypt - Decrypt.exe ;)
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

> 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 updater

if they do that, for example i make an update of some paperdoll

user A has updated client, and he use the new equipment

user B hasn't update his client

when user B meet user A, he will got an 'unrecoverable DX8' error

so it's recommended to make an force update for every update

back to main problem, some player sometimes open the client directly from client.exe, not from the updater

so 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

> 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 string

and the encrypter program use a special key

so if the player want to bypass the version, i think they must hack the scripter mind :mellow:
Link to comment
Share on other sites

> 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

look, at client section

replace

```
buffer.WriteLong App.Major
buffer.WriteLong App.Minor
buffer.WriteLong App.Revision
```
with

```
buffer.WriteLong version
```
so client will not send it's app.major minor and revision to server

and 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...