ParseThis

Compiled for ParseThis 1.5

First Draft

Mike Boutin

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


Table of Contents

1. Introduction
2. Getting Started
Installing and Uninstalling ParseThis
Installing ParseThis
Uninstalling ParseThis
Quick Start
3. Options
ParseThis Options
Plug-in Options
4. Parsing Log Files
Parsing a New File
Managing Open Files
5. Analyzing Results
Fight Overview
Fight Details
Fight Options
6. TimeStamper
Command Line Reference
Quick Start
7. Contributing

List of Examples

6.1. Example TimeStamper Output

Chapter 1. Introduction

ParseThis is an Open Source MMOG Log parser released under the GNU GPL. Multiple games can be supported under the same interface through a plug-in system. The primary goal of ParseThis is to be a powerful combat log parser that can be used real-time to monitor the action as it happens, or offline to analyze every detail. Initial releases of ParseThis focus on creating a framework that allows plug-ins for individual games to be easily developed.

ParseThis can track chat channels as well as detailed fight information including the following:

  • Start time

  • Duration

  • Percent Damage

  • Damage per second (DPS)

  • Number of attacks

  • Minimum, Maximum, and Average damage

Chapter 2. Getting Started

Installing and Uninstalling ParseThis

Installing ParseThis

Installation for ParseThis is simple. The latest release of ParseThis is ready for download from http://home.gwi.net/~mboutin/parsethis. Both .zip and .rar archives are made available.

ParseThis requires Microsoft Windows XP, Microsoft Windows 2000, or Microsoft Windows Vista with Internet Explorer 5 or higher to run.

Procedure 2.1. Installing ParseThis

  1. Download ParseThis.zip or ParseThis.rar. Both archives have the same contents. Which to download is a matter of preference between .zip and .rar.

  2. Extract the downloaded file to folder of your choice.

    Note

    Ensure that "Use Folder Names" or the equivalent setting for your extraction program is selected. ParseThis expects a certain directory structure to work correctly.

Uninstalling ParseThis

To uninstall ParseThis delete the folder you originally extracted ParseThis to during installation. Any customizations or settings changes can be saved by making a copy of ParseThis.ini before removing the folder.

Quick Start

To get right in using ParseThis and see some results follow the instructions below.

Procedure 2.2. Quick start to parsing log files

  1. Run ParseThisGUI.exe.

  2. Double click the appropriate plug-in that will parse log files for the game you are intersted in. Alternatively you can open the plug-in with FileOpenPlug-in Name (Alt-f+o)

  3. Enter the name of the log file to parse in the Log File text box by clicking the ... button to browse for the file. Alternatively the file name can be typed in manually.

  4. Click Open File(s) to start parsing.

Chapter 3. Options

The options for ParseThis, and any plug-ins, can be reached with ToolsOptions... (Alt-o).

ParseThis Options

Save Window Position

When checked, Save Window Position, will save ParseThisGUI.exe's size and position between sessions.

View Options on Plug-in's First Load

When checked, View Options on Plug-in's First Load, will show this options window the first time ParseThis is started after a new plug-in is added.

Reset Colors

Reset Colors resets color selections to the state they were in before the options dialog was opened.

Default Colors

Default Colors resets color selections to the default for ParseThis

Colors

Each row in the list box is for a color setting described below. Left click a row, or the background of the listbox, to set the item's background color. Right click a row to set the item's text color.

Colors: Row %1, Colors: Row %2

Row %1 and Row %2 are used in lists such as the one used to display chat channels or characters. Each row is displayed in an alternating color.

Colors: Combatant

Combatant is used by fight displays to set the color of Combatant rows.

Colors: Target

Target is used by fight displays to set the color of Target rows.

Colors: Weapon

Weapon is used by fight displays to set the color of Weapon rows.

Colors: Hit / Miss

Hit / Miss is used by fight displays to set the color of Hit / Miss rows.

Colors: Attack %1, Colors: Attack %2

Attack %1 and Attack %2 are used by fight displays to set the color of Attack rows. Each row is displayed in an alternating color.

Plug-in Options

Each of the plug-in options described below is specific to the plug-in it is set for. These options allow for customization on a plug-in level basis.

