Skip to content

Save Data

Colin Halseth edited this page May 19, 2021 · 10 revisions

To manage save data. Press the Files button at the top of the navigation side-bar, just beli0w the view switcher. This will being up the file management popup window.

Creating a New file

The app will automatically try to load the last used data, some users may want to start fresh with no data. The New Project button in the file management popup window allows for the app's data to be cleared and started from scratch. Please save any changes before using the new button as any unsaved changes will be lost.

The new button looks like a large plus or addition symbol.

Saving

Since TrekSharp is a web-application, data may be lost when the cache is cleared. To persist application data you can download all of the application's data in JSON format. There are two ways to download this data. In the file management popup window there are save and a load buttons. The Save Project button which looks like a box with a downwards facing arrow will take the application's data, encode it as JSON, and then trigger a download of the JSON file. Alternatively, the CTL+S hotkey (CMD+S on MacOS) can be used to trigger this data download and is more convenient for most uses.

To prevent users from accidently leaving the web-application without saving their data, the current app's data is saved to the browser's local storage and will attempt to be automatically loaded next time the page is visited.

Loading

TrekSharp will automatically try to load the last file used as it is persisted to the browser's local storage. To load any different save files, in JSON format, you can open the loading dialog by using the Load Project button which is located in the file management popup window and looks like a box with an arrow pointing upwards. Pressing this button will open the load dialog.

The loading dialog contains a large empty text area for the JSON data. To load a JSON file you can either manually copy the contents of the file into the text area and press the Load button at the bottom right of the dialog. To create an easier method for loading files, there is a file picker at the top of the dialog. Once a json file has been picked here, its contents will be automatically read and put into the JSON text area. Just like with the manual JSON entry press the Load button to confirm.

Depending on the size of the JSON data this may take a second to load. If there are any errors with this loading procedure then those will show up in the dialog and the dialog will stay open. If the loading was successful it will automatically close.

Format

TrekSharp uses the widely known JSON format for saving and loading the various assets that it manages. This format is easy to edit, if manual editing is required, and easy to share between different users and computers. For instance, Players can create their own characters and send the JSON files to their Game-Master so that they have a reference of all the players talents and stats.