Exporting Game Session Data

Problem: How can I get a “session report” from players’ individual game sessions? (Other than them taking screenshots at the end of the session)

I really want to use Narrat- as I’m familiar with RenPy- to create an interactive class session for a D&D game that I’m running (it has a magic school theme).

I’ve been having players roll for EXP in learning a particular skill during sessions (that’s how they attend classes) but it is eating up a lot of time during sessions. Since Narrat has dice rolling tools and all, all I’m missing is a way for players to get the info/exp to me so that I can update it in a custom Notion page that serves as their “report card” and tracks their experience.

This is the system I believe I can code into Narrat:

  1. Out of the four classes for the day, choose two. (I can figure out how to script this so the player is limited, I did something similar in RenPy)

  2. Within the class, you may pick any three of the 4-6 skills that are covered with the day’s class/lesson.

  3. For each skill you choose, roll a d20 to determine how well you were paying attention. (Nat20’s and Nat1’s will need to be flagged in the session report as it may trigger professor inquiries in game)

  4. Depending on the roll, roll the corresponding pair of experience dice to determine how much you learned. (This is what I need to be included in the session report to be shared with me and I am not sure what to do for this.)

I hope this provides enough information though I am more than available to provide more details. I mainly have experience in RenPy so if I would need JavaScript knowledge then, please let me know and I can get onto learning that!

What is the end goal for display in notion?

Because at the least difficult end you could output the markdown of the report card to the dialog area, and then have it copy pasted into notion.

At the most difficult end, using JS, you could probably directly send the markdown formatted information into notion using it’s API

Once you start using JS to do what you need, you really can do just about anything. So creating a database or dashboard to display and track these report cards is feasible, and a matter of how much time you have available for it the project.

The bullet points that you want can definitely be done in just Narrat.

Ah gotcha! So, I need to create a JS database in order to extract the information from the game session? (Sorry, I am very unfamiliar with JS but I do have plans to learn.)

To clarify with Notion:
I’ve already built tables and progress bars to display a player’s experience. To clarify, I don’t need the information to be imported into Notion as I can do that by hand. But what I was looking for was a way to export the info of the class taken and the dice rolls (or the game session info) into a database that identifies the info from a player. I could then check on that database and then update things by hand.

The workflow would be this:

  1. Player goes through a Narrat game session. (They would have a unique player name/ID)
  2. All the rolls, course experience they rolled, as well as the data of the class they took and the particular skills they decided to learn are all recorded and sent to a database once they wrap up that session.
  3. I check that database, make my notes and then update any numbers in their Notion site.
  4. Resolve any rolls and decisions the next campaign session. :smiley:

Really hope this makes sense!

ohhh,

Notion has CSV imports for tables, so you could output the data to screen as a CSV, or to a variable and use js to have that saved to disk. That way you can import it into your database.

(or use api calls to directly manipulate and send the data over if you want)

1 Like

Ooooh! I SEE! Thank you! I’ll see if there are some tutorials on how to do the JS for this and then experiment. Thank you so much! If I have any questions, do you mind if I follow up here?

If you really want to automate it you’d need a server, and then add a bit of custom js to the narrat game to send the data to your server. Then you could have a dashboard or whatever you want on your server to look at the data, or export it in raw format.

One relatively “easy” way especially if your app is meant to be private, is to use something like Supabase to get a free database that you can send data to from your app. Then you can look at the data in there, or export it, or make yourself a sort of admin dashboard for it.

But at this point you’re sort of making a mini online game.

Otherwise lazier version that doesn’t involve a server, is like above you write a bit of js (or even narrat code could do it, but better to do that part in js) that takes all the data you care about, variables etc, and outputs them as a json string, or csv lines, and then you’d need players to copy paste that to you or into some kinda shared file that you’d manually use

Narrat itself doesn’t have much to do with what you do here either way, as you’re really talking about exporting data from narrat somewhere else. Getting the data is easy as it’s there and your code can access it. What do you do with it is another story

1 Like