PDA

View Full Version : Fantasy Grounds to Discord (Grognard Bot)



Cupcakus
April 9th, 2020, 16:45
Hey Everyone,

As we are all "sheltering in place" I found I needed something to do with my time, I spent a few days throwing this together. I'm just gauging interest for now, if this is something GM's want for their groups I'll polish it up a bit and post it here...

This came about because my players feel I roll "too well" and I wanted to show them the actual die roll statistics per session... We play via Discord so it made sense to have the results post to discord.

What I have is a Discord bot that "watches" your fantasy grounds campaign and then gives your player's live feedback during the session, and at the end of the session he reports on all the die rolls and gives out some gold stars...

Currently I've only tested it with Pathfinder 2E, but it should work with any CoreRPG ruleset.

https://i.ibb.co/G0d973P/chat.png

https://i.ibb.co/5ktPs6T/stats.png

This does require not only an FG Extension, but also a companion app that communicates with the Bot server.

UPDATE: July 21st 2020: I have uploaded the source AS IS to GitHub https://github.com/Cupcakus/FGBot. If you would like to help collaborate on this project, please DM me and I'll add you to my Discord where we can discuss.

dberkompas
April 9th, 2020, 18:22
I enjoy projects like this.

Thanks @CupCakus


Dave

superteddy57
April 9th, 2020, 18:37
This is neat and great job!

Dax Doomslayer
April 9th, 2020, 19:22
Wow, this looks great! Our group was just talking about having stats like this.

LordEntrails
April 9th, 2020, 20:08
You know, their is the Chatlog.html that can be used for a similar purpose. I was always wanting Doug to get around to formalizing his Campaign Statistics (https://www.fantasygrounds.com/forums/showthread.php?37768-Campaign-Game-Statistics). Maybe it would be easier to do something like being able to load a chatlog.html in a discord bot and have it generate such reports? Wouldn't require an extension and could be use retro-actively :)

Cupcakus
April 9th, 2020, 20:57
You know, their is the Chatlog.html that can be used for a similar purpose. I was always wanting Doug to get around to formalizing his Campaign Statistics (https://www.fantasygrounds.com/forums/showthread.php?37768-Campaign-Game-Statistics). Maybe it would be easier to do something like being able to load a chatlog.html in a discord bot and have it generate such reports? Wouldn't require an extension and could be use retro-actively :)

That was my original plan, unfortunately the chat log doesn't have the specific die rolls, only the totals, so it's not useful for a running dice tally.

I also needed hooks for "killed" creatures... because of regen you can't just wait for the chat log to show "dying" or "destroyed", they might spring back to life. Instead it waits for me (The GM) to remove the dead creature from the combat tracker before awarding the kill to a player.

ddavison
April 9th, 2020, 21:59
That was my original plan, unfortunately the chat log doesn't have the specific die rolls, only the totals, so it's not useful for a running dice tally.

I also needed hooks for "killed" creatures... because of regen you can't just wait for the chat log to show "dying" or "destroyed", they might spring back to life. Instead it waits for me (The GM) to remove the dead creature from the combat tracker before awarding the kill to a player.

Nice.

LordEntrails
April 9th, 2020, 23:56
That was my original plan, unfortunately the chat log doesn't have the specific die rolls, only the totals, so it's not useful for a running dice tally.

I also needed hooks for "killed" creatures... because of regen you can't just wait for the chat log to show "dying" or "destroyed", they might spring back to life. Instead it waits for me (The GM) to remove the dead creature from the combat tracker before awarding the kill to a player.
If a NPC runs away and the GM removes them from the CT is a kill awarded? Or unless if it's unconscious?

Cupcakus
April 10th, 2020, 00:33
If a NPC runs away and the GM removes them from the CT is a kill awarded? Or unless if it's unconscious?

If it's dying, destroyed, or dead, the last PC to damage it gets credit when I remove it from the tracker. If I remove it for any other reason, it doesn't count as a kill.

LordEntrails
April 10th, 2020, 00:40
If it's dying, destroyed, or dead, the last PC to damage it gets credit when I remove it from the tracker. If I remove it for any other reason, it doesn't count as a kill.
Nice :)
Sound like you thought this through :)

Three of Swords
April 10th, 2020, 04:39
This is really cool! Unfortunately we don't use Discord. Maybe we'll have to try it.

parallaxtz
April 10th, 2020, 09:21
Even if it's not polished, it would be cool even just as example code...release an "alpha" :-D

