Compare commits
15 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
e57d62aef2 | |
|
|
bef9b90901 | |
|
|
51ad48d058 | |
|
|
2414f3b8f3 | |
|
|
81da532074 | |
|
|
2972bc2cf7 | |
|
|
4a35a24d43 | |
|
|
fe9fe03282 | |
|
|
4eedb1527b | |
|
|
192b1b4252 | |
|
|
48c6d1123d | |
|
|
e91fe82e95 | |
|
|
32e44a5cf9 | |
|
|
1ba672680e | |
|
|
3b768ca44c |
|
|
@ -1,8 +1,8 @@
|
||||||
name: Pull Request Check
|
name: Pull Request Check
|
||||||
run-name: ${{ gitea.actor }} is updating the pull request 🚀
|
run-name: ${{ gitea.actor }} is updating the pull request 🚀
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [ synchronize ]
|
types: [synchronize]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
testing:
|
testing:
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
name: Release Job
|
name: Release Job
|
||||||
run-name: ${{gitea.actor}} is releasing a package
|
run-name: ${{gitea.actor}} is releasing a package
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [ published ]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: node-01
|
runs-on: node-01
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
steps:
|
||||||
- name: Print Tag
|
- name: Print Tag
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -40,15 +38,11 @@ jobs:
|
||||||
zip -r release.zip . # Adjust the path to your build output directory
|
zip -r release.zip . # Adjust the path to your build output directory
|
||||||
mv release.zip /tmp/release.zip
|
mv release.zip /tmp/release.zip
|
||||||
|
|
||||||
- name: Auto Commit
|
|
||||||
run: |
|
|
||||||
git add .
|
|
||||||
git commit -m "auto commit"
|
|
||||||
git push origin HEAD:main
|
|
||||||
|
|
||||||
- name: Package Upload
|
- name: Package Upload
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
server_url: https://git.macniel.online
|
server_url: https://git.macniel.online
|
||||||
files: |
|
files: |
|
||||||
/tmp/release.zip
|
/tmp/release.zip
|
||||||
|
./dist/system.json
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
src/packs/__source
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="WEB_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/src/packs/__source" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/src/packs/__source" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<profile version="1.0">
|
|
||||||
<option name="myName" value="Project Default" />
|
|
||||||
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
|
|
||||||
<option name="myValues">
|
|
||||||
<value>
|
|
||||||
<list size="7">
|
|
||||||
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
|
||||||
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
|
||||||
<item index="2" class="java.lang.String" itemvalue="comment" />
|
|
||||||
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
|
||||||
<item index="4" class="java.lang.String" itemvalue="embed" />
|
|
||||||
<item index="5" class="java.lang.String" itemvalue="script" />
|
|
||||||
<item index="6" class="java.lang.String" itemvalue="prose-mirror" />
|
|
||||||
</list>
|
|
||||||
</value>
|
|
||||||
</option>
|
|
||||||
<option name="myCustomValuesEnabled" value="true" />
|
|
||||||
</inspection_tool>
|
|
||||||
</profile>
|
|
||||||
</component>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/DSA41.iml" filepath="$PROJECT_DIR$/.idea/DSA41.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
70
README.md
|
|
@ -1,10 +1,7 @@
|
||||||
Modulentwicklung eines Systems was Das Schwarze Auge 4.1 in FoundryVTT abbildet.
|
Modulentwicklung eines Systems was Das Schwarze Auge 4.1 in FoundryVTT abbildet.
|
||||||
----
|
----
|
||||||
|
|
||||||
Manifest des Systems: `https://git.macniel.online/macniel/foundry-dsa41-game/raw/branch/main/src/system.json`
|
In diesem Repository findet die Codeentwicklung des Moduls statt.
|
||||||
|
|
||||||
|
|
||||||
In diesem Repository findet die Codeentwicklung des Moduls statt.
|
|
||||||
|
|
||||||
## Weitere Resourcen
|
## Weitere Resourcen
|
||||||
|
|
||||||
|
|
@ -20,67 +17,4 @@ API: https://foundryvtt.com/api/classes/foundry.abstract.Document.html
|
||||||
|
|
||||||
Demo: https://github.com/foundryvtt/dnd5e
|
Demo: https://github.com/foundryvtt/dnd5e
|
||||||
|
|
||||||
# Features
|
Flim Flam
|
||||||
|
|
||||||
## Spieler Tools
|
|
||||||
|
|
||||||
### Währungsanzeige
|
|
||||||
|
|
||||||
Mit dieser handlichen Anzeige kann man auf einem Blick sehen, über wieviele Geldmittel man verfügt. Hierzu werden alle Dukaten, Silbertaler, Kreuzer und Heller im Inventar zusammengezählt und ansprechend präsentiert.
|
|
||||||
|
|
||||||
### Teilen und Zusammenlegen von Gegenstands-Stapeln
|
|
||||||
|
|
||||||
Es ist möglich via Kontextmenü Gegenstands-Stapel in zwei Stapel aufzuteilen, dies ist vorallem dann hilfreich, wenn man Loot aufteilen möchte. Gleichermaßen ist es möglich gleichartige Gegenstands-Stapel zusammenzuführen, in dem man einen Stapel auf ein anderen fallen lässt.
|
|
||||||
|
|
||||||
### Attacke Dialog
|
|
||||||
|
|
||||||
Über den Charakterbogen kann eine Attacke gestartet werden. In diesem Dialog kann das Ziel, die Waffe sowie das Manvör und etwaige Erschwernisse und Ansagen eingestellt werden. Je nach Länge des Manövers wird die Attacke direkt ausgeführt oder in die Abklingleiste deponiert.
|
|
||||||
|
|
||||||
### Verteidigungs Dialog
|
|
||||||
|
|
||||||
Über den Charakterbogen kann eine Verteidigung gestartet werden. In diesem Dialog kann die Waffe oder das Manöver ausgewählt werden womit sich der Charakter verteidigen soll. Der Verteidigungswurf wird automatisch durchgeführt.
|
|
||||||
|
|
||||||
### Rasten und Regeneration
|
|
||||||
|
|
||||||
Es ist möglich den Rasten und Regenerations Dialog von dem Charakterbogen eines Charakters aufzurufen worin man die Einstellungen vornehmen kann die die Regeneration während einer Rest von Lebensenergie und Astralenergie sowie der Heilung von Wunden beeinflussen.
|
|
||||||
|
|
||||||
### Mini Charakterbogen
|
|
||||||
|
|
||||||
Wenn der Charakterbogen schmall genug gezogen ist, wird dieser aktiviert und enthält lediglich die Seitenleiste sowie die Attribute auf denen gewürfelt werden können. Daneben allerdings befinden sich die Reiter des großen Charakterbogens welche die jeweiligen Seiten in kleiner Form als separates Fenster öffnen lassen.
|
|
||||||
|
|
||||||
### Item Browser
|
|
||||||
|
|
||||||
Es ist nun möglich auf dem Charakterbogen unter dem Reiter "Inventar" den Item Browser zu öffnen wo alle Gegenstände der aktuellen Welt enthalten sind und mit rudimentären Filtern durchsucht werden können. Ein Spieler kann hierrüber neue Gegenstände kaufen, der Spielleiter hingegen kann per Drag and Drop die gesuchten Gegenstände auf alle Actor Sheets hinzufügen.
|
|
||||||
|
|
||||||
## GM Tools
|
|
||||||
|
|
||||||
### Gruppenmanagement
|
|
||||||
|
|
||||||
Um die Übersicht zu wahren, gibt es mit Gruppen das Werkzeug in die Hände der Spielleitung um wichtige Infos wie
|
|
||||||
Eigenschaften, Vor und Nachteile und andere Statistiken eines Charakters innerhalb einer Gruppe zu haben und diese
|
|
||||||
gleichzeitigt mit denen anderer vergleichen zu können.
|
|
||||||
|
|
||||||
### Kreaturen
|
|
||||||
|
|
||||||
Da die Erstellung eines Charakters sehr komplex ist, gibt es mit Kreaturen eine stark abgespeckte Variante, die leicht
|
|
||||||
während der Sitzung oder in Vorbereitung angelegt werden können. Nur die für kämpfischer Begegnungen relevanten
|
|
||||||
Informationen sind verfügbar.
|
|
||||||
|
|
||||||
### Händler
|
|
||||||
|
|
||||||
Um die Vorbereitung einer Sitzung so komfortabel wie möglich zu gestalten, gibt es mit Händler die Möglichkeit Gebäude
|
|
||||||
oder NSCs vorzubereiten welche Waren und oder (ggf. in Anzahl beschränkte) Dienstleistungen bereitstellen, gegen einen
|
|
||||||
Preis natürlich.
|
|
||||||
|
|
||||||
### Battle
|
|
||||||
|
|
||||||
Um heimlich vergleichend Talentproben von zwei Charakteren und oder Kreaturen durchzuführen gibt es den Battle Dialog. In diesem können Charaktere/Kreaturen ausgewählt werden, deren Talente ausgewählt oder eingegeben (samt Eigenschaften) werden, Erschwernisse eingetragen werden und dann geht es auch schon los.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Acknowledgments
|
|
||||||
|
|
||||||
Icon Theme of Equipment Items (e.g. Weapons, Armory, Adventuring Gear) is made by https://soda-1.itch.io/
|
|
||||||
|
|
||||||
Tanja für den UI UX Support.
|
|
||||||
|
|
||||||
|
|
|
||||||
42
glossar.json
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
"maxASP": "Gibt an um wieviel der ASP-Wert verändert wird",
|
|
||||||
"maxLEP": "Gibt an um wieviel der LEP-Wert verändert wird",
|
|
||||||
"maxAUP": "Gibt an um wieviel der AUP-Wert verändert wird",
|
|
||||||
"maxMR": "Gibt den Modifikator für die maximale basis MR an",
|
|
||||||
"regenerationASP": "Gibt an um wieviel die ASP-Regeneration verändert wird",
|
|
||||||
"regenerationLEP": "Modifikator der n#chtlichen LEP-Regeneration",
|
|
||||||
"inRollRegeneration": "Gibt an wie hoch der Bonus ist beim Wurf auf die Intuition um in der Nacht mehr ASP zu regeneireren",
|
|
||||||
"koRollRegeneration": "Gibt an wie hoch der Bonus ist beim Wurf auf die Konstitution um in der Nacht mehr LEP zu regeneireren",
|
|
||||||
"modGrosseMeditation": "Gibt die Modifikation an für den Wurf auf die große Meditation zum erhöhren des ASP-Grundwerts",
|
|
||||||
"erschoepfungBonus": "Gibt den Bonus an ab wann ein Held erschöpft ist (normal ist KO, aber mit dem Bonus eben mehr oder weniger)",
|
|
||||||
"talentBonus": "Der Bonus der für den jeweiligen Wurf auf das Talent gegeben wird",
|
|
||||||
"talente": "Eine Liste der Talente auf die der talentBonus zieht",
|
|
||||||
"attributBonus": "Der Bonus der in der jeweiligen Situation auf das Attribut gegeben wird",
|
|
||||||
"ritualBonus": "Ein Bonus der für ein spezielles Ritual gilt",
|
|
||||||
"wundschwellenModifikator": "Wert um den die Wundschwelle verändert wird",
|
|
||||||
"inBonus": "Ein Bonus der situativ für Intuition verwendet werden kann",
|
|
||||||
"geBonus": "Ein Bonus der situativ für Gewandheit verwendet werden kann",
|
|
||||||
"koBonus": "Ein Bonus der situativ für Gewandheit verwendet werden kann",
|
|
||||||
"kkBonus": "Ein Bonus der situativ für Gewandheit verwendet werden kann",
|
|
||||||
"chBonus": "Ein Bonus der situativ für Gewandheit verwendet werden kann",
|
|
||||||
"ffBonus": "Ein Bonus der situativ für Gewandheit verwendet werden kann",
|
|
||||||
"klBonus": "Ein Bonus der situativ für Gewandheit verwendet werden kann",
|
|
||||||
"muBonus": "Ein Bonus der situativ für Gewandheit verwendet werden kann",
|
|
||||||
"fkBonus": "Bonus der für Fernkampf-Proben benutzt wird",
|
|
||||||
"zauberBonus": "Bonus für Zauberproben",
|
|
||||||
"zauberPatzerMod": "Bei + benötigt man neben den zwei Zwanzigen eine 18,19 oder 20. Bei - benötigt man nicht 20-20-X sondern es reicht 19-20-X für den Patzer",
|
|
||||||
"gsMod": "Veränderung der Geschwindigkeit um x",
|
|
||||||
"ausweichMod": "Veränderung des Ausweichen-Wertes",
|
|
||||||
"beVoraussetzung": "Voraussetzung, dass eine BE kleiner sein muss als der Wert",
|
|
||||||
"eigenschaft": "Auf welche Eigenschaft bezieht es sich?",
|
|
||||||
"iniBonus": "Ein Bonus der sich auf den Initiative-Basis-Wert bezieht",
|
|
||||||
"linkhandMalus": "Ist der Bonus der benutzt wird anstelle von -6/-6 für AT und PA",
|
|
||||||
"tpKKLinkhand": "Normalerweise wird kein TPKK-Bonus für Linkhand benutzt, mit true schon",
|
|
||||||
"zusatzAktionMitLinkhand": "Eine Zusätzliche Aktion (AT oder PA) für die 'Falsche' Hand",
|
|
||||||
"sfPflicht": "Gibt an ob man die Sonderfertigkeit für das Mannöver benötigt (true) oder ob diese Optional ist und man es auch ohne, aber schwerer machen kann (false)",
|
|
||||||
"kombiSF": "Welche Sonderfertigkeiten lassen sich Kombinieren oder finden gemeinsam Anwendung",
|
|
||||||
"schadensart": "Wird die Schadensart geändert? Lethal, Ausdauer oder whatever",
|
|
||||||
"aktionsText": "Text zur nutzbaren Aktion aus WDS",
|
|
||||||
"mehrereAktionen": "Gibt an ob die Sonderfertigkeit im Kampf mehr als eine Aktion benötigt",
|
|
||||||
"nichtNutzbareWaffen": "Waffen die nicht verwendet werden dürfen für diese Sonderfertigkeit"
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
const { src, dest, series } = require('gulp');
|
||||||
|
const process = require('node:process');
|
||||||
|
const replace = require('gulp-replace');
|
||||||
|
const sass = require('gulp-sass')(require('sass'));
|
||||||
|
|
||||||
|
function buildStyles() {
|
||||||
|
return src('src/style/**/*.scss')
|
||||||
|
.pipe(sass().on('error', sass.logError))
|
||||||
|
.pipe(dest('dist/style/'))
|
||||||
|
};
|
||||||
|
|
||||||
|
function copySource() {
|
||||||
|
return src(['src/**/*', '!src/style/**/*.scss'])
|
||||||
|
.pipe(dest('dist/'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateManifestFile() {
|
||||||
|
return src('dist/system.json')
|
||||||
|
.pipe(replace('{{VERSION}}', process.env.VERSION))
|
||||||
|
.pipe(dest('dist/'))
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.default = series(
|
||||||
|
copySource,
|
||||||
|
buildStyles,
|
||||||
|
updateManifestFile
|
||||||
|
)
|
||||||
211
gulpfile.mjs
|
|
@ -1,211 +0,0 @@
|
||||||
import {dest, series, src} from 'gulp';
|
|
||||||
import gulp from 'gulp';
|
|
||||||
import process from 'node:process';
|
|
||||||
import replace from 'gulp-replace';
|
|
||||||
import jsonModify from 'gulp-json-modify';
|
|
||||||
import {subtle} from 'node:crypto';
|
|
||||||
import * as dartSass from 'sass';
|
|
||||||
import gulpSass from 'gulp-sass';
|
|
||||||
import {deleteAsync} from 'del';
|
|
||||||
import {readdirSync, readFileSync, writeFileSync, rmdirSync, existsSync, mkdirSync, statSync} from "fs";
|
|
||||||
import {join} from 'node:path';
|
|
||||||
|
|
||||||
import {compilePack} from '@foundryvtt/foundryvtt-cli';
|
|
||||||
|
|
||||||
const sass = gulpSass(dartSass)
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generate a random alphanumeric string ID of a given requested length using `crypto.getRandomValues()`.
|
|
||||||
* @param {string} reference The reference which should be used to generate a semi random ID
|
|
||||||
* @param {number} length The length of the random string to generate, which must be at most 16384.
|
|
||||||
* @returns {string} A string containing random letters (A-Z, a-z) and numbers (0-9).
|
|
||||||
*/
|
|
||||||
function randomID(reference = "", length = 16) {
|
|
||||||
const encoder = new TextEncoder()
|
|
||||||
const data = encoder.encode(reference)
|
|
||||||
return subtle.digest('SHA-256', data).then(hashBuffer => {
|
|
||||||
// Step 2: Convert the hash to a Base62 string
|
|
||||||
const base62Chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
|
||||||
const hashArray = new Uint8Array(hashBuffer)
|
|
||||||
let num = BigInt(0)
|
|
||||||
|
|
||||||
// Convert hash buffer to a BigInt
|
|
||||||
for (let byte of hashArray) {
|
|
||||||
num = (num << BigInt(8)) | BigInt(byte)
|
|
||||||
}
|
|
||||||
|
|
||||||
let base62Id = '';
|
|
||||||
while (num > 0) {
|
|
||||||
const remainder = num % BigInt(62)
|
|
||||||
base62Id = base62Chars[Number(remainder)] + base62Id
|
|
||||||
num = num / BigInt(62)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Step 3: Return the first 16 characters
|
|
||||||
return base62Id.slice(-length)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const convert = function (from, to, ofType, overwrite = true) {
|
|
||||||
const SOURCE = from;
|
|
||||||
const DEST = to;
|
|
||||||
const TYPE = ofType;
|
|
||||||
|
|
||||||
if (overwrite) {
|
|
||||||
try {
|
|
||||||
rmdirSync(DEST, {force: true, recursive: true})
|
|
||||||
} catch (e) {
|
|
||||||
}
|
|
||||||
mkdirSync(DEST)
|
|
||||||
}
|
|
||||||
|
|
||||||
let promises = []
|
|
||||||
|
|
||||||
const filewalker = async (source) => {
|
|
||||||
console.debug("entering directory", source)
|
|
||||||
for (let file of readdirSync(source)) {
|
|
||||||
if (statSync(join(source, file)).isDirectory()) {
|
|
||||||
await filewalker(join(source, file))
|
|
||||||
} else {
|
|
||||||
if (file.endsWith(".json")) {
|
|
||||||
console.debug("processing file", join(source, file))
|
|
||||||
let originalSource = JSON.parse(readFileSync(join(source, file), {encoding: "utf8"}))
|
|
||||||
promises.push(new Promise((resolve2) => {
|
|
||||||
randomID("DSA_4-1" + TYPE + originalSource.name.trim()).then(id => {
|
|
||||||
let targetSource = {
|
|
||||||
_id: id,
|
|
||||||
_key: "!items!" + id,
|
|
||||||
type: TYPE,
|
|
||||||
img: originalSource.image,
|
|
||||||
name: originalSource.name.trim(),
|
|
||||||
system: {...originalSource},
|
|
||||||
}
|
|
||||||
delete targetSource.system.image;
|
|
||||||
let target = JSON.stringify(targetSource, null, 2)
|
|
||||||
let newFileName = "./" + join(DEST, id + ".json")
|
|
||||||
if (!existsSync(join("./", DEST))) {
|
|
||||||
mkdirSync(join("./", DEST))
|
|
||||||
}
|
|
||||||
writeFileSync(newFileName, target, {encoding: "utf8"})
|
|
||||||
resolve2()
|
|
||||||
})
|
|
||||||
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
filewalker(SOURCE)
|
|
||||||
|
|
||||||
return Promise.allSettled(promises)
|
|
||||||
}
|
|
||||||
|
|
||||||
function cleanDist() {
|
|
||||||
return deleteAsync(['dist/**'])
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildStyles() {
|
|
||||||
return src('src/style/**/*.scss')
|
|
||||||
.pipe(sass().on('error', sass.logError))
|
|
||||||
.pipe(dest('dist/style/'))
|
|
||||||
}
|
|
||||||
|
|
||||||
function copySource() {
|
|
||||||
return src(['src/**/*', '!src/assets/**/*', '!src/style/**/*.scss', '!src/packs/**/*'])
|
|
||||||
.pipe(dest('dist/'));
|
|
||||||
}
|
|
||||||
|
|
||||||
function copyAssets() {
|
|
||||||
return src(['src/assets/**/*'], {encoding: false})
|
|
||||||
.pipe(dest('dist/assets/'))
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateManifestFile() {
|
|
||||||
return src('src/system.json')
|
|
||||||
.pipe(
|
|
||||||
jsonModify({
|
|
||||||
key: "version",
|
|
||||||
value: process.env.VERSION
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.pipe(
|
|
||||||
jsonModify({
|
|
||||||
key: "download",
|
|
||||||
value: "https://git.macniel.online/macniel/foundry-dsa41-game/releases/download/{{VERSION}}/release.zip".replace("{{VERSION}}", process.env.VERSION)
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.pipe(dest('src/'))
|
|
||||||
}
|
|
||||||
|
|
||||||
gulp.task('prepareDB', async function (done) {
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (!existsSync("./src/packs/__source")) {
|
|
||||||
mkdirSync("./src/packs/__source");
|
|
||||||
}
|
|
||||||
|
|
||||||
await convert("./src/packs/_source/talente", "./src/packs/__source/talente", "Skill")
|
|
||||||
await convert("./src/packs/_source/zauber-brw", "./src/packs/__source/zauber", "Spell")
|
|
||||||
await convert("./src/packs/_source/vorteile", "./src/packs/__source/vorteile", "Advantage")
|
|
||||||
await convert("./src/packs/_source/nachteile", "./src/packs/__source/vorteile", "Advantage", false)
|
|
||||||
await convert("./src/packs/_source/sonderfertigkeiten", "./src/packs/__source/sonderfertigkeiten", "SpecialAbility")
|
|
||||||
await convert("./src/packs/_source/waehrungen", "./src/packs/__source/waehrungen", "Equipment")
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Waffen", "./src/packs/__source/waffen", "Equipment")
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Munition", "./src/packs/__source/munition", "Equipment")
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Ruestzeug", "./src/packs/__source/ruestzeug", "Equipment")
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Behaelter", "./src/packs/__source/gegenstaende", "Equipment", false)
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Bekleidung", "./src/packs/__source/gegenstaende", "Equipment", false)
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Beleuchtung", "./src/packs/__source/gegenstaende", "Equipment", false)
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Buecher", "./src/packs/__source/gegenstaende", "Equipment", false)
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Essutensilien", "./src/packs/__source/gegenstaende", "Equipment", false)
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Sonstiges", "./src/packs/__source/gegenstaende", "Equipment", false)
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Werkzeug", "./src/packs/__source/gegenstaende", "Equipment", false)
|
|
||||||
await convert("./src/packs/_source/Gegenstaende/Seile", "./src/packs/__source/gegenstaende", "Equipment", false)
|
|
||||||
await convert("./src/packs/_source/liturgien-und-segnungen", "./src/packs/__source/liturgien", "Liturgy")
|
|
||||||
await convert("./src/packs/_source/wunden", "./src/packs/__source/wunden", "ActiveEffect")
|
|
||||||
|
|
||||||
await convert("./src/packs/_source/kulturen", "./src/packs/__source/kulturen", "Culture")
|
|
||||||
await convert("./src/packs/_source/spezien", "./src/packs/__source/spezien", "Species")
|
|
||||||
await convert("./src/packs/_source/professionen", "./src/packs/__source/professionen", "Profession")
|
|
||||||
done()
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
gulp.task('buildDB', function (done) {
|
|
||||||
// Determine which source folders to process
|
|
||||||
|
|
||||||
const PACK_SRC = "src/packs/__source"
|
|
||||||
const PACK_DEST = "dist/packs/"
|
|
||||||
|
|
||||||
return new Promise(async (resolve, reject) => {
|
|
||||||
const folders = readdirSync(PACK_SRC, {withFileTypes: true}).filter(file =>
|
|
||||||
file.isDirectory()
|
|
||||||
);
|
|
||||||
|
|
||||||
for (const folder of folders) {
|
|
||||||
const src = join(PACK_SRC, folder.name)
|
|
||||||
const dest = join(PACK_DEST, folder.name)
|
|
||||||
console.info(`Compiling pack ${folder.name}`)
|
|
||||||
await compilePack(src, dest, {recursive: true, nedb: false})
|
|
||||||
|
|
||||||
}
|
|
||||||
resolve()
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
export default series(
|
|
||||||
cleanDist,
|
|
||||||
updateManifestFile,
|
|
||||||
copySource,
|
|
||||||
copyAssets,
|
|
||||||
buildStyles,
|
|
||||||
gulp.task('prepareDB'),
|
|
||||||
gulp.task('buildDB')
|
|
||||||
)
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
import {cpSync, existsSync} from 'node:fs';
|
|
||||||
import {join, resolve} from 'node:path';
|
|
||||||
|
|
||||||
const MODULE_ID = process.cwd();
|
|
||||||
|
|
||||||
const SRC = join(MODULE_ID, "/dist")
|
|
||||||
const DEST = "/home/macniel/.local/share/FoundryVTT/Data/systems/DSA_4-1"
|
|
||||||
|
|
||||||
if (existsSync(SRC)) {
|
|
||||||
cpSync(SRC, resolve(DEST), {recursive: true})
|
|
||||||
console.debug(`copied ${SRC} to ${DEST}`)
|
|
||||||
} else {
|
|
||||||
console.error(`Source ${SRC} does not exists. Forgot to compile?`)
|
|
||||||
}
|
|
||||||
53
package.json
|
|
@ -1,33 +1,24 @@
|
||||||
{
|
{
|
||||||
"name": "DSA41Module",
|
"name": "DSA41Module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "Another DSA 4.1 System Module for FoundryVTT",
|
"description": "Another DSA 4.1 System Module for FoundryVTT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://git.macniel.online/macniel/foundry-dsa41-game.git"
|
"url": "git+https://git.macniel.online/macniel/foundry-dsa41-game.git"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "true",
|
"test": "true",
|
||||||
"build": "gulp",
|
"build": "gulp"
|
||||||
"localBuild": "VERSION=0.0.1 gulp",
|
},
|
||||||
"installToFoundry": "node installToFoundry.mjs"
|
"devDependencies": {
|
||||||
},
|
"gulp": "^5.0.1",
|
||||||
"devDependencies": {
|
"gulp-replace": "^1.1.4",
|
||||||
"@foundryvtt/foundryvtt-cli": "^3.0.2",
|
"gulp-sass": "^6.0.1",
|
||||||
"cb": "^0.1.1",
|
"sass": "^1.93.2",
|
||||||
"del": "^8.0.1",
|
"sass-build": "^1.1.6"
|
||||||
"fvtt-types": "npm:@league-of-foundry-developers/foundry-vtt-types@^13.346.0-beta.20250812191140",
|
},
|
||||||
"gulp": "^5.0.1",
|
"dependencies": {
|
||||||
"gulp-replace": "^1.1.4",
|
"gulp-cli": "^3.1.0"
|
||||||
"gulp-sass": "^6.0.1",
|
}
|
||||||
"merge-stream": "^2.0.0",
|
|
||||||
"nedb": "^1.8.0",
|
|
||||||
"sass": "^1.93.2",
|
|
||||||
"sass-build": "^1.1.6"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"gulp-cli": "^3.1.0",
|
|
||||||
"gulp-json-modify": "^1.0.2"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1019 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1010 B |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 770 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1002 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |