PDA

View Full Version : [LocalStats and bots] How can I use them together?


Redline
3rd November, 2002, 10:57 PM
empty

The_Undertaker
4th November, 2002, 09:28 PM
What is your exact problem?

Redline
9th November, 2002, 11:32 AM
How can I use stat if I've bots on server?!?

ApocDeath
9th November, 2002, 02:02 PM
I've been following this one a lot, and here's what I've gathered from forum threads and the occasional interaction with El Muerte who made LocalStats:

After patch 2136, you can enable LocalStats (and WorldStats, on which LocalStats seems to rely) with minplayers>1 (ie with bots enabled) but IT WILL NOT LOG ANYTHING UNTIL ALL YOUR BOTS HAVE BEEN REPLACED BY HUMAN PLAYERS. Sad but true. :(

mattyg
12th November, 2002, 02:11 PM
But is there a way to log the stats locally and not force the user to be authenticated with the master stats logger from EPIC? I want people to be able to play on my server without going out and getting a login and all that krap... But I want to be able to log game results...

Is this possible?

What is the difference between these lines in the ini. ?

bEnableStatLogging=True

bCollectStats=True

SendStats=True


Can some combination of setting these get me where I want to be?
:withstupid:

ApocDeath
12th November, 2002, 03:46 PM
I'm pretty sure that's a big 'no'... LocalStats piggy-backed on WorldStats, and WorldStats requires a passwd/stats-login... I agree, not ideal, but El Muerte was looking to preserve the original gametypes...

However, hope is not lost! There's a coder going by something like HellRaiser who wrote a mod that does local stats logs right! He just had to make new versions of _every_ gametype!!! (Awful, isn't it? ??? ) Sadly, I'm a big loser and CAN'T FIND THE LINK AGAIN!! Damn, do I hate being an airhead...

ApocDeath
12th November, 2002, 03:55 PM
Of course! It's associated with the ut2003stats project at sourceforge! I'm a dummy... Anyway, go here, and get 'locallog' by HellRaiser... I _believe_ this one claims to do what is needed... If so, let me know, so I can run it too!! ;)

http://sourceforge.net/projects/ut2003stats/

elmuerte
13th November, 2002, 11:29 AM
But is there a way to log the stats locally and not force the user to be authenticated with the master stats logger from EPIC? I want people to be able to play on my server without going out and getting a login and all that krap... But I want to be able to log game results...

LocalStats doesn't require the worldstats username and password, but the UT2003 client sees that Stats are enabled on the server and forces you to enter a username and password.
Registration of new users is done automatically when you enter a username and password, you don't have to visit a websiteor something.

obiwan
15th November, 2002, 12:03 AM
Of course! It's associated with the ut2003stats project at sourceforge! I'm a dummy... Anyway, go here, and get 'locallog' by HellRaiser... I _believe_ this one claims to do what is needed... If so, let me know, so I can run it too!! ;)

http://sourceforge.net/projects/ut2003stats/

okay, downloaded and installed, makes a lovely text file for everygame :) the statsdb seems a little buggy but is being updated continously. main thing is it works on the whole, well done to the guys at sourceforge!!!

Evolution
15th November, 2002, 01:14 AM
Epic has stated that this in fact a bug with 2136. Should be fixed in the next patch.

ApocDeath
15th November, 2002, 02:12 AM
Thanks, Evo!

PapaDoom
16th November, 2002, 08:01 AM
I am using Hellraiser's locallog 0.9 mod (NOT mutlocallog- that doesn't work with bots). It works just fine. Its drawback: it requires players to download a (small; approx. 250 k) "mod".

Couple that with the statsDB code by Paul Gallier (the latest unpackaged version from CVS) and you have a pretty workable solution that functions with bots and gives you server based stats.

You can find statsDB here: http://ut2003stats.sourceforge.net/ . On the downloads page, you can get the latest full version (0.91b as of this writing; which is pretty buggy) or use CVS to get the latest "in progress" update. The CVS version is working pretty well, and will be part of a full release "shortly", according to Paul.