Default Log Path

Default Log Path is the folder to be used as the default location when browsing for log files.

Default Start Position

Default Start Position is the position to start parsing a log file.

Begining

Start parsing from the first line of the log file.

End

Start parsing from the last line of the log file. This option is only valid when the Parse Mode is Active.

Date/Time

Start parsing at the given date and time in the log file.

Default End Position

Default End Position is the position to stop parsing a log file. This option is only used when the Parse Mode is Parse Once.

End

Stop parsing when the end of the log file is reached.

Date/Time

Stop parsing when a given date and time is reached in the log file.

Default Parse Mode

Default Parse Mode is how a file should be parsed.

Parse Once

Parse the file once starting at Start Position and ending at End Position.

Active

Parse the file from Start Position to End Position and then continue to monitor the file for changes.

Default Watch Mode

Default Watch Mode describes how ParseThis should handle new log files that are created while parsing an existing log file. Some games will create a new log file each time you change areas within the game. Setting the Watch Mode can tell ParseThis to detect these new files and switch over without any intervention.

No Watch

Do not watch for new files. Only parse the selected file as instructed.

Watch

Watch for files that match the given Log Watch Pattern. If a new file is detected that matches the pattern then stop parsing the current file and start parsing the new file using the same settings as the old.

Default Log Watch Pattern

Default Log Watch Pattern is the Microsoft MS-DOS wild card match pattern for new files. For example Combat_log*.txt will match any file that starts with Combat_log and ends with .txt.

Fight Timeout

Fight Timeout is the number of seconds of no activity for a fight to be considered complete. Any attacks after the timeout has occured will be part of a new fight.

Attack Timeout

Attack Timeout is the number of seconds of no activity for a Target or Weapon to be considered complete. Any new attacks from the given Target or Weapon after the timeout has occured will be part of a new block.

Chapter 4. Parsing Log Files

Parsing a New File

This section describes all the options for parsing a new.

Procedure 4.1. Parsing a New File

  1. Choose a file to parse. This can be done by typing the name of the file in the Log File text box by clicking the ... button to browse for the file or typing the file's name in manually. When using the ... the file will automatically be added to the list box containing the files that are currently selected to be parsed.

    If you typed the file name in manually then clicking the + will add the file to the list of files selected to be parsed. Clicking the - removes all selected files from the list. The X will clear the list.

    As many files as desired can be added to the selected list at one time. Multiple selection is enabled and options in the following steps will apply to all selected files.

  2. Choose a Start Position. This option controls where ParseThis will begin reading the file. If Date/Time is selected the date to start at is chosen in the Start Date option.

  3. Choose a End Position. This option controls where ParseThis will stop reading the selected file and is only a choice when the Parse Mode is set to Parse Once. If Date/Time is selected the date to stop at is chosen in the End Date option.

  4. Choose the Parse Mode. This option controls how ParseThis handles changes to the file. Parse Once tells ParseThis to read the file once from Start Position to End Position. Any changes written to the file after ParseThis has reached the end will not be recognized. Many games write out their log files progressively as you are playing. To have ParseThis continue to monitor a file in this case select Active. This option tells ParseThis to monitor the file until a watch condition is met or you tell it to stop.

  5. Choose the Watch Mode. This option controls how ParseThis handles a new log file being created while an existing log file is being parsed. Some games will start a new file each time you change an area or log in and out. Instead of manually selecting the new file each time you can tell ParseThis to watch for new files for you. Watch will watch for new files that match the Log Watch Pattern. When a new file is found that matches the pattern the current file is stopped and the new file is opened with the same settings as the current file. No Watch will not watch for new files.

  6. Choose the Log Watch Pattern. This option is only available when Watch Mode is set to Watch. Enter a MS-DOS wild card pattern. For example Combat_log*.txt will match any file that starts with Combat_log and ends with .txt.

  7. Choose the Start Date. This option is only available when Start Position is set to Date/Time. The date and time chosen is used within the context of the log file to decide where to start parsing. This is usefull when you have a large log file but may only want to parse a certain portion starting after a given date and time.

  8. Choose the End Date. This option is only available when End Position is set to Date/Time. The date and time chosen is used within the context of the log file to decide where to stop parsing. This is usefull when you have a large log file but may only want to parse a certain portion ending at a given date and time.

  9. Click Open File(s) to start parsing all selected files.

