{"id":15111320,"url":"https://github.com/nottlexa/dices-engine","last_synced_at":"2026-02-02T18:32:04.848Z","repository":{"id":257267835,"uuid":"853861591","full_name":"NottLexa/DICES-Engine","owner":"NottLexa","description":"Engine for creating interactive and automated TRPG character sheets. Made for one silly filly","archived":false,"fork":false,"pushed_at":"2024-12-06T17:28:48.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T02:02:36.058Z","etag":null,"topics":["dnd","dnd5e","javascript","js","json","nodejs","nwjs","python","python3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NottLexa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-07T18:32:26.000Z","updated_at":"2024-12-06T17:28:52.000Z","dependencies_parsed_at":"2025-06-26T02:02:37.443Z","dependency_job_id":null,"html_url":"https://github.com/NottLexa/DICES-Engine","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"fb90a839938cd67276f086e11d3454ec02ce6669"},"previous_names":["nottlexa/marecreator","nottlexa/dices-engine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NottLexa/DICES-Engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NottLexa%2FDICES-Engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NottLexa%2FDICES-Engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NottLexa%2FDICES-Engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NottLexa%2FDICES-Engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NottLexa","download_url":"https://codeload.github.com/NottLexa/DICES-Engine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NottLexa%2FDICES-Engine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261984644,"owners_count":23240302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dnd","dnd5e","javascript","js","json","nodejs","nwjs","python","python3"],"created_at":"2024-09-26T00:03:28.089Z","updated_at":"2026-02-02T18:32:04.820Z","avatar_url":"https://github.com/NottLexa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DICES Engine\n\u003e (D\u0026D Interactive Character Expandable Sheet Engine) \\\n\u003e Engine for creating interactive and automated TRPG character sheets.\n\u003e\n\u003e ex. MareCreator\n\nby Alexey [\"NotLexa\"]((https://github.com/NottLexa)) Kozhanov (Алексей Кожанов)\n\n[![GitHub License](https://img.shields.io/github/license/NottLexa/DICES-Engine)](https://github.com/NottLexa/DICES-Engine/blob/master/COPYING)\n\nDICES Engine consists of three parts:\n* Render engine (for now it's only a plain HTML dynamic page for NW.JS)\n* MareCreator Formula Parser (MCFP) - JavaScript's module for parsing attribute effects' or formulas' code, turning them\ninto JS objects that abstractly represent a formula's code parts, and (optionally) converting these objects into JS function.\n* Template Builder - Python module for building (compiling) DICES Engine templates in format of JSON, using DICES Engine\nattributes written in Python (Python 3.x, preferably \u003e=3.10).\n\nMade for [@arkain123](https://github.com/arkain123) ≽^•⩊•^≼\n\n## How to install\n\n1) Install [NodeJS](https://nodejs.org).\n2) Clone the repository.\n3) Run shell command `npm install` in repository's directory.\n\n## How to run\n\n1) Run shell command `npm run start` in repository's directory.\n\n## How to build templates\n\n1) Create a python script, preferably with extention `.build.py`:\n    ```\n    import sys\n    try:\n        from core import template_builder as tb\n    except:\n        import pathlib\n        sys.path.append(str(pathlib.Path(__file__).parent.parent.parent))\n        from core import template_builder as tb\n    import json\n    \n    \n    \n    ... # here you can generate attribute tree that you will use in template_data later\n    \n    \n    \n    template_data = tb.TemplateData(\n        name = \"\", # add template's display name here\n        version = 1,\n        attributes = tb.AttributeTree(...)\n    )\n    \n    if __name__ == '__main__':\n        with open(__file__[:(-9 if __file__.endswith('.build.py') else -3)]+'.json', 'w') as f:\n            json.dump(template_data.parse(), f, indent=(None if '-compact' in sys.argv[1:] else 2))\n    ```\n\n2) Run it (should be working with running from anywhere)\n3) _(Optional)_ If your template data is too big and template JSON-file becomes too heavy, you can run this script with\n   `-compact` flag. In this way, template JSON-file will be written in one line.\n\n## How to deploy DICES Engine on web client\n\n### Native DICES Engine render engine\n\n1) Run shell command `npm run browserify` in repository's directory. It will create a new file in the repo's directory:\n   `index_bundle.js`, a bundled version of all core scripts and `index.js` in one script, compatible with deploying in\n   regular HTML document.\n2) In `index.html`, change `\u003cscript src=\"index.js\" id=\"script\" platform=\"NODE\"\u003e\u003c/script\u003e` to\n   `\u003cscript src=\"index_bundle.js\" id=\"script\"\u003e\u003c/script\u003e` it is essential that `platoform` attribute is removed when\n   deploying for the web.\n   \n### Custom render engine\n\nWhenever you want to use your custom render engine for DICES engine, you must create your own HTML document and JS\nscript connected to it. However, to use DICES Engine functionality, your own JS script must be compatible with CommonJS,\nas you need to `require(\"./core/dices_engine.cjs\")` to make it work. In that case, you can create a NodeJS script and\nmake it browserified with `npm run browserify`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnottlexa%2Fdices-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnottlexa%2Fdices-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnottlexa%2Fdices-engine/lists"}