View Full Version : Pitboss WebStats Proof of Concept - Curious About Interest
OverloadUT Jun 05, 2006, 02:13 PM I have spent the last several days working on a project I am calling "Pitboss WebStats" and I finally have a proof of concept I can show off.
Click here to see (http://www.apartment167.com/pitboss/?func=ViewGame&gameid=5)
What you're seeing is the current state of the Pitboss game I'm playing in, accurate to the last 30 seconds. If someone logs in, logs out, converts to an AI, finishes their turn, etc. it's all logged and viewable on that page. There are also two RSS feeds available on that page. If you're running Firefox, you should see the familiar RSS logo in the address bar. Go ahead and add those feeds to your Bookmarks to see how they work. One is a display of who has and hasn't finished the current turn (thanks to The Obb for the idea (http://forums.civfanatics.com/showthread.php?t=172750)) and the second feed is simply a feed of the game log.
The core part of this is accomplished by a pair of scripts:
The first half is an application (the "Uploader") that runs on my Pitboss server machine. It monitors the Pitboss admin window and whenever it sees a change, it uploads the data to my webserver.
The second half is a set of php scripts connected to a MySQL database that can receive the data from the Uploader and store it in the database.
And then of course there are the php scripts that display the pages (the RSS feeds and the page linked above.)
I have several plans for making this better:
Of course a better layout and looks nice.
Individual player stats. You should be able to tell when the last time each player logged in, how many turns a player has missed, etc.
Score Graphs?
Maybe the ability to auto-kick someone out of the game if they miss too many turns in a row. I currently do this manually in our game.
I'm open to ideas!
One big thing I am contemplating is allowing anybody to use my webserver to display their pitboss game stats. The whole thing is already designed to be able to handle multiple games at once; that works right now in fact. I would probably register a domain like civpitboss.com (any better ideas?) to make it easy for pitboss hosts to have a place that shows their game stats. I would do this if there is a big interest in this program, but not a big interest in setting it up on your own server.
My question to you, the pitboss server hosts: are you interested in this kind of thing? Do you have a php/mysql webserver that you would install the php script on, or would you rather have a public site that you could use to display your Pitboss WebStats?
portuga Jun 06, 2006, 05:05 AM I am unable to host PTBS games, but as a player, just the funcionality you have in place now is very useful.
:goodjob:
sometemple Jun 06, 2006, 06:19 AM OMG I would kill for such impressive web-based functionality. I've got MySQL/PHP running on my server already. Are you releasing an early version of this? I would love to get hold of it if you are. This is awesome!
OverloadUT Jun 07, 2006, 05:38 PM Well, I'm a little disappointed by the small number of replies, but oh well.
If you check out the link above again, you'll see that I added a much nicer looking layout complete with a "live" turn timer. I'm working now on player-specific stats, although I'm not sure exactly what I am going to put on that page. Right now I'm thinking "Last Time Logged In" "Total Turns Missed" and a filtered game log that only shows events related to that player.
There is also a new third RSS feed available that gives you a list of the players in the game sorted by score, with the familiar asterisk representing that they have finished their current turn.
portuga: Tell your Pitboss host to check this thread! ;)
sometemple: I plan on releasing the .exe portion of this pretty soon, and ask that people try to have it upload to my server to see if it works. Right now I have no idea if the uploader will always work. I have tried to anticipate different configurations (like not having a turn timer) but I might have missed some. I know I don't support "non-simultaneus" Pitboss games but I don't plan on it because I think simultaneus turns is what Pitboss is all about!
The PHP portion is a bit harder to release, due partly to the fact that I'm not a great PHP scripter and the code is a little messy (although I've done by best to keep it portable) and then of course there's the fact that my database structure is changing constantly, so whatever script I release to create the tables will be obsolete the next release. I'd like to have the feature list more complete before I release this portion.
I have thought of some more ideas for the whole thing in general:
Players should be able to create a simple "account" on the webpage and then "join" a pitboss game using a password that the admin set up. This would enable making a pitboss stats page private to players.
I am going to implement an email turn notifier in to the script and stop using Scree's stand alone turn notifier. The reason for this is I now have the ability to do some interesting things in the email. It could send the updated score list, for example, or maybe it could warn specific players that they missed their last turn.
sometemple Jun 07, 2006, 08:42 PM I was very disappointed in the lack of response as well, but I would argue that once a release has been made and folks start talking about it demand will be overwhelmingly in your favor.
As a pitboss host I take for granted that no one else has the turn status in front of them 24/7. The email notification was a huge step up but not everyone checks their email religiously. I can only imagine that your utility will increase the number of turns played every day, as it gives them one more (and that's a really impressive one more) way to keep posted.
Wing Wah Jun 07, 2006, 11:50 PM i haven't hosted a game before, but this is something i'd thought of, i'm glad to see it's already been developed! the new screenie looks much better than the original plain text too.
the oob Jun 08, 2006, 05:54 AM Ooh I wish I'd seen this thread earlier. Great work!
Once you add in the email notification this will do what my modified turn notifier does and a hell of a lot more, so I'd probably use your application rather than mine and will recommend that others do the same (I take little pride in my work :lol:). I would suggest adding the time remaining on the game clock to the 'who has and who hasn't finished their turn' feed, which is something I'd like to do for my program.
One question: how did you extract the game clock from the window? For instance, to get the players out of the game window, I use this C# code (which Scree wrote but I use in my part of the program):
motdHandle = FindWindowEx(pitBossHandle,System.IntPtr.Zero,"Edit",null);
I figure I have to replace "Edit" with something else... do you know what string I need? I have no idea how to find the names of the panels.
Do you have a php/mysql webserver that you would install the php script on, or would you rather have a public site that you could use to display your Pitboss WebStats?
I have a webserver but would need to set it up for php/mysql. A public site would be nice though :), you may want to talk to whoever runs CivFanatics about hosting it somewhere on this site.
Here's an idea you might consider: allow players to send messages to each other via the page, and players would be notified that they have a message waiting in the RSS feed. For example, player A sends a message to player B. The next time player B checks any of the RSS feeds, there's a line down the bottom saying '1 message unread', which they can read on the webpage. Messages could optionally be sent to the whole team or everyone in the game. It might not be worth doing though since it assumes the recipient actually uses and checks the RSS feed, which they may not.
This would require custom feeds for each player though. It might be easier just to make it so it has '1 message for player B' in a global feed, or perhaps just a number in brackets next to their name so you wouldn't need to add any new lines.
I can program in PHP but haven't done so in a while (since 3rd year compsci), feel free to message me if you want me to do any of the programming.
OverloadUT Jun 08, 2006, 05:30 PM I would suggest adding the time remaining on the game clock to the 'who has and who hasn't finished their turn' feed, which is something I'd like to do for my program.
Done! At first I was showing the "time until turn over" timer, but that didn't work out so well because it could be pretty far off (depending on when your aggregator pulled the RSS feed) so I changed it to show the time that the turn will be over. It presents it in a nice human-readable format too. If it's today, it just says the time, if it's tomorrow is says "tomorrow at xx:xx", if it's later this week, it says something like "Saturday at xx:xx" - all in all I think it's pretty spiffy. :)
I figure I have to replace "Edit" with something else... do you know what string I need? I have no idea how to find the names of the panels.
Ah, yes the control names. They're a little annoying. I'm actually surprised "edit" pulls the MOTD, because that field is actually called "edit1". At least... for me. I'm using AutoIt for my application and it has a stand alone utility that lets you see the control names in any window. I honestly don't know how Windows controls work so it could be that AutoIt is actually just assigning its own names to the controls and C# is doing the same, slightly differently. I find that unlikely though. More likely is that when you search for "edit" in C#, it finds the first match, which is the "edit1" control. But these are just guesses.
I still haven't answered your question. The turn timer is "Static2" - however, if there is no turn timer at all, "Static2" is "Who" (player 1's "Who" label) - so I check to see if "Static2" is "Who" and if it isn't, I know it's the turn timer. For your reference, here are some of the comments in my code that tell you what the control names are for different parts of the admin window:
;Button1 = "Player 1"
;Button3 = "Player 2"
;Button5 = "Player 3"
;If there is a turn timer, the following are all increased by 1
;Static3 = Player 1's name
;Static9 = Player 2's name
;Static15 = Player 3's name
;Static7 = Player 1's score
;Static13 = Player 2's score
;Static19 = Player 3's score
;Static5 = Player 1's score
;Static11 = Player 2's score
;Static17 = Player 3's score
Here's an idea you might consider: allow players to send messages to each other via the page, and players would be notified that they have a message waiting in the RSS feed. For example, player A sends a message to player B. The next time player B checks any of the RSS feeds, there's a line down the bottom saying '1 message unread', which they can read on the webpage. Messages could optionally be sent to the whole team or everyone in the game. It might not be worth doing though since it assumes the recipient actually uses and checks the RSS feed, which they may not.
I actually added player messaging to my design doc. My plan for this thing has really exploded! Seeing if you have new messages through the RSS feed is an interesting idea; I think I might implement that. A custom feed for each player wouldn't be too hard to do. I could have the page not even offer RSS feeds unless you're logged in (you most likely wouldn't want a feed unless you're actually a player in the game anyway, and if you are a player, you should be logged in!)
sometemple Jun 08, 2006, 07:23 PM Do I sense a partnership forming? This project seems to be getting bigger by the second! Any idea when we might see a beta release?
Keep up the great work, and let me know if anybody needs anything.
the oob Jun 09, 2006, 12:07 AM I still haven't answered your question. The turn timer is "Static2" - however, if there is no turn timer at all, "Static2" is "Who" (player 1's "Who" label) - so I check to see if "Static2" is "Who" and if it isn't, I know it's the turn timer.
For some reason I'm getting the current time when I use Static2 (or StaticX where X is any number) rather than the game clock.
Kobald Jun 09, 2006, 02:10 AM Don't be concerned about the lack of responses - for my part I think it's a great idea. I already use the_oob's (scree's modified) turn notifier (many thanks to the both of you), and installed a web server on the same machine that hosts the game just to host the feeds. Then I found a PHP script to convert the feeds into HTML so that players who don't use RSS can still see who's played without logging in (and using up my upload bandwidth in the process).
Overload - I've been waiting for someone to create something like this (I figured it was inevitable). It's a fantastic idea and will make Pitboss games all the more user-friendly. I don't expect many people will use it though unless you/civfanatics make it available on a public site (option 2) and make a very user-friendly frontend - although I'm keen to use it either way since I've already set up a web server.
If there's anything I can help with (eg. upload my game stats to your server when you release the .exe like you've mentioned) I'll be sure to get involved.
One thing I am curious about though - how accurate is the estimate of when the current turn is due to end? I've noticed that my clock runs slow (likely a symptom of hosting on an older machine) - I assume that in situations like that the accuracy of the "new turn at xxx" will be somewhat... well, inaccurate?
Anyway, keep up the great work.
Keith_C Jun 09, 2006, 08:48 AM This looks great - also reminds me of the UT stats page, which from your name is where I guess you got the idea of the layout from ;)
I'll give this a go on my server.
Bernout1 Jun 09, 2006, 10:36 AM sometemple: I plan on releasing the .exe portion of this pretty soon, and ask that people try to have it upload to my server to see if it works. Right now I have no idea if the uploader will always work. I have tried to anticipate different configurations (like not having a turn timer) but I might have missed some. I know I don't support "non-simultaneus" Pitboss games but I don't plan on it because I think simultaneus turns is what Pitboss is all about!
Count me in! This looks like a great utility!
Also, I wouldn't worry so much about the lack of quick responses to this topic. The MP forum isn't as well trafficked as some of the other ones at CivFanatics.
BTW, is this 1.61 only? I'm still running 1.52 on my PB server.
Bernout
OverloadUT Jun 09, 2006, 12:20 PM For some reason I'm getting the current time when I use Static2 (or StaticX where X is any number) rather than the game clock.
Hmm, I guess AutoIt uses its own names for the controls... You have some more arguments in that function call though - have you tried changing the "System.IntPtr.Zero" value to something else?
One thing I am curious about though - how accurate is the estimate of when the current turn is due to end? I've noticed that my clock runs slow (likely a symptom of hosting on an older machine) - I assume that in situations like that the accuracy of the "new turn at xxx" will be somewhat... well, inaccurate?
Anyway, keep up the great work.
That's not unique to your machine. I'm hosting on a pretty good server and my "24 hour" turn timer ends up being about 24.7 hours. The uploader re-uploads the time remaining at least once every 15 minutes to try to keep that web version up to date, but the "New turn at xxx" indicator does indeed change. For example, my page says 10:20 right now, but when the turn ended last night, it said it would be at 10:04. I'm not sure what I can do about this. Computers are supposed to know how long a second is!
This looks great - also reminds me of the UT stats page, which from your name is where I guess you got the idea of the layout from ;)
I've been found out (http://www.apartment167.com/ut2004stats/matchstats.php?match=6622)! I was actually semi-heavily involved in the development of UTStatsDB. I developed OLStats (http://www.ataricommunity.com/forums/showthread.php?s=&threadid=415919), a mod to UT2004 that greatly improved the built in stat logging as well as allowed you to output fully featured HTML files without even needing a PHP/MySQL server. It's one of my favorite creations. :) Can anyone tell that I'm a stats weenie?
BTW, is this 1.61 only? I'm still running 1.52 on my PB server.
I can't imagine why it wouldn't work on version 1.52, as the interface didn't change at all, I believe. Or did it? Actually, I'm starting to think that 1.52 didn't have a "Finished Turn" indicator in the admin panel, but I can't remember for sure. If it is indeed missing that feature then it wouldn't work very well, as knowing who needs to play their turn I think is the most useful part of this...
Keith_C Jun 09, 2006, 04:15 PM I've been found out (http://www.apartment167.com/ut2004stats/matchstats.php?match=6622)! I was actually semi-heavily involved in the development of UTStatsDB. I developed OLStats (http://www.ataricommunity.com/forums/showthread.php?s=&threadid=415919), a mod to UT2004 that greatly improved the built in stat logging as well as allowed you to output fully featured HTML files without even needing a PHP/MySQL server. It's one of my favorite creations. :) Can anyone tell that I'm a stats weenie?
AHh - I thought I recognised your name, but couldn't place it! Keep meaning to run your stats on my server (Titan 32p ONS) but just never seem to get time. Not with Civ 4 in my life anyway ;) Top work on more stats packages though - I like the look of this Civ one!
the oob Jun 09, 2006, 09:26 PM Hmm, I guess AutoIt uses its own names for the controls... You have some more arguments in that function call though - have you tried changing the "System.IntPtr.Zero" value to something else?
Ehh at this point I may as well just wait for you to finish your program and switch to it than bother updating mine... no sense in 'reinventing the wheel'.
For example, my page says 10:20 right now, but when the turn ended last night, it said it would be at 10:04. I'm not sure what I can do about this.
You could simply put an asterix next to the timer display, and then down the bottom have:
* Turn may take longer than displayed due to bla bla bla
Bernout1 Jun 10, 2006, 10:40 AM I can't imagine why it wouldn't work on version 1.52, as the interface didn't change at all, I believe. Or did it? Actually, I'm starting to think that 1.52 didn't have a "Finished Turn" indicator in the admin panel, but I can't remember for sure. If it is indeed missing that feature then it wouldn't work very well, as knowing who needs to play their turn I think is the most useful part of this...
Ya, unfortunately it doesn't have the finished turn indication. Guess I'll have to wait until this game is finished and I start up a 1.61 server. Keep up the good work though! :D
Bernout
OverloadUT Jun 11, 2006, 01:48 AM Beta Uploader Released!
I am releasing the current beta version of the uploader program, so people can try it out and make sure it works for everyone. :)
Pitboss WebStats Uploader version 0.7.0.2 (http://www.apartment167.com/modules.php?name=Downloads&d_op=getit&lid=31)
Unrar that in to its own directory anywhere on your computer. It will create several files that it uses, so don't just throw it on your desktop or something.
Run it and select a profile (default is fine, or you can rename it if you like; it makes no difference.)
The "Game Name" must match your game name exactly - it uses this to find the Pitboss window by its title.
For the script location, enter this: http://www.apartment167.com/pitboss/pbupload.php
For the Upload Username/Password, enter anything you want. If the username already exists, the uploads won't work, so pick something unique. The password is just to make sure people can't upload fake stats to your game. After you upload for the first time, your password is locked to that forever. (This will be quite different once I make the whole account creation system on the website.) If you want to have stats for more than one pitboss game, you must supply a different user/pass for each one otherwise your stats will get really messed up.
Now click Start Watching! If all goes well, you will see the status text change to "Successful Upload" in a few seconds. If it says anything else, tell me!
Once the uploader is going, you can view your game stats by going to the WebStats main page (http://www.apartment167.com/pitboss) and finding your game in the short list.
I sure hope this works!
the oob Jun 11, 2006, 02:11 AM Works for me :) I changed the update frequency from 10 seconds to 60 seconds though, I calculate it would use about 1.5 gigs of bandwidth a month if left as the default.
One suggestion: label what time zone the 'new turn at such and such time' is for, or (preferably) allow people to pick their own time zone.
OverloadUT Jun 11, 2006, 09:42 AM Works for me :) I changed the update frequency from 10 seconds to 60 seconds though, I calculate it would use about 1.5 gigs of bandwidth a month if left as the default.
One suggestion: label what time zone the 'new turn at such and such time' is for, or (preferably) allow people to pick their own time zone.
I actually thought I changed the CheckInterval to 60 seconds in the code, but turns out I just changed it on my own .ini file. Oops! However, that just tells it how often to check for changes - it will only actually upload data if anything changes, so it shouldn't use too much bandwidth.
About the time zone thing: I do plan on implementing the ability to adjust the times displayed to the user's local timezone, once I get the account creation thing going. I'm not exactly sure how to do this, but I'm sure there are tons of examples of how to do it on the web.
OverloadUT Jun 11, 2006, 08:26 PM I just uploaded a new version of the uploader, same link as above. You should update to this version as soon as you can. It turned out that it WAS uploading all the data at every interval when it shouldn't have been.
Now it will only upload when things change, so you don't have to worry about bandwidth. (It will also force an update every 15 minutes to keep the turn timer up to date.)
Also, I added a score graph feature! Unfortunately my main game doesn't have enough turns logged (you need 2) to show the graph yet, but it'll be pretty snazzy.
the oob Jun 12, 2006, 12:15 AM I seem to be having problems running two instances of the program (one for each pitboss game)... only one is able to connect at a time according to your server, although they both claim to be connected on my end.
OverloadUT Jun 12, 2006, 01:11 AM I seem to be having problems running two instances of the program (one for each pitboss game)... only one is able to connect at a time according to your server, although they both claim to be connected on my end.
I've never actually tried running two copies of the program, but I did all the preparations such that it should work.
Are you supplying a different user/pass for each game? You have to do that; right now, that's the only way the server differentiates between different games.
Edit: Actually, I see now that that is indeed the problem. Your game stats have really wacky stats because the year is jumping back and forth. To fix it you'll unfortunately have to start uploading both of them using a different user/pass combo.
Keep in mind that this whole user/pass thing is just a temporary situation until I get actual user registration implemented. It should be cleaner then.
the oob Jun 12, 2006, 02:26 AM Yeah that was it, thanks.
Feel free to remove the older entries for my games from the main page (3rd and 4th on the list).
MooManof_ Jun 12, 2006, 10:56 AM I'm willing to help out with the PHP side of things, as well as exploring the possibility of reversing some of the control, you allow a web admin feature for PitBoss (so you could install it on a remote server). In theory this would allow for settings to be changed mid-game (although not necessarily mid-turn).
It should be possibly to have the system ask for three types of login (one to register / admin a game, one to check player stats, and one to admin the site, or some sort of combination).
HitAnyKey Jun 13, 2006, 12:13 PM This is a totally awesome idea and concept and I think it would be a great addition for our RealPolitik game. I'll have to get him to take a look over here and see if he can get your app running to upload the stats to your webserver page.
A couple questions though:
The Game Log. Does that display global events of things that people would normally see in-game, such as Wonders being created, Religions founded, Cities destroyed, etc?
Also, if you have Multiple people logging into a single Civ (for Teams) would that screw up the app, or would it just act like a 'Name Changed To' line in the Game Log?
We also have an 18-person PBTS game that was just started which I'll point the hoster to this thread too. It'd be great for that game.
HitAnyKey Jun 13, 2006, 12:16 PM That's not unique to your machine. I'm hosting on a pretty good server and my "24 hour" turn timer ends up being about 24.7 hours. The uploader re-uploads the time remaining at least once every 15 minutes to try to keep that web version up to date, but the "New turn at xxx" indicator does indeed change. For example, my page says 10:20 right now, but when the turn ended last night, it said it would be at 10:04. I'm not sure what I can do about this. Computers are supposed to know how long a second is!
One of the primary reasons that this actually happens is that the game pauses every time a player logs in. And the longer it takes for the game to load and for them to log in the longer the pause of the game. So if you have a lot of people and they log in multiple times a day to check what's going on with the turn, the turn will last that much longer.
In our 18-player game we had the turn timer set to 24 hours, and the first few turns took over 27-28 hours. So we edited the timer down to 20 hours and things are back to being more on a 24 hour schedule.
OverloadUT Jun 13, 2006, 02:05 PM This is a totally awesome idea and concept and I think it would be a great addition for our RealPolitik game. I'll have to get him to take a look over here and see if he can get your app running to upload the stats to your webserver page.
A couple questions though:
The Game Log. Does that display global events of things that people would normally see in-game, such as Wonders being created, Religions founded, Cities destroyed, etc?
Also, if you have Multiple people logging into a single Civ (for Teams) would that screw up the app, or would it just act like a 'Name Changed To' line in the Game Log?
We also have an 18-person PBTS game that was just started which I'll point the hoster to this thread too. It'd be great for that game.
Good questions!
Global Events - No, it's impossible to get those from the admin window. However, I have been toying with the idea of expanding the WebStats system to optionally work with a WebStats mod. The mod would report TONS of more info about the game (who's at war with who, wonders being built, current standings, etc.) to a file and then my app would upload that to the web part of it. It's something I will look in to more after I get my current plans with the website finished.
Multiple people logging in - Yeah, in that case it would simply show a "name changed to" event each time they alternated control.
Who is uploading stats for a game named "zonk"? Something has gone wrong because it shows that everyone has finished their turns, but no new turn has begun. It looks like you're not using a turn timer, so I might have a bug in my uploader related to that. I would appreciate if you would post here so I can troubleshoot it with you.
Great_Scott Jun 13, 2006, 05:21 PM Overload, this is fantastic. I dont run a PHP/MySQL server... but I would really, really, really like this feature for my game Realpolitik!
grimliin Jun 16, 2006, 07:26 AM I am running an 18 player PTBS in connection with RPII. I would love to run this on that game as well, but don't have any experience setting up webservers. I would definitely be interested on putting the stats on a public site, or if you can tell me how to set up the server I could give it a shot.
namliaM Jun 17, 2006, 10:55 AM About the time changing thing.. I know that if you log on to a pittbos game the time pauses due to it beeing downloaded and setup on your side.
It might only happen if someone is allready online, but I have noticed this when I was online making my turn and someone else was connecting...
Fosse Jun 17, 2006, 02:48 PM Thanks Overlord. This is a big help for all of us.
OverloadUT Jun 21, 2006, 10:11 AM I've been making huge strides in this project!
The ability to register an account, claim your civilization, and then use the diplomacy center to message other players is fully implemented. There are a lot of little things missing which I'm working on right now.
Now I'm looking for some input. One of the things you need to be able to do on the website is "register" your leader. This means you are claiming that you control the leader you selected, and will be able to send diplomatic messages as that civ. In the future this will also allow you to access all of your civ's details like the advisors in the game. Obviously this should be protected in some way so that unscrupulous players cannot register as someone else's leader. You can't register a leader once it's already been registered, but there still should be some sort of protection. There are a number of different ways to approach it:
The game administrator sets a registration password that must be used to claim any civ. This prevents people outside the game from registering as one of the civs and messing things up, although it doesn't prevent one of your players from registering as the wrong civ.
The game administrator sets a different registration password for each civ. This prevents anyone from registering as the wrong civ, as the game administrator would email the registration password directly to the correct player.
The game administrator must approve any leader registrations. He would check the email address of the person trying to register to be sure it's the correct person.
Right now I have the first option implemented, but I don't think it's good enough. I'm leaning towards the second option, but I'm curious to know what you guys think.
Oh yeah, I also got a domain (http://www.civstats.com).
IglooDude Jun 21, 2006, 10:46 AM This is exactly what I've been looking for - I'm going to be putting the Offtopic forum's CivIVor game on this feed, at least for turn notifications (neither the embedded nor the PBNotify email notifications works on my pitboss server).
:goodjob: :goodjob: :goodjob:
Fosse Jun 21, 2006, 11:14 AM Overload, this is amazing! Work like this is really appreciated. Access to advisors and diplomacy while at work and away from the game? Outstanding!
Regarding passwords, as safety goes, option 2 sounds the best. 3 would work and be easier on the admin of each game (especially since some players may not use the page at all, as seems to be the case with my current CINvilization game), but could be a hassle for players to have to wait for approval.
I'm looking forward to seeing the rest of the features when they're done. The messaging center sounds promising, especially. Will it be like a mini-forum with PM's? Am I correct that the site will be able to generate turn notification emails? The programs available on these pages take care of that now, but it would be nice to just start Pitboss, then start your stats uploader and be done with it, especially as people start hosting multiple games.
Fosse Jun 21, 2006, 11:15 AM I tried to register my leader, and it tells me the game admin picks the password. I am the admin, and I haven't found where to do that. Is the feature available to the public yet, or have I missed something?
OverloadUT Jun 21, 2006, 11:43 AM I tried to register my leader, and it tells me the game admin picks the password. I am the admin, and I haven't found where to do that. Is the feature available to the public yet, or have I missed something?
Oh yeah, I forgot about that. I haven't implemented the interface to actually administrate the game (to change those passwords and stuff.) For now, I set your game registration password to the same password you used to register at the site (note that I can't tell what your password is; it's encrypted. But I can copy and paste the encrypted string. :P) EDIT: Oh yeah, because you can't set the leaders of each of your players, all of their pictures are going to be giant question marks, which is pretty ugly. You'll just have to wait for me to finish the administration interface. ;) At least you can check out the diplomacy center and give me any suggestions you might have.
I think I will go with option 2 then. You're right that it would be a bit of a hastle to the players if they had to wait for authorization. If we want our players to use this tool, it should be as painless as possible! The admin we don't care about because us admins are used to having to do things the complicated way. ;)
About the turn notification: It's not in yet. However, this will be even better than using PBNotify or the built in tool because players will be able to individually choose if they want to receive the new turn notifications, they will be able to change their email address whenever they want, and in the future I may have the turn notification show "key events" of the previous turn or something like that.
IglooDude Jun 21, 2006, 12:01 PM Overload, I downloaded the app, un-rar'ed it (I would suggest converting it to a zip file instead, as Windows boxes are more likely to unzip them natively), and ran it. I entered a profile name, and got the app window. The name of the game matches the first line (if it doesn't, I see a "Cannot find pitboss window" error), I've tried both your http://www.apartment167.com/pitboss/pbupload.php and http://www.civstats.com/pitboss/pbupload.php addresses (the Try It button never un-grays out, btw), and put in a username of Igloodude and a password, but I get 'upload failed' over and over.
I've got my pitboss server locked down pretty tight, and it is behind a firewall that only allows 2056 TCP inbound to it, so I suspect a connectivity problem... :(
OverloadUT Jun 21, 2006, 12:15 PM Strange. It should work. Open up your PitbossStats.ini file and change the LogLevel to 2, then run it again and let it fail a couple times. Then post the contents of your log file here.
NOTE: Be sure your password is something you don't care about, as it will be in plaintext in your log.
The cool thing about the way this system works is that a firewall should never block it, because it's doing everything on standard web port 80. You'd be hard pressed to find someone blocking port 80. ;)
IglooDude Jun 21, 2006, 12:53 PM Here's the log data. I can browse the internet from the pitboss server, so port 80 is open outbound through the firewall, at least. I'd suspect that some function/service required for this has been disabled as part of my OS lockdown.
6/21/2006 13:41:21 tt - Script started at 6/21/2006 13:41:21 tt
6/21/2006 13:49:50 tt - Upload FAILED. Return code: -1
6/21/2006 13:50:01 tt - Upload FAILED. Return code: -1
6/21/2006 13:50:11 tt - Upload FAILED. Return code: -1
6/21/2006 13:50:21 tt - Upload FAILED. Return code: -1
6/21/2006 13:50:31 tt - Upload FAILED. Return code: -1
6/21/2006 13:50:41 tt - Upload FAILED. Return code: -1
6/21/2006 13:50:52 tt - Upload FAILED. Return code: -1
6/21/2006 13:51:02 tt - Upload FAILED. Return code: -1
6/21/2006 13:51:12 tt - Upload FAILED. Return code: -1
6/21/2006 13:51:22 tt - Upload FAILED. Return code: -1
6/21/2006 13:51:32 tt - Upload FAILED. Return code: -1
6/21/2006 13:51:42 tt - Upload FAILED. Return code: -1
6/21/2006 13:51:53 tt - Upload FAILED. Return code: -1
6/21/2006 13:52:03 tt - Upload FAILED. Return code: -1
6/21/2006 13:52:13 tt - Upload FAILED. Return code: -1
6/21/2006 13:52:23 tt - Upload FAILED. Return code: -1
6/21/2006 13:52:33 tt - Upload FAILED. Return code: -1
6/21/2006 13:52:44 tt - Upload FAILED. Return code: -1
6/21/2006 13:52:54 tt - Upload FAILED. Return code: -1
6/21/2006 13:53:04 tt - Upload FAILED. Return code: -1
6/21/2006 13:53:14 tt - Upload FAILED. Return code: -1
6/21/2006 13:53:24 tt - Upload FAILED. Return code: -1
6/21/2006 13:53:35 tt - Upload FAILED. Return code: -1
6/21/2006 13:53:45 tt - Upload FAILED. Return code: -1
6/21/2006 13:53:55 tt - Upload FAILED. Return code: -1
6/21/2006 13:54:05 tt - Upload FAILED. Return code: -1
6/21/2006 13:54:15 tt - Upload FAILED. Return code: -1
6/21/2006 13:54:26 tt - Upload FAILED. Return code: -1
6/21/2006 13:54:36 tt - Upload FAILED. Return code: -1
6/21/2006 13:54:46 tt - Upload FAILED. Return code: -1
6/21/2006 13:54:56 tt - Upload FAILED. Return code: -1
6/21/2006 13:55:09 tt - Upload FAILED. Return code: -4
6/21/2006 13:55:19 tt - Upload FAILED. Return code: -4
6/21/2006 13:55:30 tt - Upload FAILED. Return code: -4
6/21/2006 13:55:40 tt - Upload FAILED. Return code: -4
6/21/2006 13:55:40 tt - Script stopped at 6/21/2006 13:55:40 tt | Reason: GUI Closed. UNABLE TO UPLOAD HALT COMMAND!
6/21/2006 13:55:40 tt -
6/21/2006 14:41:11 tt - Script started at 6/21/2006 14:41:11 tt
6/21/2006 14:41:14 tt - Found Pitboss Window. Handle: 0x000204FC
6/21/2006 14:41:15 tt - There are 18 players. Parse Time: 1.40173681291896
6/21/2006 14:41:15 tt - A turn timer is in use and is currently: 11:24:44. Parse Time: 0.0876209127137667
6/21/2006 14:41:16 tt - A new turn has begun! Year: 1960 BC
6/21/2006 14:41:16 tt - Player 1 has finished his turn.
6/21/2006 14:41:16 tt - Player 1's name is now: azzaman333
6/21/2006 14:41:16 tt - Player 2 has finished his turn.
6/21/2006 14:41:16 tt - Player 2's name is now: Davo
6/21/2006 14:41:16 tt - Player 3 has finished his turn.
6/21/2006 14:41:16 tt - Player 3's name is now: Dr.Yoshi
6/21/2006 14:41:16 tt - Player 4 has finished his turn.
6/21/2006 14:41:16 tt - Player 4's name is now: Truronian
6/21/2006 14:41:16 tt - Player 5's name is now: Whomp
6/21/2006 14:41:16 tt - Player 6's name is now: .Shanihito.
6/21/2006 14:41:16 tt - Player 7 has finished his turn.
6/21/2006 14:41:16 tt - Player 7's name is now: Robboo
6/21/2006 14:41:16 tt - Player 8 has finished his turn.
6/21/2006 14:41:16 tt - Player 8's name is now: BCLG100
6/21/2006 14:41:17 tt - Player 9 has finished his turn.
6/21/2006 14:41:17 tt - Player 9's name is now: RaisinBran
6/21/2006 14:41:17 tt - Player 10 has finished his turn.
6/21/2006 14:41:17 tt - Player 10's name is now: Sparta
6/21/2006 14:41:17 tt - Player 11 has finished his turn.
6/21/2006 14:41:17 tt - Player 11's name is now: *MOD* Tycoon101
6/21/2006 14:41:17 tt - Player 12's name is now: VRWCAgent
6/21/2006 14:41:17 tt - Player 13 has finished his turn.
6/21/2006 14:41:17 tt - Player 13's name is now: De Lorimier
6/21/2006 14:41:17 tt - Player 14 has finished his turn.
6/21/2006 14:41:17 tt - Player 14's name is now: King bleuet
6/21/2006 14:41:17 tt - Player 15's name is now: Ed The Great
6/21/2006 14:41:17 tt - Player 16 has finished his turn.
6/21/2006 14:41:17 tt - Player 16's name is now: IglooDude
6/21/2006 14:41:17 tt - Player 17 has finished his turn.
6/21/2006 14:41:17 tt - Player 17's name is now: Blackheart
6/21/2006 14:41:17 tt - Player 18 has finished his turn.
6/21/2006 14:41:17 tt - Player 18's name is now: Montezuma
6/21/2006 14:41:18 tt - Player 1's score is now: 153
6/21/2006 14:41:18 tt - Player 2's score is now: 189
6/21/2006 14:41:18 tt - Player 3's score is now: 148
6/21/2006 14:41:18 tt - Player 4's score is now: 227
6/21/2006 14:41:18 tt - Player 5's score is now: 132
6/21/2006 14:41:18 tt - Player 6's score is now: 114
6/21/2006 14:41:18 tt - Player 7's score is now: 187
6/21/2006 14:41:18 tt - Player 8's score is now: 128
6/21/2006 14:41:18 tt - Player 9's score is now: 121
6/21/2006 14:41:18 tt - Player 10's score is now: 194
6/21/2006 14:41:19 tt - Player 11's score is now: 160
6/21/2006 14:41:19 tt - Player 12's score is now: 153
6/21/2006 14:41:19 tt - Player 13's score is now: 174
6/21/2006 14:41:19 tt - Player 14's score is now: 141
6/21/2006 14:41:19 tt - Player 15's score is now: 117
6/21/2006 14:41:19 tt - Player 16's score is now: 243
6/21/2006 14:41:19 tt - Player 17's score is now: 114
6/21/2006 14:41:19 tt - Player 18's score is now: 128
6/21/2006 14:41:19 tt - Player 1's type is now: 1
6/21/2006 14:41:19 tt - Player 2's type is now: 1
6/21/2006 14:41:19 tt - Player 3's type is now: 1
6/21/2006 14:41:20 tt - Player 4's type is now: 1
6/21/2006 14:41:20 tt - Player 5's type is now: 1
6/21/2006 14:41:20 tt - Player 6's type is now: 1
6/21/2006 14:41:20 tt - Player 7's type is now: 1
6/21/2006 14:41:20 tt - Player 8's type is now: 1
6/21/2006 14:41:20 tt - Player 9's type is now: 1
6/21/2006 14:41:20 tt - Player 10's type is now: 1
6/21/2006 14:41:20 tt - Player 11's type is now: 1
6/21/2006 14:41:20 tt - Player 12's type is now: 1
6/21/2006 14:41:20 tt - Player 13's type is now: 1
6/21/2006 14:41:20 tt - Player 14's type is now: 1
6/21/2006 14:41:21 tt - Player 15's type is now: 1
6/21/2006 14:41:21 tt - Player 16's type is now: 1
6/21/2006 14:41:21 tt - Player 17's type is now: 3
6/21/2006 14:41:21 tt - Player 18's type is now: 3
6/21/2006 14:41:21 tt - Starting an upload. Func=Init URL: http://www.civstats.com/pitboss/pbupload.php?Func=Init&ID=IglooDude&Pass=********&NumPlayers=18&UseTurnTimer=1&GameName=CIVivor&UploaderVersion=0.5.0.5
6/21/2006 14:41:21 tt - Upload Finished. Data Downloaded: -1 Time: 0.506621092904266
6/21/2006 14:41:21 tt - Upload FAILED. Return code: -4
6/21/2006 14:41:32 tt - Starting an upload. Func=Init URL: http://www.civstats.com/pitboss/pbupload.php?Func=Init&ID=IglooDude&Pass=*******&NumPlayers=18&UseTurnTimer=1&GameName=CIVivor&UploaderVersion=0.5.0.5
6/21/2006 14:41:32 tt - Upload Finished. Data Downloaded: -1 Time: 0.214370262142256
6/21/2006 14:41:32 tt - Upload FAILED. Return code: -4
6/21/2006 14:41:42 tt - Starting an upload. Func=Init URL: http://www.civstats.com/pitboss/pbupload.php?Func=Init&ID=IglooDude&Pass=********&NumPlayers=18&UseTurnTimer=1&GameName=CIVivor&UploaderVersion=0.5.0.5
6/21/2006 14:41:42 tt - Upload Finished. Data Downloaded: -1 Time: 0.192262703779391
6/21/2006 14:41:42 tt - Upload FAILED. Return code: -4
6/21/2006 14:41:52 tt - Starting an upload. Func=Init URL: http://www.civstats.com/pitboss/pbupload.php?Func=Init&ID=IglooDude&Pass=********&NumPlayers=18&UseTurnTimer=1&GameName=CIVivor&UploaderVersion=0.5.0.5
6/21/2006 14:41:52 tt - Upload Finished. Data Downloaded: -1 Time: 0.193911796052292
6/21/2006 14:41:52 tt - Upload FAILED. Return code: -4
6/21/2006 14:41:52 tt - Script stopped at 6/21/2006 14:41:52 tt | Reason: GUI Closed. UNABLE TO UPLOAD HALT COMMAND!
6/21/2006 14:41:52 tt -
OverloadUT Jun 21, 2006, 01:12 PM Well, first change your Script Location to http://www.civstats.com/pbupload.php and see if that works. When I manually entered the URL it worked fine, so I think that'll do it. :)
Future versions of the Uploader won't even have the Script Location option, as I've decided to do all the hosting myself and you'd never need to change it!
Fosse Jun 21, 2006, 01:53 PM Okay, I got my leader registered, so I have seen the diplomacy section. Thanks. I have to say, it looks pretty great. From the features you've talked about implementing, my own brief time as an admin for a Pitboss game and a player for another, and my imagination I've come up with a list of suggestions. I'm not sure how possible they all are, and I have to say that the service was already amazing yesterday with just an RSS feed, but maybe these will spark something for you.
* Group Diplomacy, and Public postings. If the recipients of a diplomatic message were listed as check boxes, instead of a pull down menu, we could send a message to several people at once. Incoming messages could indicate everyone who received a message, so we'd always know who's involved in which diplomacy. A checkbox for "All" would post the message to everyone.
* Is it possible to limit diplomacy to just civs that the player has met? You seem able to extract data from the game, so this may be possible. This is mostly a "house rule" kind of thing that I bring from SMAC PBEM... nobody can discuss the game without contact. It works on the honor system really, but if you implemented it it would allow a message to "ALL" players to filter out those that would, according to the rules, not be able to get it.
* A scheduling service. What I imagine here is that players could see a calendar where they could input times that they could get online to play. When all the players have a block of time that coincides for 30 minutes, an email is sent out alerting everyone of a possible play time, and a message on the game's page appears saying the same. Alerts could also go out when, say, 80% of the players could do a particular time so that the others could check their schedule. This would alleviate the need to handle this business over messaging programs or email, where in my experience it is very inefficient. Massive group emails only work when people are highly organized, and random groups of gamers don't always tend to be. ;)
* Out of Town flag. If a player won't be able to play for a few days, he can tell Civstats, and a message on the main gamestats page would inform everyone of that.
* Hold up notifiers. Sometimes everyone has played excpet for ONE PERSON, maybe 2 in a big game, and there are 18 hours to go. :mad: If I am ever that person I wouldn't mind an email telling me so, since I might be able to squeeze in the turn before work, instead of getting home from work like I usually do. Of course, some would hate the nagging, so if it was an option that'd be better.
Am I right that all communication between Civ and your program is only one way?
OverloadUT Jun 21, 2006, 03:19 PM Thanks for the suggestions!
* Group Diplomacy, and Public postings. If the recipients of a diplomatic message were listed as check boxes, instead of a pull down menu, we could send a message to several people at once. Incoming messages could indicate everyone who received a message, so we'd always know who's involved in which diplomacy. A checkbox for "All" would post the message to everyone.
Hm, my players have requested the same thing, so perhaps I will do this. It will require a bit of a rework, but I think it would be very useful. I've also been contemplating changing the system around to be a "threaded" type of system. Perhaps the messages should look more like the "chat" type system you see in game? I could do that... I think I will draft out some ideas and then ask for feedback.
* Is it possible to limit diplomacy to just civs that the player has met? You seem able to extract data from the game, so this may be possible. This is mostly a "house rule" kind of thing that I bring from SMAC PBEM... nobody can discuss the game without contact. It works on the honor system really, but if you implemented it it would allow a message to "ALL" players to filter out those that would, according to the rules, not be able to get it.
This is something I plan on. If you notice however, every time I talk about extracting data from the game, I talk about it as a plan in the future. This is because I can't extract data from the game yet. To do this, I will need to write an actual Civ 4 mod that the Pitboss game will need to be running. I really wish there was another way (outside of trying to read the memory, which is prone to way too many errors) but I can't figure out any. :(
* A scheduling service.
It's an interesting idea. My own group never does this so I hadn't thought of it. I'll put it on my "distant future possibilities" list.
* Out of Town flag. If a player won't be able to play for a few days, he can tell Civstats, and a message on the main gamestats page would inform everyone of that.
* Hold up notifiers. Sometimes everyone has played excpet for ONE PERSON, maybe 2 in a big game, and there are 18 hours to go. :mad: If I am ever that person I wouldn't mind an email telling me so, since I might be able to squeeze in the turn before work, instead of getting home from work like I usually do. Of course, some would hate the nagging, so if it was an option that'd be better.
The out of town flag is a great idea. I will add that to the design doc.
I do plan on having some sort of hold-up notification as an option.
Am I right that all communication between Civ and your program is only one way?
Right now, yes. However, it would not be hard to add communication going the other way. Actually, it kind of is two way already, because the uploader reads the return value from the upload php script to make sure everything is okay. I've been toying with the idea of some remote-administration features like being able to kick a player out of the game from the WebStats, or perhaps even be able to cycle the whole server in case there are connectivity problems. This is one of those things that I don't need because I use Remote Desktop, but I think a lot of people would like it.
Fosse Jun 21, 2006, 04:12 PM Thanks for the suggestions!
Thanks for listening.
I've also been contemplating changing the system around to be a "threaded" type of system. Perhaps the messages should look more like the "chat" type system you see in game? I could do that... I think I will draft out some ideas and then ask for feedback.
I haven't seen it in action yet (my game isn't even at 3000 BC yet), but here's my thought: If all diplomacy is laid out in chronological order, if it's threaded or seperated into incoming and outgoing, it could quickly get cluttered, with lots of issues being spliced in amongst one another. These are games when people have ten minutes to play a turn and 24 hours to conduct diplomacy in between, after all! Perhaps players can add a subject to each message, and the website can display the list of subjects. So your screen might look like:
Sino-Roman Border
War of 100 AD - Peace talks
Trade Deals
Let's Attack Cathy
Then clicking on any topic will bring you to the threaded display of those messages. If players were diligent about using this system it could be a powerful and well oganized tool.
OverloadUT Jun 21, 2006, 05:44 PM That's basically what I was thinking:
You could start a new "discussion" (is that a good word to use?) with however many civs you wanted, and inside that discussion it would read like a diplomacy window does in game (maybe it would look slightly more forumy, but it'd basically be a glorified chat box.) Each discussion in the index would only be one item, which would list the subject. The "new message" icon would show up if there are new messages in that discussion since you last read it.
For simplicity, if you wanted to "add" someone to a discussion, you would need to start a new discussion with them included. I wouldn't want to have to create a whole interface for having everyone agree to let someone join a discussion.
Whomp Jun 21, 2006, 07:32 PM This is a really awesome tool. We have a 18 (now 14 :mischief: ) person game that this would be very helpful for. I've posted this to our thread.
18 person pitboss game (http://forums.civfanatics.com/showthread.php?t=159115&page=51)
the oob Jun 21, 2006, 11:19 PM OverloadUT: Could you change my password for my games? I can't remember what I put :(
If you're able to do this I'll send you the new passwords by PM.
OverloadUT Jun 21, 2006, 11:31 PM Your games seem to still be connected to the uploaders. Are you talking about the upload password or the player registration password? If it's the latter, then there's no way to currently set it, but I can do it manually in the database if you PM me the password you would like it to be.
MooManof_ Jun 22, 2006, 01:36 AM As I said before, I'm willing to help clean up (and secure) your code as well as help implement the new features. I have experience with PHP, particularly database operations and user control.
BTW, copy/pasting passwords is pretty stupid, even when they're encrypted. a much safer method would be to use encrypted session variables.
Also you should never let a user send you a password for manual entry (nor should that even be possible). The best thing to do would be to make the system autogenerate a new password, or failing that, you set it to an arbitary value, and the user changes it when they login. That way you don't learn people's passwords.
I can also help setup an autogeneration system, if you like.
IglooDude Jun 22, 2006, 06:55 AM Well, first change your Script Location to http://www.civstats.com/pbupload.php and see if that works. When I manually entered the URL it worked fine, so I think that'll do it. :)
Future versions of the Uploader won't even have the Script Location option, as I've decided to do all the hosting myself and you'd never need to change it!
It works with the new script location, thanks!! :)
OverloadUT Jun 22, 2006, 10:44 AM As I said before, I'm willing to help clean up (and secure) your code as well as help implement the new features. I have experience with PHP, particularly database operations and user control.
BTW, copy/pasting passwords is pretty stupid, even when they're encrypted. a much safer method would be to use encrypted session variables.
Also you should never let a user send you a password for manual entry (nor should that even be possible). The best thing to do would be to make the system autogenerate a new password, or failing that, you set it to an arbitary value, and the user changes it when they login. That way you don't learn people's passwords.
I can also help setup an autogeneration system, if you like.
Heh, I understand all that. All I did was copy the md5 string from one field in the database (the user's password) and pasted it in to another field (the player registration) - I did this because the website is incomplete and doesn't have the features to change that password, so there's no way I would already have a random password generator implemented. I think you're overreacting a bit! There's no way I can "learn" a player's password by looking at an md5 string. :P
Anyway, thanks for the offer. For now I'm fine working alone but I may ask for help in the future. :) I do have one question for you, and I'm sure the answer is simple but I haven't found it in the php docs: How can I call another php script to execute in the background. For example, I want to call a bunch of mail() functions for the turn notification, but I don't want the script that does this to wait for those functions to finish before ending the script. I want to be able to just fire off a, for example, mail.php script and not worry about what the return values are from the mail() calls. I know I can use exec(), but I figure there has to be a cleaner way. I mean, when you post to one of these forums, it emails all the people that have "subscribed" to the thread, but the page doesn't take a long time to load while it's waiting for the mail to send.
HitAnyKey Jun 22, 2006, 08:04 PM I've noticed a little oddity so far in that the site seems to record turns being Finished when they really aren't being finished. Whether this happens due to name changes and repeated logins and logouts I'm not sure. But it's certainly and oddity. You'll see it appears to happen quite often in our Realpolitik game.
Also, the name changing is going through weirdly as well but that's obviously something related to the fact that we're running the game with a Mod.
The constant name changes is because it's being played as teams, with like 4-6 people on each team all logging in as the same Civ.
EDIT: Just as an example I'm going to post the results of the Finished Turn oddity for my team only:
6/21/06 9:14 pm A new turn has begun. It is now 1000 BC
6/21/06 9:14 pm MOD* HitAnyKey Finished turn
6/22/06 3:29 am HitAnyKey Finished turn
6/22/06 5:18 am MOD* Corossol Finished turn
6/22/06 9:22 am Corossol Finished turn
6/22/06 2:13 pm MOD* Rince Finished turn
At no point during any of the above was the turn actually Finished. The Red Button (and hence the ending of the turn) wasn't actually done until I logged in and did so after my login at 5:13pm. And that one didn't even register the Finished Turn action.
Any idea why?
OverloadUT Jun 22, 2006, 11:33 PM Ahhh, I know exactly what it is. For some reason several people on your game are using names like "*MOD* HitAnyKey". The way the uploader can tell when someone has finished with theit turn is that the admin panel puts an asterisk at the beginning of someone's name when their turn has finished. But because you logged in with a name that starts with an asterisk anyway, it thinks that you finished your turn just then. And that's also why it shows your name as "MOD* HitAnyKey" until your turn is actually finished, then it goes back to showing the asterisk in the beginning.
The point of all this rambling is... uh... Do you know why your names have *MOD* at the beginning of them? Is that something you as players are adding manually, or is that a side effect of the mod you are running. If it's the latter, what mod is it? I'll take a look.
The bottom line is I could add specific support for checking for the "*MOD*" paradigm, but I would like to know WHY that's there before I do. ;)
HitAnyKey Jun 23, 2006, 05:04 AM I know we definately aren't putting the MOD stuff in our names when we log in, and those don't show up in the names In-Game. So it's definately something in the translation behind the scenes through the uploader.
As for the details of the MOD itself, you got me on that as I don't know anything about Mods. I'll get Great Scott's attention and have him tell you about the Mod that's being used.
IglooDude Jun 23, 2006, 05:24 AM We're not actually using any mods in the Civivor game, but one player that apparently has a problem with his Civ4 installation shows up with a MOD in his playername automatically. Maybe there's a way to automatically parse names for "MOD*" and remove that 4-character string from them, as far as Civstats is concerned?
OverloadUT Jun 23, 2006, 09:21 AM Ah, okay. The fact that it happens to people not running a mod on the server is good news.
My guess is this: The Pitboss server application puts "*MOD*" at the beginning of players name when it detects that a client is using modified assets on his client, and the "Lock Modified Assets" option is not turned on serverside. It serves as a warning to the administrator that a player could be trying to cheat.
I'll add in specific support to strip the "*MOD*" from people's names.
IglooDude Jun 23, 2006, 11:28 AM Ah, okay. The fact that it happens to people not running a mod on the server is good news.
My guess is this: The Pitboss server application puts "*MOD*" at the beginning of players name when it detects that a client is using modified assets on his client, and the "Lock Modified Assets" option is not turned on serverside. It serves as a warning to the administrator that a player could be trying to cheat.
I'll add in specific support to strip the "*MOD*" from people's names.
That is exactly my guess as well.
And just a quick thought, you up to putting the downloadable exec on the civstats website itself?
Fosse Jun 23, 2006, 11:50 AM Will there be an option to delete games? I'm starting to feel guilty for that TEST one that's sitting in the middle of your screen. ;)
MooManof_ Jun 23, 2006, 12:01 PM The *MOD* aspect is when Civ4 (the game or PitBoss) detects that some files are different from that of the host... this can be as little as changing a single file, then changing it back. The different 'last modified' date is what triggers the *MOD* tag. Often nothing at all is wrong, and I believe the Blue Marble terrain pack may be a trigger.
One thing to note, though; if you set the option 'Lock Modified Assets' (the new name for 'Disable Cheats'), anyone who triggers *MOD* will NOT be able to connect. It's that simple.
OverloadUT Jun 25, 2006, 02:45 AM Major updates
I have a few things to announce this weekend. :)
First, I uploaded a new version of the Uploader (http://www.apartment167.com/modules.php?name=Downloads&d_op=getit&lid=31). Everybody should update to this new version. It now has support for the "*MOD*" in players' names. Please tell me if it works. :) Also, the interface has been improved - there's now a nifty network activity icon, and the script location is no longer there, as the script location doesn't need to change. Finally, I added a "Auto Detect" button that can be used to automatically fill in the "Game Name" field - it shows a list if detected Pitboss games if it finds more than one.
Second, I mentioned it in passing before, but I registered a domain for this project:
http://www.civstats.com/
Please make sure you're using this location to access the site now. The old location will continue to work for a little while, but the code is not being updated there so you won't see any of the new features.
Which brings me to the new feature! You can now "administrate" games you own, allowing you to set all of the game options as well as set all of the players' leaders and registration passwords. In order to see the options for this, I'll need to manually assign the admins of each of the games, because you guys started uploading your stats before I had the whole "Add a game" feature. So, if you want me to assign you as the admin for your game, please tell me:
The game name that's yours
The username you used to register at www.civstats.com
MooManof_ Jun 25, 2006, 06:32 AM What does 'Return Code: -4' mean? Because I appear to be doing everything correctly... It's found the game, it's talking to 207.38.11.34 (www.civstats.com is 69.59.169.176 :confused: ), and it's sending the game data... yet it keeps saying 'Upload Failed'. I'm using the username from the website, and the password I put in when I selected 'Add Game'.
The game is 'ApolytonMFS', and it looks as though you have a lot of work head of you, not just to finish, but to clean up afterwards.
Fosse Jun 25, 2006, 10:18 AM CINvilization is my game, and Fosse is the name I registered on your site. The name and password on the old uploader I was using are different than the name and password for your site. Will this cause problems, and if so what do I need to do to fix them?
The new version of the uploader is not successfully sending information to the website. Also, the Pitboss game autodetect tells me it has found two Pitboss windows (I have one game and pbnotify open at the time), but it doesn't discover the name or put anything in the text box of that little window.
-Fosse
HitAnyKey Jun 25, 2006, 11:12 AM I've also noticed that for your Bar Graphs, you only have line colors available for 9 players. So any game that has more than 9 people, any of the additional people won't show up on the graph.
OverloadUT Jun 25, 2006, 11:21 AM What does 'Return Code: -4' mean? Because I appear to be doing everything correctly... It's found the game, it's talking to 207.38.11.34 (www.civstats.com is 69.59.169.176 :confused: ), and it's sending the game data... yet it keeps saying 'Upload Failed'. I'm using the username from the website, and the password I put in when I selected 'Add Game'.
First of all, don't use the "Add Game" feature on the website. I totally forgot that when I rolled out the latest changes, that will not work until I release a version of the uploader that doesn't use the username/password paradigm. It will eventually use a gameid/password system, but that's not implemented yet. So for now just use the same method as before, where you choose a unique user/pass and that will create the new game for you, and then I have to manually set you as the admin.
Return Code -4 is when the Uploader can't parse what came back from the script. It usually means it's going to the wrong location OR there's a parse error in the pbupload script that is causing it to print out unknown data. And it was the latter. I found out I had a bug in the upload script that caused a parse error. Argh.
So tell me if it's working now. You shouldn't need a new version of the uploader. The thing I find strange is what IP you say it's communicating with. That seems wrong to me. Oh well, try anyway.
Fosse- Same thing; I fixed a bug in the uploader so tell me if it's correctly sending data now. If it's not then I must have some bug in the uploader that is not manifesting on my two test machines. Very possible.
I also set you as the admin for your game, so you should now be able to adjust the details if you visit your game page. It should have a red bar saying that you have not completed setup.
Finally, what exactly is it saying when you click the Auto Detect button? If there is only one game running it should simply fill in the game name in to the field, and if there is more than one, it should pop up a small dialog with a list of the games it detected. Selecting one of them and clicking okay should fill in the game name field for you.
OverloadUT Jun 25, 2006, 11:22 AM I've also noticed that for your Bar Graphs, you only have line colors available for 9 players. So any game that has more than 9 people, any of the additional people won't show up on the graph.
Yes, this is true, and will only be temporary. It simply came down to the fact that I couldn't think of more than 9 colors that were unique enough! I plan on making it work for more players.
OverloadUT Jun 25, 2006, 11:41 AM The name and password on the old uploader I was using are different than the name and password for your site. Will this cause problems, and if so what do I need to do to fix them?
I should have mentioned this. For now, just use the same user/pass combo in the uploader you have been using all along. The only thing that is going to change in the future is that instead of asking for a "username" it will ask for the gameid of your game, but you will still have a unique upload password for each game.
Fosse Jun 25, 2006, 01:48 PM Got it. I think that a problem was that I set up the new version's profile as my game name, since I intend to start a new game soon, instead of my first name as I did before.
That doesn't make sense to me, because from what I understand it should just create a new game if it thinks something is different about it, but there you are. using the profile "CINvilization" with the same username and password gets a failed upload every time. Useing the profile "Kyle" with the same info works like a charm.
Thanks again!
Fosse
MooManof_ Jun 25, 2006, 04:01 PM I traced that IP using Ethereal... that's where the packets were going. As for the fix... it didn't take for me. I'm still getting -4's all over the place.
oh, and for the player colours, why not use the civ colours? So Russian would be Orange, and English white, etc.
OverloadUT Jun 25, 2006, 06:07 PM Okay, there were indeed a couple bugs in the Uploader. It wasn't always updating the user/pass variables based on what you put in the fields, so that's why you were having trouble with a new Profile Fosse.
I uploaded a new version; same link as above.
MooManof_: Your problem is definitely the fact that it's for some reason uploading to the wrong server. -4 is returned whenever it can't parse the "webpage" that is returned.
There are a coule things I'd like you to check out. First, you can open the .tmp files in your PitbossStats directory. Those contain the "webpage" that was returned when it tried to upload the data. The contents of those files should tell us where it's actually trying to go.
Second, open your PitbossStats.ini file and change the LogLevel to 4. Change your upload password to something you don't mind posting here, try to start the parser, quit after it gets an error, and then post the contents of your .log file named after your profile name here.
oh, and for the player colours, why not use the civ colours? So Russian would be Orange, and English white, etc.
That's a great idea. For some reason I thought that the colors in the game were random (I could have sworn I started another game as the Russians and my color was different) but those two colors you said match up with the colors in my game, so you must be right. :P Do you know where there is a list of the colors that all of the players are? Even better would be the actual python script that contains them because then I can probably use the exact colors.
MooManof_ Jun 26, 2006, 05:11 AM I didn't have any .tmp files until I switched off my Firewall, which incidently seems to have cured the problem.
I'll look into making an entry in my firewall list, which it normally does automatically for any program I run that wants an internet connection. I don't know why it didn't this time. Unless it only made a one-way doorway.
EDIT: <Removed Log-dump as it was unecessary>
I think the simplest method for controlling who owns what game, would be to add a 'Claim this game' option to the games which aren't yet assigned, and the game admin has to supply the upload password whilst logged in to claim it.
EDIT2: Game: ApolytonMFS, User: MMC
MooManof_ Jun 27, 2006, 08:20 PM Ok. It's now working, although it doesn't seem to have updated for 2 hours and I can't see any problems.
I have a couple of requests. I'll try to list them in a way to may it easy for you to reply:
May I have a copy of the php source files? I have a few ideas that I want to test out the practicality of. You could send them to my email address if you don't want to give them out publicly. I'll send you any work I do with notes so you can integrate it into your version.
One of my players likes to play as the Arizonians (formally Romans) and I have another who's playing as the Band o' Theives. Could you add the option to rename civs when they register their leaders.
When playing with AI and 'Take over AI' switch off, it seems a little annoying to be told that the AI slots are 'unregistered'. Two ways of correcting this could be: a) Check for the AI flag and simply remove them from the list when the admin sets passwords and from the list for a player registering their leader, or b) in the admin list, add a checkbox that lets the admin set that civ as AI, thus removing it from the second list. a) would be the simplest for users to deal with, but b) would allow for the AI scene to change (if players are kicked or 'Take over AI' is switched on)
OverloadUT Jun 28, 2006, 10:53 AM May I have a copy of the php source files? I have a few ideas that I want to test out the practicality of. You could send them to my email address if you don't want to give them out publicly. I'll send you any work I do with notes so you can integrate it into your version.
One of my players likes to play as the Arizonians (formally Romans) and I have another who's playing as the Band o' Theives. Could you add the option to rename civs when they register their leaders.
When playing with AI and 'Take over AI' switch off, it seems a little annoying to be told that the AI slots are 'unregistered'. Two ways of correcting this could be: a) Check for the AI flag and simply remove them from the list when the admin sets passwords and from the list for a player registering their leader, or b) in the admin list, add a checkbox that lets the admin set that civ as AI, thus removing it from the second list. a) would be the simplest for users to deal with, but b) would allow for the AI scene to change (if players are kicked or 'Take over AI' is switched on)
1) Right now I'd prefer to keep the source private. You could tell me what your ideas are and I could tell you what I think the practicality of it is ;). I may change my mind about this in the near future as this project might become too big for me :P
2) Hm, that's a good idea. It would require a bit more login in the query functions, but that's why I'm moving all the queries to their own common functions anyway! I'll add this to my design doc.
3) Also a good idea. I'll go with b) because in my games we have players switching to AIs occasionally. If you tick a player as "Always an AI" (perhaps a better term?) then they will not show up in the list of leaders to register, nor in the diplomacy center to send messages to.
GFletch Jul 01, 2006, 02:01 AM Fantastic tool, OverloadUT! Got the uploader up and running, followed your instructions on this board, and it's running perfectly. My Pitboss game is: "FOFC Global".
I appreciate you making a tool like this available.
Bernout1 Jul 02, 2006, 11:39 AM First of all, don't use the "Add Game" feature on the website. I totally forgot that when I rolled out the latest changes, that will not work until I release a version of the uploader that doesn't use the username/password paradigm. It will eventually use a gameid/password system, but that's not implemented yet. So for now just use the same method as before, where you choose a unique user/pass and that will create the new game for you, and then I have to manually set you as the admin.
Oops...I went and used the new game feature at the site before reading this. If you could delete the "6MD Test" that has 0 players I'd appreciate it. Thanks! So far this looks very cool. :D
[Edit:] Never mind...found a way to delete it on my own. Double cool. ;)
Bernout
OverloadUT Jul 03, 2006, 08:24 PM I'm glad everyone is enjoying it so far. Thank you very much for the testing and feedback you've been providing!
A major feature has just been rolled out:
New Turn Notification!
It should now be emailing out new turn notifications. This also means that the "Preferences" button on the game stats page works as well. Individual players can now choose whether or not they want to receive new turn notifications (as well as diplomacy message notifications.)
This feature is not entirely tested, so don't go and tell all of your players to register just yet! ;) Let a turn or two pass and make sure you get the notification yourself. Right now you can't customize the message. I will eventually be implementing HTML mails for those that want it, and in the distant future the new turn notifications will also list the key events that happened durin the previous turn.
I am getting pretty close to an official launch of CivStats.com version 1.0. :cool: I have a couple more small features to implement and then a bunch of code cleanup and error handling to do, and then I will make a new thread officially announcing the service.
After that I will begin work on the new "discussion-based" diplomacy center. That will be a lot of work so I wanted to polish up the current feature list first. It's about time I actually go through and clean up the error handling. :)
GFletch Jul 05, 2006, 05:41 PM Thanks for the work on this. My players absolutely love it.
DaveShack Jul 06, 2006, 10:31 PM I'm hosting "MTDG Test Game 2" and the players are asking how they register their leaders. What do I need to do?
OverloadUT Jul 07, 2006, 12:53 AM I'm hosting "MTDG Test Game 2" and the players are asking how they register their leaders. What do I need to do?
Okay, I manually set you as the administrator for your game. Now if you visit you game stats page while logged in, you'll see a banner asking you to finish setup. Just click "Next" when it asks you to start the uploader.
IglooDude Jul 07, 2006, 08:50 AM OverloadUT, I'm having a serious problem. I've been running the v.5 uploader on my "civivor" game with no problems, but then attempted to add a game called "CDZ" (running on a different box, different IP address) and #1 haven't been able to make CDZ show up, and #2 every time I start the v.7 uploader, it injects CDZ data into the Civivor game display. I've upgraded the Civivor uploader to v.7 as well, and I've tried creating the CDZ game from the website. Can you suggest a troubleshooting path?
DaveShack Jul 07, 2006, 10:51 AM For IglooDude's problem my suggestion would be to allow an alternate port address, if the PHP side can handle that.
MooManof_ Jul 07, 2006, 11:59 AM I believe this could be a known problem where you need to make sure you are using a different username and password combination for each uploader you run.
the oob Jul 07, 2006, 06:20 PM OverloadUT: now that there are quite a few games on the civstats page, you may want to order the list alphabetically.
OverloadUT Jul 07, 2006, 06:40 PM MooManof is correct about the issue - it's caused by using the same username/password combo on a second game. A lot of people got confused about what the user/pass for the upload is for, and think that it has to be the same as your login to the site. The user/pass thing was just a way of generating a unique identifier for your game so people didn't upload to the same gameid. The new system requires you to "add" the game to the page first and is a lot less confusing because of that.
However, this can happen even when you DO set a different user/pass in a second profile, and that's because of a couple serious bugs in the uploader that I just recently identified. The bottom line is the multiple-profiles support is a bit broken in the latest release. I have already fixed that, however, and am polishing up the next version of the uploader, which has a lot of changes in the way data is uploaded. This will also be the first version that asks you to enter your "Game ID" instead of a "username."
I will release it some time tonight, so keep an eye on this thread.
I would consider this release to be the first real "beta" release, whereas the previous releases were more like alphas.
OverloadUT Jul 07, 2006, 10:17 PM Important New Version of Uploader
As the gigantic font above says, there is an important new version (http://www.apartment167.com/modules.php?name=Downloads&d_op=getit&lid=31) of the uploader. Here are the main changes:
I fixed some major bugs that happened when you tried to upload the stats from more than one pitboss game at a time. Now it's perfectly safe to run more than one at a time, and there's even some logic to ensure you don't load the same profile twice.
The "Upload Username" has been changed to "GameID" - Instead of putting a username in that field, you should put the GameID assigned to you by the server. (You can tell what yours is by going to your game stats page and looking at the URL. It'll be something like viewgame.php?gameid=5
This version of the uploader uploads a timestamp with every upload, instead of letting the server timestamp it when it uploads. This means that if for some reason the uploads stop working (let's say your internet connection goes down) but stuff is still happening in the server (on a LAN maybe?) then when your internet connection comes back, all of the data will upload at once but they will have the proper time listed in the game log. This will probably not help anyone ever since it's an obscure circumstance, but it's still cleaner! Note that this means it's important for your server's clock and timezone to be set correctly.
A few other tweaks that make it cleaner and better.
IglooDude - I felt bad about your game stats getting all messed up, so I went through the database and removed the bad entries by hand. It's back to its old awesomeness. :)
Fosse Jul 08, 2006, 11:16 AM I started the new uploader and tried to rename the default profile. The rename box dialogue wouldn't go away when I typed soemthing, and just kept reopening each time I hit "Ok" or "cancel." I couldn't even X it out, so I had to kill it with task manager.
using the default profile I was able to get CINvilization up though.
OverloadUT Jul 08, 2006, 12:30 PM I started the new uploader and tried to rename the default profile. The rename box dialogue wouldn't go away when I typed soemthing, and just kept reopening each time I hit "Ok" or "cancel." I couldn't even X it out, so I had to kill it with task manager.
using the default profile I was able to get CINvilization up though.
Strange... I haven't actually tested the rename feature in several versions so it's possible I broke it along the way. I'll take a look.
You could in the mean time simply open up your ini file (while the upload is not running) and change the [default] header to whatever you want your profile named.
IglooDude Jul 09, 2006, 01:08 PM Important New Version of Uploader
As the gigantic font above says, there is an important new version (http://www.apartment167.com/modules.php?name=Downloads&d_op=getit&lid=31) of the uploader. Here are the main changes:
I fixed some major bugs that happened when you tried to upload the stats from more than one pitboss game at a time. Now it's perfectly safe to run more than one at a time, and there's even some logic to ensure you don't load the same profile twice.
The "Upload Username" has been changed to "GameID" - Instead of putting a username in that field, you should put the GameID assigned to you by the server. (You can tell what yours is by going to your game stats page and looking at the URL. It'll be something like viewgame.php?gameid=5
This version of the uploader uploads a timestamp with every upload, instead of letting the server timestamp it when it uploads. This means that if for some reason the uploads stop working (let's say your internet connection goes down) but stuff is still happening in the server (on a LAN maybe?) then when your internet connection comes back, all of the data will upload at once but they will have the proper time listed in the game log. This will probably not help anyone ever since it's an obscure circumstance, but it's still cleaner! Note that this means it's important for your server's clock and timezone to be set correctly.
A few other tweaks that make it cleaner and better.
IglooDude - I felt bad about your game stats getting all messed up, so I went through the database and removed the bad entries by hand. It's back to its old awesomeness. :)
You are officially my favorite freeware developer now. :goodjob:
I'll try getting the CDZ one going again this afternoon - I had a power outage yesterday that downed both pitboss games. :(
Fosse Jul 09, 2006, 01:27 PM Thanks about the .ini note.
what about creating a New profile, in order to run a second game?
OverloadUT Jul 09, 2006, 01:55 PM Oops! I didn't realize it was that broken. I had put in some logic to make sure you don't use invalid characters in the profile name (any character that can't be used in a filename) but I accidentially made it so that you can only use a profile name that DOES have invalid characters! :mischief:
Regardless, this means that:
Uploader Version 0.8.0.10 Released
Same link as above. The only change is fixing that bug.
Fosse Jul 09, 2006, 02:00 PM Never mind, you can just copy the lines and add them to the .ini manually. No biggie.
Bernout1 Jul 09, 2006, 09:28 PM Regardless, this means that:
Uploader Version 0.8.0.10 Released
Same link as above. The only change is fixing that bug.
Question...since we use the game # now in the uploader, does that mean we can use the "Add Game" functionality at the web site? I assume the answer is 'yes' but I wanted to make sure. :)
Bernout
OverloadUT Jul 09, 2006, 09:48 PM That is correct. "Add Game" is now the preferred method for adding a new game, as it sets you up as the game administrator instead of me having to do it by hand.
I will be disabling the old method of adding new games, and then after enough time has passed, I will be disabling the old method of uploading current games (that is, using the user/pass thing instead of a gameid/pass)
Fosse Jul 10, 2006, 08:25 PM Since you're busy enough, I thought it might be time for another feature request! ;)
I've now started a game that is only using CivStats, and its up to the players to claim their civs to get turn emails. This has led me to wish for two things:
1 - The ability for game admins to see who has and who has not registered their civs. It might be useful for players to, so they don't send diplomacy messages out into the void of a player who has never even been to Civstats.
2 - The little pbnotify trick that minimizes both itself and Pitboss to the system tray. If it could reach out and grab the "launch" window as well... that'd be awesome.
And a question: does the player get any sort of notification when a Civstats diplomacy message is delivered? It seems that it could be easy to overlook them sometimes if you don't get into the habit of checking.
The improvments to the uploader and the site itself have been great.
Fosse
OverloadUT Jul 10, 2006, 10:49 PM Well I've got good news for you. :)
You can tell which players have registered by going to "Player Settings" in the admin tools for your game. It also allows you to "unregister" a player in case someone goes AWOL and you get a replacement.
Also, if you try to send a diplomacy message to a player that is not registered, a giant red banner shows across the top of the page that says: "Nobody has registered as this player. You should remind them to! You can still send a message now and they will get it when they register."
And yes, it sends you an email notification when you get a diplomatic message, although players can choose not to.
As for the minimizing thing - yeah, I'll implement that. I originally didn't because I felt there was no need to duplicate what pbnotify does, but now that I have my own turn notification I suppose I should do that. I did originally want to be able to hide the console window as well, but I'm not sure there is a good way to do this. The title of the window can change depending on the shortcut you make to run it, so I'm not sure how else to reliably detect it. Perhaps it has its own unique class.... That would work. I'll check in to it.
mickeyj Jul 11, 2006, 02:57 AM One of the games I'm playing is using the apartment167 address and not the civstats address which means I can't register my game. Is there a reason for this? And will I be able to register these games with all my other games in the future?
netbjarne Jul 11, 2006, 03:36 AM So - I had this player who just couldn't stop bugging me with this civstat thing, so I just had to implement it to shut him up: http://civstats.com/viewgame.php?gameid=65
Well - All is good. I guess I have to give you thumbs up :-)
One thing though - when setting up the game, you are supposed to choose map type. We are playing on a custom smartmap map - but there is no way to choose "custom" or "other" in your drop-down menu.
Best regards
Bjarne
mickeyj Jul 11, 2006, 03:40 AM So - I had this player who just couldn't stop bugging me with this civstat thing, so I just had to implement it to shut him up: http://civstats.com/viewgame.php?gameid=65
I wonder who that could have been :D
MooManof_ Jul 11, 2006, 06:46 AM One of the games I'm playing is using the apartment167 address and not the civstats address which means I can't register my game. Is there a reason for this? And will I be able to register these games with all my other games in the future?
The apartment167 address has been stagnated since version 7 was first released. If you tell your game admin to transfer to a newer version, I would suggest that Overlord may be able to transfer the relevant info over.
Although why both addresses don't point to the same folder on the same server, I don't know. Surely that would prevent problems like this, and it would mean that both addresses show the up-to-date information. If the newer uploaders are phasing out the A167 address, then once the older uploaders become obselete (and as such no longer compatible with the server software), then you could just drop the old A167 address.
MooManof_ Jul 11, 2006, 06:50 AM On a slightly different note, the 'Site News' section shouldn't really be displying the list of games any more. It should be displaying release announcements instead. Also, how many people have gone to www.civstats.com without knowing about this thread, and have thus been unable to find and download the uploader. There should be a link in the top bar near the login links.
Fosse Jul 11, 2006, 08:03 AM Thanks for pointing me in the right direction, Overload. I just never saw them!
About minimizing the window... would a ridiculous hacky workaround like having the player input the name of the window work? A little button that says, "garbage extra Pitboss Window Name," then you enter it, then ta-da! It's gone!
OverloadUT Jul 11, 2006, 10:04 AM Fosse - That would work as a last resort. It's just... as you said, ridiculous hacky ;)
MooManOf - That's true. I haven't implemented a news system yet (although I suppose I should just put some static text, which is better than nothing.) Until now, I didn't want anyone going to CivStats.com to use the tool without viewing this thread. It was kind of an alpha that I didn't want everyone using. Now that the whole "add a game" feature is implemented and whatnot, I think it's time to do that.
MooManof_ Jul 11, 2006, 10:41 AM If not a link to the app, a link to this thread should have been there. And my offer to help is still open - even if it's mostly just administrating the website.
grimliin Jul 13, 2006, 08:41 AM I am having issues with my game. I have the latest civstats running, but its not updating any of the logins or turn completions since I upgraded. On my server I see the successful upload, and it looks like it is registering at the website. Any ideas?
Bernout1 Jul 13, 2006, 08:51 AM I am having issues with my game. I have the latest civstats running, but its not updating any of the logins or turn completions since I upgraded. On my server I see the successful upload, and it looks like it is registering at the website. Any ideas?
Just to get rid of the obvious, you *are* running 1.61 right? :)
Bernout
grimliin Jul 13, 2006, 03:07 PM yep, it is
OverloadUT Jul 13, 2006, 09:23 PM Well, what game is it that you're having problems with?
grimliin Jul 14, 2006, 05:54 AM guess that would help huh?
RP Free for ALL PTBS
grimliin Jul 14, 2006, 06:08 PM looks lik you fixed it whatever it was, thanks!!
grimliin Jul 16, 2006, 02:12 PM Well it spit out a bunch of info when I posted it was fixed before, but now its back to not working again. Not sure what is wrong...
MooManof_ Jul 16, 2006, 02:35 PM Checked your firewall? That can sometimes play tricks on CivStats
OverloadUT Jul 16, 2006, 08:25 PM Yeah, a firewall could cause problems with the uploader - it needs to communicate on port 80 to do it's thing.
Other than that, I can't imagine why it wouldn't be uploading the stats correctly, especially if the app is saying it's doing a successful upload. Have you checked the logfile to see what it says in there? It would be named [YourProfileName].log.
grimliin Jul 17, 2006, 02:02 PM turned the firewall off, itsupdating the time and stuff, and sending out new turn notifies, but no turn indicators or login logs. Here are the last few lines of the log.
7/17/2006 15:54:51 tt - Player 18's type is now: 1
7/17/2006 15:54:53 tt - Upload Finished. Data Downloaded: 21 Time: 1.70731699140533
7/17/2006 15:54:53 tt - Upload Finished. Data Downloaded: 21 Time: 0.453216819456104
7/17/2006 15:54:54 tt - Upload Finished. Data Downloaded: -1 Time: 0.339874760619017
I tried going back to .7, but same thing. Wondering if something on your server side doesn't like my game. Can you blank it to try again?
OverloadUT Jul 17, 2006, 02:19 PM Open up your Pitbossstats.ini file and change the loglevel to 2.
Then run the app like normal, and after it does an upload or two, please post the last several lines from the log here. You'll want to edit out your password from the log.
Also, there are a few .tmp files that are created when it uploads data. After you start and stop it, please post the contents of each of the .tmp files. It should only be one line, something like pbupload=1|queries=10 but it might have a php error in there too. That's what I'm looking for. :)
grimliin Jul 18, 2006, 07:43 AM Not successfully uploading now. Firewall is turned off. Don't know what else to try...
7/18/2006 7:21:12 tt - Player 18's type is now: 1
7/18/2006 7:21:14 tt - Upload Finished. Data Downloaded: 21 Time: 1.4622886428303
7/18/2006 7:21:14 tt - Upload Finished. Data Downloaded: 21 Time: 0.345812107404712
7/18/2006 7:21:15 tt - Upload Finished. Data Downloaded: -1 Time: 0.308921943990088
7/18/2006 7:21:15 tt - Upload FAILED. Return code: -4
7/18/2006 7:21:25 tt - Upload Finished. Data Downloaded: -1 Time: 0.307103835822709
7/18/2006 7:21:25 tt - Upload FAILED. Return code: -4
7/18/2006 7:21:35 tt - Upload Finished. Data Downloaded: -1 Time: 0.322045678989927
7/18/2006 7:21:35 tt - Upload FAILED. Return code: -4
7/18/2006 7:21:46 tt - Upload Finished. Data Downloaded: -1 Time: 0.380481597521473
7/18/2006 7:21:46 tt - Upload FAILED. Return code: -4
7/18/2006 7:21:56 tt - Upload Finished. Data Downloaded: -1 Time: 0.306162934115928
7/18/2006 7:21:56 tt - Upload FAILED. Return code: -4
7/18/2006 7:22:06 tt - Upload Finished. Data Downloaded: -1 Time: 0.318325373755603
7/18/2006 7:22:07 tt - Upload FAILED. Return code: -4
7/18/2006 7:22:17 tt - Upload Finished. Data Downloaded: -1 Time: 0.344863104109601
7/18/2006 7:22:17 tt - Upload FAILED. Return code: -4
gamedata.tmp pbupload:1|queries:4|
init.tmp pbupload:1|queries:5|
OverloadUT Jul 18, 2006, 12:57 PM Very strange. It appears to be uploading the init command and the game data command, but it fails on the player update command. Do you have a playerdata.tmp file?
Also, I mispoke. Could you do the same thing with a loglevel of 3? That's when it should actually show us the exact URL it's trying to access.
Data downloaded -1 means that either the server returned an error (404 or 403 or 503) or it wasn't able to contact the server at all...
grimliin Jul 18, 2006, 02:00 PM no, don't have payerdata.tmp
7/18/2006 15:57:16 tt - Total Parse Time: 6.83503797270323
7/18/2006 15:57:16 tt - Queueing data to upload. Items in queue before this one: 0
7/18/2006 15:57:16 tt - Starting an upload. Func=Init URL: http://www.civstats.com/pbupload.php?Func=Init&ID=23&Pass=********&UploaderVersion=0.8.0.10&NumPlayers=18&UseTurnTimer=1&GameName=RP+Free+for+All+PTBS×tamp=1153252636
7/18/2006 15:57:16 tt - Queueing data to upload. Items in queue before this one: 1
7/18/2006 15:57:17 tt - Queueing data to upload. Items in queue before this one: 2
7/18/2006 15:57:21 tt - Upload Finished. Data Downloaded: 21 Time: 4.72569083500836
7/18/2006 15:57:21 tt - Starting an upload. Func=GameData URL: http://www.civstats.com/pbupload.php?Func=GameData&ID=23&Pass=*********&UploaderVersion=0.8.0.10&Year=1840+BC&TurnTimer=32253×tamp=1153252636
7/18/2006 15:57:22 tt - Upload Finished. Data Downloaded: 21 Time: 0.475747057237722
7/18/2006 15:57:22 tt - Starting an upload. Func=PlayerData URL: http://www.civstats.com/pbupload.php?Func=PlayerData&ID=23&Pass=*********&UploaderVersion=0.8.0.10×tamp=1153252636&P1Name=grimliin&P1Type=1&P1Score=93&P1Finished=1&P2Name=Taruka+Wasuncha&P2Type=1&P2Score=96&P2Finished=1&P3Name=DaveShack&P3Type=1&P3Score=92&P3Finished=0&P4Name=Great+Cottus+Arci&P4Type=1&P4Score=120&P4Finished=0&P5Name=Herandar+Elutheria+Imperator&P5Type=1&P5Score=96&P5Finished=1&P6Name=CB&P6Type=1&P6Score=100&P6Finished=0&P7Name=Emperor&P7Type=1&P7Score=159&P7Finished=1&P8Name=HitAnyKey&P8Type=1&P8Score=100&P8Finished=1&P9Name=facehuger&P9Type=1&P9Score=153&P9Finished=0&P10Name=Corossol&P10Type=1&P10Score=120&P10Finished=1&P11Name=Fosse&P11Type=1&P11Score=100&P11Finished=1&P12Name=Ash+Sere&P12Type=1&P12Score=109&P12Finished=0&P13Name=shday&P13Type=1&P13Score=102&P13Finished=0&P14Name=niamor&P14Type=1&P14Score=165&P14Finished=1&P15Name=Rakkasan21&P15Type=1&P15Score=96&P15Finished=1&P16Name=Matrix&P16Type=1&P16Score=107&P16Finished=1&P17Name=FortyJ&P17Type=1&P17Score=100&P17Finished=0&P18Name=Steiner-Davion&P18Type=1&P18Score=83&P18Finished=1
7/18/2006 15:57:22 tt - Upload Finished. Data Downloaded: -1 Time: 0.346615561474992
7/18/2006 15:57:22 tt - Upload FAILED. Return code: -4
OverloadUT Jul 18, 2006, 03:02 PM Hrm...
I'm starting to think that the problem might be related to the scripting language I'm using choking on a GET request that is so long. That URL is over 1000 characters! I'm sure that's some violation of hte W3C guidelines.
I entered the URL manually and the data successfully updated in your game, so the problem is not on the php's end, which is a shame because that would have been an easy fix.
Unfortunately there is no other easy way to do it. I might have to move all of the data to POST variables, but that would require a significant rewrite.
I will experiment with the data you gave me to see if I can confirm that it's a problem with the scripting language I'm using and see if I can work around it easily.
grimliin Jul 19, 2006, 06:32 AM alright, thanks, if you find out I'm just over a threshhold I could request players to shorten names or find another way to trim off a few chars
OverloadUT Jul 21, 2006, 06:20 PM You know that significant rewrite I was talking about? It's done :D
I'm glad this problem came up actually, because it gave me the push I needed to rework the uploading system. Plus it was very fun to write a fully compliant HTTP/1.1 client. :crazyeye:
Of course, there's still the question if it will actually fix your problem!
Please try using this new version (http://www.civstats.com/downloads/CivStatsUploader_0.9.0.1.zip) of the uploader.
Other people probably shouldn't update to this new version quite yet. It has a LOT of changed code and might not work completely, although I have done extensive testing. I would just like to give it another day before I "offically" release it. :)
grimliin Jul 21, 2006, 08:55 PM woo hoo, we are back in business!! Thanks!!!
OverloadUT Jul 23, 2006, 04:04 PM Some new features just rolled out. Check www.civstats.com to read about them :cool:
I will be officially releasing the new version of the uploader sometime today. I have made a few changes since that one linked above.
And lastly: I need someone that is administrating a game that has an eliminated player in it to tell me what it says under "Ping" for the eliminated player. Thanks!
Fosse Jul 23, 2006, 04:52 PM In game? Because in CINvilization the player named "Kyle" is from me logging into an unclaimed human civ that never got picked up and deleting the units in game (I didn't realize retiring would do the trick back in my early Admin days ;) ).
Nobody ever met the civ, so he doesn't show up on the list and I get no in-game ping report.
OverloadUT Jul 23, 2006, 05:37 PM I meant to say what it says in the actual Pitboss admin pannel.
However, I figured out a different way to do what I wanted so it's all good.
I'm about to roll out an update with a lot of changes, but not many of the changes are visible. It's mostly improvements in the backend, althought there will be some new noticable things like an "Eliminated" event in the game log.
Fosse Jul 23, 2006, 06:48 PM Here you go. The player "Kyle" was unclaimed for a few turns, then I logged in and deleted all of the units. I would guess, but am not positive, that it's the same if civ was eliminated during the course of the game.
My best guess for how you can have the website look for eliminated civs though is to just watch for a score of zero, because that can only happen if you are indeed dead.
OverloadUT Jul 23, 2006, 07:38 PM Yeah, that's how I implemented it. I just wanted to make sure it didn't say something weird instead of AI, as that could cause unexpected results when the uploader tries to parse it.
But it's all good!
GFletch Jul 26, 2006, 04:58 AM I'm trying to upgrade my two games (Soylent Green and FOFC Global) to 1.0 Civstats, and the uploader program freezes when I use "Auto Detect". What am I doing wrong?
OverloadUT Jul 26, 2006, 04:21 PM ERoy - There was indeed a bug when using that feature and more than 1 window was detected. You can get the fixed version here (http://www.civstats.com/download.php).
Also, there is a new thread (http://forums.civfanatics.com/showthread.php?t=178807).
Any future questions or comments should go there.
|
|