Compare commits

..

No commits in common. "10ac885cb85fb6b95f7d239f9ca2526f9356f805" and "b8fa191734fbaa90aed99d7c06a6eb247e31d713" have entirely different histories.

11 changed files with 89 additions and 380 deletions

11
.vscode/settings.json vendored
View file

@ -1,11 +0,0 @@
{
"json.schemas": [
{
"fileMatch": [
"data/spells/*.json"
],
"url": "/./.vscode/spells-schemas.json"
}
],
}

View file

@ -1,306 +0,0 @@
{
"$comment": "TODO: Subdivide the schema to have a common definition for each data (spells, books, creatures)",
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/object1678401116.json",
"title": "Root",
"type": "object",
"required": ["spell"],
"properties": {
"spell": {
"$id": "#root/spell",
"title": "Spell",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items",
"title": "Items",
"type": "object",
"required": [
"recid",
"name",
"source",
"page",
"srd",
"level",
"school",
"time",
"range",
"components",
"duration",
"desc"
],
"properties": {
"recid": {
"$id": "#root/spell/items/recid",
"title": "Recid",
"type": "integer",
"examples": [0],
"default": 0,
"description": "unique id for the spell, for localization purpose",
"uniqueItems": true,
"autoIncrement": true
},
"name": {
"$id": "#root/spell/items/name",
"title": "Name",
"type": "string",
"default": "",
"examples": ["Acid Arrow"],
"pattern": "^.*$"
},
"source": {
"$id": "#root/spell/items/source",
"title": "Source",
"description": "what's the source. Each enum is a book code",
"type": "string",
"default": "GRI01",
"enum": ["GRI01", "ENC01", "CRE01", "GRI02", "ENC02", "CRE02"],
"examples": ["GRI01"],
"pattern": "^.*$"
},
"page": {
"$id": "#root/spell/items/page",
"description": "in the book, page source",
"title": "Page",
"type": "integer",
"examples": [110],
"default": 0
},
"srd": {
"$id": "#root/spell/items/srd",
"description": "is srd or a creation",
"title": "Srd",
"type": "boolean",
"examples": [true],
"default": true
},
"level": {
"$id": "#root/spell/items/level",
"title": "Level",
"type": "integer",
"examples": [2],
"default": 0
},
"school": {
"$id": "#root/spell/items/school",
"description": " 'A' : Abjuration,'C' : Conjuration, 'D': Divination, 'E': Enchantment, 'N': Necromancy, 'T' : Transmutation, 'I' : Illusion, 'V' : Evocation",
"enum": ["A", "C", "D", "E", "I", "N", "T", "V"],
"title": "School",
"type": "string",
"examples": ["E"],
"pattern": "^.*$"
},
"time": {
"$id": "#root/spell/items/time",
"title": "Time",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/time/items",
"title": "Items",
"type": "object",
"required": ["number", "unit"],
"properties": {
"number": {
"$id": "#root/spell/items/time/items/number",
"title": "Number",
"type": "integer",
"examples": [1],
"default": 0
},
"unit": {
"$id": "#root/spell/items/time/items/unit",
"title": "Unit",
"type": "string",
"default": "",
"examples": ["action"],
"pattern": "^.*$"
}
},
"dependentRequired": {
"number": ["unit"]
}
}
},
"range": {
"$id": "#root/spell/items/range",
"title": "Range",
"type": "object",
"required": ["type", "distance"],
"properties": {
"type": {
"$id": "#root/spell/items/range/type",
"title": "Type",
"type": "string",
"default": "point",
"examples": ["point"],
"pattern": "^.*$",
"enum": ["point", "cone", "sphere", "cylinder", "special"],
"description": "point by default, but can be cone, sphere, cylinder, special "
},
"distance": {
"$id": "#root/spell/items/range/distance",
"title": "Distance",
"type": "object",
"required": ["type", "amount"],
"properties": {
"type": {
"$id": "#root/spell/items/range/distance/type",
"title": "Type",
"type": "string",
"default": "",
"examples": ["feet"],
"pattern": "^.*$"
},
"amount": {
"$id": "#root/spell/items/range/distance/amount",
"title": "Amount",
"type": "integer",
"examples": [90],
"default": 0
}
}
}
}
},
"components": {
"$id": "#root/spell/items/components",
"title": "Components",
"type": "object",
"properties": {
"v": {
"$id": "#root/spell/items/components/v",
"title": "V",
"type": "boolean",
"examples": [true],
"default": true
},
"s": {
"$id": "#root/spell/items/components/s",
"title": "S",
"type": "boolean",
"examples": [true],
"default": true
},
"m": {
"$id": "#root/spell/items/components/m",
"title": "M",
"type": "string",
"default": "",
"examples": ["powdered rhubarb leaf and an adders stomach"],
"pattern": "^.*$"
}
}
},
"duration": {
"$id": "#root/spell/items/duration",
"title": "Duration",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/duration/items",
"title": "Items",
"type": "object",
"required": ["type"],
"properties": {
"type": {
"$id": "#root/spell/items/duration/items/type",
"title": "Type",
"type": "string",
"enum": ["timed", "permanent", "special", "instant"],
"default": "",
"examples": ["instant"],
"pattern": "^.*$"
}
}
}
},
"concentration": {
"$id": "#root/spell/items/concentration",
"title": "Concentration",
"type": "boolean",
"default": false
},
"desc": {
"$id": "#root/spell/items/desc",
"title": "Desc",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/desc/items",
"title": "Items",
"type": "string",
"description": "A description for the entry. Do not copy-paste gameplay infos to prevent copyright",
"default": "",
"examples": [
"A shimmering green arrow streaks toward a target within range and bursts in a spray of acid."
],
"pattern": "^.*$"
}
},
"damageInflict": {
"$id": "#root/spell/items/damageInflict",
"title": "Damageinflict",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/damageInflict/items",
"title": "Items",
"type": "string",
"default": "",
"examples": ["acid"],
"pattern": "^.*$"
}
},
"savingThrow": {
"$id": "#root/spell/items/savingThrow",
"title": "Savingthrow",
"description": "array of saving Throw available",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/savingThrow/items",
"title": "Items",
"type": "string",
"default": "",
"enum": ["Dex", "Str", "Sag", "Cha", "Int", "Con"],
"examples": [""],
"pattern": "^.*$",
"minItems": 1,
"uniqueItems": true
}
},
"miscTags": {
"$id": "#root/spell/items/miscTags",
"title": "Misctags",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/miscTags/items",
"title": "Items",
"type": "string",
"default": "",
"examples": [""],
"pattern": "^.*$"
}
},
"areaTags": {
"$id": "#root/spell/items/areaTags",
"title": "Areatags",
"type": "array",
"default": [],
"items": {
"$id": "#root/spell/items/areaTags/items",
"title": "Items",
"type": "string",
"default": "",
"examples": [""],
"pattern": "^.*$"
}
}
}
}
}
}
}

