Introduction to getting combat data from the ChatLog

Discussion in 'Player Created Resources' started by Balec Fares deCani, Feb 16, 2017.

Thread Status:
Not open for further replies.
  1. Balec Fares deCani

    Balec Fares deCani Avatar

    Messages:
    1,343
    Likes Received:
    4,015
    Trophy Points:
    125
    Gender:
    Male
    A lot of data is logged by SotA to a text file referred to as the ChatLog. Basically it includes most everything you see in the chat window in-game which includes not only chat, but alerts when things are sold or when notes are written to your journal, lists of items added to a trade window and a rich wealth of combat statistics.

    There is so much combat data written to the chatlog that a lot of people might turn that option off from displaying in the game (even when it is not checked in any of your chat windows, it is written to the ChatLog). The best way to get value from the combat data is to look at it in aggregate, or at least to simplify it and sort it out.

    This guide presents an introduction to mining the ChatLog for combat data but could be applied to other areas as well.

    First let's roll up our sleeves, dig in and gather some information from sheer brute force. Say we have a question about how effective a particular attack is against different types of mobs. We'll start by collecting some data into the ChatLog (there already may be plenty from regular playing).

    If you want to be really scientific about it (I don't have the patience for that) you'd start collecting controlled data at a particular time and always use the same sized stacks (e.g. 1-stack attack or 2-stack, etc). There won't be any way to tell later how many glyphs were stacked for each attack. Also, if your question is about something like Death Touch which has different effectiveness at different levels of health you'd want to control that as well (e.g. run up and attack a variety of mobs, each multiple times with 1-stack death touch with your avatar at full health). Or if you're like me and just want to get a general sense of effectiveness, play regularly using the skill in question (but still be sure to attack a variety of mobs with it).

    Once you have some data logged, open up the ChatLog (type /datafolder in chat in-game and it will open the folder with the ChatLog folder, find the log from the day you are interested in, or copy and paste several logs into a single larger file to get data from several days).

    Using a free tool like Notepad++, you can find all occurrences of the name of the skill you are interested in.

    [​IMG]

    In the "Find Result" window you can Select All then Copy and Paste into a new document that will just contain the lines referencing that attack. Note that if you are playing with, or near, other players their attacks are also recorded to your chatlog so you can either play alone while you collect the data or use this same technique to search for your name and filter out the other player's data.

    [​IMG]

    Now we need to eliminate a bunch of "noise" so we can visualize the results of the attacks. The first two lines can be deleted.

    [​IMG]

    We need to get rid of the date/time stamp in brackets at the beginning of each line. You can use the regex search and replace to search for (without the quotes) "\tLine .*] " (This searches for a string starting with tab followed by the word "Line" continuing until it finds a right-bracket followed by a space). Make sure the search mode is "Regular Expression" at the bottom left.

    Make sure the "Replace with" box is empty and click "Replace All" to globally replace that stuff with nothing.

    [​IMG]


    Whew, that was the hard part...

    Now Select All and sort the file alphabetically...

    [​IMG]

    ...and delete any lines from the top or bottom which don't start with "<your avatar's name> attacks..."

    [​IMG]

    Now, in my case, all the lines will start with:
    Balec deCani attacks

    Once again open the find/replace window and globally replace "Balec deCani attacks " with nothing (use your name, of course)

    [​IMG]

    Now we need to get rid of the stuff between the name of the mob and the amount of damage. You can highlight that " and hits, dealing " and globally replace with a comma.

    [​IMG]

    Now we need to get rid of the stuff after the amount of damage. Globally replace the following with nothing (look and identify the different variations within the file, highlight them and replace with nothing):
    point of damage from Break Armor.
    points of damage from Break Armor.
    points of critical damage from Break Armor.

    [​IMG]

    At this point you should have a comma-separated file, with the name of the mob and the amount of damage done. You should be able to scan through it and get a sense of how effective the attack is against different mobs.

    [​IMG]

    To take it a step further, save it as a csv, e.g. BreakArmor.csv and open it in Excel or a similar program.

    Select all of the cells that are populated, and insert a Box and Whisker chart:

    [​IMG]

    ...and voila, enlightenment!

    [​IMG]


    Compliments of your friends at:
    [​IMG]


    If I have the energy, maybe I'll post a part 2 someday on how to automate this process and parse the log programatically, pulling out additional data such as blocks and critical hits, etc.
     
    Bink, Jaanelle DeJure, Umuri and 9 others like this.
  2. Spoon

    Spoon Avatar

    Messages:
    8,403
    Likes Received:
    23,554
    Trophy Points:
    165
    Gender:
    Male
    Location:
    Sweden
    Sweet.

    Thanks for taking the time.
     
Thread Status:
Not open for further replies.