Managing Open Files

Once a file has started parsing it will show up in the lower list box.

Pause

All selected files will be paused at their current location. Any watches associated to paused files will not be paused and will continue to monitor for new files.

Close

All selected files will be immediately stop parsing and be closed. Any watches associated with the files to be closed will be closed as well.

Unpause All

All files that are currently paused will resume parsing.

Pause All

All files will be paused at their current location. Any watches associated to paused files will not be paused and will continue to monitor for new files.

Close All

All files will immediately stop parsing and be closed. Any watches associated with these files will be closed as well.

Chapter 5. Analyzing Results

The Fights tab is broken up into two list boxes with a number of options at the bottom of the screen. The upper list box is the Fight Overview and shows all of the Fights that have been parsed. The lower list box is the Fight Details and shows information for the selected Fight(s). The options at the bottom affect how the details for the selected Fight(s) are displayed.

Fight Overview

The upper list box displays all Fights that have been parsed. All Attacks within X seconds of each other make up a Fight. This number can be changed, but if it was set to 10 seconds then every Attack within 10 seconds of the last would be considered part of the same Fight. If 10 seconds pass without any Attacks then subsequent Attacks will start a new Fight. Each row in the upper list box is a Fight

Selecting a Fight, or even multiple fights, shows the aggregated statistics in the Fight Details list box. Ctrl can be used to individually select more than one Fight. Shift can be used to select a range of Fights. Ctrl+a can be used to select all Fights.

Start Time

Start Time is defined as the time of the first Attack of any of the Combatants that become involved in the Fight.

Duration

Duration is defined as the amount of time between the Start Time and the last Attack of any of the Combatants that were involved in the Fight.

Target

Target gives the name of the first Target the player attacked. If the player was not involved in the Fight then the name of the first Combatant to become involved in the Fight is shown.

O-Dmg

O-Dmg gives the total offensive damage for the player in the Fight. Offensive damage is defined as damage the player did to other Combatants. If the player was not involved in the Fight 0.00 O-Dmg is shown.

O-DPS

O-DPS gives the total offensive damage per second (DPS) for the player in the Fight. If the player was not involvd in the Fight 0.00 O-DPS is shown.

D-Dmg

D-Dmg gives the total defensive damage for the player in the Fight. Defensive damage is damage that was done to the player by other Combatants. If the player was not invovled in the Fight 0.00 D-Dmg is shown.

D-DPS

D-DPS gives the total defensive damage per second (DPS) for the player in the Fight. If the player was not involved in the Fight 0.00 D-DPS is shown.

#

# gives the number of Combatants involved in the Fight.

Fight Details

  • Combatant: Characters involved in the fight, player or non-player.

    • Target: Who the Combatant attacked.

      • Weapon: What weapon the Combatant used to attack the Target.

        • Hit / Miss: Was the attack a successful hit or did the attack miss?

          • Attack: Details about the attack.

Fight Options can be used to selectively show or hide any level of the tree except the Combatants.

ParseThis uses the concept of peers to calculate some of the statistics. Any details at the same level of the heirarchy with the same parent are considered peers. All Combatants are considered peers for example. All Targets for a single Combatant are considered peers. Targets for different Combatants are not considered peers. Similarly all Weapons used to attack a single Target by a Combatant are considered peers. If Targets are not displayed then all Weapons for a single Combatant are considered peers.

Details

Details gives information about the given row. The name of a Combatant or Target or the type of Attack are examples.

Start Time

Start Time is defined as the time of the first Attack of the given type shown in the Details column.

Duration

Duration is defined as the amount of time between the Start Time and and the last Attack of the given type shown in the Details column.

Dmg

Dmg shows the total damage done for the given type shown in the Details column.

% Dmg

% Dmg shows the percent damage of the sum of the damage of the given type's peers. For example if Triskeel did 400 damage and Player did 350 damage then Triskeel's % Dmg would be 400 / ( 400 + 350 ), or 53.33%.

DPS