I'm running the latest version from CVS on my game server website at http://kgadams.no-ip.org. Just click on the "UT Stats" link and you'll see the current data from my server. Be aware that it helps to know something about PHP and mySQL, both of which are required to set up statsDB.

Evolution: are you saying that Epic has stated that local stats not working with bots is a bug? I'd be happy to hear that. Because frankly it has sounded to me like Epic's position is: "If its got bots, it ain't official and it will never have stats because we want UT2003 to be like the olympics!".

Bah: I never bought this game or set up a server to compete in the olympics :angry:

ApocDeath
16th November, 2002, 02:55 PM
Excellent to know, Papa... We have our own in-house php/mySQL stats parser/database access package at Apoc for classic UT stats. Once we decide to start logging in 2k3, I guess someone (probably me :p ) will need to bastardize that for the new logs. Maybe I'll keep an eye on statsDB... I really don't have a ton of time to be coding...

PapaDoom
16th November, 2002, 07:09 PM
I just figured out a drawback to using the locallog 0.9 mod. If you do, your server will no longer show up in the standard server listings in the UT2003 game browser.

Locallog, if you use it fully the way I do, adds new game types to your server: like LogGames.LogCTFGame (for capture the flag), for example. Apparently, this is the only way currently to get bot-enhanced games to log stats locally. Since the UT2003 browser doesn't display custom game types, your server will no longer show up in any of the game type listings.

Yeah, I know: this is obvious. But it wasn't obvious to me. I spent several minutes trying to find my server today, and then finally it clicked.

Heads up to anyone as brain-dead as myself ;) Maybe someone knows of a way to get the games to show up in the browser and can share it here?

ApocDeath
16th November, 2002, 10:52 PM
This was one of the reasons El Muerte's LocalStats is as limited as WorldStats... He knew that to get true full local logging, the gametypes would have to be modded. Pick your poison, as they say... ;)

Technically, one can add stuff to the server browser via mods... It was done many times in classic UT. Perhaps a final release of LocalLog (or a further mod if this wasn't part of HellRaiser's plan) would be to add servers running his mod's gametypes to the server browser in one way or another... Certainly would be worthwhile if enough server admins ran LocalLog!!

Anyway, we'll see. Part of the reason I dig local stats logging is because I run a private server, so the server browser has always been one of my least and last concerns. We've been openning to the public more, though, so I guess I'm more worried about it now than I have been.

PapaDoom
16th November, 2002, 11:05 PM
Apoc, my interest in local stats is pretty similar to yours it sounds like.

Being visible in the browser is a "nice to have" since it attacts more players, but not critical. Having stats working with bot-enriched games *is* important for my server. So, I pick the "no browser presence" option, without hesitation.

Mind you, I'll be watching to see future developments. What is heartening to me is all the community support and development work that has taken place to get local stats and "bot enriched" stat logging working, even though Epic seems to care not a whit about either of these things.

Bazzla
19th November, 2002, 01:42 AM
Would anyone mind letting me know how to run a LocalLog game type from the command line on a dedicated server?

I'm probably just being stupid, but I cant seem to get the right syntax.

I guess it should look someting like this:

ucc server DM-Antalus.ut2?game=(what goes here)?AdminName= etc.

PapaDoom
19th November, 2002, 04:30 AM
Bazzla, assuming you are using the LocalLogs mod by Hellraiser (current version 0.93), your startup line might look something like this:

[code:1:3bd1ceefaf]ucc server DM-Antalus?game=LogGames.LogDeathmatch?MinPlayers=4 -nohomedir -ini=<yourINIfile>.ini[/code:1:3bd1ceefaf]


The "game=LogGames.LogDeathmatch" part is the only part that's different- the rest of the settings are just what I use on my server, and your settings may be different.

elmuerte
19th November, 2002, 09:09 AM
a little warning, Hellraiser's localog will mostlikely break the next UT2003 version.
so becarefull when you upgrade, first test if it still works and doesn't break anything before you update your servers without looking.

PapaDoom
20th November, 2002, 07:19 AM
Thanks, El_Meurte, for the heads up.

Any reason why you believe the locallog code will break?

Or is Epic just being pissy about the fact that not everyone wants to play the olympic games of first person shooters, and wants to have stats with bots?

