1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Running Pitboss as a service

Discussion in 'Civ4 - PitBoss Games' started by Machtyn, Apr 10, 2008.

  1. Machtyn

    Machtyn Chieftain

    Joined:
    Jul 18, 2007
    Messages:
    6
    I've searched the Internet and found only one thread discussing this issue... from 2 years ago in an archived civfanatics forum. And the answer was not fully reviewed.

    Is there a way to run Pitboss as a service?

    If not and if any of the Firaxis guys are reading this forum*, here is my suggestion...
    1. Allow command-line arguments for starting a pitboss server. For each option, create a tag
    -Name "valid filename string" -Admin_Password "valid string" -Map [Archipelago|..|Wheel] -Size [Duel|..|Huge] -Climate [Temperate|..|Cold] -Sea_Level [Low|Medium|High] -Era [Ancient|..|Future] -Speed [Marathon|..|Quick] -World_Wrap [Flat|Cylindrical] -Resources [Standard|Balanced] -Turn_Limit "valid integer" -Elimination_Limit "valid integer" -Victories {+Time +Conquest +Domination +Cultural +Space_Race +Diplomatic} -Game_Options {+No_City_Razing +No_City_Flipping_From_Culture .. +No_Tribal_Villages} -Multiplayer_Options {+Simultaneous_Turns +Take_over_AI +Shuffle_Teams +Anonymous +Turn_Timer} -Turn_Timer_Hours "valid integer" (this option, if non-zero, automatically enables +Turn_Timer) -Player_File "players.xml"

    2. Allow a file (xml, perhaps) to load these options.
    Civ4Warlords_PitBoss.exe -file "MyOptionsFile.xml"

    3. Allow command-line load argument for restarting a game.
    Civ4Warlords_PitBoss.exe -load "MyCivGame.xml"

    4. Allow the service to restart the game and automatically load the last automatic save.

    5. Allow a pitboss game to be run from Linux. (heck, write your next games for Linux, I'm getting tired of paying the Microsoft tax and Vista is a flop that I'm not going get.)

    * I know this is not a Firaxis site, nor an official Firaxis tech support site.
     
  2. oyzar

    oyzar Have quit civ/forums

    Joined:
    Oct 7, 2006
    Messages:
    6,923
    Location:
    Norway
    try bugs and suggestions, this forum is never read by much of anyone.
     
  3. Redarg

    Redarg Chieftain

    Joined:
    Feb 28, 2008
    Messages:
    55
    0-4.: Yeah, many of us want such things.

    5. is possible with wine:
    http://forums.civfanatics.com/showthread.php?p=6547872#post6547872

    Not native and with wasting a lot of CPU time. But it works.

    Redarg
    P.S.: Please give me the link from the 2 years old thread. It'd like to know what they tried. Were a possibillity reported to get it working or was all hypothetically?
     
  4. Tyrghen

    Tyrghen Warlord

    Joined:
    May 7, 2008
    Messages:
    174
    Location:
    Belgium
    It might be stupid, but couldn't AutoIT help there?
    It's a useful programmable admin tool, you could write a program that interacts with the pitboss exe and does all that. I'm thinking of making such thing, if I ever get enough time to go at it, I will :)

    Basically, AutoIT can interact with texts and controls on any window, plus it has web/file capabilities so it would be possible to command it remotely. Also you can use it as a "Watch Dog" for your pitboss server.
    I was thinking of running a program like NetMeter to detect connection "leaks" that happen with PitBoss when you don't exit properly in Civ4, and scan it with AutoIT to re-start the pitboss and clear the problem.
    Also AutoIT can read the content of the Dos window to detect any possible problems.

    I might have the saturday off... (unless my wife finds something for me to do) and have a first look at it.

    Though it doesn't solve your Linux problem :)
     
  5. Machtyn

    Machtyn Chieftain

    Joined:
    Jul 18, 2007
    Messages:
    6
    http://forums.civfanatics.com/archive/index.php/t-170679.html

    Hmm, a custom tool to start, configure, etc. a pitboss server. Yes, it would have to automagically move the mouse to the proper points on the screen to choose the correct radiobuttons and save file. But the tool could capture writes to the stdio and monitor the game that way. It would also be able to read current tasks and discover if the game has crashed that way.

    Though, I wish the original programmers had thought of the simple to code command line options. Hadn't they learned from all the first-person shooters and modders of other server games... we like expandability and flexibility.
     
  6. Tyrghen

    Tyrghen Warlord

    Joined:
    May 7, 2008
    Messages:
    174
    Location:
    Belgium
    It can do all that, I've used it many times to automate some process on external programs, but it takes some time to write those little apps.
    The good point is that you can make it a standalone application once the code is written.

    The pitboss window probably don't even need to be visible, it can be minimized to task bar. It could also possibly post it's status to an external website or FTP a file to a server you own so you can check the status.
     
  7. OverloadUT

    OverloadUT Stats Monkey

    Joined:
    Nov 9, 2005
    Messages:
    352
    Location:
    Novato, CA
    I am planning on having Civstats 2.0 do some of what you're asking for.
     
  8. Tyrghen

    Tyrghen Warlord

    Joined:
    May 7, 2008
    Messages:
    174
    Location:
    Belgium
    I'm off to work in a moment, so no coding today, maybe monday... hopefully ;-)
    If those would be implemented in Civstats it would be even better!
     
  9. Redarg

    Redarg Chieftain

    Joined:
    Feb 28, 2008
    Messages:
    55
    What about all these "Not responding" games?
    I got one and it neither updates the server window nor has a single clickable button, but still works when loaded.

    Redarg
    €dith: Thanks for the old thread. In brief: They did nothing.
     
  10. Tyrghen

    Tyrghen Warlord

    Joined:
    May 7, 2008
    Messages:
    174
    Location:
    Belgium
    Do you mean that the pitboss window is in "not responding" state?
    Then it's detectable, usually when you click anywhere on the window the title changes to "(not responding)".

    Or do you mean something else?
     
  11. Redarg

    Redarg Chieftain

    Joined:
    Feb 28, 2008
    Messages:
    55
    Exact. That's what i mean.
    And what would you do if this is detected?
    Restart the pitboss server?
    If so, that's not practicable for me. After reloading the game with pitboss it will happen again by instant(the pitboss windows is not responding, but the game still runs). This would result in a never ending loop of restarting the pitboss server...

    By the way can Civstats get data out of an not responding pitboss server window?

    Redarg
     
  12. Tyrghen

    Tyrghen Warlord

    Joined:
    May 7, 2008
    Messages:
    174
    Location:
    Belgium
    Well, you can post the "not responding" status to the web and let the game admin restart it from the distance. CivStats surely could do that.
    That way you can decide whether or not to restart it.

    But it's not a normal way of functionning if your pitboss server goes "not responding" after a few seconds :)
     
  13. Redarg

    Redarg Chieftain

    Joined:
    Feb 28, 2008
    Messages:
    55
  14. Tyrghen

    Tyrghen Warlord

    Joined:
    May 7, 2008
    Messages:
    174
    Location:
    Belgium
    Well, it's a different thing, you're linking to what is an obvious bug that affects everyone.
    The "not responding" problem doesn't seem to affect that much people. It works perfectly on my end at least.
     
  15. Redarg

    Redarg Chieftain

    Joined:
    Feb 28, 2008
    Messages:
    55
    A bug is a bug. Regardless how many people it effects.

    Perhaps it's not the pitboss, perhaps it's a corrupted savegame.
    It's not responding on at least two different PCs. (WinXP and my Debian)

    Redarg
     
  16. OverloadUT

    OverloadUT Stats Monkey

    Joined:
    Nov 9, 2005
    Messages:
    352
    Location:
    Novato, CA
    You can fix this.

    This is caused by either the game title or one of the player names using a non alphanumeric character. Almost anything besizes a-z, A-Z, 0-9 will cause the Pitboss admin window to be completely locked up because it chokes on rendering that character.

    Tell all of your players to use a name that only uses the 26 letters of the English alphabet.
     
  17. Redarg

    Redarg Chieftain

    Joined:
    Feb 28, 2008
    Messages:
    55
    I see.
    So I have to change the game title. I've heard of a savegame manipulator, does this do the trick? Where can I get it?
    An other game (hostet on Linux) with a special character (ä) doesn't hang.

    Hm, I'll be careful the next time.

    Redarg
     
  18. Redarg

    Redarg Chieftain

    Joined:
    Feb 28, 2008
    Messages:
    55
    No it can't. Tested with civstats.com uploader Version 1.5.1.0. (WinXp 32bit and Debian-Linux 32bit Lenny with wine 1.0.1-174)
    After clicking "activate" it crashes like Pitboss: "Not responding" in the window title, no reaction on any click.

    Redarg
     
  19. viper_1986_1986

    viper_1986_1986 Warlord

    Joined:
    May 15, 2008
    Messages:
    114
    Yeah too much work to do anything to our current pitboss.exe. Using macros WOULD work, but really it is still running and being shown.
    Just use http://www.window-hide.com/ :)
    BAM can't see it, out of sight, out of mind!
    Put pitboss server on your windows startup so if you do have a system crash or restart, you have a friendly reminder to restart the server
     

Share This Page