DPS shows the damage per second (DPS) of the given type. This number is calculated as Dmg divided by Duration.

#

# is the number of Attacks for the given type.

% #

% # shows the percent number of Attacks for the sum of the Attacks of the given type's peers. For example if Triskeel missed 10 times, hit 50 times, and critically hit 3 times then the % # for his misses would be 10 / ( 10 + 50 + 3 ), or 15.87%.

#/s

#/s shows the number of Attacks per second for the given type. This number is calculated as # divided by Duration.

Min, Max, Avg

Min, Max, Avg show the minimum, maximum and average damage for a single hit of the given type.

Fight Options

Fight Options can be used to select which pieces of information should be displayed. By default only the Combatant row is shown. Displaying more can give a nearly overwhelming set of information.

Primary Character

The Primary Character is used by other settings to control sorting and visibility. By default the Player is the Primary Character. Some games give no indication of the Player's name in the log file. Instead of seeing the character's name it will show "Player."

Perspective

Perspective controls what perspective damage statistics are displayed from. When Offensive, the default, is selected numbers shown in the Fight Details list box will be damage done by the Combatant to the Target. When Defensive is selected numbers shown in the Fight Details list box will be damage done by the Target to the Combatant.

Primary Character Only

When Primary Character Only is checked only statistics for the Primary Character will be shown in the Fight Details list box.

Primary Character First

When Primary Character First is checked the Primary Character will be the first Combatant shown in the Fight Details list box. The remaining Combatants will be shown in alphabetical order. When Primary Character Only is not checked the Primary Character will show up in alphabetical order with all of the other Combatants.

Show Targets

When Show Targets is checked a Combatant's targets will be shown in the Fight Details list box.

Combine Targets

When Combine Targets is checked all Targets with the same name will be merged into a single set of data. This option is only available when Show Targets is checked.

Show Weapons

When Show Weapons is checked a Combatant's Target's Weapons will be shown in the Fight Details list box.

Combine Weapons

When Combine Weapons is checked all Weapons with the same name will be merged into a single set of data. This option is only available when Show Weapons is checked.

Differentiate Hit / Miss

When Differentiate Hit / Miss is checked Attacks will be broken up into Hit / Miss categories.

Show Attacks

When Show Attacks is checked Attack information will be shown in the Fight Details list box.

Chapter 6. TimeStamper

TimeStamper is an utility application to add timestamps to log files. TimeStamper has default options for ease of use with The Lord of the Rings Online, but can be used for any game that writes log files without timestamps.

Command Line Reference

ParseThisTimeStamper.exe [-d directory] [pattern...]

When no options are given TimeStamper will defaultly watch %UserProfile%\My Documents\The Lord of the Rings Online for Combat_*.txt and General_*.txt. Ctrl+c can be used to shut TimeStamper down. When a new file is detected that matches one of the patterns TimeStamper will start writing a new file with logwatch- appended in front of the original file name.

Example 6.1. Example TimeStamper Output

Monitoring C:\Documents and Settings\Mike\My Documents\The Lord of the Rings Online\ for the following patterns:
Combat_*.txt
General_*.txt

Adding timestamps to Combat_20081205_4.txt.
Closing Combat_20081205_4.txt...
Stopping directory monitor...
				


In the example above TimeStamper is being used to watch for The Lord of the Rings Online log files. When Combat_20081205_4.txt is detected a new file, logwatch-Combat_20081205_4.txt, is created with timestamps. This new file can now be monitored and parsed by ParseThis.

Quick Start

Procedure 6.1. Running TimeStamper

  1. Run ParseThisTimeStamper.exe

  2. Enable logging in-game. It is important that logging is enabled after ParseThisTimeStamper.exe starts running. TimeStamper watches for the creation of new files and will not add timestamps for files that exist at start-up.

  3. Use ParseThis to parse the log file shown in ParseThisTimeStamper.exe output. See Chapter 4, Parsing Log Files for full details about parsing a log file.

Chapter 7. Contributing

ParseThis has been solely designed and developed by Mike Boutin. Have some suggestions or feedback? Interested in helping out for the next version? Send an email to . Feedback is greatly appreciated and help is welcome from just about anyone willing to contribute some of their time.