Compare commits

...

21 Commits
alpha ... main

Author SHA1 Message Date
Frédéric CAMPO f03d350768
Last bugfix for tonight we allow fvtt to remember character sheets
Signed-off-by: Frédéric CAMPO <frederic@campo.email>
2022-05-27 04:33:48 +02:00
Frédéric CAMPO 4df687637a
Update bug on chance and add new attribute to input name
Signed-off-by: Frédéric CAMPO <frederic@campo.email>
2022-05-27 04:27:27 +02:00
Frédéric CAMPO c5f752331a
Character sheet update
Signed-off-by: Frédéric CAMPO <frederic@campo.email>
2022-05-27 04:22:01 +02:00
Frédéric CAMPO b3e7085f93
On test l'ajout d'un champ et d'un onglet
Signed-off-by: Frédéric CAMPO <frederic@campo.email>
2022-05-26 23:10:15 +02:00
Frédéric CAMPO ed945f1311
On corrige une erreur de placement dans les div
Signed-off-by: Frédéric CAMPO <frederic@campo.email>
2022-05-26 22:56:14 +02:00
Frédéric CAMPO 794d62f48b
Test rajout de tab dans la fiche actor
Signed-off-by: Frédéric CAMPO <frederic@campo.email>
2022-05-26 22:51:53 +02:00
Frédéric CAMPO dcaaa4206a
Changement de mirroir pour le module Ravenous 2022-05-26 21:56:39 +02:00
Frédéric CAMPO 93e2702915
Gitea, ca marche 2022-05-26 21:52:17 +02:00
Frédéric CAMPO 81ba365c57 Mise à jour de 'TODO.md' 2022-05-26 21:51:01 +02:00
Maximilien Rigaut 7ffdaa2c4c Test 2022-05-26 21:42:42 +02:00
Maximilien Rigaut 51b349e625
Update system.json 2022-05-26 21:20:56 +02:00
Maximilien Rigaut 06c7cdc9c0 Hard Refactor 2022-05-26 21:19:50 +02:00
Maximilien Rigaut 0cb17abdd6 Hard Refactor 2022-05-26 21:12:05 +02:00
Maximilien Rigaut aa141a36e5 Hard Refactor 2022-05-26 21:09:13 +02:00
Maximilien Rigaut 8fccdd9f10 Hard Refactor 2022-05-26 21:04:29 +02:00
Maximilien Rigaut f4a6c3e835 Added a TODO 2022-05-19 23:38:22 +02:00
Maximilien Rigaut a5c611f1f8
Update system.json 2022-05-19 21:18:35 +02:00
Maximilien Rigaut a8f400e090
Update system.json 2022-05-19 21:14:07 +02:00
Maximilien Rigaut 1decf3aa34
Update system.json 2022-05-19 21:02:25 +02:00
Maximilien Rigaut c9abbb1c90
Update system.json 2022-05-19 20:42:40 +02:00
Maximilien Rigaut 7b746c6bee
Update system.json 2022-05-19 20:41:20 +02:00
18 changed files with 183 additions and 132 deletions

View File

@ -1,2 +1,3 @@
# Ravenous RPG system for Foundry Virtual Tabletop # Ravenous RPG system for Foundry Virtual Tabletop
--------------------- ---------------------
test

9
TODO.md Normal file
View File

@ -0,0 +1,9 @@
# List of tasks at hand
* Designer une feuille de perso
* Reverse engineer la facon d'utiliser le meta langage de FVTT ou lire la doc, si on est faible
* Implementer la feuille en html
* Implementer les jets de des
* Implementer les items
* Implementer la liste d'items (modules?)
* Implementer les metiers
* Implemnter les classes et listes de compétences (modules ?)

View File

