first page

This commit is contained in:
François-Xavier Guillois
2023-04-20 18:27:54 +02:00
parent 5ddd9db9b3
commit 5761587649
9 changed files with 207 additions and 200 deletions
+77 -8
View File
@@ -1,11 +1,4 @@
{
"TOTEM.AbilityStr": "Strength",
"TOTEM.AbilityCon": "Constitution",
"TOTEM.AbilityDex": "Dexterity",
"TOTEM.AbilityInt": "Intelligence",
"TOTEM.AbilityWis": "Wisdom",
"TOTEM.AbilityCha": "Charisma",
"TOTEM.AbilityStrAbbr": "str",
"TOTEM.AbilityConAbbr": "con",
"TOTEM.AbilityDexAbbr": "dex",
@@ -13,10 +6,86 @@
"TOTEM.AbilityWisAbbr": "wis",
"TOTEM.AbilityChaAbbr": "cha",
"TOTEM.level": "Niveau",
"TOTEM.pool": "Réserve",
"TOTEM.pools": "Réserves",
"TOTEM.self_control": "Sang-Froid",
"TOTEM.effort": "Effort",
"TOTEM.group": "Groupe",
"TOTEM.abilities.vigor":"Vigueur",
"TOTEM.abilities.health":"Santé",
"TOTEM.abilities.precision":"Précision",
"TOTEM.abilities.reflexes":"Réflexes",
"TOTEM.abilities.knowledge":"Savoir",
"TOTEM.abilities.perception":"Perception",
"TOTEM.abilities.will":"Volonté",
"TOTEM.abilities.empathy":"Empathie",
"TOTEM.EffectCreate": "Create Effect",
"TOTEM.EffectToggle": "Toggle Effect",
"TOTEM.EffectEdit": "Edit Effect",
"TOTEM.EffectDelete": "Delete Effect",
"TOTEM.Add": "Add"
"TOTEM.Add": "Add",
"TOTEM.SkillLevel.beginner": "Débutant",
"TOTEM.SkillLevel.proficient": "Confirmé",
"TOTEM.SkillLevel.expert": "Expert",
"TOTEM.SkillLevel.master": "Maître",
"TOTEM.SkillLevel.legend": "Légende",
"TOTEM.totems.human": "l'Humain",
"TOTEM.totems.scavenger": "le Prédateur",
"TOTEM.totems.symbiote": "le Symbiote",
"TOTEM.totems.parasite": "le Parasite",
"TOTEM.totems.builder": "le Bâtisseur",
"TOTEM.totems.horde": "la Horde",
"TOTEM.totems.hive": "la Ruche",
"TOTEM.totems.solitary": "le Solitaire",
"TOTEM.totems.adapted": "l'Adapté",
"TOTEM.abilityCategory.physical": "Physiques",
"TOTEM.abilityCategory.manual": "Manuelles",
"TOTEM.abilityCategory.mental": "Mentales",
"TOTEM.abilityCategory.social": "Sociales",
"TOTEM.skillCategory.man": "L'Homme",
"TOTEM.skillCategory.animal": "L'Animal",
"TOTEM.skillCategory.machine": "La Machine",
"TOTEM.skillCategory.weapon": "L'Arme",
"TOTEM.skillCategory.survival": "La Survie",
"TOTEM.skillCategory.earth": "La Terre",
"TOTEM.skills.arts":"Arts",
"TOTEM.skills.civilization":"Civilisation",
"TOTEM.skills.psychology":"Psychologie",
"TOTEM.skills.rumors":"Rumeurs",
"TOTEM.skills.healing":"Soins",
"TOTEM.skills.animalism":"Animalisme",
"TOTEM.skills.dissection":"Dissection",
"TOTEM.skills.wildlife":"Faune",
"TOTEM.skills.repulsion":"Répulsion",
"TOTEM.skills.tracks":"Traces",
"TOTEM.skills.crafting":"Artisanat",
"TOTEM.skills.diy":"Bricolage",
"TOTEM.skills.mecanical":"Mécanique",
"TOTEM.skills.driving":"Pilotage",
"TOTEM.skills.technology":"Technologie",
"TOTEM.skills.firearms":"Armes à feu",
"TOTEM.skills.archery":"Armes de tir",
"TOTEM.skills.armory":"Armurerie",
"TOTEM.skills.throwing":"Armes de jet",
"TOTEM.skills.melee":"Mêlée",
"TOTEM.skills.feed":"Alimentation",
"TOTEM.skills.atletics":"Atlétisme",
"TOTEM.skills.brawling":"Corps à corps",
"TOTEM.skills.stealth":"Furtivité",
"TOTEM.skills.alertness":"Vigilance",
"TOTEM.skills.environment":"Environnement",
"TOTEM.skills.flora":"Flote",
"TOTEM.skills.road":"Route",
"TOTEM.skills.toxics":"Toxiques",
"TOTEM.skills.remains":"Vestiges"
}
+3 -2
View File
@@ -38,7 +38,8 @@ export class TotemActorSheet extends ActorSheet {
// Add the actor's data to context.data for easier access, as well as flags.
context.system = actorData.system;
context.flags = actorData.flags;
context.config = CONFIG.TOTEM;
// Prepare character data and items.
if (actorData.type == 'character') {
this._prepareItems(context);
@@ -69,7 +70,7 @@ export class TotemActorSheet extends ActorSheet {
_prepareCharacterData(context) {
// Handle ability scores.
for (let [k, v] of Object.entries(context.system.abilities)) {
v.label = game.i18n.localize(CONFIG.TOTEM.abilities[k]) ?? k;
v.label = game.i18n.localize(context.system.abilities[k].label) ?? k;
}
}
+50 -52
View File
@@ -4,63 +4,61 @@ export const TOTEM = {};
* The set of Ability Scores used within the sytem.
* @type {Object}
*/
/*
TOTEM.SkillLevels = {
1:{ "label":"TOTEM.SkillLevel.beginner", "dicePool":1, "reroll":0},
2:{ "label":"TOTEM.SkillLevel.proficient", "dicePool":1, "reroll":1},
3:{ "label":"TOTEM.SkillLevel.expert", "dicePool":2, "reroll":1},
4:{ "label":"TOTEM.SkillLevel.master", "dicePool":2, "reroll":2},
5:{ "label":"TOTEM.SkillLevel.legend", "dicePool":3, "reroll":2},
}
TOTEM.nations = {
"istanie1":{
"label": "Istanie (îles du couchant)",
"cities": ["tanger", "argan", "ar'kobah", "ishandra"]
TOTEM.TotemNumbers = {
1:{ "label":"TOTEM.totems.human", "key":"human"},
2:{ "label":"TOTEM.totems.scavenger", "key":"scavenger"},
3:{ "label":"TOTEM.totems.symbiote", "key":"symbiote"},
4:{ "label":"TOTEM.totems.parasite", "key":"parasite"},
5:{ "label":"TOTEM.totems.builder", "key":"builder"},
6:{ "label":"TOTEM.totems.horde", "key":"horde"},
7:{ "label":"TOTEM.totems.hive", "key":"hive"},
8:{ "label":"TOTEM.totems.solitary", "key":"solitary"},
9:{ "label":"TOTEM.totems.adapted", "key":"adapted"}
}
TOTEM.abilityCategories = {
"physical": {
"label":"TOTEM.abilityCategory.physical"
},
"istanie2":{
"label": "Istanie (monts dinariques)",
"cities": ["montenegro", "ishandra"]
"manual": {
"label":"TOTEM.abilityCategory.manual"
},
"istanie3":{
"label": "Istanie (anatolie)",
"cities": ["ismyr", "istanbul", "ankara"]
"mental": {
"label":"TOTEM.abilityCategory.mental"
},
"pentapolie":{
"label": "Pentapolie",
"cities": ["serone", "éole", "relais de l'affrevie", "relais de bragee", "géode", "théorie", "démos", "négoce", "lucé"]
},
"venice":{
"label": "Venice",
"cities": ["venice"]
},
"rhodesiennes":{
"label": "Provinces rhodesiennes",
"cities": ["alsyde", "spicule", "urbs", "les syénites"]
},
"methalune":{
"label": "Méthalune",
"cities": ["méthalune", "ferraille"]
},
"gloriana":{
"label": "Gloriana",
"cities": ["enclosure", "londres", "camelot", "hivernee"]
},
"antipolie":{
"label": "Antipolie",
"cities": ["paris", "ithar","candbury","abaya", "relais d'elphiel", "entrelace", "prague", "vienne"]
},
"olmune":{
"label": "Principautés d'Olmune",
"cities": ["entrepont", "olmune","arssens","braysine"]
},
"lansk":{
"label": "Lansk",
"cities": ["saint-petersbourg", "hypogée","sancre","moscou", "kiev","kryo"]
},
"nordanie":{
"label": "Nordanie",
"cities": ["souspente", "gottenborg","solth", "nacre", "dorvik", "mystille"]
},
"terraincognita":{
"label": "Terra Incognita",
"cities": ["chantier de transécryme"]
"social": {
"label":"TOTEM.abilityCategory.social"
}
}
}
*/
TOTEM.skillCategories = {
"man": {
"label":"TOTEM.skillCategory.man"
},
"animal": {
"label":"TOTEM.skillCategory.animal"
},
"machine": {
"label":"TOTEM.skillCategory.machine"
},
"weapon": {
"label":"TOTEM.skillCategory.weapon"
},
"survival": {
"label":"TOTEM.skillCategory.survival"
},
"earth": {
"label":"TOTEM.skillCategory.earth"
}
}
+2 -37
View File
@@ -1,49 +1,14 @@
export class WarningDialog extends Dialog {
constructor(dialogData) {
let options = { classes: ["warning"] };
let conf = {
title: "Avertissement",
content: dialogData.content
};
super(conf, options);
this.dialogData = dialogData;
}
/* -------------------------------------------- */
activateListeners(html) {
/*super.activateListeners(html);
this.html = html;
this.setEphemere(this.dialogData.signe.system.ephemere);
html.find(".signe-aleatoire").click(event => this.setSigneAleatoire());
html.find("[name='signe.system.ephemere']").change((event) => this.setEphemere(event.currentTarget.checked));
html.find(".signe-xp-sort").change((event) => this.onValeurXpSort(event));
html.find("input.select-actor").change((event) => this.onSelectActor(event));
html.find("input.select-tmr").change((event) => this.onSelectTmr(event));*/
}
async onSelectActor(event) {
/*const actorId = this.html.find(event.currentTarget)?.data("actor-id");
const actor = this.dialogData.actors.find(it => it.id == actorId);
if (actor) {
actor.selected = event.currentTarget.checked;
}*/
}
}
export class CombatResultDialog extends Dialog {
constructor(dialogData, options) {
let options = { classes: ["combat", "result"], ...options };
/*let options = { classes: ["combat", "result"], ...options };
let conf = {
title: "Résultat de la confrontation",
content: dialogData.content
};
super(conf, options);
this.dialogData = dialogData;
this.dialogData = dialogData;*/
}
/* -------------------------------------------- */
+3 -13
View File
@@ -14,21 +14,11 @@ export const registerHooks = function () {
if ($("#pause").attr("class") !== "paused") return;
$(".paused img").attr("src", 'systems/totem/images/pause.webp');
$(".paused img").css({ "opacity": 1});
$("#pause.paused").css({ "display": "flex", "justify-content": "center" });
$("#pause.paused figcaption").css({ "width": `256px`, "height": `256px` });
$("#pause.paused figcaption").text(game.i18n.localize("TOTEM.PausedText"));
$("#pause.paused figcaption").text("En cours de destruction...");
});
/*Hooks.on("renderPause", ((_app, html) => {
html.find("img").attr("src", "systems/bol/ui/pause2.webp")
}))
Hooks.on('renderChatLog', (log, html, data) => BoLUtility.chatListeners(html))
Hooks.on('renderChatMessage', (message, html, data) => BoLUtility.chatMessageHandler(message, html, data))
*/
console.log("rendering hooks");
Hooks.on('renderChatLog', (log, html, data) => TotemFight.chatListeners(html));
Hooks.on('renderChatMessage', (message, html, data) => TotemFight.chatMessageHandler(message, html, data));
// Hooks.on('renderChatLog', (log, html, data) => TotemFight.chatListeners(html));
// Hooks.on('renderChatMessage', (message, html, data) => TotemFight.chatMessageHandler(message, html, data));
/**
* Create a macro when dropping an entity on the hotbar
+9 -1
View File
@@ -1,3 +1,7 @@
import { registerHandlebarsHelpers } from "./system/helpers.mjs";
import { registerHooks } from "./system/hooks.mjs";
import { registerSettings } from "./system/settings.mjs";
// Import document classes.
import { TotemActor } from "./documents/actor.mjs";
import { TotemItem } from "./documents/item.mjs";
@@ -6,7 +10,7 @@ import { TotemActorSheet } from "./sheets/actor-sheet.mjs";
import { TotemItemSheet } from "./sheets/item-sheet.mjs";
// Import helper/utility classes and constants.
import { preloadHandlebarsTemplates } from "./helpers/templates.mjs";
import { TOTEM } from "./helpers/config.mjs";
import { TOTEM } from "./system/config.mjs";
/* -------------------------------------------- */
/* Init Hook */
@@ -44,6 +48,10 @@ Hooks.once('init', async function() {
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("totem", TotemItemSheet, { makeDefault: true });
registerHandlebarsHelpers(); // Register Handlebars helpers
registerHooks(); // register Hooks
registerSettings(); // register Engrenages Settings
// Preload Handlebars templates.
return preloadHandlebarsTemplates();
});
+20 -35
View File
@@ -21,23 +21,28 @@
"templates": ["base"],
"attributes": {
"level": {
"label":"TOTEM.level",
"value": 1
},
"self_control": {
"label":"TOTEM.self_control",
"value": 0,
"min": 0,
"max": 5
},
"effort": {
"label":"TOTEM.effort",
"value": 0,
"min": 0,
"max": 5
},
"group": {
"label":"TOTEM.group",
"value": 0,
"min": 0,
"max": 5
}
},
"AbilityCategories": {
"physical": {
"label":"TOTEM.abilityCategory.physical"
},
"manual": {
"label":"TOTEM.abilityCategory.manual"
},
"mental": {
"label":"TOTEM.abilityCategory.mental"
},
"social": {
"label":"TOTEM.abilityCategory.social"
}
},
},
"abilities": {
"vig": {
"label":"TOTEM.abilities.vigor",
@@ -96,26 +101,6 @@
"category": "social"
}
},
"skillCategories": {
"man": {
"label":"TOTEM.skillCategory.man"
},
"animal": {
"label":"TOTEM.skillCategory.animal"
},
"machine": {
"label":"TOTEM.skillCategory.machine"
},
"weapon": {
"label":"TOTEM.skillCategory.weapon"
},
"survival": {
"label":"TOTEM.skillCategory.survival"
},
"earth": {
"label":"TOTEM.skillCategory.earth"
}
},
"skills": {
"arts": {
"label":"TOTEM.skills.arts",
+42 -52
View File
@@ -8,35 +8,15 @@
{{!-- The grid classes are defined in scss/global/_grid.scss. To use,
use both the "grid" and "grid-Ncol" class where "N" can be any number
from 1 to 12 and will create that number of columns. --}}
<div class="resources grid grid-3col">
{{!-- "flex-group-center" is also defined in the _grid.scss file
and it will add a small amount of padding, a border, and will
center all of its child elements content and text. --}}
<div class="resources grid grid-4col">
{{#each system.attributes as |attribute att|}}
<div class="resource flex-group-center">
<label for="system.health.value" class="resource-label">Health</label>
<label for="system.attributes.level.value" class="resource-label">{{ localize attribute.label }}</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="system.health.value" value="{{system.health.value}}" data-dtype="Number"/>
<span> / </span>
<input type="text" name="system.health.max" value="{{system.health.max}}" data-dtype="Number"/>
<input type="text" name="system.attributes.{{att}}.value" value="{{attribute.value}}" data-dtype="Number"/>
</div>
</div>
<div class="resource flex-group-center">
<label for="system.power.value" class="resource-label">Power</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="system.power.value" value="{{system.power.value}}" data-dtype="Number"/>
<span> / </span>
<input type="text" name="system.power.max" value="{{system.power.max}}" data-dtype="Number"/>
</div>
</div>
<div class="resource flex-group-center">
<label for="system.attributes.level.value" class="resource-label">Level</label>
<div class="resource-content flexrow flex-center flex-between">
<input type="text" name="system.attributes.level.value" value="{{system.attributes.level.value}}" data-dtype="Number"/>
</div>
</div>
</div>
{{/each}}
</div>
</div>
@@ -45,11 +25,11 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
{{!-- Default tab is specified in actor-sheet.mjs --}}
<a class="item" data-tab="features">Features</a>
<a class="item" data-tab="description">Description</a>
<a class="item" data-tab="items">Items</a>
<a class="item" data-tab="spells">Spells</a>
<a class="item" data-tab="effects">Effects</a>
<a class="item" data-tab="features">Statistiques</a>
<a class="item" data-tab="description">Background</a>
<a class="item" data-tab="items">Matos</a>
<a class="item" data-tab="spells">Totem</a>
<a class="item" data-tab="effects">Santé</a>
</nav>
{{!-- Sheet Body --}}
@@ -57,30 +37,40 @@
{{!-- Owned Features Tab --}}
<div class="tab features" data-group="primary" data-tab="features">
<section class="grid grid-3col">
<aside class="sidebar">
{{!-- The grid classes are defined in scss/global/_grid.scss. To use,
use both the "grid" and "grid-Ncol" class where "N" can be any number
from 1 to 12 and will create that number of columns. --}}
<div class="abilities flexcol">
{{#each system.abilities as |ability key|}}
<div class="ability flexrow flex-group-center">
<label for="system.abilities.{{key}}.value" class="resource-label rollable flexlarge align-left" data-roll="d20+@abilities.{{key}}.mod" data-label="{{ability.label}}">{{ability.label}}</label>
<input type="text" name="system.abilities.{{key}}.value" value="{{ability.value}}" data-dtype="Number"/>
<span class="ability-mod rollable" data-roll="d20+@abilities.{{key}}.mod" data-label="{{ability.label}}">{{numberFormat ability.mod decimals=0 sign=true}}</span>
</div>
<h3>Caractéristiques</h3>
<section class="grid grid-4col">
{{#each config.abilityCategories as |abilityCategory ackey|}}
<div>
<h4>{{ localize abilityCategory.label }}</h4>
{{#each @root.system.abilities as |ability key|}}
{{#ife ability.category ackey }}
<div class="ability flexcol flex-group-center items-center">
<label for="system.abilities.{{key}}.value" class="resource-label rollable flexlarge align-left" data-roll="d20+@abilities.{{key}}.mod" data-label="{{ability.label}}">{{ability.label}}</label>
<input type="text" name="system.abilities.{{key}}.value" value="{{ability.value}}" data-dtype="Number"/>
</div>
{{/ife}}
{{/each}}
</div>
</aside>
{{!-- For the main features list, span the right two columns --}}
<section class="main grid-span-2">
{{!-- This is a Handlebars partial. They're stored in the `/parts` folder next to this sheet, and defined in module/helpers/templates.mjs --}}
{{> "systems/totem/templates/actor/parts/actor-features.html"}}
</section>
{{/each}}
</section>
<h3>Compétences</h3>
<div class="grid grid-cols-3">
{{#each config.skillCategories as |skillCategory sckey|}}
<div class="col">
<h4>{{ localize skillCategory.label }}</h4>
{{#each @root.system.skills as |skill skey|}}
{{#ife skill.category sckey }}
<div class="ability flexrow flex-group-center">
<label style="flex:80%;" for="system.skills.{{skey}}.value" class="resource-label rollable flexlarge align-left" data-roll="d20+@skills.{{skey}}.mod" data-label="{{skill.label}}">{{ localize skill.label}}</label>
<input type="text" name="system.skills.{{skey}}.value" value="{{skill.value}}" data-dtype="Number"/>
</div>
{{/ife}}
{{/each}}
</div>
{{/each}}
</div>
</div>
{{!-- Biography Tab --}}
+1
View File
@@ -1,3 +1,4 @@
{{> "systems/totem/templates/actor/parts/actor-features.html"}}
<ol class="items-list">
<li class="item flexrow items-header">
<div class="item-name">Name</div>