Tykho
May 3rd, 2020, 17:55
Would love this for my games. Is it open source? Depending on the language I'm sure you would get contributors (including me).

Egheal
May 5th, 2020, 07:38
I need it, please !

Weissrolf
May 7th, 2020, 10:13
:cool:

Dax Doomslayer
May 10th, 2020, 17:54
@cupcakus, I was curious what the status of this is as I would love to try this out for my 5E game!

Saeval
May 18th, 2020, 03:45
I would love to use this for my games, we always have a short discussion after each session to talk about what we liked, didn't like, and favorite moment so adding this into the mix would be really fun for our group.

Rixshaw
May 20th, 2020, 16:51
So if I were wanting to have access to this bot where would I go to get it?

Neovirtus
May 20th, 2020, 21:10
Would definitely be interested in trying this out!

bmos
May 21st, 2020, 12:52
I'd love to try this with PF1e! I've been wanting dice stats for ages. Sounds like fun.

Malumake
May 21st, 2020, 21:50
@CupCakus I would definitely like to help with this project. I have a group (not mine, but several of my friends) that are using Avrae with Discord. I would like to see/help with something similar for FG and your project looks like it is a great base for that.

Ctmega
May 21st, 2020, 22:18
@CupCakus Count me in as well if you are in need of testers and QA. I think there might also be some value here for my fellow streamers that have been looking for creative ways to get some of the in-game detail into our streams.

Thanks for all your great work on this!

vaughnlannister
May 22nd, 2020, 09:29
Hey awesome, look forward to trying it for our sessions!

Best,
Vaughn

connivingsumo
May 24th, 2020, 17:33
This is awesome @Cupcakus! My friends and I joke about how terrible my die-rolling is in person and digitally, so I'm excited to get and use this tool. Thanks!! ;)

JollyClaret
May 28th, 2020, 23:51
I've been checking this daily to see updates. Seriously cool! Hopefully will be finished for release soon.

jasharen
May 29th, 2020, 14:48
Would love to get this!

lucdurand
June 2nd, 2020, 01:39
I would be very interested tp try this out!

Mumbles
June 5th, 2020, 07:22
This is spectacular! Looking forward to a release so I can implement it in my campaigns.

Drath3n
June 5th, 2020, 21:27
Yes, this is cool. Can it be made to work with a Proboards forum?

Egheal
June 7th, 2020, 15:06
No more news since the 10th of April, I have a bad feeling about this guys. I hope the OP is fine.

VolcanicImp
June 7th, 2020, 19:58
This looks fantastic and I wouldn't mind adding it to my FGU

Cupcakus
June 8th, 2020, 00:57
Hi Everyone,

I apologize for not posting again to this thread in a while... when I first posted this interest wasn't that immediate, but it seems to have exploded as of late... I have some good news and some bad news...

Good News: Grognard is still in development. I update him once every couple of weeks with new features and bug fixes. He now collects a lot more stats on the players, like attendance records, total kills, total heals, favorite weapons, etc... We are currently playing the Pathfinder 2E "Extinction Curse" campaign, so he also tracks all the stats and information about the player's circus.

Bad News: This whole thing is a bit of a hack, and I don't know if it's really releasable... There are three parts to this whole thing:

1. The Discord BOT -- Runs on a cloud server, maintains the statistics database
2. The FG/FGU Extension -- This extension takes "events" such as die rolls and when players get kills and saves them as XML files (You can create database entries in FG and export those entries). This is the only way I could figure out how to get the data out of FG and into something else in real time.
3. The PC Application -- There is an app you have to run along side FG that constantly scrapes the XML files being written and parses them into network events that can be sent to the Discord BOT server. It then deletes the XML files off your PC.

That is a lot to maintain in wide release. It all works quite well, but if you forget to run the PC Application the log files will just pile up forever until you eventually run out of disk space.

Things I still need to do for a wide release:

1. I need to teach the bot how to handle multiple accounts. Right now it will broadcast to every discord channel it's currently in the events it receives from everywhere.
2. I need to figure out how to package the PC application so it will be trusted enough to install and run on other PCs. (I wrote it in electron so it should run on Macs too, but untested)
3. I'd like to do a limited close beta release with just a couple more GM's to work out the kinks.

A caveat... This only works with Pathfinder 2E at the moment. If you want this for 5E or something else I would need to rework how the kill tracking works. Rolls tracking should be fine with any CoreRPG ruleset, but the kills tracking is tied heavily into the PF2E combat tracker.

