1 Commits

Author SHA1 Message Date
Ammerhai c606172184 system.json aktualisiert 2024-09-22 15:57:10 +02:00
14 changed files with 4 additions and 429 deletions
-2
View File
@@ -1,4 +1,2 @@
# dsa-4th-edition
https://gitlab.com/foundry-vtt-dsa/dsa-4.1-core/dsa-4.1-system
-> comparison for mechanics
-73
View File
@@ -1,73 +0,0 @@
{{#*inline "editable-input"}}
<div class="editable-input editable-{{type}}">
{{#if @root.editable}}
<input type="{{type}}" name="{{name}}" value="{{value}}" placeholder="{{placeholder}}">
{{else}}
<div>
{{value}}
{{#unless value}}{{placeholder}}{{/unless}}
</div>
{{/if}}
{{#if placeholder}}
<div class="placeholder">{{placeholder}}</div>
{{/if}}
</div>
{{/inline}}
{{#*inline "die-type"}}
<div class="center die die-{{type}}">{{localize (concat "DSA41.attributes.short." type)}}</div>
{{/inline}}
{{#*inline "die-value"}}
<div class="col">
<div class="center">{{localize (concat "DSA41.attributes.short." type)}}</div>
<div class="die die-{{type}}">{{lookup @root.actor.system.computed type}}</div>
</div>
{{/inline}}
<form class="actor-sheet {{ cssClass }}" autocomplete="off">
<div class="row">
{{>editable-input type="text" name="name" value=actor.name placeholder=(localize "DSA41.name")}}
{{>editable-input type="text" name="system.race" value=actor.system.race placeholder=(localize "DSA41.race")}}
{{>editable-input type="text" name="system.culture" value=actor.system.culture placeholder=(localize "DSA41.culture")}}
{{>editable-input type="text" name="system.profession" value=actor.system.profession placeholder=(localize "DSA41.profession")}}
</div>
<div class="row">
<img class="character-image" src="{{ actor.img }}" title="{{ actor.name }}" {{#if editable}}data-edit="img"{{/if}}>
{{#each actor.system.attributes}}
{{>die-value type=@key}}
{{/each}}
</div>
<div class="row">
<fieldset>
<legend>{{localize "DSA41.attributes.label"}}</legend>
<table>
<tr>
<th></th>
{{#each actor.system.attributes}}
<th>{{localize (concat "DSA41.attributes.short." @key)}}</th>
{{/each}}
</tr>
<tr>
<td>{{localize "DSA41.attributes.initial"}}</td>
{{#each actor.system.attributes}}
<td>{{>editable-input type="number" name=(concat "system.attributes." @key ".initial") value=(lookup this "initial")}}</td>
{{/each}}
</tr>
<tr>
<td>{{localize "DSA41.attributes.advancement"}}</td>
{{#each actor.system.attributes}}
<td>{{>editable-input type="number" name=(concat "system.attributes." @key ".advancement") value=(lookup this "advancement")}}</td>
{{/each}}
</tr>
<tr>
<td>{{localize "DSA41.attributes.modifier"}}</td>
{{#each actor.system.attributes}}
<td>{{>editable-input type="number" name=(concat "system.attributes." @key ".modifier") value=(lookup this "modifier")}}</td>
{{/each}}
</tr>
</table>
</fieldset>
</div>
</form>
-15
View File
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
<g>
<path d="m11.906 20.4h40.188l-20.094 34.801z"/>
<path d="m52.635 21.059 6.5977 26.664-26.391 7.6172z"/>
<path d="m32 .55664 19.791 19.043h-39.582z"/>
<path d="m11.365 21.059 19.793 34.281-26.391-7.6172z"/>
<path d="m4.6875 16.691 6.0664 3.5039-6.0664 24.52z"/>
<path d="m29.359 1.9863-18.207 17.518-6.0664-3.5039z"/>
<path d="m34.641 1.9863 24.273 14.014-6.0664 3.5039z"/>
<path d="m59.312 16.691v28.023l-6.0664-24.52z"/>
<path d="m7.3281 49.295 24.271 7.0059v7.0078z"/>
<path d="m56.672 49.295-24.271 14.014v-7.0078z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 696 B

-11
View File
@@ -1,11 +0,0 @@
<form class="item-sheet {{ cssClass }}" autocomplete="off">
<header>
{{#if editable}}
<img src="{{ item.img }}" title="{{ item.name }}" data-edit="img">
<input name="name" type="text" value="{{ item.name }}" placeholder="Name">
{{else}}
<img src="{{ item.img }}" title="{{ item.name }}">
<div>{{ item.name }}</div>
{{/if}}
</header>
</form>
-11
View File
@@ -1,11 +0,0 @@
<form class="item-sheet {{ cssClass }}" autocomplete="off">
<header>
{{#if editable}}
<img src="{{ item.img }}" title="{{ item.name }}" data-edit="img" >
<input name="name" type="text" value="{{ item.name }}" placeholder="Name">
{{else}}
<img src="{{ item.img }}" title="{{ item.name }}">
<div>{{ item.name }}</div>
{{/if}}
</header>
</form>
-11
View File
@@ -1,11 +0,0 @@
<form class="item-sheet {{ cssClass }}" autocomplete="off">
<header>
{{#if editable}}
<img src="{{ item.img }}" title="{{ item.name }}" data-edit="img" >
<input name="name" type="text" value="{{ item.name }}" placeholder="Name">
{{else}}
<img src="{{ item.img }}" title="{{ item.name }}">
<div>{{ item.name }}</div>
{{/if}}
</header>
</form>
-11
View File
@@ -1,11 +0,0 @@
<form class="item-sheet {{ cssClass }}" autocomplete="off">
<header>
{{#if editable}}
<img src="{{ item.img }}" title="{{ item.name }}" data-edit="img" >
<input name="name" type="text" value="{{ item.name }}" placeholder="Name">
{{else}}
<img src="{{ item.img }}" title="{{ item.name }}">
<div>{{ item.name }}</div>
{{/if}}
</header>
</form>
-11
View File
@@ -1,11 +0,0 @@
<form class="item-sheet {{ cssClass }}" autocomplete="off">
<header>
{{#if editable}}
<img src="{{ item.img }}" title="{{ item.name }}" data-edit="img">
<input name="name" type="text" value="{{ item.name }}" placeholder="Name">
{{else}}
<img src="{{ item.img }}" title="{{ item.name }}">
<div>{{ item.name }}</div>
{{/if}}
</header>
</form>
-37
View File
@@ -1,37 +0,0 @@
{
"DSA41": {
"name": "Name",
"race": "Rasse",
"culture": "Kultur",
"profession": "Profession",
"attributes": {
"label": "Eigenschaften",
"initial": "Startwert",
"advancement": "Steigerungen",
"modifier": "Modifikatoren",
"long": {
"courage": "Mut",
"cleverness": "Klugheit",
"intuition": "Intuition",
"charisma": "Charisma",
"dexterity": "Fingerfertigkeit",
"agility": "Gewandheit",
"constitution": "Konstitution",
"strength": "Körperkraft"
},
"short": {
"courage": "MU",
"cleverness": "KL",
"intuition": "IN",
"charisma": "CH",
"dexterity": "FF",
"agility": "GE",
"constitution": "KO",
"strength": "KK"
}
}
}
}
-37
View File
@@ -1,37 +0,0 @@
{
"DSA41": {
"name": "Name",
"race": "Race",
"culture": "Culture",
"profession": "Profession",
"attributes": {
"label": "Attributes",
"initial": "Initial",
"advancement": "Advancements",
"modifier": "Modifiers",
"long": {
"courage": "Courage",
"cleverness": "Cleverness",
"intuition": "Intuition",
"charisma": "Charisma",
"dexterity": "Dexterity",
"agility": "Agility",
"constitution": "Constitution",
"strength": "Strength"
},
"short": {
"courage": "CO",
"cleverness": "CL",
"intuition": "IN",
"charisma": "CH",
"dexterity": "DE",
"agility": "AG",
"constitution": "CN",
"strength": "ST"
}
}
}
}
-98
View File
@@ -1,98 +0,0 @@
.row {
display: flex;
flex-direction: row;
}
.col {
display: flex;
flex-direction: column;
}
.wrap {
flex-wrap: wrap;
}
.center {
text-align: center;
}
.editable-input {
flex: 1;
padding: 0px 3px;
}
.editable-input input {
border: none;
}
.editable-number {
text-align: center;
}
.placeholder {
font-size: 0.8em;
border-top: 1px solid;
}
.character-image {
width: 115px;
height: 115px;
}
.die {
width: 48px;
height: 48px;
line-height: 48px;
background-color: #000;
mask-image: url("../src/Assets/d20.svg");
mask-size: contain;
text-align: center;
color: #fff;
}
.die-courage { background-color: #b22319; }
.die-cleverness { background-color: #8158a3; }
.die-intuition { background-color: #388834; }
.die-charisma { background-color: #0c0c0c; }
.die-dexterity { background-color: #d4b366; }
.die-agility { background-color: #678ec3; }
.die-constitution { background-color: #a3a3a3; }
.die-strength { background-color: #d5a877; }
.actor-sheet fieldset {
width: 100%;
}
.actor-sheet table {
border: none;
background: none;
table-layout: fixed;
}
.item-sheet header {
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-items: center;
}
.item-sheet header img {
flex: 0 0 64px;
height: 64px;
margin-right: 6px;
}
.item-sheet header input,
.item-sheet header div {
flex: 1;
height: 48px;
line-height: 48px;
margin: 8px;
font-size: 2em;
}
-79
View File
@@ -1,79 +0,0 @@
Hooks.once("init", function() {
console.log("INIT");
CONFIG.Actor.dataModels.Player = DSA41_CharacterData;
//DocumentSheetConfig.unregisterSheet(Actor, "core", ActorSheet);
DocumentSheetConfig.registerSheet(Actor, "dsa41", DSA41_ActorSheet, {
makeDefault: true,
types: [
"Player",
]
});
//DocumentSheetConfig.unregisterSheet(Item, "core", ItemSheet);
DocumentSheetConfig.registerSheet(Item, "dsa41", DSA41_ItemSheet, {
makeDefault: true,
types: [
"Generic Item",
"Melee Weapon",
"Ranged Weapon",
"Armor",
"Shield",
]
});
});
const { SchemaField, NumberField, StringField } = foundry.data.fields;
class AttributeField extends foundry.data.fields.SchemaField {
constructor() {
return super({
initial: new NumberField({ integer: true, initial: 8, min: 8, max: 14, }),
advancement: new NumberField({ integer: true, initial: 0, min: 0, max: 4, }),
modifier: new NumberField({ integer: true, initial: 0, min: 0, }),
});
}
}
class DSA41_CharacterData extends foundry.abstract.TypeDataModel {
static defineSchema() {
return {
race: new StringField(),
culture: new StringField(),
profession: new StringField(),
attributes: new SchemaField({
courage: new AttributeField(),
cleverness: new AttributeField(),
intuition: new AttributeField(),
charisma: new AttributeField(),
dexterity: new AttributeField(),
agility: new AttributeField(),
constitution: new AttributeField(),
strength: new AttributeField(),
}),
}
}
prepareDerivedData() {
super.prepareDerivedData();
this.computed = {};
for (const [attribute, values] of Object.entries(this.attributes)) {
this.computed[attribute] = Object.values(values).reduce((a, b) => a + b, 0);
}
}
}
class DSA41_ActorSheet extends ActorSheet {
get template() {
return "systems/dsa-4th-edition/src/ActorSheet.html";
}
}
class DSA41_ItemSheet extends ItemSheet {
get template() {
return "systems/dsa-4th-edition/src/ItemSheets/" + this.item.type + ".html";
}
}
+3 -19
View File
@@ -2,23 +2,7 @@
"id": "dsa-4th-edition",
"title": "Custom Das Schwarze Auge 4.1",
"description": "",
"esmodules": ["src/main.mjs"],
"styles": ["src/main.css"],
"languages": [
{
"lang": "de",
"name": "German (Deutsch)",
"path": "src/lang/de.json"
},
{
"lang": "en",
"name": "English",
"path": "src/lang/en.json"
}
],
"version": "0.1.5",
"version": "0.1.1",
"manifest": "https://gitea.ammerhai.com/foundry/dsa-4th-edition/releases/download/latest/system.json",
"download": "https://gitea.ammerhai.com/foundry/dsa-4th-edition/releases/download/test2/dsa-4th-edition.zip"
}
"download": "https://gitea.ammerhai.com/foundry/dsa-4th-edition/releases/download/latest/dsa-4th-edition.zip"
}
+1 -14
View File
@@ -1,16 +1,3 @@
{
"Actor": {
"types": [
"Player"
]
},
"Item": {
"types": [
"Generic Item",
"Melee Weapon",
"Ranged Weapon",
"Armor",
"Shield"
]
}
}