Or (heaven forfend) are they actually going to write code to support local logging of games with bots? If so, I'm perfectly happy to switch to their supported logging method.

Something tells me they aren't doing the latter, however- I'm a cynic, so the "pissy" option seems more likely :p

obiwan
20th November, 2002, 03:55 PM
I would like to know the answer to that one too, everyone loves the stats with bots on my server, and between uprading and stats, the upgrade can go............ so hopefully both can still work

elmuerte
20th November, 2002, 10:14 PM
Epic has made some changes in stats code, and gameclass code.
I dont' know what hellraiser has overwritten from that code, but there's a pretty good chance that it will break. So just watch out when you upgrade.

parmie
21st November, 2002, 09:44 AM
I've made my own log parser for hellraisers locallog
now it seems all the kills of real players are not logged
only from bots

HellraiserUK
23rd November, 2002, 05:22 PM
The reason I wrote LogGames is that I run a server myself where there are not enough players all the time to use my MutLocalLog or El_Meurte's logger and also there are bugs in the original logging which means that the logs sent to Epic are not always a true reflection of the game and therefore a local copy of these logs has the same errors. I replaced alot of code to achieve what I wanted to do, more than was required, in order to minimise problems from later patches. The downside is that if Epic makes an improvement in some of the code I have replaced then obviously you will not see the improvement.

I will assume that Epic will make the next patch available as a beta like the last one, so that testing can take place and new versions of mods written if necessary. Any addition to the game can be broken by an Epic patch and it's sensible practice to test before implementation of any patch.

I hope that Epic add local logging with support for bots and fix their little logging bugs so that I can run it on my server without having to worry about the next patch. At the moment I collect and parse logs on a daily basis using LogGames without any problems.

PapaDoom
23rd November, 2002, 06:13 PM
Hellraiser, its good to hear from you here!

I have nothing but thanks to give to you, El_Muerte, and Paul (Panthera) of StatsDB. Whether I use your code or not, you folks and people like you who contribute to the server admin community deserve a ton of praise.

My server has bots, always will. I don't care about "tournament" stats, but I want stats. Crazy though it may seem, my players and I get a kick out of seeing what is going on with "our" server.

Thanks to LogGames and StatsDB, I have what I want. Yes, I'd prefer it if my server showed up in the UT2003 server browser. Heck, I'd be happy if Epic came out and natively supported what I want. But what Epic taketh away (local stats with bots), you folks giveth back.

Now I will watch and see what happens with the next release of UT2003...

ApocDeath
23rd November, 2002, 07:57 PM
Ditto on Papa's sentiments from clan Apoc!! I'm not running your stuff on our 2k3 server yet, but as soon as my clan starts to play 2k3 more, it'll be _demanded_ that we have local logging with bots... Thanks a bunch to you folks for your efforts!!

obiwan
24th November, 2002, 04:32 PM
I third that!!!

my players love the stats too, its only once a week we get 6-8 players all at once so the rest of the time when we have 3-5 playing they still wanna see there stats!

cheers all you guys, epic take a leaf outta someone elses book ;)

HellraiserUK
24th November, 2002, 05:25 PM
Thanks for the great comments guys and gals.

The next version should be available real soon which includes one of the things I've most wanted to add the the log... chat. The people I play with not only wanted to see how much they pwned by but how witty their end of game comments were. :p I guess server admins could also use this to record any language not to their liking.

FarmBoy
25th November, 2002, 06:35 AM
I'd love to add local stats logging (even if bots are present) on my UT 2003 Server and this sounds like exactly what I'm looking for.

HellRaiser, where can we download this puppy and keep up-to-date on your new versions? I can't wait to give it a try.

