Sidebar Window

Login





Civilization Links



Other Links



« Development Twitter | Home | MOD PlayerName Explained »

Running Multiple Instances of Pitboss

By Joe | May 2, 2010

Grawl asked how one could do this in a comment to a previous post, and I ended up writing a rather lengthy response. I decided to make it a full-on post, rather than just a response to his comment. Anyone interested in a consolidated list of steps can thank him as much as me.

To run multiple copies of Pitboss, here’s what I did:

First, I followed the instructions on Scott Parker’s blog to make a “stripped down” copy of Pitboss for my server. The article is old, and only talks about Vanilla and Warlords, but the same steps can be applied for Beyond the Sword.  The gist of it is removing all the art / sounds / scenario files you don’t need, so that the entire directory to run Pitboss is significantly smaller than the entire Civ 4 directory.  If you are running Pitboss on a server that already has Civilization 4 installed on it, you can skip this step.

Next, create shortcuts that launch Pitboss with the ALTROOT argument. This tells the Pitboss program that you want to run it with an alternate directory, which means that all of the configuration files, saves, and whatnot will go to the specified folder. Create a shortcut, and have the target be the following:

“C:\pitboss\Beyond the Sword\Civ4BeyondSword_PitBoss.exe” /ALTROOT=c:\pitboss\1

Where “C:\pitboss\Beyond The Sword\” is the directory you installed Pitboss to, and “C:\pitboss\1″ is an empty directory you have created to store the configuration files / saves.

To be completely clear, YOU ONLY NEED ONE COPY OF PITBOSS. The ALTROOT directories are very small (~3 megs), and do not contain any executables or anything like that.

You will use this shortcut to launch this instance of Pitboss. Double click it to open, and let the GUI come up. Close the GUI whenever it finishes loading.

Now go to C:\pitboss\1, find the “CivilizationIV.ini” file, and open it up. This file contains various configuration options for Civilization 4, and Pitboss.

Search for the word “Port”. It’s at the bottom of the file for me. You should see the following:

; NetComm Port
Port = 2056

2056 is the default port that Pitboss hosts games on. Change this port to something else (2057, for example), and then reload Pitboss, using the same shortcut. Now when it starts up, it will listen for connections on the new port.

You can repeat this process as many times as you want, and have many Pitboss servers running on one machine, using only one install of Pitboss itself. Remember that each shortcut needs it’s own ALTROOT directory, and need to have a different port number. Be sure to keep it straight!

To connect to a game running on a non-default port, all you have to do is add the port after a colon to the IP address in Civilization 4.

For example, if the game you play at is normally at IP 10.20.30.40, you would type “10.20.30.40:2057″ into the IP / Hostname box in Civilization 4 to connect to the new instance you created.

After you have multiple servers running, you should install the PlayYourTurn.com Uploader Tool in to each directory you created for the ALTROOT stuff. Each instance of Pitboss should have it’s own Uploader executable / log / ini file, so everything is kept neat. Be sure to use the right Uploader Tools with the right Game Names, and you should be up and running multiple instances of Pitboss, and sending events to our servers here, to be logged.

Feel free to ask more questions in the comments here. If needed, I can add images to this post to better clarify.

Topics: News | 10 Comments »

10 Responses to “Running Multiple Instances of Pitboss”

  1. LeLv30_Superbus Says:
    May 3rd, 2010 at 2:17 am

    Thanks Joe, I was looking for just this piece of information. Pitboss’ own documentation isn’t quite complete.

  2. Yoyoson Says:
    May 8th, 2010 at 7:03 am

    Very well put, Joe!

    To this I would also add the following warning:
    The very first time you use ALTROOT, it’s going to MOVE (not copy) all of the stuff from your “\My Documents\My Games\Sid Meier’s Civilization 4″ and/or your “\My Documents\My Games\Beyond the Sword” folder to the ALTROOT target directory that you specified. This means that if you try this on a box where you normally play single player, all of your stuff is going to seem to disappear. If this happens to you, then you know where to go looking for it. However if you’re reading this BEFORE you do activate ALTROOT for the first time, then I highly recommend just making a copy of that whole folder somewhere safe so you know exactly how to restore things to the way they were before the uninvited move.

  3. astrologix Says:
    May 9th, 2010 at 12:35 am

    Thanks a lot, Joe!

    I’ll try it as soon as posible, but not before this fall, whith the launch of a new APT (Astrologix Pitboss Tournaments) pitboss game.

  4. Uploader Tool Version 1.05 Released | Play Your Turn Says:
    June 16th, 2010 at 4:05 pm

    [...] Running Multiple Instances of Pitboss [...]

  5. VanJolly Says:
    June 29th, 2010 at 9:04 am

    It seems to be confusing my 2 games now. I am happily running multiple instances of pitboss but uploader seems to be mix up details for game 159 and 168.

    I have a copy of uploader in each C:\pitboss\x where x is the instance number ( 1 or 2).

    The uploader config file in both instances should reference the C:\pitboss\x dir or the orginal pitboss exe install location?

  6. Joe Says:
    June 29th, 2010 at 12:54 pm

    The uploader tool needs to know where the Pitboss EXE is located. Is that what you are referring to?

  7. VanJolly Says:
    June 30th, 2010 at 5:00 am

    I tried it both ways. E.g in the config file point to the btspitboss.exe location and putting the C:\pitboss\1 or C:\pitboss\2 in uploader cfg file.

    Either way I seem to get details of game 168 and 159 merged on your site.

    Here is the contents of my current config file:

    [general]
    pitbossPath=C:\Documents and Settings\dave\Application Data\Firaxis Games\Sid Meier’s Civilization 4\Beyond the Sword\Civ4BeyondSword_Pitboss.exe
    gameID=159
    gamePassword=xxxxxxxx

    This file is in C:\pitboss\2\

    the uploader.exe is in the same dirctory. They don’t have a subdir.

    Another copy of the uploader.exe and config are in C:\pitboss\1\

    [general]
    pitbossPath=C:\Documents and Settings\dave\Application Data\Firaxis Games\Sid Meier’s Civilization 4\Beyond the Sword\Civ4BeyondSword_Pitboss.exe
    gameID=168
    gamePassword=xxxxxxxx

    Any idea what I’m messing up?

  8. Joe Says:
    June 30th, 2010 at 12:41 pm

    You should never have to edit the ini file yourself, the Uploader Tool will handle all of that for you.

    What version of the Uploader Tool are you using?

    Load both copies of Pitboss, and then start the first uploader. Ensure that the proper game name is selected in the drop down menu. If you don’t see the drop down menu, you are using an old version that does not support multiple Pitboss servers.

    Once the right game name is selected, press “Start the Uploader.”

    Then repeat the process for the second game, again ensuring that the right game name is selected.

    If you are running version 1.04m, there is a bug that does not gray out the “Refresh” button when the uploader is running. Never hit this button. This will re-create the game list, and may change what you have selected.

    Other than that, your ini files look fine, and the way you described your directory structure is correct. I’m not sure what else I can do to troubleshoot it.

  9. VanJolly Says:
    July 1st, 2010 at 6:21 am

    OK I was running 1.03 switching to 1.05 will certainly fix this. Many thanks for swift replies. BTW all links seem to lead 1.03 download :-( Please point me to 1.05 link. Seems there is no end to my spazyness.

  10. VanJolly Says:
    July 1st, 2010 at 6:26 am

    Cancel last request. Capt spaz figured it out himself.

Comments

You must be logged in to post a comment.