Running “Rage of Mages 2” server

How to start your server in Allods 2:

  1. Allods 2 on the Internet consists of three components:
    • client – the game itself; what the user sets up
    • server – instance on which the map runs (one map – one instance of the server)
    • hat – is a program that connects several servers into one
  2. These components are presented as source code, which must be compiled. Each is compiled in its own development environment:
  3. To build a client/server, load the .sln project file into VCExpress 2005/2010; for the hat, download MinGW (from there: osdn.net), customize it (my video guide) and open project file .cbp in Codeblocks.
  4. Cygwin – won’t work…. MinGW – only.
  5. To build a client/server, load the .sln project file into VCExpress 2005/2010; for the hat, download MinGW.
  6. About building the server in VCExpress 2010:
    (a) don’t click the “arrow” for Run (debug), but just shoot down (otherwise there will be an error). You build not an executable (because there are no resources), but srvmgr.dll library, which has built-in “patches”, which are already built into the server (more details here).
    b) by default VSE is running in stripped mode, where the menu has no Build section. To make it appear, check the box “expert settings” in the top menu.
    c) VCE runs on trial mode for 30 days by default. You can find the renewal key on google 😉
  7. To compile them, you will need to install additional libraries and link to them in the compiler settings. The easiest way is to run the compilation, look at the error text, google it and understand which library you need to add. For the server you don’t need anything special, just download VCE 2010 and build it… But for the client, I installed the following libraries (you need to add them to the project path):
  8. After you have worked out the bugs and compiled everything, you will have the client:
    client; key files allods2.exe and a2mgr.dll; *.res files for the client are no longer needed; the data folder should be in the root of the client instead.
    server; key files a2serv.exe and srvmgr.dll; the server folder must contain *.res files, like in vanilla allods.
    hat; to the files of het it is necessary to add .bat (I will describe below).

For DB – use this dump (rename by removing .txt;  it’s got one login a2fan; change pass via SHA1)

Now each component separately:

HAT

First, on the server (or local, if you are doing it on your computer), create a folder for Hat. I recommend C:\Allods2
There you should put the following files (the code indicates the contents of the batons):
libgcc_s_dw2-1.dll
libmysql.dll
libstdc++-6.dll
list.txt
playernum.txt
playerstat.xml
redhat.exe
sleep.exe
redhat.cfg
redhat_servers.cfg
allods.cmd

start /BELOWNORMAL hat2.cmd
sleep 15
start /BELOWNORMAL server.cmd 1
sleep 5
start /BELOWNORMAL server.cmd 2
sleep 5
start /BELOWNORMAL server.cmd 3
sleep 5
start /BELOWNORMAL server.cmd 4
sleep 5

hat2.cmd

:a
start /BELOWNORMAL /w C:\Allods2\redhat.exe
sleep 5
goto a

server.cmd

cd C:\
cd Allods2\
cd Server%1
del /q time.info
:a
del /q time.info
del /q chr\*.sck
del /q chr\info.map
del /q ctl\*
start /BELOWNORMAL /w a2serv%1.exe -cfg"C:\Allods2\Server%1\server.cfg" --cfg2="srvmgr.cfg"
sleep 15
goto a

Considering allods.cmd – we uuse there start /BELOWNORMAL server.cmd 1-4 because, we have 4 servers in our example; if you have one server, make it (1).

About the configure hash files – examples are presented in the build from the githab. The only important thing – specifying servers, if there are many is done through ports like this

Also there folders:
Chr
ctl
logs
Server1
Server2
Server3
Server4

SERVER

We are interested in the folder Server1; this is the actual server (one of the servers, there may be many, respectively there will be folders Server2, Server3 and so on). Inside:

Folder chr
Folder ctl
Folder maps
a2serv1.exe
famehall.dat
graphics.res
main.res
movies.res
patch.res
scenario.dll
scenario.res
sfx.res
sleep.exe
smackw32.dll
srvmgr.dll
world.res
server.cfg

Most important is server config file server.cfg (when you will download it, remove .txt).

In the name of the executable must be the serial number of the server (as the folder, for example: for Server2 will be a2serv2.exe)

sleep.exe – a utility, which you can get on the Internet; and put in each folder, where it is called by the batnik.

That is basically all. To start the server we start the batch file allods.cmd . If something does not work – watch the logs and google how to solve the problem.

Files for editing *.res files (the most important here is world.res, there parameters of spells, things, monsters) can be found at exc!ton‘s website. Also he had guide how to customize RoM2.

CLIENT

Before you compile the client, set in the file network_hat_enter.cpp the address of your server (hat), in my case it is #define URL “hat.tangar.info”. Build and you are ready to go!

CONCLUSION

Now we need to create an account:
To do this, add name and password to the database table “logins”. Registration can be conveniently done through a php-script, which can be found here: https://github.com/igroglaz/rom2utils

You can play!

FAQ

If you see bad encoding in the hat: change default language in for non-unicode programs in “region” section of Windows OS.

flag ServerRotateMaps:
true – the server (instance) will run continuously, as in the vanilla version
false – the server will shut down (and restart automatically by Hat) after playing all the cards in the queue

Can’t create characters: disable STRICT_TRANS_TABLES

Leave a Reply

🇬🇧 Attention! Comments with URLs/email are not allowed.
🇷🇺 Комментарии со ссылками/email удаляются автоматически.