“How XVM was created” – Part 1

Source: http://habrahabr.ru/company/wargaming/blog/231065/

Hello everyone,

recently, there was a Wargaming programming blog entry by the developers of the very popular XVM mod on how the mod was actually created. You might have heard about the Wargaming developer contest and these guys decided to participate in it as well, but they also decided to write series of posts about how one of the most popular WoT mods in the world came to be. One of the reasons this is posted in the WG programming blog is the fact that XVM developers and WG “buried the hatchet” and started cooperating more. I will not be translating the entire entry literally – instead, I will make it a bit more compact to make sense. Also, if some of the technical stuff could be translated or expressed better, feel free to let me know.

The author of the post (nickname is iBat it seems, the habr blog is really bad in not showing the author identity without manual signature) stated that he started with mods as early as 2011, when he found World of Tanks and learned about the existence of mods for it in the first place. That drove him to try various mods (including UI-changing mods) but he wasn’t satisfied and deleted all the mods after one battle until he ran into the OTM mod.

OTM means Over Target Markers and it changes the icons of the tanks (the class, hitpoints etc.) to other ones, created by players. This included for example the health bar, which at that point was not implemented into World of Tanks yet. This is how it looked:

281ddf80a78cc063a62aa9777b8d115b

The healthbar was the main feature of the OTM mod – at least for iBat. It was a major upgrade, because the only way to read the amount of hitpoints of your and enemy vehicles at that point was to move your mouse over them and read the hint. That made finding “almost dead” tanks somewhat difficult and OTM made it much easier. Second big feature of the mod was that it allowed the player to actually customize its appearance via editing the OTMData.xml file. The amount of customizable things in the OTM mod grew from version to version and the mod itself was popularized in Russia a lot by various video-makers, who used it. In the end, for iBat, this was the first mod that he kept playing with, he customized it for his own needs and kept it as the only mod until he ran into the second mod that he liked, which was the noobmeter.

Noobmeter (in Russian Olenemer, literally “deer meter”) was discovered by him at the point when he still was a WoT supertester. The mod was nice, but it has a very complicated installation process, which confused a lot of people:

- download and unpack the archive
- there was no res_mods folder in the game yet, so the contents of the archive had to be copied directly into the game folder, overwriting the official files
- install some WAMP assembly (SS: not sure what that exactly means)
- a script from another archive directory had to be inserted into the root of the web server. The script acted basically as a WebDAV server with some small changes.
- create a Windows net disk and tie it to the command server, created by the previous step
(“> net use t: http://localhost/local_server/server.php”)
- install a piece of software by the name of Dokan (FUSE equivalent for Windows)
- using the mirror.exe utility from the Dokan software, a mirror of the disk “t:” (previous steps) had to be created (called “r:” – another disk thus appeared in the system, a mirror of the net disk created earlier, but considered local by the system
- in the res\gui\flash folder of game client, a symbolic link with the name of “stat” had to be created, doing… something (SS: sorry, again, very technical) via the following command: “> mklink /D c:\games\World_of_Tanks\res\gui\flash\stat r:\user\”

And only at this point it was possible to make the client work.

16820058c2d9951be00b926e577fa4ae

This mod showed the player winrate directly in the player lists on each side of the screen, using colors to differ them in their quality. After the installation, there was genuine surprise that this thing is working at all and that it’s actually popular. Of course, the average WoT player couldn’t perform the installation without mistakes and so the Noobmeter topic on RU forums was one of the most frequented ones. At that point, it was decided that the process has to be simplified somehow. The first idea was to remove the WAMP step. It was realized that the PHP only basically needs the WebDAV server, which can be created in more ways.

Coincidentally, the developer at that point was dabbling in NodeJS and wanted to write the WebDAV in it. There were however some issues and in the end, he googled and learned of the existence of user mode file systems in general and in Dokan in particular. He started working in Visual Studio and it took him half a night to create a .NET executable, which did the same thing as the “WAMP + Dokan mirror” construct – it created a local disk in the system.

Why the disk was needed: World of Tanks UI worked with Action Script. The mod idea was to take the AS file that was needed, to decompile it, change what is needed within, to compile it and to return it where it came. That’s how the Noobmeter worked – it re-worked the player list in battle to include the winrate and colors. The question was how to get the statistics from the mod server. The obvious answer was to ask the server via http. There was however one catch: AS operates in a sandbox (and there are more than one sandboxes – each for various UI parts) and this sandbox had blocked net access. There exists however an access to the file system using relative paths. That’s what the entire mess with links, disks and servers was for.

It worked like this:

- the AS script recieved a list of players, who had to be rendered in the player list
- for every player, a file “stat\” is accessed
- since the stat part is a link, what really is accessed is “r:\user\”
- the .NET application recieves a request to access the file, it creates a http request towards the mod server
- when it recieves the answer, it gives it to the AS script as “file content”

This simplification increased the amount of that mod users by an entire order. When asking for help with installation, players were now often redirected to the “simplified installation” topic of the developer.

To be continued…

40 thoughts on ““How XVM was created” – Part 1

  1. Yea, where are these times whem B-C 25t was a 9T medium tank …

    Btw very nice article SS.

          • older.

            US was the first new nation since WoT started with russia and germany
            before france came, US was the leader in terms of balance between heavy thick armor and mobile accurate firepower. which is why, some old players like me are still afraid of the T30. and i still want it.

            well now stuff like mobile heavy firepower’s more of a T-54 thing though =/ yankees are always more of a MT person.

            • US was already in the closed beta.. and OTM came alive a year or so after open beta ended.. so yea, he has to mean UK.

      • Well the second screenshot reminded me of these times cause there is a 9T B-C 25t :) I know XVM was developed much sooner. And there was some +-3 MM ? Cause I rememer some Pz. IV in 9T battles and such stuff (without platoon). 6T KV-3 was also awesome. I got IS-4 before the split with the S-70 gun and it was awesome tank. It still is but before it was 9T and totaly OP.

    • That time when tier 6 tanks could meet tier 10s.
      When the KV-3 was a tier 6, and the tier 5 KV had down to tier 3 matchmaking, with the 152mm and 107mm
      Man those times. I actually thought HE on the 122mm was better than AP, because I hadn’t learned weakspots existed

  2. What the hell, M103 and E5 were introduced AFTER the MM spread was reduced from +/-3 to +/-2 what is up with that screenshot?

      • -2/+2 mm got introduced when the hellcat branch got in, and that branch appeared when the HT-es got replaced.

        Anyway, the screenshot is weird even if you take the old -3/+3 MM into consideration…you have there a tier 10 fighting several tier 6s

        • Yeah (good old tier 6 KV-3) at first I thought it was a training battle, what the hell man?

          And yeah I remember the split when T30 became tier 9, but I didn’t remember when exactly the MM spread got lowered. I startee playing right when the French were introduced and still vividly remember M3 Lee vs T29 or the superman KV tank.

          • I also started when the frenchies got added…
            I was interested on getting that free T34 premium but couldn’t get it on time…reached only tier 6(was a tomato back then).

            And I have to correct what I said above…I was wrong, Hellkitty was added in 0.7.2, -2/+2 MM was added in 0.7.5

          • The mighty KV. Sadly I was a noob back then and couldn’t use the tier 5 KV-2 to its full potential. :/

        • T6s against t10 was quite common back then, it was a few months after the frenchies came out that they changed it.

          • Good old times, when I was proud to actually damage a Maus in my KV…
            When there was less to no flaming in the Forums…
            When there was no XVM or other mods around and everything was just fair, and you had a nice competition to fight a hightier Tank…
            I guess we are just the experienced Generation of WoT….

        • +-2 MM got introduced in patch 7.4 and US tree was reworked in patch 7.2 … if you dont believe me search for it. And I don’t know who got it and where did you get it … I mean this +-3 MM … I saw Pz. IV in 9T battles and I doubt it is +-3 MM spread.

  3. Good times. You know, making stuff more complicated is not always for the benefit of it. Back then not every noob could install xvm , camp behind arty and wait for that one snipe shot on a decent player. No winrate calculation and suiciding/afking at the start, armour was worth something and engagements happened at all kinds of distances, not only mid range with absurd firepower and accuracy. Nowadays the bad players of your team run into two fv 183/WTE100 and get slaughtered without retaliation, you start the match down 3 T10s and comeback chances are limited. Maps were actually diverse and there was open and closed maps not just this “two lanes with messy middle and too many bumps to properly shoot” design which since then has dominated everything. I could just keep going on and on, it’s a shame really.

    • I’m pretty sure you’re looking at it with rose-tinted glases, and what are those maps you’re talking about? Many of them got reintroduced, but Himmelsdorf, Malinovka etc. Is still identical to the way it was before.

        • well, except for the very recent little change at the hill, the map hasn’t change since closed beta.

          • I think this map got really changed. There was no chance of rushing along the shore on the left side of the map (where the deep water is) and you could not cross the water in the middle. All these stupid reworks made this map even worse and were made recently. A lot of maps were changed since the times these screenshots were taken.

            • oh yea, they did also lower that side a little bit, but it was also a very recent change.. the fact is that back in beta there were plans to put a town in the middle of malinovka, that would have been a real game change.

    • and you forgot that the game ran almost perfectly smooth and without the lags and freezes

    • What about tier 3es against the old KV?…or tier 8s vs the old KV?…that 152 mm derp combined with the old HE mechanics was sick.
      0.0

      • I had fights in the old KV against Maus… I remember shooting derps at those beasts for 25-50 damage.

  4. WAMP = Windows, Apache server, MySQL database, PHP scripting language; for Linux/Mac it is LAMP/MAMP. It is the most commonly used open-source combo (Apache, MySQL, PHP) for web development.
    - http://www.wampserver.com/en/

    Dokan is a library for creating an user defined file systems…like mounting a SSH-FS as a drive in Windows or doing the same with Dropbox/Google Drive or others. Then you can work with the “files” stored there the same way you would on your HDD.
    - http://dokan-dev.net/en/about/

    SymLink is basically a file-system level shortcut to a file/directory, allowing you to move for example parts of your WoT installation to a different location – eg. have the main game on an SSD and the updates/screenshots/replays directories on a completely different drive :)
    - http://en.wikipedia.org/wiki/Symbolic_link

  5. Nice article but xvm was and continue to be the worst creation ever in games history.Ruined the game and starts the chats-forums war between players for stats,tomatoes,pink,purple,sea colors,greens,lemons,oranges.

  6. Aah, the good old days, when is4 where still a t9, and t6 could meet t10 :)

  7. Pingback: “How XVM was created” – Part 2 | For The Record

  8. WAMP (Windows/Apache/MySQL/PHP) is the standard web dev kit/tools, Windows counterpart for LAMP (Linux/Apache/MySQL/PHP).

    and thx SS for the stories! :)

  9. Pingback: “How XVM was created” – Part 3 | For The Record