Yet Another Log Parser
Isn't that a Python script? If so you would also need a parser to run it which can be found here.
Last paragraph, "Background" section.
Blue
American Steele: 50 BS/Inv
Nightfall: 50 DDD
Sable Slayer: 50 DM/Rgn
Fortune's Shadow: 50 Dark/Psi
WinterStrike: 47 Ice/Dev
Quantum Well: 43 Inv/EM
Twilit Destiny: 43 MA/DA
Red
Shadowslip: 50 DDC
Final Rest: 50 MA/Rgn
Abyssal Frost: 50 Ice/Dark
Golden Ember: 50 SM/FA
Actually, it's in the "About the Program" section.
Paragon City Search And Rescue
The Mentor Project
>.>
That's, uh, under the Background! Yeah, that's it!
Blue
American Steele: 50 BS/Inv
Nightfall: 50 DDD
Sable Slayer: 50 DM/Rgn
Fortune's Shadow: 50 Dark/Psi
WinterStrike: 47 Ice/Dev
Quantum Well: 43 Inv/EM
Twilit Destiny: 43 MA/DA
Red
Shadowslip: 50 DDC
Final Rest: 50 MA/Rgn
Abyssal Frost: 50 Ice/Dark
Golden Ember: 50 SM/FA
Somewhat amusingly, I am my own first source of a bug report. There is an issue with how I parse logins. If you specify an alignment, it ignores login messages for the other alignment. This isn't what's needed. The fix should be simple, and I'll update it tomorrow later today (Tuesday).
Blue
American Steele: 50 BS/Inv
Nightfall: 50 DDD
Sable Slayer: 50 DM/Rgn
Fortune's Shadow: 50 Dark/Psi
WinterStrike: 47 Ice/Dev
Quantum Well: 43 Inv/EM
Twilit Destiny: 43 MA/DA
Red
Shadowslip: 50 DDC
Final Rest: 50 MA/Rgn
Abyssal Frost: 50 Ice/Dark
Golden Ember: 50 SM/FA
Thanks for sharing this UberGuy.
My interest, as you know, is mostly for exploring earning rates across
various levels, so this should be fairly helpful, with minimal overhead.
Regards,
4
I've been rich, and I've been poor. Rich is definitely better.
Light is faster than sound - that's why some people look smart until they speak.
For every seller who leaves the market dirty stinkin' rich,
there's a buyer who leaves the market dirty stinkin' IOed. - Obitus.
Summary:
I've written a script that can parse CoH chat logs and output CSV (comma-separated value) files that you can import into spreadsheet programs and analyze your inf creation rates over time. You can track moving averages in Herostats - this isn't the same thing. This shows how much Inf you either created directly or got in the form of common recipes in each time interval over a span of time you specify.
Background:
Recently, in another thread, a discussion kicked off about one of my own character's earning rates, and how much time was spent actually playing to achieve those daily rates. I thought one good way to represent that would be to look in my logs for combat reward messages. If I could plot how much reward I got per interval of time, that would at least give an idea of how much time I was spending in combat and how much reward I was getting per interval of time in which I did so. It's not quite the same as time logged in, but in some ways I thought it might be even more useful.
I didn't want to write something that would actually produce the graphs. I figured any decently full-featured spreadsheet program could do that if I spit the data out in CSV format. So I wrote a program that could spit out CSVs. You can see some of the resulting graphs, created with Excel, in this post.
There was some interest in the parser I created, so I am posting it here. This isn't directly market-related, but it's about tracking Inf creation rates for a character, and that's often a topic discussed by market forum regulars.
About the program:
First, let me explain what the script does (and doesn't) do. For this script to do you any good, you have to enable chat logging in CoH. Despite the name, "chat" logging logs most things you see in your various channel tabs, including reward messages.
This script parses those logs. You give it a date (and/or time) span and some optional arguments. The script will figure out what CoH chat log files cover that span of time, read them, and look for the following kinds of messages.
- Messages saying you got Inf, for example like you'd get for defeating a mob or completing a mission.
- Messages saying you got a common recipe drop.
It then uses these messages to create rows of the following data.- Date/time of the beginning of a time interval in the format MM/DD/YYYY HH:MM:SS
- Total Inf rewarded directly to your character during that interval.
- Total Inf value of common recipes received during that interval, assuming level 50 recipes sold to an NPC. (The level 50 assumption is a significant limitation if you want to use the program to track earning of lower-level characters. I considered making it support other levels, but doing so will be somewhat tedious. If someone really wants it, I'll consider adding it.)
By default, the program will parse whole chat logs files from start to end and assume everything should be treated as though it should lump all rewards together. By default, it summarizes the data in 15-minute time intervals. These behaviors can be changed using command-line options.The program does not parse out any messages from WW or the BM, or any other recipe types than commons.
The script is written in Python. You will need a Python interpreter for Python version 3.0 or 3.1. You can download them for Windows here or here. I do assume you're running Python in your Windows environment, even if you're actually on a Mac or Linux system. If you want to run a native Python install for your platform that should be fine, but you'll have to have your CoH chat logs somewhere your native OS can see them, and tell the script where they are.
Usage:
Here's what you see if you run the program with no arguments.
The two required arguments are a start date/time and an end/date time. You don't have to supply the time part of the date/time, but if you want to supply minutes you have to supply hours, and if you want to supply seconds, you have to supply hours and minutes.
If you supply a full date/time, you have to enclose the date and its time in quotes, like so.
rateParser.py "11/17/2010 10:25" "11/26/2010 19:30:30"
If you only supply a start date, the log file for that day (if it can be found) will be read in its entirety. Likewise, if you only supply an end date that whole log file will be read. If you supply a start time, the output will begin on that date with the interval that contains that time. If you supply an end time, the output will end just before the interval containing that time.
The output file will contain a row for every time interval in from the start interval to just before the end interval, even if there were no log files or reward messages for some of the times. If you weren't earning rewards or even not logged in, the data for that interval row will just be zeroes.
The -i or --interval option is how many minutes you want each row in your CSV file to be a summary of. The choices are 5, 10, 15, 20, 30 and 60 minutes. If you don't supply this argument, 15 is used.
If you supply --villain, --hero or --praetorean, this affects how the parser looks for Inf rewards. If you don't specify, it will look for rewards with the word "inf" in the name position, which is valid for all alignments. If you know you only want to track a villain, you will probably get faster and more accurate results if you specify --villain, since this will then only match lines with "infamy" in them.
If you don't specify a character name using the -n option, then the script will just track every reward message it sees. If you specify a name, it will pay attention to login messages indicating that a character just logged into the game. It will only count reward messages after it sees a login message for the name specified, and will stop counting if it sees another name log in. The alignment switches, like --villain, affect this behavior. If you want to parse for a specific character, I recommend you supply the appropriate alignment, as the pattern used is more efficient.
Note: Supplying a specific character name can have unexpected interactions if you log in two (or more) accounts on your machine at the same time using the same client install. Both CoH game instances will update the same log file. If you log in character A, then character B, and tell the parser to look for character A, it will start skipping data as soon as it sees character B log in. On the flip side, if you log in B then A, and take take both characters into the same mission, for, reward messages will be doubled up for that time interval in the logs - one for each character. Be warned - this tool makes some pretty general assumptions, so try to be sensitive to what sort of data you give it.
The -o option is for the name of the CSV file you want created. If you don't specify this, it will be called "Rates.csv", and it will be put in the directory from which you ran the script.
The -g option is for pointing the script to your CoH game directory. The default is "C:\Program Files\City of Heroes". If that's not where your game is installed, you need to supply this option and give it the correct directory. For example, on my own computer I have to add '-g "D:\City of Heroes'.
The -v option is just in case I update this tool so people can tell the versions apart without cracking open the script in notepad or an editor.
Download It
If you've gotten this far and are still awake, maybe you want to download this tool and use it, look at how it was written, or seed a random number generator with it. You can download the latest version here. Hopefully I'll stick a readme in the zip archive in the next day or two. For now, this post is its manual.
Bug Reports
If you play with this and run into bugs, feel free to drop me a PM here on the boards and I'll look into what you report. I'll be honest, I haven't tested this extensively. I made sure it did what I used it for, poked a few of the options I added to make it user friendly, and released it into the wild, so it's entirely possible it has glaring bugs.
Date/Time Formats
I have no idea if CoH uses different date/time formats if your computer is configured for another locale. If you happen to be in Europe, or South or Central America and find that the code as written won't match the date formats in your logs, let me know. Making the code locale-sensitive is possible, but more work than I was expecting to have to do.
Blue
American Steele: 50 BS/Inv
Nightfall: 50 DDD
Sable Slayer: 50 DM/Rgn
Fortune's Shadow: 50 Dark/Psi
WinterStrike: 47 Ice/Dev
Quantum Well: 43 Inv/EM
Twilit Destiny: 43 MA/DA
Red
Shadowslip: 50 DDC
Final Rest: 50 MA/Rgn
Abyssal Frost: 50 Ice/Dark
Golden Ember: 50 SM/FA