FG Con 16

Global RPG Con - Friday April 16th to Sunday April 18th, 2021

Event List

A Mirror Image Spell for Fantasy Grounds!

by HoloGnome, 16 MAR 2015

As we are all preparing adventure content for FG Con 6, I thought I would share one of the tricks I use to make it a little bit easier to create and update live scenario content for Fantasy Grounds. While this trick specifically pertains to the Windows OS, it should also work on MacOS and linux.

To simplify the content building process for Fantasy Grounds, I use a single shared location between my main RPG build folder and the FG data directory for campaign images to help eliminate extra copying steps and file duplication. Initially, I tried relying on standard Windows shortcuts, but they’re very basic links and didn’t do what I needed. So, I got out my +3 Pickaxe of Arcane Excavation and dug underneath the hood of Windows to use its secret symbolic linking capability.

A symbolic link, or symlink for short, is a virtual file system reference that points to a directory in a different physical location on a storage volume. When an application sees this kind of virtual link, it directly accesses the physical content at its true location. The obvious benefit is that you can easily share and reference the same physical folder or content in multiple places, which helps save on time and storage space. No need for duplication!

Windows, however, does not enable this feature by default. Symlinking is usually only accessible from the command line of a non-admin account after additional privileges setup (see addendum), perhaps because if used improperly, symlinks can create problems, not unlike stocking up on color spray for a zombie fight. But wait! There’s an easier way! There is an extension for Windows Explorer called “Link Shell Extension” that lets you create symbolic links and other special file system references. You can find it here: http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

As an example, when I create content for FG, I always set up an “images” directory in my main build folder that includes everything I plan to put in the images directory of the live FG campaign folder. To help organize the content, I create various sub-directories, including: maps, npcs, and scenes. Then, I create the campaign folder and go into the data directory and delete the default images folder. In its place, I create a symlink to the images folder in my main build folder, as follows:


When I launch my campaign in Fantasy Grounds, all my content shows up in the images tab, as expected. That’s it! As you might imagine, there are many ways to use symbolic linking with Fantasy Grounds to improve GM workflow. I hope you find this trick useful and please be careful when creating and using symbolic links! For more information about enabling these functions in Windows without an additional application, see the addendum below. Also, note that MacOS and linux both include symbolic link support.

Addendum: Using Native Symbolic Link Support in Windows OS

The following steps explain what is required to create symbolic links in Windows. These steps assume that you are a Windows Power-User.

1. Create a non-admin user account for the purpose of symlinking. It could be a dedicated FG account or just one you use for symlinking anything on your drive. (beyond the scope of just FG)
2. Make sure this new user has the correct privileges to be able to access any content that you plan to symlink. For example, if you want to be able to symlink content owned by UserX, then you must add the symlink user to the user (or group) permissions for UserX’s user directory (\Users\UserX). Depending on how you do this and what scope you set, it may take some time for Windows to update the permissions and there may be various innocuous errors.
3. Grant the non-admin symlink account the privilege to be able to use the symlink command, as follows:
a. Go to start->run->secpol.msc
b. Go to Security Settings->Local Policies->User Rights Assignment
c. Add the symlink user to the permissions for “Create Symbolic Links”
4. Log in as the symlink account
5. Go to Run->cmd.exe to open a DOS prompt
6. Navigate to the directory location where you would like to create a symlink, such as a campaign folder in FG
7. Use the following command to create symlinks: mklink /D [linkName] [physicalFolderLocation]

For example, to create a symlink for the images directory of an FG campaign, you would navigate to the campaign folder (for simplicity, but you could also just use the full path of that folder) and use the following command:
mklink /D images C:\Users\[UserName]\[YourScenarioImagesBuildLocation]