View file

@ -1,9 +1,46 @@
# FateforgeTools #FateforgeTools
A suite of tools for Fateforge players and Masters. blabla
### Lib ### Lib
- bryntum-grid - bryntum-grid
- water.css - water.css
- data localize - data localize
- jquery - jquery
- w2ui
## Spells
### JSON structure
| field | type | value |
| ------------------------ | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id | _number_ | unique id for the spell, for localization purpose |
| name | _string_ | spell's name |
| source | _number_ | where the spell is coming from |
| page | _number_ | page source |
| srd | _boolean_ | is this a srd or a creation |
| level | _number_ | spell's level |
| school | _string_ | spell school : "A" : Abjuration,"C" : Conjuration, "D": Divination, "E": Enchantment, "N": Necromancy, "T" : Transmutation, "I" : Illusion, "V" : Evocation |
| time | _array_ | incantation time |
| time.number | _number_ | |
| time.unit | _string_ | |
| range | _module_ | |
| range.type | _string_ | point by default, but can be cone, sphere, cylinder, special |
| range.distance | _module_ | |
| range.distance.type | _string_ | feet or meter or other unit measure |
| range.distance.amount | _number_ | amount of distance in `range.distance.type` |
| components | _module_ | |
| components.v | _boolean_ | verbal component |
| components.s | _boolean_ | somatic component |
| components.m | _string_ | materials components |
| duration | _array_ | |
| duration.type | _string_ | timed, permanent, special or instant |
| duration.duration | _module_ | |
| duration.duration.type | _string_ | minute or hours |
| duration.duration.amount | _number_ | amount of `duration.duration.type` |
| concentration | _boolena_ | does spell need concentration ? |
| desc | _array_ | markdown description of the spell |
| damageInflict | _string_ | |
| conditionInflict | _string_ | |
| savingThrow | _array_ | array of string of saving Throw available |
| miscTags | _array_ | |
| | | |

View file