Also, is there a tool or sample code to implement a stats website (based on HellRaiser's mod) that doesn't use PHP? Preferably something that uses ASP 3.0 or ASP.Net.

Thanks,
FarmBoy

PapaDoom
25th November, 2002, 02:17 PM
Farmboy, here is a URL from ut2003hq for LocalLog:

http://www.ut2003hq.com/pafiledb/pafiledb.php?action=file&id=660

As for an ASP stats parser, the only one I know of is the one referred to on El_Muerte's site: MegaStats. According to the info, its designed to work with El_Muerte's logging mod, but perhaps it can be changed to work with other log files? Here is a URL:

http://66.75.123.4/megabase/index2.aspx

FarmBoy
25th November, 2002, 11:39 PM
Thanks for the link to LocalLog.

As for an ASP stats parser, the only one I know of is the one referred to on El_Muerte's site: MegaStats.

I saw the MegaStats service but when I saw it used El Muerte's logger, I was pretty sure it wouldn't work with HellRaiser's logger. Unless the log format that El Muerte and HellRaiser are creating are identical, I'm betting it won't work. I guess it is possible that it could be changed to work with HellRaiser's logger. If something doesn't come along shortly (either for HellRaiser's logger or something official from Epic), I'll probably just use some of my vacation time in December to create a stats web site myself.

Does anyone think there'd be much demand for a stats site that used ASP or ASP.Net and ODBC instead of PHP & MySQL?

Thanks,
FarmBoy

ApocDeath
26th November, 2002, 02:12 AM
Considering both PHP and MySQL work under both MS and non-MS OS's? I guess there might be demand for Win-specific stuff, but when the other works on many more OS's, why be exclusionary? Leave that to the goons at MS... ;) Sorry for the bitterness, but I'm busting my hump to become less dependent on MS products, because I find it hard to believe that I have to pay for their inferior software just because of market pressure. It just kills me that I even still run a dual boot at home... ???

PapaDoom
26th November, 2002, 06:12 AM
I know that the log file formats used by El_Muerte and Hellraiser are different, but statsDB can parse both formats. From this fact, it is reasonable to assume that there are a lot of similarities in the two log formats.

I'm speculating, but I'd guess that it might be easier to take MegaStat's source code and revise it to work with Hellraiser's format that it would be to write something from scratch.

Personally, I kind of doubt that there will be a ton of people using ASP.Net and MS SQL for UT stats parsing/reporting. First, because MS SQL costs real money. Most UT server admins are not running their service as a business and can't afford to lay out hard cash for extra licensing. Second, because Linux and MySQL are pretty solid and easy to implement. There is no really compelling advantage to Microsoft's products for this type of application.

By the way, I've worked with both and written log parsing code in both (although the logs I was parsing with ASP.Net/VB.net/C# were different logs, the concept was the same). I can't say that there was a particular performance advantage for ASP/MS SQL versus PHP/mySQL, not for this type of work at least. If this were a complex application with multi-table joins, views, stored procedures, and distributed data requirements...then MS SQL would start to show its stuff.

That being said, a great way to learn a platform is to write some code using it. If you are working with ASP.Net and can afford the licensing costs for it and Microsoft SQL, then more power to you.

FarmBoy
26th November, 2002, 07:01 AM
Thanks for the replies guys. I guess I should clarify a few things.

when the other works on many more OS's, why be exclusionary? Leave that to the goons at MS... ;) Sorry for the bitterness, but I'm busting my hump to become less dependent on MS products, because I find it hard to believe that I have to pay for their inferior software just because of market pressure. It just kills me that I even still run a dual boot at home... ???

ApocDeath, I usually find good info in your posts, but please do curb the bitterness. Everyone is entitled to their personal preferences and opinions. I'm certainly not bashing PHP and MySQL, I just don't use them and was asking if a solution already existed in ASP & ODBC. And I don't like being called a goon. ;)

PapaDoom, thanks for the comments on the log file formats.

As far as database choice is concerned, my goal here was to get to ODBC, so people can plug in whatever database they choose. The code that I've seen so far is tied to MySQL and you can't use anything else. IMHO, that's not necessarily a good design... :dontgetit:

For this type of application, PapaDoom is probably right about performance. This kind of stuff isn't rocket science, and performance will probably be similar regardless of database & web engine choice.

So, anyway, back to my original query. It sounds like what I want doesn't exist already, so I'll probably undertake that over the holidays unless Epic provides support for it in a patch or bonus pack.

