Compare commits

..

No commits in common. "main" and "alpha" have entirely different histories.
main ... alpha

18 changed files with 132 additions and 183 deletions

View File

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

View File

@ -1,9 +0,0 @@
# 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: ["vtt_sys_ravenous", "sheet", "actor"], classes: ["worldbuilding", "sheet", "actor"],
template: "systems/vtt_sys_ravenous/templates/actor-sheet.html", template: "systems/worldbuilding/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("vtt_sys_ravenous", "macroShorthand"); context.shorthand = !!game.settings.get("worldbuilding", "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("vtt_sys_ravenous", "isTemplate"); return !!this.getFlag("worldbuilding", "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("vtt_sys_ravenous", "macroShorthand"); const shorthand = game.settings.get("worldbuilding", "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("vtt_sys_ravenous", "macroShorthand"); const shorthand = game.settings.get("worldbuilding", "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("vtt_sys_ravenous", "isTemplate")); const templates = collection.filter(a => a.getFlag("worldbuilding", "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.vtt_sys_ravenous.useEntity; const useEntity = game.worldbuilding.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.vtt_sys_ravenous.isTemplate; delete createData.flags.worldbuilding.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: ["vtt_sys_ravenous", "sheet", "item"], classes: ["worldbuilding", "sheet", "item"],
template: "systems/vtt_sys_ravenous/templates/item-sheet.html", template: "systems/worldbuilding/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("vtt_sys_ravenous", "isTemplate"); return !!this.getFlag("worldbuilding", "isTemplate");
} }
} }

View File

@ -1,11 +1,11 @@
/** /**
* Create a Macro from an attribute drop. * Create a Macro from an attribute drop.
* Get an existing vtt_sys_ravenous macro if one exists, otherwise create a new one. * Get an existing worldbuilding 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 createvtt_sys_ravenousMacro(data, slot) { export async function createWorldbuildingMacro(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 createvtt_sys_ravenousMacro(data, slot) {
name: data.label, name: data.label,
type: "script", type: "script",
command: command, command: command,
flags: { "vtt_sys_ravenous.attrMacro": true } flags: { "worldbuilding.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 { createvtt_sys_ravenousMacro } from "./macro.js"; import { createWorldbuildingMacro } 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 vtt_sys_ravenous System`); console.log(`Initializing Simple Worldbuilding 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.vtt_sys_ravenous = { game.worldbuilding = {
SimpleActor, SimpleActor,
createvtt_sys_ravenousMacro, createWorldbuildingMacro,
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("vtt_sys_ravenous", SimpleActorSheet, { makeDefault: true }); Actors.registerSheet("worldbuilding", SimpleActorSheet, { makeDefault: true });
Items.unregisterSheet("core", ItemSheet); Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("vtt_sys_ravenous", SimpleItemSheet, { makeDefault: true }); Items.registerSheet("worldbuilding", SimpleItemSheet, { makeDefault: true });
// Register system settings // Register system settings
game.settings.register("vtt_sys_ravenous", "macroShorthand", { game.settings.register("worldbuilding", "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("vtt_sys_ravenous", "initFormula", { game.settings.register("worldbuilding", "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("vtt_sys_ravenous", "initFormula"); const initFormula = game.settings.get("worldbuilding", "initFormula");
_simpleUpdateInit(initFormula); _simpleUpdateInit(initFormula);
/** /**
@ -102,13 +102,13 @@ Hooks.once("init", async function() {
/** /**
* Macrobar hook. * Macrobar hook.
*/ */
Hooks.on("hotbarDrop", (bar, data, slot) => createvtt_sys_ravenousMacro(data, slot)); Hooks.on("hotbarDrop", (bar, data, slot) => createWorldbuildingMacro(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.vtt_sys_ravenous.useEntity ? "entityId" : "documentId"; const idAttr = game.worldbuilding.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("vtt_sys_ravenous", "isTemplate", true); actor.setFlag("worldbuilding", "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("vtt_sys_ravenous", "isTemplate", false); actor.setFlag("worldbuilding", "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.vtt_sys_ravenous.useEntity ? "entityId" : "documentId"; const idAttr = game.worldbuilding.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("vtt_sys_ravenous", "isTemplate", true); item.setFlag("worldbuilding", "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("vtt_sys_ravenous", "isTemplate", false); item.setFlag("worldbuilding", "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/vtt_sys_ravenous/templates/parts/sheet-attributes.html", "systems/worldbuilding/templates/parts/sheet-attributes.html",
"systems/vtt_sys_ravenous/templates/parts/sheet-groups.html" "systems/worldbuilding/templates/parts/sheet-groups.html"
]; ];
// Load the template parts // Load the template parts

View File

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

View File

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

View File

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

View File

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

View File

@ -2,16 +2,6 @@
"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,
@ -23,9 +13,7 @@
"min": 0, "min": 0,
"max": 5 "max": 5
}, },
"attributes": { "attributes": {},
"torque": 1
},
"groups": {} "groups": {}
} }
}, },

