PDA

View Full Version : Rotating DM Campaign Sync Tools (RoDCaST)



omega392
December 12th, 2022, 10:22
Hey all, so my friends and I tried to come up with a west marches style campaign as we are few and it's difficult for any of us to be the dedicated DM for extended periods of time (life and all) but FG didn't quite have the ability to "share" a campaign's DM responsibilities.
So while we were looking into how to play a game like that we split up some duties across our group and I came up with a set of scripts to be able to hand the campaign file around easily so the next DM can take the most current version of the game files and host it.
I thought this might be helpful for others if you wanted to use it to either backup a campaign or even start your own dynamic DM style story with your buddies.

===Basic overview
The tool comes in 2 parts, the sync script and the zip script.
The sync script archives the current matching campaign file (by campaign name) and then takes the campaign file transmitted with it and replaces it in the live campaign directory. (Roll back is manual)
The zip script collects the current live campaign file and creates a new zip to be handed off to the next person.
The next DM unzips the file, uses the Sync tool to update their campaign file to the current one, hosts the next session, and continues on at the helm of the campaign.

===Some Usage Notes
This is very much a V0.1 and so the usage is pretty basic but I think usable for most people as I don't expect there to be too many of these kinds of games going around.

The campaign name (and thus the campaign folder name) must be set in each script (sync and zip) under the $campaignName variable.
Script is designed to be used with a single campaign at a time. It is not configured to create backups of your campaigns.
Ideally everyone is using the default Fantasy Grounds location in AppData\Roaming\Smiteworks\Fantasy Grounds
** If users are not using the default location there is an override variable in $altFantasyGroundsFolder but you will need to change it to make it matches your non-default local path or reset to $null before running
The Sync script assumes that the campaign file provided is always going to be more up to date and will archive the current file in Fantasy Grounds\campaignArchive\ (a new folder) with the name of the campaign, and a timestamp of when it was archived.
The scripts are written in Powershell so it should work on pretty much any modern Windows machine without requiring admin permissions. There should be an option to right click and select "Run with Powershell"
There is basic troubleshooting and information provided by the script to the user in the Powershell session.
This doesn't include transmission of the file. You will need to find a way to send the Zip file to the next DM on your own.

===Comments and suggestions
I welcome potential feature requests and comments.
If you want to read through the code it's a bit messier than I would normally like but it needed to be that way to minimize unnecessary operations and perform certain checks in sequence to build the appropriate directory paths while also checking and providing the user with some useful feedback if the directories are not reachable.
Ideally I would like to find one of the files within a campaign directory that is always updated whenever there is a session played. I would like to use this as a file to check to ensure older data is not replacing newer data without the user confirmation. This would be a feature I would like to implement for v0.2.

PS: Not sure if this is not the right place to post this or if it should go somewhere else. Please let me know if this should be moved or if an Admin can assist in moving the thread that would be great. :)