@ -3,7 +3,7 @@
{ {
"recid": 0, "recid": 0,
"name": "Acid Arrow", "name": "Acid Arrow",
"source": "GRI01", "source": "GRI",
"page": 110, "page": 110,
"srd": true, "srd": true,
"level": 2, "level": 2,
@ -35,13 +35,14 @@
"A shimmering green arrow streaks toward a target within range and bursts in a spray of acid." "A shimmering green arrow streaks toward a target within range and bursts in a spray of acid."
], ],
"damageInflict": ["acid"], "damageInflict": ["acid"],
"savingThrow": [""],
"miscTags": ["", ""], "miscTags": ["", ""],
"areaTags": ["", ""] "areaTags": ["", ""]
}, },
{ {
"recid": 1, "recid": 1,
"name": "Acid Blob", "name": "Acid Blob",
"source": "GRI01", "source": "GRI",
"page": 110, "page": 110,
"srd": false, "srd": false,
"level": 1, "level": 1,
@ -72,13 +73,14 @@
"A yellowish bubble shoots from your pointed finger toward a creature of your choice within range" "A yellowish bubble shoots from your pointed finger toward a creature of your choice within range"
], ],
"damageInflict": ["acid"], "damageInflict": ["acid"],
"savingThrow": [""],
"miscTags": ["", ""], "miscTags": ["", ""],
"areaTags": ["", ""] "areaTags": ["", ""]
}, },
{ {
"recid": 2, "recid": 2,
"name": "Acid Splash", "name": "Acid Splash",
"source": "GRI01", "source": "GRI",
"page": 126, "page": 126,
"srd": true, "srd": true,
"level": 1, "level": 1,
@ -109,7 +111,7 @@
"You hurl a bubble of acid. " "You hurl a bubble of acid. "
], ],
"damageInflict": ["acid"], "damageInflict": ["acid"],
"savingThrow": ["Dex"], "savingThrow": ["Dexterity"],
"miscTags": ["", ""], "miscTags": ["", ""],
"areaTags": ["", ""] "areaTags": ["", ""]
} }

View file

