Skip to content

Public scene repository. Used to import scenes from D&D Beyond using the vtta.io tools

Notifications You must be signed in to change notification settings

VTTAssets/vtta.io-ddb-scenes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Public scene adjustment repository

This repository contains scene adjustment data for all processed sourcebooks and adventure modules from D&D Beyond, importable using the Foundry VTT module vtta-ddb and it's companion browser extension.

You can contribute to the quality of the scene data by submitting pull requests. Please review the contributing doc before sending in any PRs, thanks!

Folder structure

- [Code]
   - Scenes
      - Chapter Name
         - Scene Name
             File: Scene Name.json
             File: Scene Name-banner.png

Please keep the directory structure as-is. It is generated by the sourcebook parser, and all paths are sanitized by the following algorithm to replace operating system restricted special characters with regular, unique strings.

/**
 * Sanitizes a string to a valid filepath, by replacing each reserved character by a unique string literal.
 * The process is therefore reversable
 * @param {string} filepath
 * @returns sanitized string
 */
const sanitize = (str) => {
  [":", "\\?", "\\/", "<", ">", "\\\\", "\\*", "\\|", '\\"'].forEach(
    (char, index) => {
      const replacement = ` -${"#".repeat(index + 1)}- `;
      const regex = new RegExp(char, "g");
      str = str.replace(regex, replacement);
    }
  );
  return str;
};

/**
 * Reverts the sanitized filepath to it's original string
 * @param {string} filepath
 * @returns original string
 */
const unsanitize = (str) => {
  [":", "?", "/", "<", ">", "\\", "*", "|", '"'].forEach((char, index) => {
    const replacement = ` -${"#".repeat(index + 1)}- `;
    const regex = new RegExp(replacement, "g");
    str = str.replace(regex, char);
  });
  return str;
};

License: Attribution-NonCommercial-ShareAlike 4.0 International

This data collection is licensed under the Attribution-NonCommercial-ShareAlike 4.0 International. By contributing to this repository, you are willing to share your contributions to the public under the conditions of this license.

About

Public scene repository. Used to import scenes from D&D Beyond using the vtta.io tools

Resources

Stars

Watchers

Forks

Packages

No packages published