View File

@ -2,29 +2,21 @@
{{!-- Sheet Header --}} {{!-- Sheet Header --}}
<header class="sheet-header"> <header class="sheet-header">
<div class="header-container"> <img class="profile-img" src="{{data.img}}" data-edit="img" title="{{data.name}}" height="100" width="100" />
<div><input name="name" class="pc-name" type="text" placeholder="Name" value="{{data.name}}"></div> <div class="header-fields">
<div class="caracs"> <h1 class="charname">
<div class="caracs-header"><h3>Caracteristiques</h3></div> <input name="name" type="text" value="{{data.name}}" placeholder="Name" />
<div><label for="strenght">Str</label></div> </h1>
<div><input name="data.caracteristics.str" id="strenght" type="number" value="{{systemData.caracteristics.str}}"></div> <div class="resource">
<div><label for="intelligence">Int</label></div> <input type="number" name="data.health.value" value="{{systemData.health.value}}"/>
<div><input name="data.caracteristics.int" id="intelligence" type="number" value="{{systemData.caracteristics.int}}"></div> <span> / </span>
<div><label for="agility">Agi</label></div> <input type="number" name="data.health.max" value="{{systemData.health.max}}"/>
<div><input name="data.caracteristics.agi" id="agility" type="number" value="{{systemData.caracteristics.agi}}"></div> </div>
<div><label for="willpower">WP</label></div> <div class="resource">
<div><input name="data.caracteristics.wpr" id="willpower" type="number" value="{{systemData.caracteristics.wpr}}"></div> <input type="number" name="data.power.value" value="{{systemData.power.value}}"/>
<div><label for="psy">Psy</label></div> <span> / </span>
<div><input name="data.caracteristics.psy" id="psy" type="number" value="{{systemData.caracteristics.psy}}"></div> <input type="number" name="data.power.max" value="{{systemData.power.max}}"/>
<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>
@ -33,7 +25,6 @@
<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 --}}
@ -108,11 +99,11 @@
</header> </header>
{{!-- Render the attribute list partial. --}} {{!-- Render the attribute list partial. --}}
{{> "systems/vtt_sys_ravenous/templates/parts/sheet-attributes.html" attributes=systemData.ungroupedAttributes dtypes=dtypes}} {{> "systems/worldbuilding/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/vtt_sys_ravenous/templates/parts/sheet-groups.html" attributes=systemData.groupedAttributes groups=systemData.groups dtypes=dtypes}} {{> "systems/worldbuilding/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=""/>
@ -120,16 +111,5 @@
</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/vtt_sys_ravenous/templates/parts/sheet-attributes.html" attributes=systemData.ungroupedAttributes dtypes=dtypes}} {{> "systems/worldbuilding/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/vtt_sys_ravenous/templates/parts/sheet-groups.html" attributes=systemData.groupedAttributes groups=systemData.groups dtypes=dtypes}} {{> "systems/worldbuilding/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/vtt_sys_ravenous/templates/parts/sheet-attributes.html" attributes=group.attributes group=groupKey dtypes=../dtypes}} {{> "systems/worldbuilding/templates/parts/sheet-attributes.html" attributes=group.attributes group=groupKey dtypes=../dtypes}}
</li> </li>
{{/each}} {{/each}}
</ol> </ol>