@ -3,7 +3,7 @@
{ {
"recid": 0, "recid": 0,
"name": "Flèche Acide", "name": "Flèche Acide",
"source": "GRI01", "source": "GRI",
"page": 188, "page": 188,
"srd": true, "srd": true,
"level": 2, "level": 2,
@ -42,7 +42,7 @@
{ {
"recid": 1, "recid": 1,
"name": "Bille Acide", "name": "Bille Acide",
"source": "GRI01", "source": "GRI",
"page": 134, "page": 134,
"srd": false, "srd": false,
"level": 1, "level": 1,
@ -80,7 +80,7 @@
{ {
"recid": 2, "recid": 2,
"name": "Aspersion acide", "name": "Aspersion acide",
"source": "GRI01", "source": "GRI",
"page": 126, "page": 126,
"srd": true, "srd": true,
"level": 1, "level": 1,

View file

@ -1,25 +0,0 @@
<small style="text-align: center;">
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/">
<a property="dct:title" rel="cc:attributionURL" href="http://fateforge.tool">fateforge.tool</a>
by <span property="cc:attributionName">Lucastucious</span> is licensed
under
<a href="http://creativecommons.org/licenses/by-nc/4.0/?ref=chooser-v1" target="_blank"
rel="license noopener noreferrer" style="display: inline-block">CC BY-NC 4.0<img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" /><img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" /><img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" /></a>
</p>
<div class="CUVD">
<p data-localize="CUVD">CUVD
<p data-localize="link"></a>
</div>
</small>

View file

@ -2,16 +2,11 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>fateforge-tools</title> <title>fateforge-tools</title>
<link rel="stylesheet" href="css/water.css" /> <link rel="stylesheet" href="css/water.css" />
<link href="css/all.min.css" rel="stylesheet" /> <link href="css/all.min.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="/img/FateforgeTool_logo_80.png"> <link rel="icon" type="image/png" href="/img/FateforgeTool_logo_80.png">
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.localize.js"></script>
</head> </head>
<body> <body>
@ -19,9 +14,7 @@
<button onclick="changeLangEN()">English</button> <button onclick="changeLangEN()">English</button>
<button onclick="changeLangFR()">French</button> <button onclick="changeLangFR()">French</button>
<a href="index.html"> <a href="index.html"><h1>FateforgeTools</h1></a>
<h1>FateforgeTools</h1>
</a>
<div data-localize="desc"> <div data-localize="desc">
A suite of tools for Fateforge players and Masters. A suite of tools for Fateforge players and Masters.
</div> </div>
@ -42,10 +35,35 @@
</button> </button>
</div> </div>
<div id="footer"></div> <footer style="text-align: center;">
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/">
<a property="dct:title" rel="cc:attributionURL" href="http://fateforge.tool">fateforge.tool</a>
by <span property="cc:attributionName">Lucas Peter</span> is licensed
under
<a href="http://creativecommons.org/licenses/by-nc/4.0/?ref=chooser-v1" target="_blank"
rel="license noopener noreferrer" style="display: inline-block">CC BY-NC 4.0<img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" /><img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" /><img style="
height: 22px !important;
margin-left: 3px;
vertical-align: text-bottom;
" src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" /></a>
</p>
<div class="CUVD">
<p data-localize="CUVD">CUVD
<p data-localize="link"></a>
</div>
</footer>
<script type="text/javascript" src="js/footer.js"></script> <script type="text/javascript" src="lib/jquery.min.js"></script>
<script async type="text/javascript" src="js/language.js"></script> <script type="text/javascript" src="lib/jquery.localize.js"></script>
<script type="text/javascript" src="js/language.js"></script>
<script rel="preload" src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script> <script rel="preload" src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>

View file

@ -1,6 +0,0 @@
$(function () {
$("#footer").load("footer.html",function (responseTxt, statusTxt, xhr) {
console.log("bla");
$("[data-localize]").localize("main", { pathPrefix: "lang" });
});
});

View file

@ -1,5 +1,4 @@
// this code localizes all elements with a "data-localize" attribute // this code localizes all elements with a "data-localize" attribute
$("[data-localize]").localize("main", { pathPrefix: "lang" }); $("[data-localize]").localize("main", { pathPrefix: "lang" });
// You can also override the language detection and specify a language code. This code defines a function that sets the language to French. // You can also override the language detection and specify a language code. This code defines a function that sets the language to French.

View file

@ -7,7 +7,7 @@
"btn-spells": "Sorts", "btn-spells": "Sorts",
"btn-monsters": "Créatures", "btn-monsters": "Créatures",
"btn-items": "Objets Magiques", "btn-items": "Objets Magiques",
"CUVD": "Site non-officiel pour Dragons. Utilise des contenus protégés par la propriété intellectuelle © Agate RPG, avec laimable permission de léditeur dans le cadre de la licence CUVD.", "CUVD": "Site non-officiel pour Dragons créé(e). Utilise des contenus protégés par la propriété intellectuelle © Agate RPG, avec laimable permission de léditeur dans le cadre de la licence CUVD.",
"link": "Rejoignez la communauté : <a href='www.dragons-rpg.com'>www.dragons-rpg.com</a>", "link": "Rejoignez la communauté : <a href='www.dragons-rpg.com'>www.dragons-rpg.com</a>",
"verbal": "Verbale", "verbal": "Verbale",
"somatic": "Gestuelle", "somatic": "Gestuelle",

View file

@ -13,8 +13,6 @@
<link rel="icon" type="image/x-icon" href="/img/FateforgeTool_logo_80.png"> <link rel="icon" type="image/x-icon" href="/img/FateforgeTool_logo_80.png">
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.localize.js"></script>
@ -34,7 +32,7 @@
<!--<div class="container" style="display: flex;flex-direction: row;flex-wrap: wrap;">--> <!--<div class="container" style="display: flex;flex-direction: row;flex-wrap: wrap;">-->
<div class="container" "> <div class="container" ">
<div class=" list-col" id="spell-list"> <div class="list-col" id="spell-list" >
<!-- FILL WITH JS--> <!-- FILL WITH JS-->
</div> </div>
@ -48,7 +46,7 @@
<div class="view-col" id="content"> <div class="view-col" id="content" >
<table id="pagecontent" class="view" style="border:solid"> <table id="pagecontent" class="view" style="border:solid">
<td class="initial-message">Select a spell from the list to view it here</td> <td class="initial-message">Select a spell from the list to view it here</td>
@ -58,7 +56,10 @@
</div> </div>
<div id="footer"></div>
<script type="text/javascript" src="lib/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery.localize-dev.js"></script>
<script type="text/javascript" src="lib/w2ui/w2ui.js"></script> <script type="text/javascript" src="lib/w2ui/w2ui.js"></script>
<script type="text/javascript" src="lib/w2ui/w2ui.es6.js"></script> <script type="text/javascript" src="lib/w2ui/w2ui.es6.js"></script>
@ -67,7 +68,7 @@
<script type="module" src="js/spells.js"></script> <script type="module" src="js/spells.js"></script>
<script type="text/javascript" src="js/footer.js"></script>
<script src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script> <script src="https://kit.fontawesome.com/126cdd0e29.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/language.js"></script> <script type="text/javascript" src="js/language.js"></script>
</body> </body>