PDA

View Full Version : Chatlog Analyzer



hmatilainen
May 26th, 2025, 10:03
https://fgu.kuura.art/

Here's a small online tool to upload & analyse your chatlog.html from Fantasy Grounds campaign(s). At the moment it's totally not serious, and the stats section probably contains errors and omissions. I do know how to code, but made this mainly on Cursor to test what the fuss is about, so I wouldn't be surprised at all if there are bugs. Or at least Cursor seems code similar bugs I would do.

I've tested it only on my own chatlog from D&D campaign with a relatively long history, but occasional sessions throughout the years. I've no idea if the format for other RPG systems is any different.

At the moment as soon as you enter the page it starts a new session which ideally lasts until you decide to logout. Could be indefinitely. Uploaded files should be visible to only you. When you decide to logout, the files should be deleted. No data is saved into database at the moment or any user activity tracked. Also the links to individual files probably aren't shareable at the moment, in case you want to share stats with your group.

After analysing the file you should see the characters, NPCs etc. who have rolled something. There should be how many times rolled, average roll (bonuses should have been removed from the roll totals) etc. You can see stats for individual characters as well.

There should also be a session breakdown from the chatlog and link to view just individual sessions. Sessions should list characters rolling dice for that session, and bit more precise dice stats for individual dice. Also some stats for which sort of rolls were made (Saves, attacks, damage etc.). Also amount of NAT 1s & NAT 20s.

By no means this is perfect, and at places it will display zeroes which I didn't bother to check yet why, and some dice rolls will certainly be missing or misinterpreted from the chatlog, but I might be interested to take this a bit further every now & then.

For those interested, I put this on github, so it's probably possible to contribute / fork or whatever to this one: https://github.com/hmatilainen/FGUChatlogAnalyzer/. The README there is most likely not 100% accurate how to install. On live server it needs SSL. And as mentioned, I build this on Cursor out of curiosity to see what's possible to do with it in one afternoon.

LordEntrails
May 26th, 2025, 14:59
That's cool! Thanks for sharing.
I uploaded a log from a community ruleset (FrontierSpace, based on CoreRPG) and it seemed to work fine except it didn't recognize any skill rolls, but that's not surprising since they don't display to the chat like D&D rolls do.
One piece of feedback, if you go into a player or session details, there is no button or link to take you back to the analyzed log's "home page" or top. You have to go back to View Chatlogs. No big deal though. Attached the log in case anyone wants to see what a non-D&D log looks like.

hmatilainen
May 26th, 2025, 17:06
Hey thanks for testing it out and for the chatlog! I'll be sure to test it out to see the differences. And thanks for the feedback too, it's much appreciated whether it's positive or negative. I added your feedback as my first issue with this one so I can work on it & fix it.

Working out some dice roll stats from the logs has been on my mind for some years, as my players like to moan how many NAT 1s they seem to roll (but who wouldn't complain :). Earlier I made one with python, but I wanted one slightly more sophisticated. Then I figured perhaps there are others who'd like to use it for curiosity, so I decided to put it public with source and all since I have a server (just slightly better than a potato) and it wasn't doing much at the moment anyway.

Mephisto
May 27th, 2025, 20:51
Nice! :) Thanks for creating this!

Navigat0r
May 28th, 2025, 11:19
This is cool! Is there anyway to differentiate between GM rolls and PC rolls? As opposed to having a list of every entity that has rolled as a separate record?

Asking because I am a forever GM who is convinced he rolls nat 1s a lot more than the PCs...

hmatilainen
May 28th, 2025, 13:26
Hey thanks for testing it out!

I can check if there's a way to differentiate properly. When I was testing on my own chatlog, I noticed in some sessions there was a separate GM rolls. In any case, if it's not a named PC roll from the game, it's most often a GM roll anyway (or at least I think so).

To make the handling easier, I think I should save data to database, and then create UI where you can combine rolls from different characters into one particular. This would help to identify that all incarnations of Joe regularly rolls nat 1, and dice stats would be more accurate.

The chatlog from my own game is about 9 years old, and I noticed there can be several different names for same PC, as the game versions have changed over the years. So bunching those together would definitely be helpful.

There seem to be few other issues I noticed. Mostly the front page can be blank when first arriving on the page and the session doesn't exist yet. On the other hand, sharing character or session dice stats might work now. I also need to take a closer look that it crunches all the rolls, as there's a chance it's still missing some.

Nylanfs
May 28th, 2025, 15:16
I was trying to find the post where Doug talked about what tool he uses to do analysis of chat logs, but my search has failed. :(

LordEntrails
May 28th, 2025, 15:26
I was trying to find the post where Doug talked about what tool he uses to do analysis of chat logs, but my search has failed. :(
I believe he did a beta of a campaign log tool a few years ago. Never went beyond a small public beta.

hmatilainen
May 30th, 2025, 11:13
I think this weekend I'll do some more number crunching as I've extended weekend with Monday bank holiday, so I can do more testing with my long chatlog. Perhaps even adding unit tests for different rolls, to make sure they're all found as I don't have any unit tests at the moment.

If anyone has suggestions to add or some obvious issues, even if just to say it's a broken piece of mess, feel free to drop a line here or to add to the issues pages I made for myself at https://github.com/hmatilainen/FGUChatlogAnalyzer/issues.

It's a hobby project for sure, but I'll still approach it seriously and dedicate time to it, even if to just satisfy my own curiosity. If it's helpful for others too, even better.

anstett
June 2nd, 2025, 22:33
Have not tested this yet, but if you want chat logs to test I have every chat log for the last 22+ years for our game posted on our site. Weekly sessions for 31+ years.

https://www.dragonslayers-society.org/pmwiki-old/pmwiki.php?n=Main.WeeklyChatHistory

December of 2021 is when we switched over to FG.

The raw chat output is there for our 2nd edition game for each date. Because we are text based only there are lots of bit there, including various character languages etc. There is a raw log, 2025 05 16 that only adds a hard line break at the end of each chat line. Then there is the 2025 05 16c which I run a Word Macro on to convert the various rolls, languages, OOC, etc. into the wiki session style format.

I have pruned the Chatlog file from FG over time because we did around 1,000,000 words in 2024 for our group.

Glad to help with any files you need to test things out.

hmatilainen
June 3rd, 2025, 07:31
I'd definitely love to test other chatlogs as well. I grabbed a random one from your site (and I love how those are arranged there!), just added the "Session started at yyyy-mm-dd" tags in the beginning and it crunched some numbers.

Over the last few days I was checking that I'm catching more of the dice rolls than before, but there are still some special cases with ADV/DIS at least which are not caught. Also probably turning undead roll mechanics are not caught either, as in my group there are no clerics and I didn't test those rolls myself either.

I also need to verify the roll calculations for different dice types as I might have introduced a new bug (seen here https://fgu.kuura.art/chatlog/683e934f00168_chatlog.html/character/Vee%20Barlett with dice stats showing zero), so shorter session chatlogs will certainly come in handy.