I'll aim for a limited release at the end of June. If you are currently running a Pathfinder 2E campaign and would be interested in helping me test, please let me know. If you are running Extinction Curse, even better...

36648
36649
36650
36651

Saeval
June 8th, 2020, 01:16
I’m not running PF2 yet but it’s my next campaign (homebrew conversion of Reign of Winter) and this looks really cool and I would love to use it. I like the images you posted and look forward to you getting this more palatable for a public release

Dax Doomslayer
June 8th, 2020, 01:38
Sounds great Cupcakus! When you get to the 5E part of this, I'll be happy to try testing it for you if you want!

Syven
June 23rd, 2020, 17:00
Heya, I'm running a PF2 game and I'd love to test this out for you. It's homebrew, so no circus, but I have players who are suspicious of fantasy grounds and it would be interesting to see whether those suspicions are justified or not!

AlchemicalAgent
July 8th, 2020, 21:03
+1 for another willing tester here. This looks great!

Robm1158
July 13th, 2020, 08:59
Hey I am a 5e GM and a software developer! I would love to maybe help make this universal or setup a 5e version if you looking for help! It is super awesome so far! Let me know!

Dax Doomslayer
July 13th, 2020, 15:13
Hey I am a 5e GM and a software developer! I would love to maybe help make this universal or setup a 5e version if you looking for help! It is super awesome so far! Let me know!

That would be cool if this could be made available for 5E. My players would love it. They're always talking 'smack' about how bad each of them roll - lol!

Robm1158
July 13th, 2020, 22:27
That would be cool if this could be made available for 5E. My players would love it. They're always talking 'smack' about how bad each of them roll - lol!

Please feel free to drop your discord link or email and we can maybe get together and see if i can help!

Dax Doomslayer
July 16th, 2020, 19:57
Please feel free to drop your discord link or email and we can maybe get together and see if i can help!

Hi Robm, unfortunately I don't have the OP's software so I'm not sure what can be done at this point until if/when it is provided unless I'm missing something? That said, if I can help in some way get this working, I'm game for that...

spkane
July 20th, 2020, 23:24
Bad News: This whole thing is a bit of a hack, and I don't know if it's really releasable...

Even with that being the case, would you be open to sharing what you have so far, at least via a DM, if not via an unsupported Github repo or something. I'd be interested in taking a look and maybe even helping out with it or forking it. Being able to see a bit more about how you wired it all together, and generally got it working would be pretty useful.

Cupcakus
July 21st, 2020, 19:36
... Github repo or something ...

OK, ask and you shall receive! I've uploaded it AS IS to GitHub if one of you other geniuses want's to work on it I'm happy to collaborate. DM me and I'll add you to my Discord where we can chat about things as needed. I've included setup instructions from memory but didn't really test them so the first person to try will likely have to iron them out with me.

https://github.com/Cupcakus/FGBot

spkane
July 22nd, 2020, 16:22
I've uploaded it AS IS to GitHub if one of you other geniuses want's to work on it I'm happy to collaborate.

Thank you! I will definitely play around with this and see what I can do with it.

SmackDaddy
August 23rd, 2020, 08:42
Have the instructions been updated or has no one gotten with you to try and configure this for their own Discord? I would like to try and get this setup for our community discord channel which we use for voice chat for our campaign. Thank you in advance.

Cupcakus
August 26th, 2020, 17:17
Have the instructions been updated or has no one gotten with you to try and configure this for their own Discord? I would like to try and get this setup for our community discord channel which we use for voice chat for our campaign. Thank you in advance.

I just pushed a new update today that helps with a few things re: setup... I think the instructions are good, @spkane was able to get it running on his end I believe. If you want to chat with me directly for help, join my Discord.

https://discord.gg/6zTUpA8

spkane
August 27th, 2020, 03:13
I think the instructions are good, @spkane was able to get it running on his end I believe.

Sorry for going silent. I did mostly get it up and running while also trying to edit the code and generalize it a bit for a wider audience. In the end however, I ended up going a different route although I had some interesting experiments working before I got distracted with other things.The code was very useful to explore though and helped give me a good direction forward. So, I am still very glad that you decided to post it.

Wickedwaze
July 4th, 2021, 19:00
Thanks for the updates @cupcakus! I wish I was more technically able to assist in this endeavor but at least I lack those skills. I am a GM for Pathfinder 1E and would love to test the bot (and help if possible) if development goes that way. Feel free to add me on discord W1ckedwaze#2041.