Communities like this are a great resource, and I enjoy bouncing ideas off people. As long as people are civil and respectful, I'll keep coming back...

elmuerte
26th November, 2002, 09:04 AM
I expect that the Logs created by LocalStats and LocalLog are pretty much identical except for the bot related lines.

Anyway, I use the log format as defined by Epic to be used in their stats program.

McNaz
26th November, 2002, 12:03 PM
I expect that the Logs created by LocalStats and LocalLog are pretty much identical except for the bot related lines.

Anyway, I use the log format as defined by Epic to be used in their stats program.

I don't know where you are getting this. The only reason localstats "uses the log format as defined by Epic" is because your few lines of code piggy back onto their stats code which redirects the output to a local file. That is why locallog will NEVER EVER EVER EVER work with Bots and under many other circumstances. This is why you need LocalLog.

Also, I believe that LocalLog records pickups and a few other events while localstats doesn't.

:withstupid:

ApocDeath
26th November, 2002, 01:59 PM
ApocDeath, I usually find good info in your posts, Thanks...

but please do curb the bitterness. Everyone is entitled to their personal preferences and opinions. I agree... I meant to direct my bitterness towards the situation, not you personally... My apologies.

I'm certainly not bashing PHP and MySQL, I just don't use them and was asking if a solution already existed in ASP & ODBC. I didn't mean to accuse you of doing such things. If you felt I was, again, my apologies...

And I don't like being called a goon. ;) Few do... ;) Again, that random comment was directed at MS leadership and their goonish market tactics that stifle creativity in software development for the sake of making more money. I thought it fell in pretty well with my anti-MS rant... ;) At any rate, if you construed it as being directed towards you, again, my apologies... Certainly not my intention.

Damn! I really came of like a total ass on that one! I mean, I meant to be an ass, but not to you, FarmBoy... ;) Man, do I ever get nailed by text-based communication sometimes... ??? Anyway, I owe you a cold one... :gulp:

And McNaz, do you know who you're talking to? El Muerte _wrote_ LocalStats... He knows _exactly_ what it spits out, I guarantee it... And I'm sure he'll remind you of that himself...

PapaDoom
26th November, 2002, 02:59 PM
^(Hellraiser)^ & McNaz wrote LocalLog :p

You guys (El_Muerte, Hellraiser, McNaz...) have contributed a tremendous gift to the admin community. And I'm happy to have input here in this forum from all of you guys.

But lets try to keep religion out of this. Microsoft versus open source...localstats versus LocalLog. There are sound reasons for each choice, and rational people can choose whats best for them individually.

That said, understanding the differences so you can make a choice is important. LocalLog picks up stats for bots. LocalStats does not. LocalStats retains the standard game types. LocalLog does not. Both produce similar (not identical) text log files that can be parsed relatively easily.

If I were creating a parser/reporting tool for general consumption, I'd probably want it to be able to work with log files from either localstats or locallog. And, since statsDB does this, I'd say its doable.

ApocDeath
26th November, 2002, 03:45 PM
right on

FarmBoy
26th November, 2002, 08:49 PM
Thanks...
You're welcome.

My apologies.
No problem.

Again, that random comment was directed at MS leadership and their goonish market tactics that stifle creativity in software development for the sake of making more money.
Well, I'm not in marketing, but I certainly don't think we stifle creativity.

Man, do I ever get nailed by text-based communication sometimes... ??? Anyway, I owe you a cold one... :gulp:
Yeah, the medium certainly makes it difficult sometimes. Again, no problem.

PapaDoom, your last post was very well put.

Of course, Epic could make this whole discussion academic, and provide support for local stats logging in a patch or bonus pack. Hopefully the patch and bonus pack will be out before I take off for my vacation in December, and I'll know whether or not I need to spend some of my vacation time writing a stats parser and web site in ASP & ODBC.

Does anybody know if statsDB is moving to ODBC instead of being tied to mySQL? I hate re-inventing the wheel unless necessary, and if I could get the back-end of statsDB off of mySQL and onto something else, I'll probably forgo doing my own.

Thanks again all,
FarmBoy