@ -10,8 +10,8 @@ export class SimpleActorSheet extends ActorSheet {
/** @inheritdoc */ /** @inheritdoc */
static get defaultOptions() { static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, { return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["worldbuilding", "sheet", "actor"], classes: ["vtt_sys_ravenous", "sheet", "actor"],
template: "systems/worldbuilding/templates/actor-sheet.html", template: "systems/vtt_sys_ravenous/templates/actor-sheet.html",
width: 600, width: 600,
height: 600, height: 600,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}], tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}],
@ -26,7 +26,7 @@ export class SimpleActorSheet extends ActorSheet {
getData() { getData() {
const context = super.getData(); const context = super.getData();
EntitySheetHelper.getAttributeData(context.data); EntitySheetHelper.getAttributeData(context.data);
context.shorthand = !!game.settings.get("worldbuilding", "macroShorthand"); context.shorthand = !!game.settings.get("vtt_sys_ravenous", "macroShorthand");
context.systemData = context.data.data; context.systemData = context.data.data;
context.dtypes = ATTRIBUTE_TYPES; context.dtypes = ATTRIBUTE_TYPES;
return context; return context;

View File

@ -28,7 +28,7 @@ export class SimpleActor extends Actor {
* @type {boolean} * @type {boolean}
*/ */
get isTemplate() { get isTemplate() {
return !!this.getFlag("worldbuilding", "isTemplate"); return !!this.getFlag("vtt_sys_ravenous", "isTemplate");
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -40,7 +40,7 @@ export class SimpleActor extends Actor {
// Copy the actor's system data // Copy the actor's system data
const data = this.toObject(false).data; const data = this.toObject(false).data;
const shorthand = game.settings.get("worldbuilding", "macroShorthand"); const shorthand = game.settings.get("vtt_sys_ravenous", "macroShorthand");
const formulaAttributes = []; const formulaAttributes = [];
const itemAttributes = []; const itemAttributes = [];

View File

@ -173,7 +173,7 @@ export class EntitySheetHelper {
const button = event.currentTarget; const button = event.currentTarget;
const label = button.closest(".attribute").querySelector(".attribute-label")?.value; const label = button.closest(".attribute").querySelector(".attribute-label")?.value;
const chatLabel = label ?? button.parentElement.querySelector(".attribute-key").value; const chatLabel = label ?? button.parentElement.querySelector(".attribute-key").value;
const shorthand = game.settings.get("worldbuilding", "macroShorthand"); const shorthand = game.settings.get("vtt_sys_ravenous", "macroShorthand");
// Use the actor for rollData so that formulas are always in reference to the parent actor. // Use the actor for rollData so that formulas are always in reference to the parent actor.
const rollData = this.actor.getRollData(); const rollData = this.actor.getRollData();
@ -537,7 +537,7 @@ export class EntitySheetHelper {
// Identify the template Actor types // Identify the template Actor types
const collection = game.collections.get(this.documentName); const collection = game.collections.get(this.documentName);
const templates = collection.filter(a => a.getFlag("worldbuilding", "isTemplate")); const templates = collection.filter(a => a.getFlag("vtt_sys_ravenous", "isTemplate"));
const defaultType = this.metadata.types[0]; const defaultType = this.metadata.types[0];
const types = { const types = {
[defaultType]: game.i18n.localize("SIMPLE.NoTemplate") [defaultType]: game.i18n.localize("SIMPLE.NoTemplate")
@ -547,7 +547,7 @@ export class EntitySheetHelper {
} }
// Render the document creation form // Render the document creation form
const useEntity = game.worldbuilding.useEntity; const useEntity = game.vtt_sys_ravenous.useEntity;
const template = `templates/sidebar/${useEntity ? "entity" : "document" }-create.html`; const template = `templates/sidebar/${useEntity ? "entity" : "document" }-create.html`;
const html = await renderTemplate(template, { const html = await renderTemplate(template, {
name: data.name || game.i18n.format("DOCUMENT.New", {type: label}), name: data.name || game.i18n.format("DOCUMENT.New", {type: label}),
@ -576,7 +576,7 @@ export class EntitySheetHelper {
if ( template ) { if ( template ) {
createData = foundry.utils.mergeObject(template.toObject(), createData); createData = foundry.utils.mergeObject(template.toObject(), createData);
createData.type = template.data.type; createData.type = template.data.type;
delete createData.flags.worldbuilding.isTemplate; delete createData.flags.vtt_sys_ravenous.isTemplate;
} }
// Merge provided override data // Merge provided override data

View File

@ -10,8 +10,8 @@ export class SimpleItemSheet extends ItemSheet {
/** @inheritdoc */ /** @inheritdoc */
static get defaultOptions() { static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, { return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["worldbuilding", "sheet", "item"], classes: ["vtt_sys_ravenous", "sheet", "item"],
template: "systems/worldbuilding/templates/item-sheet.html", template: "systems/vtt_sys_ravenous/templates/item-sheet.html",
width: 520, width: 520,
height: 480, height: 480,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}], tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}],

View File

@ -28,6 +28,6 @@ export class SimpleItem extends Item {
* @type {boolean} * @type {boolean}
*/ */
get isTemplate() { get isTemplate() {
return !!this.getFlag("worldbuilding", "isTemplate"); return !!this.getFlag("vtt_sys_ravenous", "isTemplate");
} }
} }

View File

@ -1,11 +1,11 @@
/** /**
* Create a Macro from an attribute drop. * Create a Macro from an attribute drop.
* Get an existing worldbuilding macro if one exists, otherwise create a new one. * Get an existing vtt_sys_ravenous macro if one exists, otherwise create a new one.
* @param {Object} data The dropped data * @param {Object} data The dropped data
* @param {number} slot The hotbar slot to use * @param {number} slot The hotbar slot to use
* @returns {Promise} * @returns {Promise}
*/ */
export async function createWorldbuildingMacro(data, slot) { export async function createvtt_sys_ravenousMacro(data, slot) {
if ( !data.roll || !data.label ) return false; if ( !data.roll || !data.label ) return false;
const command = `const roll = new Roll("${data.roll}", actor ? actor.getRollData() : {}); const command = `const roll = new Roll("${data.roll}", actor ? actor.getRollData() : {});
roll.toMessage({speaker, flavor: "${data.label}"});`; roll.toMessage({speaker, flavor: "${data.label}"});`;
@ -15,7 +15,7 @@ export async function createWorldbuildingMacro(data, slot) {
name: data.label, name: data.label,
type: "script", type: "script",
command: command, command: command,
flags: { "worldbuilding.attrMacro": true } flags: { "vtt_sys_ravenous.attrMacro": true }
}); });
} }
game.user.assignHotbarMacro(macro, slot); game.user.assignHotbarMacro(macro, slot);

View File

@ -9,7 +9,7 @@ import { SimpleItem } from "./item.js";
import { SimpleItemSheet } from "./item-sheet.js"; import { SimpleItemSheet } from "./item-sheet.js";
import { SimpleActorSheet } from "./actor-sheet.js"; import { SimpleActorSheet } from "./actor-sheet.js";
import { preloadHandlebarsTemplates } from "./templates.js"; import { preloadHandlebarsTemplates } from "./templates.js";
import { createWorldbuildingMacro } from "./macro.js"; import { createvtt_sys_ravenousMacro } from "./macro.js";
import { SimpleToken, SimpleTokenDocument } from "./token.js"; import { SimpleToken, SimpleTokenDocument } from "./token.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -20,7 +20,7 @@ import { SimpleToken, SimpleTokenDocument } from "./token.js";
* Init hook. * Init hook.
*/ */
Hooks.once("init", async function() { Hooks.once("init", async function() {
console.log(`Initializing Simple Worldbuilding System`); console.log(`Initializing Simple vtt_sys_ravenous System`);
/** /**
* Set an initiative formula for the system. This will be updated later. * Set an initiative formula for the system. This will be updated later.
@ -31,9 +31,9 @@ Hooks.once("init", async function() {
decimals: 2 decimals: 2
}; };
game.worldbuilding = { game.vtt_sys_ravenous = {
SimpleActor, SimpleActor,
createWorldbuildingMacro, createvtt_sys_ravenousMacro,
useEntity: foundry.utils.isNewerVersion("9", game.version ?? game.data.version) useEntity: foundry.utils.isNewerVersion("9", game.version ?? game.data.version)
}; };
@ -45,12 +45,12 @@ Hooks.once("init", async function() {
// Register sheet application classes // Register sheet application classes
Actors.unregisterSheet("core", ActorSheet); Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("worldbuilding", SimpleActorSheet, { makeDefault: true }); Actors.registerSheet("vtt_sys_ravenous", SimpleActorSheet, { makeDefault: true });
Items.unregisterSheet("core", ItemSheet); Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("worldbuilding", SimpleItemSheet, { makeDefault: true }); Items.registerSheet("vtt_sys_ravenous", SimpleItemSheet, { makeDefault: true });
// Register system settings // Register system settings
game.settings.register("worldbuilding", "macroShorthand", { game.settings.register("vtt_sys_ravenous", "macroShorthand", {
name: "SETTINGS.SimpleMacroShorthandN", name: "SETTINGS.SimpleMacroShorthandN",
hint: "SETTINGS.SimpleMacroShorthandL", hint: "SETTINGS.SimpleMacroShorthandL",
scope: "world", scope: "world",
@ -60,7 +60,7 @@ Hooks.once("init", async function() {
}); });
// Register initiative setting. // Register initiative setting.
game.settings.register("worldbuilding", "initFormula", { game.settings.register("vtt_sys_ravenous", "initFormula", {
name: "SETTINGS.SimpleInitFormulaN", name: "SETTINGS.SimpleInitFormulaN",
hint: "SETTINGS.SimpleInitFormulaL", hint: "SETTINGS.SimpleInitFormulaL",
scope: "world", scope: "world",
@ -71,7 +71,7 @@ Hooks.once("init", async function() {
}); });
// Retrieve and assign the initiative formula setting. // Retrieve and assign the initiative formula setting.
const initFormula = game.settings.get("worldbuilding", "initFormula"); const initFormula = game.settings.get("vtt_sys_ravenous", "initFormula");
_simpleUpdateInit(initFormula); _simpleUpdateInit(initFormula);
/** /**
@ -102,13 +102,13 @@ Hooks.once("init", async function() {
/** /**
* Macrobar hook. * Macrobar hook.
*/ */
Hooks.on("hotbarDrop", (bar, data, slot) => createWorldbuildingMacro(data, slot)); Hooks.on("hotbarDrop", (bar, data, slot) => createvtt_sys_ravenousMacro(data, slot));
/** /**
* Adds the actor template context menu. * Adds the actor template context menu.
*/ */
Hooks.on("getActorDirectoryEntryContext", (html, options) => { Hooks.on("getActorDirectoryEntryContext", (html, options) => {
const idAttr = game.worldbuilding.useEntity ? "entityId" : "documentId"; const idAttr = game.vtt_sys_ravenous.useEntity ? "entityId" : "documentId";
// Define an actor as a template. // Define an actor as a template.
options.push({ options.push({
name: game.i18n.localize("SIMPLE.DefineTemplate"), name: game.i18n.localize("SIMPLE.DefineTemplate"),
@ -119,7 +119,7 @@ Hooks.on("getActorDirectoryEntryContext", (html, options) => {
}, },
callback: li => { callback: li => {
const actor = game.actors.get(li.data(idAttr)); const actor = game.actors.get(li.data(idAttr));
actor.setFlag("worldbuilding", "isTemplate", true); actor.setFlag("vtt_sys_ravenous", "isTemplate", true);
} }
}); });
@ -133,7 +133,7 @@ Hooks.on("getActorDirectoryEntryContext", (html, options) => {
}, },
callback: li => { callback: li => {
const actor = game.actors.get(li.data(idAttr)); const actor = game.actors.get(li.data(idAttr));
actor.setFlag("worldbuilding", "isTemplate", false); actor.setFlag("vtt_sys_ravenous", "isTemplate", false);
} }
}); });
}); });
@ -142,7 +142,7 @@ Hooks.on("getActorDirectoryEntryContext", (html, options) => {
* Adds the item template context menu. * Adds the item template context menu.
*/ */
Hooks.on("getItemDirectoryEntryContext", (html, options) => { Hooks.on("getItemDirectoryEntryContext", (html, options) => {
const idAttr = game.worldbuilding.useEntity ? "entityId" : "documentId"; const idAttr = game.vtt_sys_ravenous.useEntity ? "entityId" : "documentId";
// Define an item as a template. // Define an item as a template.
options.push({ options.push({
name: game.i18n.localize("SIMPLE.DefineTemplate"), name: game.i18n.localize("SIMPLE.DefineTemplate"),
@ -153,7 +153,7 @@ Hooks.on("getItemDirectoryEntryContext", (html, options) => {
}, },
callback: li => { callback: li => {
const item = game.items.get(li.data(idAttr)); const item = game.items.get(li.data(idAttr));
item.setFlag("worldbuilding", "isTemplate", true); item.setFlag("vtt_sys_ravenous", "isTemplate", true);
} }
}); });
@ -167,7 +167,7 @@ Hooks.on("getItemDirectoryEntryContext", (html, options) => {
}, },
callback: li => { callback: li => {
const item = game.items.get(li.data(idAttr)); const item = game.items.get(li.data(idAttr));
item.setFlag("worldbuilding", "isTemplate", false); item.setFlag("vtt_sys_ravenous", "isTemplate", false);
} }
}); });
}); });

View File

@ -8,8 +8,8 @@ export const preloadHandlebarsTemplates = async function() {
// Define template paths to load // Define template paths to load
const templatePaths = [ const templatePaths = [
// Attribute list partial. // Attribute list partial.
"systems/worldbuilding/templates/parts/sheet-attributes.html", "systems/vtt_sys_ravenous/templates/parts/sheet-attributes.html",
"systems/worldbuilding/templates/parts/sheet-groups.html" "systems/vtt_sys_ravenous/templates/parts/sheet-groups.html"
]; ];
// Load the template parts // Load the template parts

View File

@ -1,7 +1,7 @@
{ {
"name": "worldbuilding", "name": "vtt_sys_ravenous",
"version": "1.0.0", "version": "1.0.0",
"description": "CSS compiler for the Worldbuilding system", "description": "CSS compiler for the vtt_sys_ravenous system",
"scripts": { "scripts": {
"css": "gulp css", "css": "gulp css",
"watch": "gulp", "watch": "gulp",

View File

@ -1,18 +1,18 @@
.worldbuilding { .vtt_sys_ravenous {
/* Sheet Tabs */ /* Sheet Tabs */
/* Items List */ /* Items List */
/* Attributes */ /* Attributes */
} }
.worldbuilding .window-content { .vtt_sys_ravenous .window-content {
height: 100%; height: 100%;
padding: 5px; padding: 5px;
overflow-y: hidden; overflow-y: hidden;
} }
.worldbuilding form { .vtt_sys_ravenous form {
height: 100%; height: 100%;
} }
.worldbuilding .sheet-header { .vtt_sys_ravenous .sheet-header {
flex: 0 0 100px; flex: 0 0 auto;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -20,85 +20,94 @@
justify-content: flex-start; justify-content: flex-start;
margin-bottom: 10px; margin-bottom: 10px;
} }
.worldbuilding .sheet-header .profile-img { .vtt_sys_ravenous .sheet-header .header-container {
flex: 0 0 100px; display: grid;
height: 100px; grid-template: "a a a" auto "b c d" auto / fit-content(100%) auto auto;
}
.vtt_sys_ravenous .sheet-header .header-container .pc-name {
width: 160px;
margin-right: 10px; margin-right: 10px;
} }
.worldbuilding .sheet-header .header-fields {
flex: 1; .vtt_sys_ravenous .sheet-header .header-container .caracs {
height: 100px; display: grid;
grid-area: b;
grid-template: "a a a a" "b b c c" "d d e e" "f f g g" "h h i i" / 30px 50px 30px 50px;
} }
.worldbuilding .sheet-header h1.charname {
height: 50px; .vtt_sys_ravenous .sheet-header .header-container .caracs .caracs-header {
padding: 0px; grid-area: a;
margin: 5px 0; align-self: center;
border-bottom: 0; justify-self: center;
text-decoration: underline;
} }
.worldbuilding .sheet-header h1.charname input { .vtt_sys_ravenous .sheet-header .header-container .caracs input {
width: 100%; width: 35px;
height: 100%;
margin: 0;
} }
.worldbuilding .resource {
.vtt_sys_ravenous .sheet-header .header-container .caracs label {
}
.vtt_sys_ravenous .resource {
width: 50%; width: 50%;
height: 40px; height: 40px;
margin-top: 10px; margin-top: 10px;
float: left; float: left;
text-align: center; text-align: center;
} }
.worldbuilding .resource input { .vtt_sys_ravenous .resource input {
width: 100px; width: 100px;
height: 28px; height: 28px;
} }
.worldbuilding .tabs { .vtt_sys_ravenous .tabs {
flex: 0 0 40px; flex: 0 0 40px;
border-top: 1px solid #AAA; border-top: 1px solid #AAA;
border-bottom: 1px solid #AAA; border-bottom: 1px solid #AAA;
} }
.worldbuilding .tabs .item { .vtt_sys_ravenous .tabs .item {
line-height: 40px; line-height: 40px;
font-weight: bold; font-weight: bold;
} }
.worldbuilding .tabs .item.active { .vtt_sys_ravenous .tabs .item.active {
text-decoration: underline; text-decoration: underline;
text-shadow: none; text-shadow: none;
} }
.worldbuilding .sheet-body { .vtt_sys_ravenous .sheet-body {
overflow: hidden; overflow: hidden;
} }
.worldbuilding .sheet-body .tab { .vtt_sys_ravenous .sheet-body .tab {
height: 100%; height: 100%;
overflow-y: auto; overflow-y: auto;
} }
.worldbuilding .editor, .vtt_sys_ravenous .editor,
.worldbuilding .editor-content { .vtt_sys_ravenous .editor-content {
height: 100%; height: 100%;
} }
.worldbuilding .item-list { .vtt_sys_ravenous .item-list {
list-style: none; list-style: none;
margin: 7px 0; margin: 7px 0;
padding: 0; padding: 0;
overflow-y: auto; overflow-y: auto;
} }
.worldbuilding .item-list .item { .vtt_sys_ravenous .item-list .item {
min-height: 30px; min-height: 30px;
line-height: 24px; line-height: 24px;
padding: 3px 0; padding: 3px 0;
border-bottom: 1px solid #BBB; border-bottom: 1px solid #BBB;
align-items: stretch; align-items: stretch;
} }
.worldbuilding .item-list .item img { .vtt_sys_ravenous .item-list .item img {
flex: 0 0 24px; flex: 0 0 24px;
margin-right: 5px; margin-right: 5px;
} }
.worldbuilding .item-list .item-name { .vtt_sys_ravenous .item-list .item-name {
margin: 0; margin: 0;
} }
.worldbuilding .item-list .item-controls { .vtt_sys_ravenous .item-list .item-controls {
flex: 0 0 36px; flex: 0 0 36px;
} }
.worldbuilding .item-list .item-buttons { .vtt_sys_ravenous .item-list .item-buttons {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
flex-direction: row; flex-direction: row;
@ -106,23 +115,23 @@
flex: 2; flex: 2;
justify-content: flex-start; justify-content: flex-start;
} }
.worldbuilding .item-list .item-button { .vtt_sys_ravenous .item-list .item-button {
line-height: 1; line-height: 1;
font-size: 11px; font-size: 11px;
flex: none; flex: none;
width: auto; width: auto;
} }
.worldbuilding .attributes { .vtt_sys_ravenous .attributes {
position: relative; position: relative;
} }
.worldbuilding .attributes .attribute-control, .vtt_sys_ravenous .attributes .attribute-control,
.worldbuilding .attributes .group-control { .vtt_sys_ravenous .attributes .group-control {
flex: 0 0 20px; flex: 0 0 20px;
text-align: center; text-align: center;
line-height: 28px; line-height: 28px;
border: none; border: none;
} }
.worldbuilding .attributes .attribute-roll { .vtt_sys_ravenous .attributes .attribute-roll {
flex: 0 0 20px; flex: 0 0 20px;
text-align: center; text-align: center;
border-bottom: none; border-bottom: none;
@ -130,11 +139,11 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.worldbuilding .attributes .group-prefix { .vtt_sys_ravenous .attributes .group-prefix {
height: 31px; height: 31px;
margin-right: 10px; margin-right: 10px;
} }
.worldbuilding .attributes .button { .vtt_sys_ravenous .attributes .button {
width: 100%; width: 100%;
flex: 1; flex: 1;
margin: 0; margin: 0;
@ -145,11 +154,11 @@
line-height: 28px; line-height: 28px;
display: block; display: block;
} }
.worldbuilding .attributes .attribute-key { .vtt_sys_ravenous .attributes .attribute-key {
background: transparent; background: transparent;
border: none; border: none;
} }
.worldbuilding .attributes-header { .vtt_sys_ravenous .attributes-header {
position: sticky; position: sticky;
top: 0; top: 0;
left: 0; left: 0;
@ -162,12 +171,12 @@
text-align: left; text-align: left;
font-weight: bold; font-weight: bold;
} }
.worldbuilding .attributes-list { .vtt_sys_ravenous .attributes-list {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.worldbuilding .attributes-list li > * { .vtt_sys_ravenous .attributes-list li > * {
margin: 0 3px; margin: 0 3px;
height: 28px; height: 28px;
line-height: 24px; line-height: 24px;
@ -176,47 +185,47 @@
border-radius: 0; border-radius: 0;
border-bottom: 1px solid #AAA; border-bottom: 1px solid #AAA;
} }
.worldbuilding .attributes-list .attribute-col label { .vtt_sys_ravenous .attributes-list .attribute-col label {
font-size: 10px; font-size: 10px;
text-align: center; text-align: center;
line-height: 1; line-height: 1;
} }
.worldbuilding .attributes-list .attribute-col input { .vtt_sys_ravenous .attributes-list .attribute-col input {
font-size: 11px; font-size: 11px;
text-align: center; text-align: center;
line-height: 1; line-height: 1;
height: 50%; height: 50%;
} }
.worldbuilding .attribute input[type="text"]::placeholder, .vtt_sys_ravenous .attribute input[type="text"]::placeholder,
.worldbuilding .group-header input[type="text"]::placeholder { .vtt_sys_ravenous .group-header input[type="text"]::placeholder {
opacity: 0; opacity: 0;
transition: opacity 0.25s ease-in-out; transition: opacity 0.25s ease-in-out;
} }
.worldbuilding .attribute input[type="text"]:focus::placeholder, .vtt_sys_ravenous .attribute input[type="text"]:focus::placeholder,
.worldbuilding .group-header input[type="text"]:focus::placeholder { .vtt_sys_ravenous .group-header input[type="text"]:focus::placeholder {
opacity: 1; opacity: 1;
} }
.worldbuilding .group-controls { .vtt_sys_ravenous .group-controls {
margin: 5px; margin: 5px;
} }
.worldbuilding .groups-list { .vtt_sys_ravenous .groups-list {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.worldbuilding .group { .vtt_sys_ravenous .group {
margin: 5px 0 0; margin: 5px 0 0;
padding: 0; padding: 0;
} }
.worldbuilding .group-header { .vtt_sys_ravenous .group-header {
align-items: center; align-items: center;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
border: 1px solid #AAA; border: 1px solid #AAA;
border-radius: 2px; border-radius: 2px;
padding: 2px 5px; padding: 2px 5px;
} }
.worldbuilding .group-key, .vtt_sys_ravenous .group-key,
.worldbuilding .group-label { .vtt_sys_ravenous .group-label {
font-weight: bold; font-weight: bold;
border: none; border: none;
border-bottom: 1px solid #AAA; border-bottom: 1px solid #AAA;
@ -224,22 +233,22 @@
border-radius: 0; border-radius: 0;
margin-right: 6px; margin-right: 6px;
} }
.worldbuilding .group-key { .vtt_sys_ravenous .group-key {
opacity: 0.75; opacity: 0.75;
} }
.worldbuilding .group-label { .vtt_sys_ravenous .group-label {
flex: 2; flex: 2;
} }
.worldbuilding .group-dtype { .vtt_sys_ravenous .group-dtype {
height: 24px; height: 24px;
flex: 0 0 116px; flex: 0 0 116px;
margin: 0 5px; margin: 0 5px;
} }
.worldbuilding.sheet.actor { .vtt_sys_ravenous.sheet.actor {
min-width: 560px; min-width: 560px;
min-height: 420px; min-height: 420px;
} }
.worldbuilding.sheet.item { .vtt_sys_ravenous.sheet.item {
min-width: 460px; min-width: 460px;
min-height: 400px; min-height: 400px;
} }

View File

@ -1,4 +1,4 @@
.worldbuilding { .vtt_sys_ravenous {
.window-content { .window-content {
height: 100%; height: 100%;
padding: 5px; padding: 5px;
@ -279,13 +279,13 @@
} }
} }
.worldbuilding.sheet.actor { .vtt_sys_ravenous.sheet.actor {
min-width: 560px; min-width: 560px;
min-height: 420px; min-height: 420px;
} }
.worldbuilding.sheet.item { .vtt_sys_ravenous.sheet.item {
min-width: 460px; min-width: 460px;
min-height: 400px; min-height: 400px;
} }

View File

@ -1,11 +1,11 @@
{ {
"name": "worldbuilding", "name": "vtt_sys_ravenous",
"title": "Simple World-Building", "title": "Ravenous Game System",
"description": "A minimalist game system which provides configurable Actor and Item templates to support free-form system agnostic game-play.", "description": "With ravenous hunger.",
"version": "0.6.4", "version": "0.0.5h",
"minimumCoreVersion": "0.8.9", "minimumCoreVersion": "0.8.9",
"compatibleCoreVersion": "9", "compatibleCoreVersion": "9",
"author": "Atropos", "author": "Cocobug Inc.",
"esmodules": ["module/simple.js"], "esmodules": ["module/simple.js"],
"styles": ["styles/simple.css"], "styles": ["styles/simple.css"],
"packs": [], "packs": [],
@ -16,12 +16,12 @@
"path": "lang/en.json" "path": "lang/en.json"
} }
], ],
"gridDistance": 5, "gridDistance": 2,
"gridUnits": "ft", "gridUnits": "m",
"primaryTokenAttribute": "health", "primaryTokenAttribute": "health",
"secondaryTokenAttribute": "power", "secondaryTokenAttribute": "power",
"url": "https://gitlab.com/foundrynet/worldbuilding/", "url": "https://proxy.dandaedre.com/gitea/Dandaedre/vtt_sys_ravenous",
"manifest": "https://gitlab.com/foundrynet/worldbuilding/raw/0.6.x/system.json", "manifest": "https://proxy.dandaedre.com/gitea/Dandaedre/vtt_sys_ravenous/raw/branch/main/system.json",
"download": "https://gitlab.com/foundrynet/worldbuilding/-/archive/release-064/worldbuilding-release-064.zip", "download": "https://proxy.dandaedre.com/gitea/Dandaedre/vtt_sys_ravenous/archive/main.zip",
"license": "LICENSE.txt" "license": "LICENSE.txt"
} }

View File

@ -2,6 +2,16 @@
"Actor": { "Actor": {
"types": ["character"], "types": ["character"],
"character": { "character": {
"caracteristics": {
"str": 0,
"agi": 0,
"per": 0,
"chr": 0,
"int": 0,
"wpr": 0,
"psy": 0,
"chn": 0
},
"biography": "", "biography": "",
"health": { "health": {
"value": 10, "value": 10,
@ -13,7 +23,9 @@
"min": 0, "min": 0,
"max": 5 "max": 5
}, },
"attributes": {}, "attributes": {
"torque": 1
},
"groups": {} "groups": {}
} }
}, },

View File

@ -2,21 +2,29 @@
{{!-- Sheet Header --}} {{!-- Sheet Header --}}
<header class="sheet-header"> <header class="sheet-header">
<img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}" height="100" width="100" /> <div class="header-container">
<div class="header-fields"> <div><input name="name" class="pc-name" type="text" placeholder="Name" value="{{data.name}}"></div>
<h1 class="charname"> <div class="caracs">
<input name="name" type="text" value="{{data.name}}" placeholder="Name" /> <div class="caracs-header"><h3>Caracteristiques</h3></div>
</h1> <div><label for="strenght">Str</label></div>
<div class="resource"> <div><input name="data.caracteristics.str" id="strenght" type="number" value="{{systemData.caracteristics.str}}"></div>
<input type="number" name="data.health.value" value="{{systemData.health.value}}"/> <div><label for="intelligence">Int</label></div>
<span> / </span> <div><input name="data.caracteristics.int" id="intelligence" type="number" value="{{systemData.caracteristics.int}}"></div>
<input type="number" name="data.health.max" value="{{systemData.health.max}}"/> <div><label for="agility">Agi</label></div>
</div> <div><input name="data.caracteristics.agi" id="agility" type="number" value="{{systemData.caracteristics.agi}}"></div>
<div class="resource"> <div><label for="willpower">WP</label></div>
<input type="number" name="data.power.value" value="{{systemData.power.value}}"/> <div><input name="data.caracteristics.wpr" id="willpower" type="number" value="{{systemData.caracteristics.wpr}}"></div>
<span> / </span> <div><label for="psy">Psy</label></div>
<input type="number" name="data.power.max" value="{{systemData.power.max}}"/> <div><input name="data.caracteristics.psy" id="psy" type="number" value="{{systemData.caracteristics.psy}}"></div>
<div><label for="charisma">Chr</label></div>
<div><input name="data.caracteristics.chr" id="charisma" type="number" value="{{systemData.caracteristics.chr}}"></div>
<div><label for="perception">Per</label></div>
<div><input name="data.caracteristics.per" id="perception" type="number" value="{{systemData.caracteristics.per}}"></div>
<div><label for="chance">Luk</label></div>
<div><input name="data.caracteristics.chn" id="chance" type="number" value="{{systemData.caracteristics.chn}}"></div>
</div> </div>
<div>Zone PV</div>
<div>Zone Armure</div>
</div> </div>
</header> </header>
@ -25,6 +33,7 @@
<a class="item" data-tab="description">Description</a> <a class="item" data-tab="description">Description</a>
<a class="item" data-tab="items">Items</a> <a class="item" data-tab="items">Items</a>
<a class="item" data-tab="attributes">Attributes</a> <a class="item" data-tab="attributes">Attributes</a>
<a class="item" data-tab="torque">Torque</a>
</nav> </nav>
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
@ -99,11 +108,11 @@
</header> </header>
{{!-- Render the attribute list partial. --}} {{!-- Render the attribute list partial. --}}
{{> "systems/worldbuilding/templates/parts/sheet-attributes.html" attributes=systemData.ungroupedAttributes dtypes=dtypes}} {{> "systems/vtt_sys_ravenous/templates/parts/sheet-attributes.html" attributes=systemData.ungroupedAttributes dtypes=dtypes}}
{{!-- Render the grouped attributes partial and control. --}} {{!-- Render the grouped attributes partial and control. --}}
<div class="groups"> <div class="groups">
{{> "systems/worldbuilding/templates/parts/sheet-groups.html" attributes=systemData.groupedAttributes groups=systemData.groups dtypes=dtypes}} {{> "systems/vtt_sys_ravenous/templates/parts/sheet-groups.html" attributes=systemData.groupedAttributes groups=systemData.groups dtypes=dtypes}}
<div class="group-controls flexrow"> <div class="group-controls flexrow">
<input class="group-prefix" type="text" value=""/> <input class="group-prefix" type="text" value=""/>
@ -111,5 +120,16 @@
</div> </div>
</div> </div>
</div> </div>
{{!-- Torque Tab --}}
<div class="tab attributes" data-group="primary" data-tab="torque">
<header class="attributes-header flexrow">
<span class="attribute-key">{{localize "SIMPLE.AttributeKey"}}</span>
<span class="attribute-value">{{localize "SIMPLE.AttributeValue"}}</span>
<span class="attribute-label">{{localize "SIMPLE.AttributeLabel"}}</span>
<span class="attribute-dtype">{{localize "SIMPLE.AttributeDtype"}}</span>
<a class="attribute-control" data-action="create" data-group="{{group}}"><i class="fas fa-plus"></i></a>
</header>
</div>
</section> </section>
</form> </form>

View File

@ -41,11 +41,11 @@
</header> </header>
{{!-- Render the attribute list partial. --}} {{!-- Render the attribute list partial. --}}
{{> "systems/worldbuilding/templates/parts/sheet-attributes.html" attributes=systemData.ungroupedAttributes dtypes=dtypes}} {{> "systems/vtt_sys_ravenous/templates/parts/sheet-attributes.html" attributes=systemData.ungroupedAttributes dtypes=dtypes}}
{{!-- Render the grouped attributes partial and control. --}} {{!-- Render the grouped attributes partial and control. --}}
<div class="groups"> <div class="groups">
{{> "systems/worldbuilding/templates/parts/sheet-groups.html" attributes=systemData.groupedAttributes groups=systemData.groups dtypes=dtypes}} {{> "systems/vtt_sys_ravenous/templates/parts/sheet-groups.html" attributes=systemData.groupedAttributes groups=systemData.groups dtypes=dtypes}}
<div class="group-controls flexrow"> <div class="group-controls flexrow">
<input class="group-prefix" type="text" value=""/> <input class="group-prefix" type="text" value=""/>
<a class="button group-control" data-action="create-group"><i class="fas fa-plus"></i>Add Attribute Group</a> <a class="button group-control" data-action="create-group"><i class="fas fa-plus"></i>Add Attribute Group</a>

View File

@ -15,7 +15,7 @@
<a class="group-control" data-action="delete-group"><i class="fas fa-trash"></i></a> <a class="group-control" data-action="delete-group"><i class="fas fa-trash"></i></a>
</div> </div>
{{> "systems/worldbuilding/templates/parts/sheet-attributes.html" attributes=group.attributes group=groupKey dtypes=../dtypes}} {{> "systems/vtt_sys_ravenous/templates/parts/sheet-attributes.html" attributes=group.attributes group=groupKey dtypes=../dtypes}}
</li> </li>
{{/each}} {{/each}}
</ol> </ol>