User:Maxoufox/TMESWC

From Mania Tech Wiki
Jump to navigation Jump to search

Just writing my thoughts about TMESWC. Don't expect anything useful from this (else it would not be under my user). This is purposely written in non-wiki style, as I'm just writing as I'm going. Formatting will be done later. Everything here is done via educated guesses (disassembling the game is a pain due to StarForce).

Running the game

New methods have been found to run ESWC, which works on any Windows version and on wine. See This video. For it to run in wine, Windows version has to be set to XP.

Auth stuff

ESWC's auth isn't like TMF one. Requests and responses don't use XML, but instead uses HTTP GET parameters and CSV-like responses. User-Agent is still set to GameBox.

The game connects to two servers : https://game.trackmanianations.com/ and http://ladder.trackmanianations.com/. The SSL certificates for these domains aren't valid anymore. To make the game connect to them (the servers are still alive), you have to use an HTTP(S) proxy like Fiddler (and allow it to accept bad certificates).

These parameters are always present (except for /patch/patch.php).

Param name Description Comment
ver game version Latest is 0.1.8.0
lang user's defined language en;fr;nl;zh_cn

Requests stuff (game.trackmanianations.com)

/patch/patch.php

Used to check for updates - Defaults parameters not present!

Parameters

Param name Description Comment
key XXXX-XXXX-XXXX-XXXX-XXX, where X is [A-Z0-9] Looks like a product key, even tho the game is free
game the game to check for updates for TmNationsESWC
lang user's defined language en;fr;nl;zh_cn
version game version (current) Latest is 0.1.8.0
osdesc String showing used OS Only present on >= 0.1.7.9; "Microsoft Windows XP(Service Pack 2)" for XP SP2
os String showing used (not the same as osdesc) Only present on < 0.1.7.9; "WinNt2kXp" for XP SP2.
action 0: Check

1: Download

3: ??

protocol maybe protocol version (retro compatibility stuff?) Seen 2
id_download Download id? Only present when action = 3; seems to be the same as in action = 1 response

Response

For action 0 If up to date

0;0;<A string telling you it's up to date, in your language>

If not

0;<Size of update, in bytes>;
<Message about the update>

For action 1

0;<Download ID>;<Server DNS name>;<subdir>;

(So url is <Server DNS name>/<subdir>)

For action 3

0

/online_game/autotest_connection.php

Used to check if the servers are still alive

Parameters

No additional parameters.

Response

Seems to always return

0;1;

/online_game/getladders.php

Used to get ladder server URL

Parameters

No additional parameters.

Response

Seems to always return

0;1;
<server dns name>;ladder;<HTTPS port>;<Server name>;<HTTP port>;

Ex (official servers)

0;1
ladder.trackmanianations.com;ladder;443;TrackMania Nations Ladder;80;

Requests stuff (ladder.trackmanianations.com)

/ladder/getcountriesrankings.php

Used to get rankings of countries

Parameters

Param name Description Comment
start First rank to display
limit Number of ranks to display
laddertype type of ladder Seen g, seems to be ignored by master.

Response

Seems to always return

0;<Number of countires>;[For each country: "<position>;<name>;<points>;"]

Example:

0;4;1;FRA;16777215;2;NED;16777215;3;CZE;16777215;4;GER;16777215;

The master sends <limit> number of countries at max, but set <number of countries> to the total number of countries, not the returned numbers.