Panthera
27th November, 2002, 09:20 AM
ow if statsDB is moving to ODBC instead of being tied to mySQL? I hate re-inventing the wheel unless necessary, and if I could get the back-end of statsDB off of mySQL and onto something else, I'll probably forgo doing my own.


I might know the answer to that....
Currently, I'm just trying to get all the holes in UT2003 StatsDB plugged up and release version 1.0 as fully bug free as I can possibly manage. I'd like to include support for ODBC, MsSQL, and PostgreSQL but now I've spent weeks on this project and have had it for a bit. I want to spend some time PLAYING UT2003! However, this doesn't mean I'm not going to write in support for the other database formats, just that it's going to take a little while longer (a week, maybe a month).

As for the current status of UT2003 StatsDB, I've gone over it with a fine comb along with some help from a few others (PapaDoom included) that have been very helpful in identifying bugs and suggesting features.
I think most people will find it worth installing PHP and MySQL to use it. They're not exactly large packages and don't take up a lot of resources. It's not that I'm trying to force anyone to use these products - they just happen to work well for the purpose, are free, and are what I'm using. The more people that get use out of my project the better spent my last few weeks were.

Paul

PapaDoom
27th November, 2002, 03:31 PM
Paul (Panthera) has done a great job on statsDB! :notworthy:

I've been running various versions on my site (http://kgadams.no-ip.org) for the past couple of weeks. The improvement in the parsing code during that span has been phenomenal, to say nothing of the stats themselves. Some really cool features:
[list:967ca25f5c]- graphs! game statistics include a chart showing the frags or score over time
- support for localstats (El_Muerte's code) and locallog (Hellraiser + McNaz's code). Through the latter, support for bot-enriched games
- from each player page, you can see (and link to) the most recent games that player has participated in
- chat logs (if you are using the latest version of localstats)[/list:u:967ca25f5c]
Definitely worth the download if you have an interest in maintaining stats for your server.

FarmBoy
28th November, 2002, 08:29 AM
Currently, I'm just trying to get all the holes in UT2003 StatsDB plugged up and release version 1.0 as fully bug free as I can possibly manage. I'd like to include support for ODBC, MsSQL, and PostgreSQL but now I've spent weeks on this project and have had it for a bit.

Thanks for answering that question Paul. I knew coming onto this board was a good idea. Yeah, support for ODBC would be a really nice addition to this. That way, people can plug in pretty much whatever database they want. Heck, Open is the first word in ODBC... :D

If you need help putting in support for ODBC, SQL Server, or Access, let me know, I believe I can provide you some assistance... ;)

Enjoy playing UT2003, after the work you have put in on statsDB, you deserve it.

Happy Thanksgiving,
FarmBoy

TattooedBones
7th May, 2003, 08:28 PM
Hi all,

First off, this package is sweet and very easy to parse. Here's my only problem. I've written my own parser and I track frags and wins. When and if a BOT wins the game, it doesn't get credit for the win. Here is an example with some clips from the log:

3 G NameChange 1 TattooedBones
4 C 2 Dante
4 G NameChange 2 Dante
9 SG
9 C 3 Nebri
9 G NameChange 3 [BOT]Nebri
9 C 4 Cleopatra
9 G NameChange 4 [BOT]Cleopatra

etc. etc. etc. then at the bottom:

357 EG fraglimit 2 6

Problem here is, the game was won by a bot, not Player #2. Notice the bots are not getting credit for reaching the frag limit. Any ideas if there is a fix in the works for this? Thanks all!

TattooedBones
24th March, 2004, 03:11 AM
So let me get this straight from someone who has this working.

If I use localstats (107) what should my configuration be? I added the line to my UT2004.ini like in the doc on his site, but that sends the server into a loop of crashing. ??
I copied the .U file to the system directory. What other changes (other than those listed on the LocalStat site) must be made to the .INI file? Seems like I also have to enable world stat logging? and set my min bots to a certain count? Please if someone would like to email or post the important parts of their working UT2004.INI I'd appreciate it!
I wrote a (sloppy?) unix (CygWIN) script to parse the logs I used to get from UT2003. Then I dump it to my site. I'd like to do that again. Thaks all!