Wednesday, August 19, 2009

Silkroad svtmod project


This project is little toolkit designed for easy modification of Silkroad version file - our familiar SV.T in Media.pk2 pack.

Theory

SV.T file contains encrypted string with version number. This number is converted into integer, divided by 1000 and then added to 1.

Silkroad loads this file, decrypts string inside and converts it into 32-bit integer. This integer has two purposes:
  1. It is displayed (with modification described before) in Silkroad launcher and Silkroad client.
  2. It is sent in 0x6100 packet to server to be checked (and in case it is outdated and still update-able version, Silkroad downloads updates).

Below is described the 0x6100 packet.
Size    Type            Name            Description
---------------------------------------------------
1 char loginMethod Specifies login method (probably)
varies sstr identification Identifies client
4 long version Version of client

SV.T file format
Size    Type            Name            Description
---------------------------------------------------
varies lstr versionString Encrypted string with version

Implementation
I have written simple application in C#.NET for SV.T file modification and reading, the svtmod. As always, it is console based application, with unix-like command line arguments.

Command line arguments
svtmod [-f "path/to/SV.T"] [-v "version"]
  • If path to SV.T is not specified, svtmod uses ./SV.T.
  • If version is not specified, svtmod tries to read value from SV.T path.
Usage example
  • Read version of existing SV.T file
    svtmod -f "media/SV.T"
  • Write version to SV.T file (Silkroad displays this value as 6.666)
    svtmod -f "update/SV.T" -v "5666"
Screenshots
As you can see, there is nothing to see on console application.

Much more interesting stuff - the Silkroad Launcher.

And most interesting one - Silkroad Client.