>[!danger] SESSION PREP IN PROGRESS
>As of March 14th, this note is out of date! I've already made it better but I haven't updated this page yet, sorry! It's newest version is already in the [[Downloads|VVunderlore Vault]].
>[!tldr]- Changelog and Roadmap
># Changelog
> ### Session Notes v1.0
> - Independently functioning modules for all the cool stuff. If you don't want them, just delete them!
> - Navigation
> - Previously On
> - Last Session Callout
> - Automatic creation and dating of new notes plus easy navigation between notes
> - On-page references to the last session to make prep less clicks between windows and more writing
># Roadmap
>### Current Encounters:
>- Fun Facts
>### Future Encounters:
>- Build-your-own session template generator
>- Game system-specific session formats
>-"change this value/filepath/etc" list for ease of personal adaptation
>- Agnosticising full template (for game and adventure)
# Session Notes
Session notes are where you take your notes during your session. While on pen and paper that could have been scrawled margin notes or bullet points in a dedicated section of the journal, there's an opportunity to do more digitally, especially with tools like Obsidian that have the functionality to make a lot of that work more efficient.
On this session template I've created, you'll find that the "session notes" section is still just a blank area where you can type some bullet points (or whatever you want) to keep track of need-to-know information. Aside from that, everything else has been built into modular blocks of code, templates, and buttons that create an efficient system for referencing, and adding to, your compendium of resources and adventure materials.
>[!example]- render of the session notes
>![[session notes render.png]]
## Installing the Session Notes Template
>[!warning] THIS IS A TEMPLATE, NOT A "PAGE"
>It is important to note that this tool is **not just a page** like the other Game Management Tools but **a template that you put in your templates folder**, similar to the Compendium Templates. Be sure you're installing this in your template folder and linking to that place when filling out the "New Session" button.
This note will run out of your templates folder, so name it something simple and memorable to make it run either via the [[Templates Introduction#Activating the Templates|template quick menu or any buttons you create]].
### Plugins:
The plugins needed for this to work are:
- **Dataview** ([[Plugins#Dataview|with javascript queries enabled]])- to gather and display all the data
- **Meta Bind** to create the buttons ([[Plugins#Meta Bind|with js enabled]])
- **Templater** to run the template, of course!
- **Modal Forms** to choose the date for the next session
To learn how to install and set up those plugins, check out the [[Plugins]] page.
## Templates
### The Full Package
#### Step 1: Install the Template
This is the full session note you see above with 100% functionality and automation. Copy and paste this into a template and follow the instructions below to manually update filepaths and file names so it works correctly.
>[!code]- Session Notes Full Template
>![[session notes - full template|no-title]]
#### Step 2: Update Code
Below are all the file names and paths that need to be updated to work correctly. If you're using the VVunderlore Vault, you'll only need to change the name of the adventure folder itself.
These changes apply to the more modular versions of the template you can find below, there will just be less to change.
Below are the things to change:
1. Every `meta-bind-button` on the template has a `folderPath` value you need to update to the folder where you keep the session notes for this specific adventure. The **New Session** button will also have a `templateFile` path that points to this file that you're creating in your templates folder.
>[!example]- meta-bind-button changes
>![[session note - meta bind button updates.png]]
2. In the template code block, change the file path at the top to the place where this adventure's session notes are to be kept.
> [!example]- template block session notes folder
> ![[session notes template folder path update 1.png]]
3. You shouldn't have to change this, but the new date form name in the template block needs to match the name of the form you will add to the modal forms plugin after this step.
>[!example]- modal forms file name
>![[session notes - date form title.png]]
#### Step 3: Install Date Form
Using the plugin [[Modal Forms]], you can create a little box that pops up that asks you what date you're going to play on (to name the session file and organize the files). For information on how to install this form (it's super easy I promise) visit the [[Plugins#Modal Forms|plugins page]].
>[!code] date form
> ````
> {
> "title": "Next Session Date",
> "name": "next-session-date",
> "customClassname": "calendar",
> "fields": [
> {
> "name": "date",
> "label": "WHEN WE WILL PLAY???",
> "description": "EVER? NEVER?",
> "isRequired": false,
> "input": {
> "type": "date",
> "hidden": false
> }
> }
> ],
> "version": "1"
> }
#### Step 4: Use the Form!
The first time you use the form you'll want to just run the "Templater: Create new note from template" function. Press `ctrl-p` or `cmd-p` to bring it up and type "Templater" to find it. Choose the correct template, choose the date, and your off to the races!
The next time you need to create a new session for this adventure, just hit the "New Session" button.
### Modular Code Blocks
>[!danger] ADVANCED AREA
>**Going below this line is a bit more advanced! It took me a while to take the pieces apart so my instructions may not be clear enough or playing with it may be buggy. These blocks aren't the same as the [[Adventure Hub]] blocks. You have to edit the page and the template code to make it work the way you want to.**
>
>**This isn't to scare you away, just to let you know it gets more complicated down here. But break it! Rebuild it! Learn something new!**
You can use the full page template or you can use whatever pieces you want to and make the adventure homepage you will find most useful for your GM style. If you want, though, you can use the full code and just hit the ground running.
#### Base Template (No Modules)
Maybe you want just the format to play around with. You don't want all the fancy modules and stuff but you still want a template. You don't believe in any of this fate crap. You're in control of your own life, remember?
This maintains any code used to display and change the frontmatter on the page (session number, session date, in game data) as well as the navigation. Everything else is just raw text.
>[!code]- session notes base template
>![[session notes BASE|no-title]]
### Individual Blocks
#### Previously On Assistant
This is a little helper that takes the "Summary" text from your last session and puts it in a secret note that is then displayed on your new session, making it easy to hover or click the link to see the summary from the last session so you don't actually have to leave the new session and interrupt your prep. Did that make sense?
##### Step 1: Add this to your template BODY, wherever you want it.
Change the "adventure_summary" to the name of the note you create in step 2.
>[!code]- previously on formatting
>````
>#### [[adventure_summary|Last time on...]]
##### Step 2: Create the little temp summary note.
This is just a blank note that lives in a buried folder somewhere. It doesn't matter where. In the VVunderlore Vault, its just in the SYS folder in extras because it's literally a temp file. Every time you create a new note, the template wipes this temp note clean and puts in the text from the most recent session's Summary section. It's neat.
Update the backlink you just created in Step 1 on your session template and, the path to the temp file in the function within the templater block of your template after you create it in Step 3.
>[!example]- update the temp file path
>![[session notes - summary assistant temp file path.png]]
##### Step 3: Add code to the Templater block in your session template.
This block goes in your template code before the `} // End of if (previous note)` line. This will put it inside the "Extraction and Insertion Code" bit.
>[!code]- Previously On Assistant
>![[session notes - previously on code|no-title]]
#### Last Session Callout
This takes the text you put in the Next Session section at the bottom of the base template and puts it in a collapsable callout on the new session you create. I use this as notes to remember for when Im doing prep for the next session. Keep it simple.
##### Step 1: Add the Callout to your session template
Add this little callout to your session template wherever you want it to show up. It's that easy.
>[!code]- last session callout
>````
>>[!todo] From Last Session:
>>
##### Step 2: Add code to the templater block in your session template
This block goes in your template code before the `} // End of if (previous note)` line. This will put it inside the "Extraction and Insertion Code" bit.
>[!code]- Next Session/Last Session Callout Code
> ![[session notes next session callout|no-title]]
##### Step 3: Make sure the code can find the callout
Just make sure the "**From Last Session:**" in this line matches that you titled the callout in Step 1
>[!code] callout name
>```
const insertionRegex = />\s*\[!todo\]\s*From Last Session:/;
> [!comingsoon] COMING SOON: FUN FACTS!
> The fun facts needs an extra plugin to function that requires a bit more involvement and I'm not quite ready to share my documentation for that yet. I'd like to see if I can make the installation a better experience first.