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!
- [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;
};
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.