Question about loading a multiplayer game through cmd

Hello everyone,

I’ve been loosely following the development of VCMI for last years. My main reason for being interested in the project is me being hopeful that it could someday provide a somewhat stable LAN multiplayer environment including WOG and other mods. Something which has been plagued with crashes and other issues from the days when I actively played internet LAN games with my friends.

While reading about VCMI v0.97 I’ve noticed command-line game loading has been introduced. I’ve been trying to get this to work properly, but unfortunately my friend and I have not been able to find the right sequence of actions to perform a proper server-client connection followed by the loading of the multiplayer save.

Steps taken to obtain a multiplayer save to load
Player 1: Hosted a portforwarded multiplayer game on a 2 player sized map.
Player 2: Joined the lobby.
Player 1: Started the game, both players properly connect. Plays and ends the turn.
Player 2: Plays and ends a turn.
Player 1: Saves and returns to the main menu, exits game.
Player 2: Client crashes.

Steps taken to load a multiplayer game
Player 2: Downloads the same save files from player 1 (game.vcgm1 game.vsgm1) and places them in the vcmi/Saves folder.
Player 1: Starts up the client to main menu using the sample command, which is suitable for the previous save.

vcmiclient --loadserver --loadnumplayers 2 --loadhumanplayerindices 0 --loadhumanplayerindices 1 --loadplayer 0

Player 2: Starts up the client to main menu through the following command.

vcmiclient --loadplayer 1 --loadserverip (serverip) --loadserverport (serverport)

Player 1: Selects load game, multiplayer and specifies the saved game. The game will enter the loading screen where the bar is frozen at 0%.
Player 2: Selects load game, multiplayer and specifies the saved game. The loading screen will remain at 0%
Player 1: Now loads the game and starts the turn. Player 2 wont get past the loading screen.

We’ve tried several other ways of loading a multiplayer game. Including changing up the command line times (server goes into loading screen first, player 2 then starts client). And trying to have player 2 load the game by going into new multiplayer game -> join. This crashes the game for player 2 and then player 1 starts the game.

I hope anyone could provide me with instructions on how to properly load a game through the commandline but also what steps to take with the client for both parties.

Welcome to forums. Unfortunately if you use “stable” 0.98 build from @Warmonger it’s most likely have too many of unfixed bugs and latest development build have MP in broken state.

Today I added workaround for MP and option to make server startup easier. Check github:
github.com/vcmi/vcmi/commits/develop

So in case you run on Windows you can use those builds:
vcmi.arseniyshestakov.com/

On Linux I don’t think there’s many options except to compile it yourself.

BTW I tested loading with latest version and it’s works for me on my local PC:

Start server like that:

vcmiserver --port 3333

First client like that:

vcmiclient --donotstartserver --testingport 3333 --testingfileprefix MPTEST_3333_clientone_ --loadserver --loadnumplayers 2 --loadhumanplayerindices 0 --loadhumanplayerindices 1 --loadplayer 0

Second client:

vcmiclient -d --testingport 3333 --testingfileprefix MPTEST_3333_clienttwo_  --loadplayer 1 --loadserverip 127.0.0.1 --loadserverport 3333

Works. Though keep in mind both testingport and testingfileprefix have to be set in order to savegames on same PC to not overwrite each other.

Also multiplayer heavily untested so unfortunately at least for now it’s going to crash.