Compare commits

...

43 Commits

Author SHA1 Message Date
6b22dade9c Foundry v13 migration 2025-05-01 23:27:51 +02:00
965fc02eb3 Foundry v13 migration 2025-05-01 23:23:29 +02:00
0ef689bf1b Fix specialization again 2025-03-11 23:47:08 +01:00
c6dcc187d8 Fix babele 2025-03-11 22:29:24 +01:00
e2f24405af Fix waring about grid 2025-02-14 13:36:52 +01:00
0487893f47 Fix v12 issue + remove warnings 2024-04-27 09:33:22 +02:00
d7b7bccbdf Update v11/v12 et correction sur le niveau de jeu 2024-04-26 19:31:30 +02:00
dbf4b17afb Update v11/v12 et correction sur le niveau de jeu 2024-04-26 19:28:57 +02:00
51e5a409c4 Update v11/v12 et correction sur le niveau de jeu 2024-04-26 19:28:28 +02:00
1e4692e850 Ajout des traits dans le header + gestion plus simple des PNJs 2024-03-19 09:16:08 +01:00
40e12c1bba Ajout des traits dans le header + gestion plus simple des PNJs 2024-03-19 09:15:30 +01:00
2450dce46c Fix traits bonus/malus and pictures in journals 2024-03-18 21:57:15 +01:00
67c1066194 Fix traits bonus/malus and pictures in journals 2024-03-18 21:56:10 +01:00
65fe498572 Fix background+landing pages 2024-03-15 12:12:02 +01:00
e1990f88b4 Fix background+landing pages 2024-03-15 12:10:44 +01:00
f99abb0966 Enhance stats 2024-02-08 13:02:57 +01:00
ec6e6be231 Fix confrontation with players 2023-10-12 08:28:30 +02:00
9d26d7bfad Amélirations des specialisations 2023-10-10 20:04:02 +02:00
81848155e5 Amélirations des specialisations 2023-10-10 20:02:13 +02:00
6778a9aa0b Release fix 2023-08-26 21:49:32 +02:00
63aa49c77f Fix CI/CD 2023-08-26 19:18:07 +02:00
0a3265419a Move repo to public area 2023-08-26 09:57:43 +02:00
f5093980b0 Move repo to public area 2023-08-26 09:53:14 +02:00
062a597b70 Various fixes in equipment, biodata 2023-08-25 09:18:45 +02:00
1d0d123947 Various fixes in equipment, biodata 2023-08-25 09:09:21 +02:00
bf94dc30b8 Picture link 2023-08-22 08:35:02 +02:00
fc3b83cfc2 Picture link 2023-08-22 08:34:12 +02:00
19b88c3de9 Add changelog 2023-08-21 15:20:10 +02:00
d669059403 Corrections diverses 2023-08-17 08:31:22 +02:00
45d419115d Needs babele, fix translation, fix margine 2023-08-16 21:17:49 +02:00
b9e2a77e88 Needs babele, fix translation, fix margine 2023-08-16 21:17:34 +02:00
5dca748bf3 v11 ready 2023-08-16 20:52:48 +02:00
98f9e1e2a6 v11 ready 2023-08-16 20:49:26 +02:00
1a90be13be v11 ready 2023-08-16 20:45:23 +02:00
e2f97762b9 Add workflow 2023-08-14 17:39:39 +02:00
de11053a9a Add workflow 2023-08-14 17:02:40 +02:00
3f7ce9918e Add workflow 2023-08-14 16:59:00 +02:00
919147b4af Add workflow 2023-08-14 16:58:18 +02:00
22953744ba Add workflow 2023-08-14 16:55:43 +02:00
6aee41b817 Final import 2023-08-14 16:47:12 +02:00
e7268a1578 Fix NPC sheet 2023-08-09 20:44:25 +02:00
0d25bbe764 Ajout annence et NPC 2023-08-09 17:33:11 +02:00
554a1af531 Annence/Boheme 2023-08-08 18:05:10 +02:00
94 changed files with 836 additions and 462 deletions

54
.gitea/workflows/main.yml Normal file
View File

@ -0,0 +1,54 @@
name: Release Creation
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "💡 The ${{ gitea.repository }} repository will cloned to the runner."
#- uses: actions/checkout@v3
- uses: RouxAntoine/checkout@v3.5.4
with:
ref: 'master'
# get part of the tag after the `v`
- name: Extract tag version number
id: get_version
uses: battila7/get-version-action@v2
# Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: 'system.json'
env:
version: ${{steps.get_version.outputs.version-without-v}}
url: https://www.uberwald.me/gitea/public/fvtt-ecryme
manifest: https://www.uberwald.me/gitea/public/fvtt-ecryme/releases/latest/system.json
download: https://www.uberwald.me/gitea/public/fvtt-ecryme/releases/download/${{github.event.release.tag_name}}/fvtt-ecryme.zip
# Create a zip file with all files required by the module to add to the release
- run: |
apt update -y
apt install -y zip
- run: zip -r ./fvtt-ecryme.zip system.json template.json README.md LICENSE.txt fonts/ images/ lang/ modules/ packs/ styles/ templates/ translated/
- name: setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
./fvtt-ecryme.zip
system.json
api_key: '${{secrets.RELEASE_TOKEN_UBERWALD}}'

7
LICENSE.txt Normal file
View File

@ -0,0 +1,7 @@
Copyright 2023 Open Sesame Games
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,6 +1,43 @@
# Système Foundry pour Ecryme v2 (French RPG, Open Sesam Games, Official) # Ecryme v2 system for FoundryVTT (French RPG, Open Sesam Games, Official)
# Developmement
Uberwald This is a base game system with functionnal character sheets for the game Ecryme, powered by the Engrenage system.
You can join the kickstarter and obtain the base books here : https://www.kickstarter.com/projects/osg-us/ecryme
# System overview
The game system in Foundry offers the following features :
- PC/NPC sheet
- Skill rolls
- Cephaly rolls (with Anency support)
- Confrontation management, with detailed result in the chat card
- Weapon rolls
- Trait management, with Spleen and Ideal also.
- Compendiums of items for the game
![System Snapshot](https://www.lahiette.com/leratierbretonnien/wp-content/uploads/2023/08/ecryme_snapshot_01.webp "System Snapshot")
# Contributions
- Original code realised by Uberwald (https://www.uberwald.me/)
# English translation
English translation by Conal Longden and Ian McClung
# Copyright mentions
Copyright 2023 Open Sesame Games
All rights reserved
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Ecryme is a game written by Alexandre Clavel and Samuel Metzener, in a universe created by Mathieu gaborit. All of the aforementionned authors retain there moral rights regarding this work in both print and digital formats.
# Requests or Problems
Please report any requests or problems you have at contact@open-sesame.games

33
changelog.md Normal file
View File

@ -0,0 +1,33 @@
v12.0.0
- Support Foundry v11/v12
- Correction sur le niveau de jeu par défaut
v11.0.39
- Modification sur la prise en compte des traits en bonus/malus
- Correction sur les images de l'aide intégrée FR
v11.0.38
- Corrections sur les champs background/notes/equipement libre
- Taduction des répertoires
- Ajout de 2 landing pages
v11.0.36
- Enable deletion specialization
- Custome bonus for specializations
- Specialization direct rolls
v11.0.31
Add profession, fix equipment tab and add missing translation
v11.0.30
Snapshot and more detailed README
v11.0.28
Initial release

4
images/.directory Normal file
View File

@ -0,0 +1,4 @@
[Dolphin]
Timestamp=2024,3,15,11,30,15.103
Version=4
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

4
images/assets/.directory Normal file
View File

@ -0,0 +1,4 @@
[Dolphin]
Timestamp=2024,3,15,11,30,26.235
Version=4
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

4
images/ui/.directory Normal file
View File

@ -0,0 +1,4 @@
[Dolphin]
Timestamp=2024,3,15,11,30,19.681
Version=4
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

View File

@ -1,7 +1,9 @@
{ {
"TYPES": { "TYPES": {
"Actor": { "Actor": {
"Personnage": "PC" "pc": "Player Character",
"npc": "Non-Player Character",
"annency": "Annency"
}, },
"Item": { "Item": {
"trait": "Trait", "trait": "Trait",
@ -16,7 +18,8 @@
"cogs": "Cogs", "cogs": "Cogs",
"cephaly": "Cephaly", "cephaly": "Cephaly",
"boheme": "Boheme", "boheme": "Boheme",
"amertume": "Amertume" "amertume": "Amertume",
"gamelevel": "Game level"
}, },
"chat": { "chat": {
"formula": "Formula", "formula": "Formula",
@ -30,7 +33,9 @@
"traitbonus": "Bonus trait", "traitbonus": "Bonus trait",
"traitmalus": "Malus trait", "traitmalus": "Malus trait",
"bonusmalustraits": "Traits Bonus/Malus", "bonusmalustraits": "Traits Bonus/Malus",
"spectranscend": "Self-Transcend : " "spectranscend": "Self-Transcend : ",
"confrontselect": "Selected for confrontation",
"sentogm": "Confrontation has been sent to GM"
}, },
"rule": { "rule": {
"cephaly-success-2": "Duration : 1 scene - Impact : Superficial - Bonus : 1 - Elegy : 1", "cephaly-success-2": "Duration : 1 scene - Impact : Superficial - Bonus : 1 - Elegy : 1",
@ -48,6 +53,7 @@
"notenoughdice": "Execution and Preservation must have 2 dices allocated" "notenoughdice": "Execution and Preservation must have 2 dices allocated"
}, },
"ui": { "ui": {
"equipmentfree": "Equipments (free input)",
"traitType": "Trait type", "traitType": "Trait type",
"niveauTrait": "Trait level", "niveauTrait": "Trait level",
"weight": "Weight", "weight": "Weight",
@ -156,7 +162,13 @@
"oniricform": "Oniric shape (Boheme)", "oniricform": "Oniric shape (Boheme)",
"ideals": "Ideals", "ideals": "Ideals",
"politic": "Political ideal", "politic": "Political ideal",
"boheme": "Boheme" "boheme": "Boheme",
"annencybonus": "Annency bonus",
"bornplace": "Born place",
"residence": "Residence",
"origin": "Origin",
"childhood": "Childhood",
"bonus": "Bonus"
} }
} }
} }

View File

@ -1,7 +1,9 @@
{ {
"TYPES": { "TYPES": {
"Actor":{ "Actor":{
"Personnage": "PJ" "pc": "Personnage Joueur",
"npc": "Personnage Non Joueur",
"annency": "Anence"
}, },
"Item": { "Item": {
"trait": "Trait", "trait": "Trait",
@ -16,7 +18,8 @@
"cogs": "Engrenages", "cogs": "Engrenages",
"cephaly": "Céphalie", "cephaly": "Céphalie",
"boheme": "Bohême", "boheme": "Bohême",
"amertume": "Amertume" "amertume": "Amertume",
"gamelevel": "Niveau de jeu"
}, },
"chat": { "chat": {
"formula": "Formule", "formula": "Formule",
@ -30,14 +33,16 @@
"traitbonus": "Trait bonus", "traitbonus": "Trait bonus",
"traitmalus": "Trait malus", "traitmalus": "Trait malus",
"bonusmalustraits": "Bonus/Malus des Traits", "bonusmalustraits": "Bonus/Malus des Traits",
"spectranscend": "Dépassement de soi : " "spectranscend": "Dépassement de soi : ",
"confrontselected": "Confrontation selectionnée",
"sentogm": "La confrontation a été envoyée au MJ"
}, },
"rule": { "rule": {
"cephaly-success-12": "Durée : 1 scène - Impact : Superficiel - Bonus : 1 - Elegie : 1", "cephaly-success-12": "Durée : 1 scène - Impact : Superficiel - Bonus : 1 - Elegie : 1",
"cephaly-success-34": "Durée : 1 semaine - Impact : Léger - Bonus : 2 - Elegie : 2", "cephaly-success-4": "Durée : 1 semaine - Impact : Léger - Bonus : 2 - Elegie : 2",
"cephaly-success-56": "Durée : 1 mois - Impact : Grave - Bonus : 3 - Elegie : 3", "cephaly-success-6": "Durée : 1 mois - Impact : Grave - Bonus : 3 - Elegie : 3",
"cephaly-success-78": "Durée : 1 année - Impact : Majeur - Bonus : 4 - Elegie : 4", "cephaly-success-8": "Durée : 1 année - Impact : Majeur - Bonus : 4 - Elegie : 4",
"cephaly-success-910": "Durée : Permanent - Impact : Mort - Bonus : 5 - Elegie : 5", "cephaly-success-10": "Durée : Permanent - Impact : Mort - Bonus : 5 - Elegie : 5",
"cephaly-failure-2": "Durée : 1 scène - Impact : Superficiel - Malus : 1 - Symptôme non visible et sans gravité - Altération bégigne difficilement repérable", "cephaly-failure-2": "Durée : 1 scène - Impact : Superficiel - Malus : 1 - Symptôme non visible et sans gravité - Altération bégigne difficilement repérable",
"cephaly-failure-4": "Durée : 1 semaine - Impact : Léger - Malus : 2 - Symptôme visible non incapacitant - Altération repérable", "cephaly-failure-4": "Durée : 1 semaine - Impact : Léger - Malus : 2 - Symptôme visible non incapacitant - Altération repérable",
"cephaly-failure-6": "Durée : 1 mois - Impact : Grave - Malus : 3 - Symptôme incapacitant - Altération repérable et fâcheuse", "cephaly-failure-6": "Durée : 1 mois - Impact : Grave - Malus : 3 - Symptôme incapacitant - Altération repérable et fâcheuse",
@ -49,6 +54,7 @@
"notenoughdice": "L'Accomplissement et la Préservation doivent avoir 2 dés chacun" "notenoughdice": "L'Accomplissement et la Préservation doivent avoir 2 dés chacun"
}, },
"ui": { "ui": {
"equipmentfree": "Equipements (saisie libre)",
"traitType": "Type de trait", "traitType": "Type de trait",
"niveauTrait": "Niveau du trait", "niveauTrait": "Niveau du trait",
"effect": "Incidence", "effect": "Incidence",
@ -157,7 +163,13 @@
"oniricform": "Forme Onorique (Bohême)", "oniricform": "Forme Onorique (Bohême)",
"ideals": "Idéaux", "ideals": "Idéaux",
"politic": "Idéaux politiques", "politic": "Idéaux politiques",
"boheme": "Bohême" "boheme": "Bohême",
"annencybonus": "Bonus d'Anence",
"bornplace": "Lieu de naissance",
"residence": "Résidence",
"origin": "Origine",
"childhood": "Enfance",
"bonus": "Bonus"
} }
} }
} }

View File

@ -6,12 +6,12 @@
import { EcrymeUtility } from "../common/ecryme-utility.js"; import { EcrymeUtility } from "../common/ecryme-utility.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
export class EcrymeActorSheet extends ActorSheet { export class EcrymeActorSheet extends foundry.appv1.sheets.ActorSheet {
/** @override */ /** @override */
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["fvtt-ecryme", "sheet", "actor"], classes: ["fvtt-ecryme", "sheet", "actor"],
template: "systems/fvtt-ecryme/templates/actors/actor-sheet.hbs", template: "systems/fvtt-ecryme/templates/actors/actor-sheet.hbs",
width: 860, width: 860,
@ -33,7 +33,7 @@ export class EcrymeActorSheet extends ActorSheet {
name: this.actor.name, name: this.actor.name,
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
system: duplicate(this.object.system), system: foundry.utils.duplicate(this.object.system),
limited: this.object.limited, limited: this.object.limited,
skills: this.actor.prepareSkills(), skills: this.actor.prepareSkills(),
traits: this.actor.getRollTraits(), traits: this.actor.getRollTraits(),
@ -41,21 +41,21 @@ export class EcrymeActorSheet extends ActorSheet {
ideal: this.actor.getIdeal(), ideal: this.actor.getIdeal(),
spleen: this.actor.getSpleen(), spleen: this.actor.getSpleen(),
impacts: this.object.getImpacts(), impacts: this.object.getImpacts(),
config: duplicate(game.system.ecryme.config), config: foundry.utils.duplicate(game.system.ecryme.config),
weapons: this.actor.getWeapons(), weapons: this.actor.getWeapons(),
maneuvers: this.actor.getManeuvers(), maneuvers: this.actor.getManeuvers(),
impactsMalus: this.actor.getImpactsMalus(), impactsMalus: this.actor.getImpactsMalus(),
archetype: duplicate(this.actor.getArchetype()), archetype: foundry.utils.duplicate(this.actor.getArchetype()),
equipements: this.actor.getEquipments(), equipments: this.actor.getEquipments(),
hasCephaly: EcrymeUtility.hasCephaly(), hasCephaly: EcrymeUtility.hasCephaly(),
hasBoheme: EcrymeUtility.hasBoheme(), hasBoheme: EcrymeUtility.hasBoheme(),
hasAmertume: EcrymeUtility.hasAmertume(), hasAmertume: EcrymeUtility.hasAmertume(),
cephalySkills: this.actor.getCephalySkills(), cephalySkills: this.actor.getCephalySkills(),
subActors: duplicate(this.actor.getSubActors()), subActors: foundry.utils.duplicate(this.actor.getSubActors()),
annency: this.actor.getAnnency(), annency: this.actor.getAnnency(),
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }), description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.biodata.description, { async: true }),
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }), notes: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.biodata.notes, { async: true }),
equipementlibre: await TextEditor.enrichHTML(this.object.system.equipementlibre, { async: true }), equipementlibre: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.equipmentfree, { async: true }),
options: this.options, options: this.options,
owner: this.document.isOwner, owner: this.document.isOwner,
editScore: this.options.editScore, editScore: this.options.editScore,
@ -75,10 +75,10 @@ export class EcrymeActorSheet extends ActorSheet {
// Everything below here is only needed if the sheet is editable // Everything below here is only needed if the sheet is editable
if (!this.options.editable) return; if (!this.options.editable) return;
html.bind("keydown", function(e) { // Ignore Enter in actores sheet html.bind("keydown", function(e) { // Ignore Enter in actores sheet
if (e.keyCode === 13) return false; if (e.keyCode === 13) return false;
}); });
html.find('.open-annency').click(ev => { html.find('.open-annency').click(ev => {
let actorId = $(ev.currentTarget).data("annency-id") let actorId = $(ev.currentTarget).data("annency-id")
@ -90,6 +90,9 @@ export class EcrymeActorSheet extends ActorSheet {
html.find('.item-edit').click(ev => { html.find('.item-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item") const li = $(ev.currentTarget).parents(".item")
let itemId = li.data("item-id") let itemId = li.data("item-id")
if (!itemId) {
itemId = $(ev.currentTarget).data("item-id")
}
const item = this.actor.items.get( itemId ); const item = this.actor.items.get( itemId );
item.sheet.render(true); item.sheet.render(true);
}); });
@ -102,14 +105,14 @@ export class EcrymeActorSheet extends ActorSheet {
let dataType = $(ev.currentTarget).data("type") let dataType = $(ev.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true }) this.actor.createEmbeddedDocuments('Item', [{ name: "NewItem", type: dataType }], { renderSheet: true })
}) })
html.find('.subactor-edit').click(ev => { html.find('.subactor-edit').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
let actorId = li.data("actor-id"); let actorId = li.data("actor-id");
let actor = game.actors.get( actorId ); let actor = game.actors.get( actorId );
actor.sheet.render(true); actor.sheet.render(true);
}); });
html.find('.subactor-delete').click(ev => { html.find('.subactor-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
let actorId = li.data("actor-id"); let actorId = li.data("actor-id");
@ -128,7 +131,13 @@ export class EcrymeActorSheet extends ActorSheet {
let categKey = $(event.currentTarget).data("category-key") let categKey = $(event.currentTarget).data("category-key")
let skillKey = $(event.currentTarget).data("skill-key") let skillKey = $(event.currentTarget).data("skill-key")
this.actor.rollSkill(categKey, skillKey) this.actor.rollSkill(categKey, skillKey)
}); });
html.find('.roll-spec').click((event) => {
let categKey = $(event.currentTarget).data("category-key")
let skillKey = $(event.currentTarget).data("skill-key")
let specId = $(event.currentTarget).data("spec-id")
this.actor.rollSpec(categKey, skillKey, specId)
});
html.find('.roll-skill-confront').click((event) => { html.find('.roll-skill-confront').click((event) => {
let categKey = $(event.currentTarget).data("category-key") let categKey = $(event.currentTarget).data("category-key")
let skillKey = $(event.currentTarget).data("skill-key") let skillKey = $(event.currentTarget).data("skill-key")
@ -142,36 +151,36 @@ export class EcrymeActorSheet extends ActorSheet {
const li = $(event.currentTarget).parents(".item") const li = $(event.currentTarget).parents(".item")
let weaponId = li.data("item-id"); let weaponId = li.data("item-id");
this.actor.rollWeaponConfront(weaponId) this.actor.rollWeaponConfront(weaponId)
}); });
html.find('.impact-modify').click((event) => { html.find('.impact-modify').click((event) => {
let impactType = $(event.currentTarget).data("impact-type") let impactType = $(event.currentTarget).data("impact-type")
let impactLevel = $(event.currentTarget).data("impact-level") let impactLevel = $(event.currentTarget).data("impact-level")
let modifier = Number($(event.currentTarget).data("impact-modifier")) let modifier = Number($(event.currentTarget).data("impact-modifier"))
this.actor.modifyImpact(impactType, impactLevel, modifier) this.actor.modifyImpact(impactType, impactLevel, modifier)
}); });
html.find('.roll-weapon').click((event) => { html.find('.roll-weapon').click((event) => {
const armeId = $(event.currentTarget).data("arme-id") const armeId = $(event.currentTarget).data("arme-id")
this.actor.rollArme(armeId) this.actor.rollArme(armeId)
}); });
html.find('.lock-unlock-sheet').click((event) => { html.find('.lock-unlock-sheet').click((event) => {
this.options.editScore = !this.options.editScore; this.options.editScore = !this.options.editScore;
this.render(true); this.render(true);
}); });
html.find('.item-equip').click(ev => { html.find('.item-equip').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
this.actor.equipItem( li.data("item-id") ); this.actor.equipItem( li.data("item-id") );
this.render(true); this.render(true);
}); });
html.find('.update-field').change(ev => { html.find('.update-field').change(ev => {
const fieldName = $(ev.currentTarget).data("field-name"); const fieldName = $(ev.currentTarget).data("field-name");
let value = Number(ev.currentTarget.value); let value = Number(ev.currentTarget.value);
this.actor.update( { [`${fieldName}`]: value } ); this.actor.update( { [`${fieldName}`]: value } );
}); });
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
/** @override */ /** @override */
setPosition(options = {}) { setPosition(options = {}) {

View File

@ -29,7 +29,7 @@ export class EcrymeActor extends Actor {
if (data instanceof Array) { if (data instanceof Array) {
return super.create(data, options); return super.create(data, options);
} }
// If the created actor has items (only applicable to duplicated actors) bypass the new actor creation logic // If the created actor has items (only applicable to foundry.utils.duplicated actors) bypass the new actor creation logic
if (data.items) { if (data.items) {
let actor = super.create(data, options); let actor = super.create(data, options);
return actor; return actor;
@ -54,6 +54,18 @@ export class EcrymeActor extends Actor {
super._preUpdate(changed, options, user); super._preUpdate(changed, options, user);
} }
/* -------------------------------------------- */
async _preCreate(data, options, user) {
await super._preCreate(data, options, user);
// Configure prototype token settings
const prototypeToken = {};
if (this.type === "pc") Object.assign(prototypeToken, {
sight: { enabled: true }, actorLink: true, disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY
});
this.updateSource({ prototypeToken });
}
/* -------------------------------------------- */ /* -------------------------------------------- */
getMoneys() { getMoneys() {
let comp = this.items.filter(item => item.type == 'money'); let comp = this.items.filter(item => item.type == 'money');
@ -61,7 +73,7 @@ export class EcrymeActor extends Actor {
return comp; return comp;
} }
getArchetype() { getArchetype() {
let comp = duplicate(this.items.find(item => item.type == 'archetype') || { name: "Pas d'archetype" }) let comp = foundry.utils.duplicate(this.items.find(item => item.type == 'archetype') || { name: "Pas d'archetype" })
if (comp?.system) { if (comp?.system) {
comp.tarot = EcrymeUtility.getTarot(comp.system.lametutelaire) comp.tarot = EcrymeUtility.getTarot(comp.system.lametutelaire)
} }
@ -80,7 +92,7 @@ export class EcrymeActor extends Actor {
} }
/* ----------------------- --------------------- */ /* ----------------------- --------------------- */
addAnnencyActor(actorId) { addAnnencyActor(actorId) {
let members = duplicate(this.system.base.characters) let members = foundry.utils.duplicate(this.system.base.characters)
members.push(actorId) members.push(actorId)
this.update({ 'system.base.characters': members }) this.update({ 'system.base.characters': members })
} }
@ -91,7 +103,8 @@ export class EcrymeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getAnnency() { getAnnency() {
return game.actors.find(a => a.type == 'annency' && a.system.base.characters.includes(this.id)) let annency = game.actors.find(a => a.type == 'annency' && a.system.base.characters.includes(this.id))
return annency || {}
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getConfrontations() { getConfrontations() {
@ -123,7 +136,7 @@ export class EcrymeActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
prepareSkills() { prepareSkills() {
let skills = duplicate(this.system.skills) let skills = foundry.utils.duplicate(this.system.skills)
for (let categKey in skills) { for (let categKey in skills) {
let category = skills[categKey] let category = skills[categKey]
for (let skillKey in category.skilllist) { for (let skillKey in category.skilllist) {
@ -135,22 +148,22 @@ export class EcrymeActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getCephalySkills() { getCephalySkills() {
let skills = duplicate(this.system.cephaly.skilllist) let skills = foundry.utils.duplicate(this.system.cephaly.skilllist)
return skills return skills
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getImpacts() { getImpacts() {
let comp = duplicate(this.items.filter(item => item.type == 'impact') || []) let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'impact') || [])
return comp; return comp;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getWeapons() { getWeapons() {
let comp = duplicate(this.items.filter(item => item.type == 'weapon') || []) let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'weapon') || [])
EcrymeUtility.sortArrayObjectsByName(comp) EcrymeUtility.sortArrayObjectsByName(comp)
return comp; return comp;
} }
getManeuvers() { getManeuvers() {
let comp = duplicate(this.items.filter(item => item.type == 'maneuver') || []) let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'maneuver') || [])
EcrymeUtility.sortArrayObjectsByName(comp) EcrymeUtility.sortArrayObjectsByName(comp)
return comp; return comp;
} }
@ -158,7 +171,7 @@ export class EcrymeActor extends Actor {
getItemById(id) { getItemById(id) {
let item = this.items.find(item => item.id == id); let item = this.items.find(item => item.id == id);
if (item) { if (item) {
item = duplicate(item) item = foundry.utils.duplicate(item)
} }
return item; return item;
} }
@ -188,12 +201,12 @@ export class EcrymeActor extends Actor {
/* ------------------------------------------- */ /* ------------------------------------------- */
getEquipments() { getEquipments() {
return this.items.filter(item => item.type == 'equipement') return this.items.filter(item => item.type == 'equipment')
} }
/* ------------------------------------------- */ /* ------------------------------------------- */
async buildContainerTree() { async buildContainerTree() {
let equipments = duplicate(this.items.filter(item => item.type == "equipment") || []) let equipments = foundry.utils.duplicate(this.items.filter(item => item.type == "equipment") || [])
for (let equip1 of equipments) { for (let equip1 of equipments) {
if (equip1.system.iscontainer) { if (equip1.system.iscontainer) {
equip1.system.contents = [] equip1.system.contents = []
@ -288,13 +301,13 @@ export class EcrymeActor extends Actor {
getSubActors() { getSubActors() {
let subActors = []; let subActors = [];
for (let id of this.system.subactors) { for (let id of this.system.subactors) {
subActors.push(duplicate(game.actors.get(id))) subActors.push(foundry.utils.duplicate(game.actors.get(id)))
} }
return subActors; return subActors;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async addSubActor(subActorId) { async addSubActor(subActorId) {
let subActors = duplicate(this.system.subactors); let subActors = foundry.utils.duplicate(this.system.subactors);
subActors.push(subActorId); subActors.push(subActorId);
await this.update({ 'system.subactors': subActors }); await this.update({ 'system.subactors': subActors });
} }
@ -336,7 +349,7 @@ export class EcrymeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
modifyConfrontBonus( modifier ) { modifyConfrontBonus( modifier ) {
let newBonus = this.system.internals.confrontbonus + bonus let newBonus = this.system.internals.confrontbonus + modifier
this.update({'system.internals.confrontbonus': newBonus}) this.update({'system.internals.confrontbonus': newBonus})
} }
@ -365,9 +378,10 @@ export class EcrymeActor extends Actor {
rollData.actorId = this.id rollData.actorId = this.id
rollData.img = this.img rollData.img = this.img
rollData.isReroll = false rollData.isReroll = false
rollData.traits = duplicate(this.getRollTraits()) rollData.config = game.system.ecryme.config
rollData.spleen = duplicate(this.getSpleen() || {}) rollData.traits = foundry.utils.duplicate(this.getRollTraits())
rollData.ideal = duplicate(this.getIdeal() || {}) rollData.spleen = foundry.utils.duplicate(this.getSpleen() || {})
rollData.ideal = foundry.utils.duplicate(this.getIdeal() || {})
rollData.confrontBonus = this.getBonusList() rollData.confrontBonus = this.getBonusList()
return rollData return rollData
@ -375,14 +389,30 @@ export class EcrymeActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getCommonSkill(categKey, skillKey) { getCommonSkill(categKey, skillKey) {
let skill = this.system.skills[categKey].skilllist[skillKey]
let rollData = this.getCommonRollData() let rollData = this.getCommonRollData()
// Specific NPC case
let skill
if (skillKey == "rawnpc") {
skill = {
name: "ECRY.ui." + categKey,
max: 10,
value: this.system.skills[categKey].pnjvalue,
spec: []
}
} else {
skill = this.system.skills[categKey].skilllist[skillKey]
skill = foundry.utils.duplicate(skill)
skill.spec = this.getSpecializations(skillKey)
}
skill = duplicate(skill) rollData.skillLevelOptions = [];
for (let i=0; i<=skill.value; i++) {
rollData.skillLevelOptions[i] = `${i}`
}
skill.categKey = categKey skill.categKey = categKey
skill.skillKey = skillKey skill.skillKey = skillKey
skill.spec = this.getSpecializations(skillKey)
rollData.skill = skill rollData.skill = skill
rollData.img = skill.img rollData.img = skill.img
rollData.impactMalus = this.getImpactMalus(categKey) rollData.impactMalus = this.getImpactMalus(categKey)
@ -398,6 +428,17 @@ export class EcrymeActor extends Actor {
this.startRoll(rollData).catch("Error on startRoll") this.startRoll(rollData).catch("Error on startRoll")
} }
/* -------------------------------------------- */
rollSpec(categKey, skillKey, specId) {
let rollData = this.getCommonSkill(categKey, skillKey)
let spec = this.items.find(it => it.type == "specialization" && it.id == specId)
rollData.mode = "skill"
rollData.selectedSpecs = [spec.id]
rollData.forcedSpec = foundry.utils.duplicate(spec)
rollData.title = game.i18n.localize(rollData.skill.name)
this.startRoll(rollData).catch("Error on startRoll")
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollSkillConfront(categKey, skillKey) { async rollSkillConfront(categKey, skillKey) {
let rollData = this.getCommonSkill(categKey, skillKey) let rollData = this.getCommonSkill(categKey, skillKey)
@ -406,8 +447,9 @@ export class EcrymeActor extends Actor {
rollData.executionTotal = rollData.skill.value rollData.executionTotal = rollData.skill.value
rollData.preservationTotal = rollData.skill.value rollData.preservationTotal = rollData.skill.value
rollData.applyTranscendence = "execution" rollData.applyTranscendence = "execution"
rollData.traitsBonus = duplicate(rollData.traits) rollData.traitsBonus = foundry.utils.duplicate(rollData.traits)
rollData.traitsMalus = duplicate(rollData.traits) rollData.traitsMalus = foundry.utils.duplicate(rollData.traits)
console.log("ROLLDATA", rollData)
let confrontStartDialog = await EcrymeConfrontStartDialog.create(this, rollData) let confrontStartDialog = await EcrymeConfrontStartDialog.create(this, rollData)
confrontStartDialog.render(true) confrontStartDialog.render(true)
} }
@ -415,16 +457,16 @@ export class EcrymeActor extends Actor {
async rollCephalySkillConfront(skillKey) { async rollCephalySkillConfront(skillKey) {
let rollData = this.getCommonRollData() let rollData = this.getCommonRollData()
rollData.mode = "cephaly" rollData.mode = "cephaly"
rollData.skill = duplicate(this.system.cephaly.skilllist[skillKey]) rollData.skill = foundry.utils.duplicate(this.system.cephaly.skilllist[skillKey])
rollData.annency = foundry.utils.duplicate(this.getAnnency())
rollData.img = rollData.skill.img rollData.img = rollData.skill.img
rollData.skill.categKey = "cephaly" rollData.skill.categKey = "cephaly"
rollData.skill.skillKey = skillKey rollData.skill.skillKey = skillKey
//rollData.impactMalus = this.getImpactMalus(categKey)
rollData.title = game.i18n.localize("ECRY.ui.cephaly") + " : " + game.i18n.localize(rollData.skill.name) rollData.title = game.i18n.localize("ECRY.ui.cephaly") + " : " + game.i18n.localize(rollData.skill.name)
rollData.executionTotal = rollData.skill.value rollData.executionTotal = rollData.skill.value
rollData.preservationTotal = rollData.skill.value rollData.preservationTotal = rollData.skill.value
rollData.traitsBonus = duplicate(rollData.traits) rollData.traitsBonus = foundry.utils.duplicate(rollData.traits)
rollData.traitsMalus = duplicate(rollData.traits) rollData.traitsMalus = foundry.utils.duplicate(rollData.traits)
rollData.applyTranscendence = "execution" rollData.applyTranscendence = "execution"
let confrontStartDialog = await EcrymeConfrontStartDialog.create(this, rollData) let confrontStartDialog = await EcrymeConfrontStartDialog.create(this, rollData)
confrontStartDialog.render(true) confrontStartDialog.render(true)
@ -440,10 +482,12 @@ export class EcrymeActor extends Actor {
rollData = this.getCommonSkill("physical", "shooting") rollData = this.getCommonSkill("physical", "shooting")
} }
rollData.mode = "weapon" rollData.mode = "weapon"
rollData.weapon = duplicate(weapon) rollData.weapon = foundry.utils.duplicate(weapon)
rollData.title = game.i18n.localize("ECRY.ui.confrontation") + " : " + game.i18n.localize(rollData.skill.name) rollData.title = game.i18n.localize("ECRY.ui.confrontation") + " : " + game.i18n.localize(rollData.skill.name)
rollData.executionTotal = rollData.skill.value rollData.executionTotal = rollData.skill.value
rollData.preservationTotal = rollData.skill.value rollData.preservationTotal = rollData.skill.value
rollData.traitsBonus = foundry.utils.duplicate(rollData.traits)
rollData.traitsMalus = foundry.utils.duplicate(rollData.traits)
rollData.applyTranscendence = "execution" rollData.applyTranscendence = "execution"
let confrontStartDialog = await EcrymeConfrontStartDialog.create(this, rollData) let confrontStartDialog = await EcrymeConfrontStartDialog.create(this, rollData)
confrontStartDialog.render(true) confrontStartDialog.render(true)
@ -453,12 +497,12 @@ export class EcrymeActor extends Actor {
rollWeapon(weaponId) { rollWeapon(weaponId) {
let weapon = this.items.get(weaponId) let weapon = this.items.get(weaponId)
if (weapon) { if (weapon) {
weapon = duplicate(weapon) weapon = foundry.utils.duplicate(weapon)
let rollData = this.getCommonRollData() let rollData = this.getCommonRollData()
if (weapon.system.armetype == "mainsnues" || weapon.system.armetype == "epee") { if (weapon.system.armetype == "mainsnues" || weapon.system.armetype == "epee") {
rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor((this.getPhysiqueMalus() + this.system.attributs.physique.value + this.system.attributs.habilite.value) / 2) } rollData.attr = { label: "(Physique+Habilité)/2", value: Math.floor((this.getPhysiqueMalus() + this.system.attributs.physique.value + this.system.attributs.habilite.value) / 2) }
} else { } else {
rollData.attr = duplicate(this.system.attributs.habilite) rollData.attr = foundry.utils.duplicate(this.system.attributs.habilite)
} }
rollData.mode = "weapon" rollData.mode = "weapon"
rollData.weapon = weapon rollData.weapon = weapon

View File

@ -6,12 +6,12 @@
import { EcrymeUtility } from "../common/ecryme-utility.js"; import { EcrymeUtility } from "../common/ecryme-utility.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
export class EcrymeAnnencySheet extends ActorSheet { export class EcrymeAnnencySheet extends foundry.appv1.sheets.ActorSheet {
/** @override */ /** @override */
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["fvtt-ecryme", "sheet", "actor"], classes: ["fvtt-ecryme", "sheet", "actor"],
template: "systems/fvtt-ecryme/templates/actors/annency-sheet.hbs", template: "systems/fvtt-ecryme/templates/actors/annency-sheet.hbs",
width: 640, width: 640,
@ -33,9 +33,9 @@ export class EcrymeAnnencySheet extends ActorSheet {
name: this.actor.name, name: this.actor.name,
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
system: duplicate(this.object.system), system: foundry.utils.duplicate(this.object.system),
limited: this.object.limited, limited: this.object.limited,
config: duplicate(game.system.ecryme.config), config: foundry.utils.duplicate(game.system.ecryme.config),
hasCephaly: EcrymeUtility.hasCephaly(), hasCephaly: EcrymeUtility.hasCephaly(),
hasBoheme: EcrymeUtility.hasBoheme(), hasBoheme: EcrymeUtility.hasBoheme(),
hasAmertume: EcrymeUtility.hasAmertume(), hasAmertume: EcrymeUtility.hasAmertume(),
@ -75,7 +75,7 @@ export class EcrymeAnnencySheet extends ActorSheet {
let actorId = li.data("actor-id") let actorId = li.data("actor-id")
this.actor.removeAnnencyActor(actorId) this.actor.removeAnnencyActor(actorId)
}) })
// Update Inventory Item // Update Inventory Item
html.find('.item-edit').click(ev => { html.find('.item-edit').click(ev => {

View File

@ -43,7 +43,7 @@ export class EcrymeCharacterSummary extends Application {
/* -------------------------------------------- */ /* -------------------------------------------- */
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return foundry.utils.mergeObject(super.defaultOptions, {
template: "systems/fvtt-ecryme/templates/dialogs/character-summary.hbs", template: "systems/fvtt-ecryme/templates/dialogs/character-summary.hbs",
popOut: true, popOut: true,
resizable: true, resizable: true,

View File

@ -10,14 +10,14 @@ export const ECRYME_CONFIG = {
"melee": "ECRY.ui.melee", "melee": "ECRY.ui.melee",
"ranged": "ECRY.ui.ranged" "ranged": "ECRY.ui.ranged"
}, },
traitLevel: [ traitLevel: {
{value: -3, text: "-3"}, "-3":{value: "-3", text: "-3"},
{value: -2, text: "-2"}, "-2":{value: "-2", text: "-2"},
{value: -1, text: "-1"}, "-1":{value: "-1", text: "-1"},
{value: +1, text: "+1"}, "+1":{value: "+1", text: "+1"},
{value: +2, text: "+2"}, "+2":{value: "+2", text: "+2"},
{value: +3, text: "+3"} "+3":{value: "+3", text: "+3"}
], },
impactTypes: { impactTypes: {
physical: "ECRY.ui.physical", physical: "ECRY.ui.physical",
mental: "ECRY.ui.mental", mental: "ECRY.ui.mental",
@ -30,7 +30,7 @@ export const ECRYME_CONFIG = {
major: "ECRY.ui.major" major: "ECRY.ui.major"
}, },
difficulty: { difficulty: {
"-1": {difficulty: "ECRY.ui.none", frequency: "ECRY.ui.none", value: "-"}, "-1": {difficulty: "ECRY.ui.none", frequency: "ECRY.ui.none", value: "-1"},
"8": { difficulty: "ECRY.ui.troublesome", frequency: "ECRY.ui.occasional", value: 8 }, "8": { difficulty: "ECRY.ui.troublesome", frequency: "ECRY.ui.occasional", value: 8 },
"10": { difficulty: "ECRY.ui.difficult", frequency: "ECRY.ui.uncommon", value: 10 }, "10": { difficulty: "ECRY.ui.difficult", frequency: "ECRY.ui.uncommon", value: 10 },
"12": { difficulty: "ECRY.ui.verydifficult", frequency: "ECRY.ui.rare", value: 12 }, "12": { difficulty: "ECRY.ui.verydifficult", frequency: "ECRY.ui.rare", value: 12 },
@ -57,6 +57,19 @@ export const ECRYME_CONFIG = {
"lige": {name: "ECRY.ui.lige", value: 100 }, "lige": {name: "ECRY.ui.lige", value: 100 },
"hurle": {name: "ECRY.ui.hurle", value: 10 }, "hurle": {name: "ECRY.ui.hurle", value: 10 },
"coin": {name: "ECRY.ui.coin", value: 1 } "coin": {name: "ECRY.ui.coin", value: 1 }
},
transcendanceOptions: {
"execution": "ECRY.ui.execution",
"preservation": "ECRY.ui.preservation"
},
bonusMalusPersoOptions: {
"-3": {value: "-3", label: "-3"},
"-2": {value: "-2", label: "-2"},
"-1": {value: "-1", label: "-1"},
"0": {value: "0", label: "0"},
"+1": {value: "1", label: "+1"},
"+2": {value: "2", label: "+2"},
"+3": {value: "3", label: "+3"}
} }
} }

View File

@ -36,7 +36,7 @@ export class EcrymeUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async init() { static async init() {
Hooks.on('renderChatLog', (log, html, data) => EcrymeUtility.chatListeners(html)); Hooks.on('renderChatLog', (log, html, data) => EcrymeUtility.chatListeners(html));
Hooks.on("getChatLogEntryContext", (html, options) => EcrymeUtility.chatMenuManager(html, options)); Hooks.on("getChatMessageContextOptions", (html, options) => EcrymeUtility.chatMenuManager(html, options));
this.rollDataStore = {} this.rollDataStore = {}
this.defenderStore = {} this.defenderStore = {}
@ -97,6 +97,7 @@ export class EcrymeUtility {
"level_b": game.i18n.localize("ECRY.settings.boheme"), "level_b": game.i18n.localize("ECRY.settings.boheme"),
"level_a": game.i18n.localize("ECRY.settings.amertume"), "level_a": game.i18n.localize("ECRY.settings.amertume"),
}, },
default: "level_a",
restricted: true restricted: true
}) })
@ -119,14 +120,14 @@ export class EcrymeUtility {
let level = game.settings.get("fvtt-ecryme", "ecryme-game-level") let level = game.settings.get("fvtt-ecryme", "ecryme-game-level")
return level == "level_a" return level == "level_a"
} }
/*-------------------------------------------- */ /*-------------------------------------------- */
static buildSkillConfig() { static buildSkillConfig() {
game.system.ecryme.config.skills = {} game.system.ecryme.config.skills = {}
for (let categKey in game.data.template.Actor.templates.core.skills) { for (let categKey in game.data.template.Actor.templates.core.skills) {
let category = game.data.template.Actor.templates.core.skills[categKey] let category = game.data.template.Actor.templates.core.skills[categKey]
for (let skillKey in category.skilllist) { for (let skillKey in category.skilllist) {
let skill = duplicate(category.skilllist[skillKey]) let skill = foundry.utils.duplicate(category.skilllist[skillKey])
skill.categKey = categKey // Auto reference the category skill.categKey = categKey // Auto reference the category
game.system.ecryme.config.skills[skillKey] = skill game.system.ecryme.config.skills[skillKey] = skill
} }
@ -215,13 +216,13 @@ export class EcrymeUtility {
confront.impactPreservation = this.getImpactFromEffect(Math.abs(confront.effectPreservation)) confront.impactPreservation = this.getImpactFromEffect(Math.abs(confront.effectPreservation))
} }
if (confront.marginPreservation > 0) { if (confront.marginPreservation > 0) {
confront.bonus1 = -confront.marginPreservation confront.bonus1 = confront.marginPreservation
} }
let msg = await this.createChatWithRollMode(this.confrontData1.alias, { let msg = await this.createChatWithRollMode(this.confrontData1.alias, {
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-confrontation-result.hbs`, confront) content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-confrontation-result.hbs`, confront)
}) })
msg.setFlag("world", "ecryme-rolldata", confront) await msg.setFlag("world", "ecryme-rolldata", confront)
console.log("Confront result", confront) console.log("Confront result", confront)
this.lastConfront = confront this.lastConfront = confront
@ -272,20 +273,17 @@ export class EcrymeUtility {
let canTranscendRoll = [] let canTranscendRoll = []
for (let i = 1; i <= 10; i++) { for (let i = 1; i <= 10; i++) {
canTranscendRoll[i] = function (li) { canTranscendRoll[i] = function (li) {
let message = game.messages.get(li.attr("data-message-id")) let message = game.messages.get($(li).attr("data-message-id"))
let rollData = message.getFlag("world", "rolldata") let rollData = message.getFlag("world", "rolldata")
//console.log(">>>>>>>>>>>>>>>>>>>>>>>>>> Menu !!!!", rollData) //console.log(">>>>>>>>>>>>>>>>>>>>>>>>>> Menu !!!!", rollData)
if (rollData.skill && i <= rollData.skill.value && !rollData.transcendUsed && rollData.spec) { return (rollData?.skill?.value >= i && !rollData.transcendUsed && rollData.spec)
return true
}
return false
} }
options.push({ options.push({
name: game.i18n.localize("ECRY.chat.spectranscend") + i, name: game.i18n.localize("ECRY.chat.spectranscend") + i,
icon: '<i class="fas fa-plus-square"></i>', icon: '<i class="fas fa-plus-square"></i>',
condition: canTranscendRoll[i], condition: canTranscendRoll[i],
callback: li => { callback: li => {
let message = game.messages.get(li.attr("data-message-id")) let message = game.messages.get($(li).attr("data-message-id"))
let rollData = message.getFlag("world", "rolldata") let rollData = message.getFlag("world", "rolldata")
EcrymeUtility.transcendFromSpec(rollData, i).catch("Error on Transcend") EcrymeUtility.transcendFromSpec(rollData, i).catch("Error on Transcend")
} }
@ -296,26 +294,27 @@ export class EcrymeUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async chatListeners(html) { static async chatListeners(html) {
html.on("click", '.button-select-confront', event => { $(html).on("click", '.button-select-confront', event => {
let messageId = EcrymeUtility.findChatMessageId(event.currentTarget) let messageId = EcrymeUtility.findChatMessageId(event.currentTarget)
let message = game.messages.get(messageId) let message = game.messages.get(messageId)
let rollData = message.getFlag("world", "ecryme-rolldata") let rollData = message.getFlag("world", "ecryme-rolldata")
ui.notifications.info( game.i18n.localize("ECRY.chat.confrontselect"))
EcrymeUtility.manageConfrontation(rollData) EcrymeUtility.manageConfrontation(rollData)
}) })
html.on("click", '.button-apply-cephaly-difficulty', event => { $(html).on("click", '.button-apply-cephaly-difficulty', event => {
let messageId = EcrymeUtility.findChatMessageId(event.currentTarget) let messageId = EcrymeUtility.findChatMessageId(event.currentTarget)
let message = game.messages.get(messageId) let message = game.messages.get(messageId)
let rollData = message.getFlag("world", "ecryme-rolldata") let rollData = message.getFlag("world", "ecryme-rolldata")
let difficulty = $("#" + rollData.rollId + "-cephaly-difficulty").val() let difficulty = $("#" + rollData.rollId + "-cephaly-difficulty").val()
EcrymeUtility.manageCephalyDifficulty(rollData, difficulty) EcrymeUtility.manageCephalyDifficulty(rollData, difficulty)
}) })
html.on("click", '.button-apply-impact', event => { $(html).on("click", '.button-apply-impact', event => {
let messageId = EcrymeUtility.findChatMessageId(event.currentTarget) let messageId = EcrymeUtility.findChatMessageId(event.currentTarget)
let message = game.messages.get(messageId) let message = game.messages.get(messageId)
let actor = game.actors.get($(event.currentTarget).data("actor-id")) let actor = game.actors.get($(event.currentTarget).data("actor-id"))
actor.modifyImpact($(event.currentTarget).data("impact-type"), $(event.currentTarget).data("impact"), 1) actor.modifyImpact($(event.currentTarget).data("impact-type"), $(event.currentTarget).data("impact"), 1)
}) })
html.on("click", '.button-apply-bonus', event => { $(html).on("click", '.button-apply-bonus', event => {
let messageId = EcrymeUtility.findChatMessageId(event.currentTarget) let messageId = EcrymeUtility.findChatMessageId(event.currentTarget)
let message = game.messages.get(messageId) let message = game.messages.get(messageId)
let actor = game.actors.get($(event.currentTarget).data("actor-id")) let actor = game.actors.get($(event.currentTarget).data("actor-id"))
@ -337,7 +336,7 @@ export class EcrymeUtility {
'systems/fvtt-ecryme/templates/dialogs/partial-confront-bonus-area.hbs', 'systems/fvtt-ecryme/templates/dialogs/partial-confront-bonus-area.hbs',
'systems/fvtt-ecryme/templates/actors/partial-impacts.hbs', 'systems/fvtt-ecryme/templates/actors/partial-impacts.hbs',
] ]
return loadTemplates(templatePaths); return foundry.applications.handlebars.loadTemplates(templatePaths);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -403,16 +402,21 @@ export class EcrymeUtility {
let id = rollData.rollId let id = rollData.rollId
let oldRollData = this.rollDataStore[id] || {} let oldRollData = this.rollDataStore[id] || {}
let newRollData = mergeObject(oldRollData, rollData) let newRollData = foundry.utils.mergeObject(oldRollData, rollData)
this.rollDataStore[id] = newRollData this.rollDataStore[id] = newRollData
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static async onSocketMesssage(msg) { static async onSocketMesssage(msg) {
console.log("SOCKET MESSAGE", msg.name) console.log("SOCKET MESSAGE", msg)
if (msg.name == "msg-draw-card") { if (msg.name == "msg_gm_chat_message") {
if (game.user.isGM && game.system.ecryme.currentTirage) { let rollData = msg.data.rollData
game.system.ecryme.currentTirage.addCard(msg.data.msgId) if ( game.user.isGM ) {
let chatMsg = await this.createChatMessage(rollData.alias, "blindroll", {
content: await renderTemplate(msg.data.template, rollData),
whisper: game.user.id
})
chatMsg.setFlag("world", "ecryme-rolldata", rollData)
} }
} }
} }
@ -492,7 +496,7 @@ export class EcrymeUtility {
rollData.margin = rollData.total - rollData.difficulty rollData.margin = rollData.total - rollData.difficulty
if (rollData.total > rollData.difficulty) { if (rollData.total > rollData.difficulty) {
rollData.isSuccess = true rollData.isSuccess = true
let maxMargin = rollData.skill.value + (rollData.spec) ? 2 : 0 let maxMargin = rollData.skill.value + ((rollData.spec) ? 2 : 0)
rollData.margin = Math.min(rollData.margin, maxMargin) rollData.margin = Math.min(rollData.margin, maxMargin)
} }
} }
@ -516,7 +520,7 @@ export class EcrymeUtility {
} }
if (rollData.selectedSpecs && rollData.selectedSpecs.length > 0) { if (rollData.selectedSpecs && rollData.selectedSpecs.length > 0) {
rollData.spec = actor.getSpecialization(rollData.selectedSpecs[0]) rollData.spec = actor.getSpecialization(rollData.selectedSpecs[0])
diceFormula += "+2" diceFormula += "+" + (String(rollData.spec.system?.bonus) || "2")
} }
rollData.bonusMalusTraits = 0 rollData.bonusMalusTraits = 0
if (rollData.traitsBonus && rollData.traitsBonus.length > 0) { if (rollData.traitsBonus && rollData.traitsBonus.length > 0) {
@ -525,7 +529,7 @@ export class EcrymeUtility {
let trait = actor.getTrait(id) let trait = actor.getTrait(id)
console.log(trait, id) console.log(trait, id)
rollData.traitsBonusList.push(trait) rollData.traitsBonusList.push(trait)
rollData.bonusMalusTraits += trait.system.level rollData.bonusMalusTraits += Math.abs(trait.system.level)
} }
} }
if (rollData.traitsMalus && rollData.traitsMalus.length > 0) { if (rollData.traitsMalus && rollData.traitsMalus.length > 0) {
@ -533,12 +537,15 @@ export class EcrymeUtility {
for (let id of rollData.traitsMalus) { for (let id of rollData.traitsMalus) {
let trait = actor.getTrait(id) let trait = actor.getTrait(id)
rollData.traitsMalusList.push(trait) rollData.traitsMalusList.push(trait)
rollData.bonusMalusTraits -= trait.system.level rollData.bonusMalusTraits -= Math.abs(trait.system.level)
} }
} }
diceFormula += "+" + rollData.bonusMalusTraits diceFormula += "+" + rollData.bonusMalusTraits
diceFormula += "+" + rollData.bonusMalusPerso diceFormula += "+" + rollData.bonusMalusPerso
diceFormula += "+" + rollData.impactMalus diceFormula += "+" + rollData.impactMalus
if (rollData.annency) {
diceFormula += "+" + rollData.annencyBonus
}
rollData.diceFormula = diceFormula rollData.diceFormula = diceFormula
return diceFormula return diceFormula
} }
@ -548,7 +555,7 @@ export class EcrymeUtility {
let actor = game.actors.get(rollData.actorId) let actor = game.actors.get(rollData.actorId)
// Fix difficulty // Fix difficulty
if (!rollData.difficulty || rollData.difficulty == "-") { if (!rollData.difficulty || rollData.difficulty == "-1") {
rollData.difficulty = 0 rollData.difficulty = 0
} }
rollData.difficulty = Number(rollData.difficulty) rollData.difficulty = Number(rollData.difficulty)
@ -556,18 +563,18 @@ export class EcrymeUtility {
let diceFormula = this.computeRollFormula(rollData, actor) let diceFormula = this.computeRollFormula(rollData, actor)
// Performs roll // Performs roll
let myRoll = new Roll(diceFormula).roll({ async: false }) let myRoll = await new Roll(diceFormula).roll()
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
rollData.roll = duplicate(myRoll) rollData.roll = foundry.utils.duplicate(myRoll)
rollData.total = myRoll.total rollData.total = myRoll.total
rollData.diceSum = myRoll.terms[0].total rollData.diceSum = myRoll.terms[0].total
this.computeResults(rollData) this.computeResults(rollData)
let msg = await this.createChatWithRollMode(rollData.alias, { let msg = await this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData) content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData)
}) })
msg.setFlag("world", "ecryme-rolldata", rollData) await msg.setFlag("world", "ecryme-rolldata", rollData)
console.log("Rolldata result", rollData) console.log("Rolldata result", rollData)
} }
@ -584,7 +591,7 @@ export class EcrymeUtility {
let msg = await this.createChatWithRollMode(rollData.alias, { let msg = await this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData) content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-generic-result.hbs`, rollData)
}) })
msg.setFlag("world", "ecryme-rolldata", rollData) await msg.setFlag("world", "ecryme-rolldata", rollData)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -628,12 +635,10 @@ export class EcrymeUtility {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static blindMessageToGM(chatOptions) { static blindMessageToGM(chatData) {
let chatGM = duplicate(chatOptions); chatData.whisper = this.getUsers(user => user.isGM);
chatGM.whisper = this.getUsers(user => user.isGM); console.log("blindMessageToGM", chatData);
chatGM.content = "Blinde message of " + game.user.name + "<br>" + chatOptions.content; game.socket.emit("system.fvtt-ecryme", { name: "msg_gm_chat_message", data: chatData });
console.log("blindMessageToGM", chatGM);
game.socket.emit("system.fvtt-ecryme", { msg: "msg_gm_chat_message", data: chatGM });
} }
@ -659,12 +664,8 @@ export class EcrymeUtility {
switch (rollMode) { switch (rollMode) {
case "blindroll": // GM only case "blindroll": // GM only
if (!game.user.isGM) { if (!game.user.isGM) {
this.blindMessageToGM(chatOptions);
chatOptions.whisper = [game.user.id]; chatOptions.whisper = [game.user.id];
chatOptions.content = "Message only to the GM"; } else {
}
else {
chatOptions.whisper = this.getUsers(user => user.isGM); chatOptions.whisper = this.getUsers(user => user.isGM);
} }
break; break;
@ -679,19 +680,20 @@ export class EcrymeUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static getBasicRollData() { static getBasicRollData() {
let rollData = { let rollData = {
rollId: randomID(16), rollId: foundry.utils.randomID(16),
type: "roll-data", type: "roll-data",
bonusMalusPerso: 0, bonusMalusPerso: "0",
bonusMalusSituation: 0, bonusMalusSituation: 0,
bonusMalusDef: 0, bonusMalusDef: 0,
annencyBonus: 0,
bonusMalusPortee: 0, bonusMalusPortee: 0,
skillTranscendence: 0, skillTranscendence: 0,
rollMode: game.settings.get("core", "rollMode"), rollMode: game.settings.get("core", "rollMode"),
difficulty: "-", difficulty: "-1",
useSpleen: false, useSpleen: false,
useIdeal: false, useIdeal: false,
impactMalus: 0, impactMalus: 0,
config: duplicate(game.system.ecryme.config) config: foundry.utils.duplicate(game.system.ecryme.config)
} }
EcrymeUtility.updateWithTarget(rollData) EcrymeUtility.updateWithTarget(rollData)
return rollData return rollData

View File

@ -6,13 +6,13 @@ export class EcrymeConfrontDialog extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async create(actor, rollData) { static async create(actor, rollData) {
let options = mergeObject(super.defaultOptions, { let options = foundry.utils.mergeObject(super.defaultOptions, {
classes: ["fvtt-ecryme ecryme-confrontation-dialog"], classes: ["fvtt-ecryme ecryme-confrontation-dialog"],
dragDrop: [{ dragSelector: ".confront-dice-container", dropSelector: null }], dragDrop: [{ dragSelector: ".confront-dice-container", dropSelector: null }],
width: 620, height: 'fit-content', 'z-index': 99999 width: 620, height: 'fit-content', 'z-index': 99999
}); });
let html = await renderTemplate('systems/fvtt-ecryme/templates/dialogs/confront-dialog.hbs', rollData); let html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-ecryme/templates/dialogs/confront-dialog.hbs', rollData);
return new EcrymeConfrontDialog(actor, rollData, html, options); return new EcrymeConfrontDialog(actor, rollData, html, options);
} }
@ -50,6 +50,7 @@ export class EcrymeConfrontDialog extends Dialog {
let msg = await EcrymeUtility.createChatMessage(this.rollData.alias, "blindroll", { let msg = await EcrymeUtility.createChatMessage(this.rollData.alias, "blindroll", {
content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-confrontation-pending.hbs`, this.rollData) content: await renderTemplate(`systems/fvtt-ecryme/templates/chat/chat-confrontation-pending.hbs`, this.rollData)
}) })
EcrymeUtility.blindMessageToGM( { rollData: this.rollData, template: "systems/fvtt-ecryme/templates/chat/chat-confrontation-pending.hbs" })
console.log("MSG", this.rollData) console.log("MSG", this.rollData)
msg.setFlag("world", "ecryme-rolldata", this.rollData) msg.setFlag("world", "ecryme-rolldata", this.rollData)
} }
@ -71,7 +72,7 @@ export class EcrymeConfrontDialog extends Dialog {
$("#confront-dice-pool").html(content) $("#confront-dice-pool").html(content)
content = await renderTemplate("systems/fvtt-ecryme/templates/dialogs/partial-confront-bonus-area.hbs", this.rollData ) content = await renderTemplate("systems/fvtt-ecryme/templates/dialogs/partial-confront-bonus-area.hbs", this.rollData )
$("#confront-bonus-pool").html(content) $("#confront-bonus-pool").html(content)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async refreshDialog() { async refreshDialog() {
@ -83,12 +84,23 @@ export class EcrymeConfrontDialog extends Dialog {
setTimeout(function () { $(".launchConfront").attr("disabled", button) }, 180) setTimeout(function () { $(".launchConfront").attr("disabled", button) }, 180)
} }
/* ------------------ -------------------------- */
_canDragStart(selector) {
console.log("CAN DRAG START", selector, super._canDragStart(selector) )
return true
}
_canDragDrop(selector) {
console.log("CAN DRAG DROP", selector, super._canDragDrop(selector) )
return true
}
/* ------------------ -------------------------- */ /* ------------------ -------------------------- */
_onDragStart(event) { _onDragStart(event) {
console.log("DRAGSTART::::", event)
super._onDragStart(event) super._onDragStart(event)
let dragType = $(event.srcElement).data("drag-type") let dragType = $(event.srcElement).data("drag-type")
let diceData = {} let diceData = {}
//console.log("DRAGTYPE", dragType) console.log("DRAGTYPE", dragType)
if (dragType == "dice") { if (dragType == "dice") {
diceData = { diceData = {
dragType: "dice", dragType: "dice",
@ -111,24 +123,24 @@ export class EcrymeConfrontDialog extends Dialog {
let data = JSON.parse(dataJSON) let data = JSON.parse(dataJSON)
if ( data.dragType == "dice") { if ( data.dragType == "dice") {
let idx = Number(data.diceIndex) let idx = Number(data.diceIndex)
//console.log("DATA", data, event, event.srcElement.className) console.log("DATA", data, event, event.srcElement.className)
if (event.srcElement.className.includes("execution") && if (event.srcElement.className.includes("execution") &&
this.rollData.availableDices.filter(d => d.location == "execution").length < 2) { this.rollData.availableDices.filter(d => d.location == "execution").length < 2) {
this.rollData.availableDices[idx].location = "execution" this.rollData.availableDices[idx].location = "execution"
} }
if (event.srcElement.className.includes("preservation") && if (event.srcElement.className.includes("preservation") &&
this.rollData.availableDices.filter(d => d.location == "preservation").length < 2) { this.rollData.availableDices.filter(d => d.location == "preservation").length < 2) {
this.rollData.availableDices[idx].location = "preservation" this.rollData.availableDices[idx].location = "preservation"
} }
if (event.srcElement.className.includes("dice-list")) { if (event.srcElement.className.includes("dice-list")) {
this.rollData.availableDices[idx].location = "mainpool" this.rollData.availableDices[idx].location = "mainpool"
} }
if (this.rollData.availableDices.filter(d => d.location == "execution").length == 2 && this.rollData.availableDices.filter(d => d.location == "preservation").length == 2) { if (this.rollData.availableDices.filter(d => d.location == "execution").length == 2 && this.rollData.availableDices.filter(d => d.location == "preservation").length == 2) {
this.buttonDisabled = false this.buttonDisabled = false
} else { } else {
this.buttonDisabled = true this.buttonDisabled = true
} }
} else { } else {
let idx = Number(data.bonusIndex) let idx = Number(data.bonusIndex)
if (event.srcElement.className.includes("execution")) { if (event.srcElement.className.includes("execution")) {
@ -151,9 +163,9 @@ export class EcrymeConfrontDialog extends Dialog {
// Apply Transcend if needed // Apply Transcend if needed
if (this.rollData.skillTranscendence > 0) { if (this.rollData.skillTranscendence > 0) {
if (this.rollData.applyTranscendence == "execution") { if (this.rollData.applyTranscendence == "execution") {
this.rollData.executionTotal += this.rollData.skillTranscendence this.rollData.executionTotal += Number(this.rollData.skillTranscendence)
} else { } else {
this.rollData.preservationTotal += this.rollData.skillTranscendence this.rollData.preservationTotal += Number(this.rollData.skillTranscendence)
} }
} }
} }
@ -180,7 +192,7 @@ export class EcrymeConfrontDialog extends Dialog {
this.processTranscendence() this.processTranscendence()
if (rollData.selectedSpecs && rollData.selectedSpecs.length > 0) { if (rollData.selectedSpecs && rollData.selectedSpecs.length > 0) {
rollData.spec = duplicate(actor.getSpecialization(rollData.selectedSpecs[0])) rollData.spec = foundry.utils.duplicate(actor.getSpecialization(rollData.selectedSpecs[0]))
rollData.specApplied = true rollData.specApplied = true
rollData.executionTotal += 2 rollData.executionTotal += 2
rollData.preservationTotal += 2 rollData.preservationTotal += 2
@ -200,19 +212,19 @@ export class EcrymeConfrontDialog extends Dialog {
for (let id of rollData.traitsBonusSelected) { for (let id of rollData.traitsBonusSelected) {
let trait = rollData.traitsBonus.find(t => t._id == id) let trait = rollData.traitsBonus.find(t => t._id == id)
trait.activated = true trait.activated = true
rollData.bonusMalusTraits += trait.system.level rollData.bonusMalusTraits += Number(trait.system.level)
} }
} }
if (rollData.traitsMalusSelected && rollData.traitsMalusSelected.length > 0) { if (rollData.traitsMalusSelected && rollData.traitsMalusSelected.length > 0) {
for (let id of rollData.traitsMalusSelected) { for (let id of rollData.traitsMalusSelected) {
let trait = rollData.traitsMalus.find(t => t._id == id) let trait = rollData.traitsMalus.find(t => t._id == id)
trait.activated = true trait.activated = true
rollData.bonusMalusTraits -= trait.system.level rollData.bonusMalusTraits -= Number(trait.system.level)
} }
} }
rollData.executionTotal += rollData.bonusMalusTraits + rollData.bonusMalusPerso rollData.executionTotal += Number(rollData.bonusMalusTraits) + Number(rollData.bonusMalusPerso)
rollData.preservationTotal += rollData.bonusMalusTraits + rollData.bonusMalusPerso rollData.preservationTotal += Number(rollData.bonusMalusTraits) + Number(rollData.bonusMalusPerso)
this.refreshDialog() this.refreshDialog()
} }
@ -222,7 +234,7 @@ export class EcrymeConfrontDialog extends Dialog {
super.activateListeners(html); super.activateListeners(html);
html.find('#bonusMalusPerso').change((event) => { html.find('#bonusMalusPerso').change((event) => {
this.rollData.bonusMalusPerso = Number(event.currentTarget.value) this.rollData.bonusMalusPerso = event.currentTarget.value
this.computeTotals() this.computeTotals()
}) })
html.find('#roll-specialization').change((event) => { html.find('#roll-specialization').change((event) => {
@ -245,7 +257,9 @@ export class EcrymeConfrontDialog extends Dialog {
this.rollData.applyTranscendence = $('#roll-apply-transcendence').val() this.rollData.applyTranscendence = $('#roll-apply-transcendence').val()
this.computeTotals() this.computeTotals()
}) })
html.find('#annency-bonus').change((event) => {
this.rollData.annencyBonus = Number(event.currentTarget.value)
})
} }
} }

View File

@ -7,7 +7,7 @@ export class EcrymeConfrontStartDialog extends Dialog {
static async create(actor, rollData) { static async create(actor, rollData) {
let options = { classes: ["fvtt-ecryme ecryme-confront-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 } let options = { classes: ["fvtt-ecryme ecryme-confront-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 }
let html = await renderTemplate('systems/fvtt-ecryme/templates/dialogs/confront-start-dialog.hbs', rollData); let html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-ecryme/templates/dialogs/confront-start-dialog.hbs', rollData);
return new EcrymeConfrontStartDialog(actor, rollData, html, options); return new EcrymeConfrontStartDialog(actor, rollData, html, options);
} }
@ -50,15 +50,15 @@ export class EcrymeConfrontStartDialog extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollConfront( diceFormula ) { async rollConfront( diceFormula ) {
// Do the initial roll // Do the initial roll
let myRoll = new Roll(diceFormula).roll({async: false}) let myRoll = await new Roll(diceFormula).roll()
await EcrymeUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) await EcrymeUtility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
// Fill the available dice table // Fill the available dice table
let rollData = this.rollData let rollData = this.rollData
rollData.roll = duplicate(myRoll) rollData.roll = foundry.utils.duplicate(myRoll)
rollData.availableDices = [] rollData.availableDices = []
for (let result of myRoll.terms[0].results) { for (let result of myRoll.terms[0].results) {
if ( !result.discarded) { if ( !result.discarded) {
let resultDup = duplicate(result) let resultDup = foundry.utils.duplicate(result)
resultDup.location = "mainpool" resultDup.location = "mainpool"
rollData.availableDices.push(resultDup) rollData.availableDices.push(resultDup)
} }

View File

@ -6,7 +6,7 @@ export class EcrymeRollDialog extends Dialog {
static async create(actor, rollData) { static async create(actor, rollData) {
let options = { classes: ["ecryme-roll-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 } let options = { classes: ["ecryme-roll-dialog"], width: 540, height: 'fit-content', 'z-index': 99999 }
let html = await renderTemplate('systems/fvtt-ecryme/templates/dialogs/roll-dialog-generic.hbs', rollData); let html = await foundry.applications.handlebars.renderTemplate('systems/fvtt-ecryme/templates/dialogs/roll-dialog-generic.hbs', rollData);
return new EcrymeRollDialog(actor, rollData, html, options); return new EcrymeRollDialog(actor, rollData, html, options);
} }
@ -52,12 +52,12 @@ export class EcrymeRollDialog extends Dialog {
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
var dialog = this;
function onLoad() { function onLoad() {
} }
$(function () { onLoad(); }); $(function () { onLoad(); });
html.find('#bonusMalusPerso').change((event) => { html.find('#bonusMalusPerso').change((event) => {
console.log("DIFF", event.currentTarget.value)
this.rollData.bonusMalusPerso = Number(event.currentTarget.value) this.rollData.bonusMalusPerso = Number(event.currentTarget.value)
}) })
html.find('#roll-difficulty').change((event) => { html.find('#roll-difficulty').change((event) => {
@ -74,13 +74,13 @@ export class EcrymeRollDialog extends Dialog {
}) })
html.find('#roll-select-transcendence').change((event) => { html.find('#roll-select-transcendence').change((event) => {
this.rollData.skillTranscendence = Number($('#roll-select-transcendence').val()) this.rollData.skillTranscendence = Number($('#roll-select-transcendence').val())
}) })
html.find('#roll-use-spleen').change((event) => { html.find('#roll-use-spleen').change((event) => {
this.rollData.useSpleen = event.currentTarget.checked this.rollData.useSpleen = event.currentTarget.checked
}) })
html.find('#roll-use-ideal').change((event) => { html.find('#roll-use-ideal').change((event) => {
this.rollData.useIdeal = event.currentTarget.checked this.rollData.useIdeal = event.currentTarget.checked
}) })
} }
} }

View File

@ -38,7 +38,7 @@ Hooks.once("init", async function () {
EcrymeUtility.preloadHandlebarsTemplates(); EcrymeUtility.preloadHandlebarsTemplates();
/* -------------------------------------------- */ /* -------------------------------------------- */
// Set an initiative formula for the system // Set an initiative formula for the system
CONFIG.Combat.initiative = { CONFIG.Combat.initiative = {
formula: "1d6", formula: "1d6",
decimals: 1 decimals: 1
@ -57,18 +57,16 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */ /* -------------------------------------------- */
// Register sheet application classes // Register sheet application classes
Actors.unregisterSheet("core", ActorSheet); foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet);
Actors.registerSheet("fvtt-ecryme", EcrymeActorSheet, { types: ["pc"], makeDefault: true }); foundry.documents.collections.Actors.registerSheet("fvtt-ecryme", EcrymeActorSheet, { types: ["pc"], makeDefault: true });
Actors.registerSheet("fvtt-ecryme", EcrymeAnnencySheet, { types: ["annency"], makeDefault: false }); foundry.documents.collections.Actors.registerSheet("fvtt-ecryme", EcrymeActorSheet, { types: ["npc"], makeDefault: true });
foundry.documents.collections.Actors.registerSheet("fvtt-ecryme", EcrymeAnnencySheet, { types: ["annency"], makeDefault: false });
Items.unregisterSheet("core", ItemSheet); foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet);
Items.registerSheet("fvtt-ecryme", EcrymeItemSheet, { makeDefault: true }); foundry.documents.collections.Items.registerSheet("fvtt-ecryme", EcrymeItemSheet, { makeDefault: true });
EcrymeUtility.init() EcrymeUtility.init()
console.log("Babele INIT!")
Babele.get().setSystemTranslationsDir("translated");
}); });
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -83,29 +81,15 @@ function welcomeMessage() {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
// Register world usage statistics async function importDefaultScene() {
function registerUsageCount(registerKey) { let exists = game.scenes.find(j => j.name == "Landing page 1");
if (game.user.isGM) { if (!exists) {
game.settings.register(registerKey, "world-key", { const scenes = await EcrymeUtility.loadCompendium("fvtt-ecryme.scenes")
name: "Unique world key", let newDocuments = scenes.filter(i => i.name == "Landing page 1");
scope: "world", await game.scenes.documentClass.create(newDocuments);
config: false, game.scenes.find(i => i.name == "Landing page 1").activate();
default: "",
type: String
});
let worldKey = game.settings.get(registerKey, "world-key")
if (worldKey == undefined || worldKey == "") {
worldKey = randomID(32)
game.settings.set(registerKey, "world-key", worldKey)
}
// Simple API counter
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
//$.ajaxSetup({
//headers: { 'Access-Control-Allow-Origin': '*' }
//})
$.ajax(regURL)
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -122,10 +106,20 @@ Hooks.once("ready", function () {
}); });
} }
registerUsageCount(game.system.id) import("https://www.uberwald.me/fvtt_appcount/count-class-ready.js").then(moduleCounter => {
console.log("ClassCounter loaded", moduleCounter)
moduleCounter.ClassCounter.registerUsageCount()
}).catch(err =>
console.log("No stats available, giving up.")
)
welcomeMessage(); welcomeMessage();
EcrymeUtility.ready() EcrymeUtility.ready();
EcrymeCharacterSummary.ready() EcrymeCharacterSummary.ready();
importDefaultScene();
// Load translations
Babele.get().setSystemTranslationsDir("translated")
}) })
@ -143,4 +137,3 @@ Hooks.on("chatMessage", (html, content, msg) => {
} }
return true; return true;
}); });

View File

@ -4,11 +4,11 @@ import { EcrymeUtility } from "../common/ecryme-utility.js";
* Extend the basic ItemSheet with some very simple modifications * Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet} * @extends {ItemSheet}
*/ */
export class EcrymeItemSheet extends ItemSheet { export class EcrymeItemSheet extends foundry.appv1.sheets.ItemSheet {
/** @override */ /** @override */
static get defaultOptions() { static get defaultOptions() {
return mergeObject(super.defaultOptions, { return foundry.utils.mergeObject(super.defaultOptions, {
classes: ["fvtt-ecryme", "sheet", "item"], classes: ["fvtt-ecryme", "sheet", "item"],
template: "systems/fvtt-ecryme/templates/item-sheet.hbs", template: "systems/fvtt-ecryme/templates/item-sheet.hbs",
dragDrop: [{ dragSelector: null, dropSelector: null }], dragDrop: [{ dragSelector: null, dropSelector: null }],
@ -56,20 +56,20 @@ export class EcrymeItemSheet extends ItemSheet {
name: this.object.name, name: this.object.name,
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
system: duplicate(this.object.system), system: foundry.utils.duplicate(this.object.system),
config: duplicate(game.system.ecryme.config), config: foundry.utils.duplicate(game.system.ecryme.config),
limited: this.object.limited, limited: this.object.limited,
options: this.options, options: this.options,
owner: this.document.isOwner, owner: this.document.isOwner,
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }), description: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.description, { async: true }),
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }), notes: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.object.system.notes, { async: true }),
isGM: game.user.isGM isGM: game.user.isGM
} }
if ( this.object.type == "archetype") { if ( this.object.type == "archetype") {
formData.tarots = EcrymeUtility.getTarots() formData.tarots = EcrymeUtility.getTarots()
} }
this.options.editable = !(this.object.origin == "embeddedItem"); this.options.editable = !(this.object.origin == "embeddedItem");
console.log("ITEM DATA", formData, this); console.log("ITEM DATA", formData, this);
return formData; return formData;
@ -89,7 +89,7 @@ export class EcrymeItemSheet extends ItemSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
postItem() { postItem() {
let chatData = duplicate(this.item) let chatData = foundry.utils.duplicate(this.item)
if (this.actor) { if (this.actor) {
chatData.actor = { id: this.actor.id }; chatData.actor = { id: this.actor.id };
} }
@ -115,7 +115,7 @@ export class EcrymeItemSheet extends ItemSheet {
let levelIndex = Number($(ev.currentTarget).parents(".item").data("level-index")) let levelIndex = Number($(ev.currentTarget).parents(".item").data("level-index"))
let choiceIndex = Number($(ev.currentTarget).parents(".item").data("choice-index")) let choiceIndex = Number($(ev.currentTarget).parents(".item").data("choice-index"))
let featureId = $(ev.currentTarget).parents(".item").data("feature-id") let featureId = $(ev.currentTarget).parents(".item").data("feature-id")
let itemData = this.object.system.levels[levelIndex].choices[choiceIndex].features[featureId] let itemData = this.object.system.levels[levelIndex].choices[choiceIndex].features[featureId]
if (itemData.name != 'None') { if (itemData.name != 'None') {

Binary file not shown.

BIN
packs/equipment/000192.ldb Normal file

Binary file not shown.

View File

@ -1 +1 @@
MANIFEST-000046 MANIFEST-000205

View File

@ -1,7 +1,7 @@
2023/08/08-14:38:49.036882 7f5afcdf86c0 Recovering log #44 2025/05/01-23:23:34.950257 7f11177fe6c0 Recovering log #203
2023/08/08-14:38:49.124780 7f5afcdf86c0 Delete type=3 #42 2025/05/01-23:23:34.960390 7f11177fe6c0 Delete type=3 #201
2023/08/08-14:38:49.124893 7f5afcdf86c0 Delete type=0 #44 2025/05/01-23:23:34.960497 7f11177fe6c0 Delete type=0 #203
2023/08/08-14:54:21.588098 7f58677fe6c0 Level-0 table #49: started 2025/05/01-23:27:45.498796 7f11153ff6c0 Level-0 table #208: started
2023/08/08-14:54:21.588122 7f58677fe6c0 Level-0 table #49: 0 bytes OK 2025/05/01-23:27:45.498850 7f11153ff6c0 Level-0 table #208: 0 bytes OK
2023/08/08-14:54:21.594444 7f58677fe6c0 Delete type=0 #47 2025/05/01-23:27:45.505411 7f11153ff6c0 Delete type=0 #206
2023/08/08-14:54:21.607310 7f58677fe6c0 Manual compaction at level-0 from '!folders!1GrTlI1xWvaxdKRI' @ 72057594037927935 : 1 .. '!items!zs7krgXhDRndtqbl' @ 0 : 0; will stop at (end) 2025/05/01-23:27:45.518830 7f11153ff6c0 Manual compaction at level-0 from '!folders!1GrTlI1xWvaxdKRI' @ 72057594037927935 : 1 .. '!items!zs7krgXhDRndtqbl' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2023/08/08-14:36:00.338439 7f5867fff6c0 Recovering log #40 2025/05/01-23:18:27.056956 7f1115ffb6c0 Recovering log #199
2023/08/08-14:36:00.347950 7f5867fff6c0 Delete type=3 #38 2025/05/01-23:18:27.067437 7f1115ffb6c0 Delete type=3 #197
2023/08/08-14:36:00.348021 7f5867fff6c0 Delete type=0 #40 2025/05/01-23:18:27.067539 7f1115ffb6c0 Delete type=0 #199
2023/08/08-14:38:45.882749 7f58677fe6c0 Level-0 table #45: started 2025/05/01-23:23:12.722068 7f11153ff6c0 Level-0 table #204: started
2023/08/08-14:38:45.882812 7f58677fe6c0 Level-0 table #45: 0 bytes OK 2025/05/01-23:23:12.722089 7f11153ff6c0 Level-0 table #204: 0 bytes OK
2023/08/08-14:38:45.920058 7f58677fe6c0 Delete type=0 #43 2025/05/01-23:23:12.728871 7f11153ff6c0 Delete type=0 #202
2023/08/08-14:38:45.981054 7f58677fe6c0 Manual compaction at level-0 from '!folders!1GrTlI1xWvaxdKRI' @ 72057594037927935 : 1 .. '!items!zs7krgXhDRndtqbl' @ 0 : 0; will stop at (end) 2025/05/01-23:23:12.744842 7f11153ff6c0 Manual compaction at level-0 from '!folders!1GrTlI1xWvaxdKRI' @ 72057594037927935 : 1 .. '!items!zs7krgXhDRndtqbl' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

BIN
packs/help/000129.ldb Normal file

Binary file not shown.

1
packs/help/CURRENT Normal file
View File

@ -0,0 +1 @@
MANIFEST-000142

8
packs/help/LOG Normal file
View File

@ -0,0 +1,8 @@
2025/05/01-23:23:35.002627 7f1116ffd6c0 Recovering log #140
2025/05/01-23:23:35.013325 7f1116ffd6c0 Delete type=3 #138
2025/05/01-23:23:35.013430 7f1116ffd6c0 Delete type=0 #140
2025/05/01-23:27:45.532648 7f11153ff6c0 Level-0 table #145: started
2025/05/01-23:27:45.532688 7f11153ff6c0 Level-0 table #145: 0 bytes OK
2025/05/01-23:27:45.540035 7f11153ff6c0 Delete type=0 #143
2025/05/01-23:27:45.546611 7f11153ff6c0 Manual compaction at level-0 from '!journal!wooTFYjEwh83FwgT' @ 72057594037927935 : 1 .. '!journal.pages!wooTFYjEwh83FwgT.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end)
2025/05/01-23:27:45.546647 7f11153ff6c0 Manual compaction at level-1 from '!journal!wooTFYjEwh83FwgT' @ 72057594037927935 : 1 .. '!journal.pages!wooTFYjEwh83FwgT.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end)

8
packs/help/LOG.old Normal file
View File

@ -0,0 +1,8 @@
2025/05/01-23:18:27.111839 7f1116ffd6c0 Recovering log #136
2025/05/01-23:18:27.122280 7f1116ffd6c0 Delete type=3 #134
2025/05/01-23:18:27.122337 7f1116ffd6c0 Delete type=0 #136
2025/05/01-23:23:12.768196 7f11153ff6c0 Level-0 table #141: started
2025/05/01-23:23:12.768227 7f11153ff6c0 Level-0 table #141: 0 bytes OK
2025/05/01-23:23:12.774547 7f11153ff6c0 Delete type=0 #139
2025/05/01-23:23:12.774689 7f11153ff6c0 Manual compaction at level-0 from '!journal!wooTFYjEwh83FwgT' @ 72057594037927935 : 1 .. '!journal.pages!wooTFYjEwh83FwgT.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end)
2025/05/01-23:23:12.774707 7f11153ff6c0 Manual compaction at level-1 from '!journal!wooTFYjEwh83FwgT' @ 72057594037927935 : 1 .. '!journal.pages!wooTFYjEwh83FwgT.xhc7hqoL8kdW6lrD' @ 0 : 0; will stop at (end)

BIN
packs/help/MANIFEST-000142 Normal file

Binary file not shown.

Binary file not shown.

BIN
packs/maneuvers/000192.ldb Normal file

Binary file not shown.

View File

@ -1 +1 @@
MANIFEST-000046 MANIFEST-000205

View File

@ -1,7 +1,7 @@
2023/08/08-14:38:49.155473 7f5867fff6c0 Recovering log #44 2025/05/01-23:23:34.989243 7f11177fe6c0 Recovering log #203
2023/08/08-14:38:49.260893 7f5867fff6c0 Delete type=3 #42 2025/05/01-23:23:34.999290 7f11177fe6c0 Delete type=3 #201
2023/08/08-14:38:49.260950 7f5867fff6c0 Delete type=0 #44 2025/05/01-23:23:34.999338 7f11177fe6c0 Delete type=0 #203
2023/08/08-14:54:21.600756 7f58677fe6c0 Level-0 table #49: started 2025/05/01-23:27:45.505528 7f11153ff6c0 Level-0 table #208: started
2023/08/08-14:54:21.600776 7f58677fe6c0 Level-0 table #49: 0 bytes OK 2025/05/01-23:27:45.505551 7f11153ff6c0 Level-0 table #208: 0 bytes OK
2023/08/08-14:54:21.607211 7f58677fe6c0 Delete type=0 #47 2025/05/01-23:27:45.512071 7f11153ff6c0 Delete type=0 #206
2023/08/08-14:54:21.607330 7f58677fe6c0 Manual compaction at level-0 from '!items!13IYF6BPUTivFZzB' @ 72057594037927935 : 1 .. '!items!oSutlbe9wyBZccmf' @ 0 : 0; will stop at (end) 2025/05/01-23:27:45.518845 7f11153ff6c0 Manual compaction at level-0 from '!items!13IYF6BPUTivFZzB' @ 72057594037927935 : 1 .. '!items!oSutlbe9wyBZccmf' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2023/08/08-14:36:00.351163 7f5867fff6c0 Recovering log #40 2025/05/01-23:18:27.099266 7f1115ffb6c0 Recovering log #199
2023/08/08-14:36:00.363535 7f5867fff6c0 Delete type=3 #38 2025/05/01-23:18:27.109501 7f1115ffb6c0 Delete type=3 #197
2023/08/08-14:36:00.363690 7f5867fff6c0 Delete type=0 #40 2025/05/01-23:18:27.109566 7f1115ffb6c0 Delete type=0 #199
2023/08/08-14:38:46.072007 7f58677fe6c0 Level-0 table #45: started 2025/05/01-23:23:12.745080 7f11153ff6c0 Level-0 table #204: started
2023/08/08-14:38:46.072050 7f58677fe6c0 Level-0 table #45: 0 bytes OK 2025/05/01-23:23:12.745126 7f11153ff6c0 Level-0 table #204: 0 bytes OK
2023/08/08-14:38:46.103317 7f58677fe6c0 Delete type=0 #43 2025/05/01-23:23:12.751818 7f11153ff6c0 Delete type=0 #202
2023/08/08-14:38:46.137931 7f58677fe6c0 Manual compaction at level-0 from '!items!13IYF6BPUTivFZzB' @ 72057594037927935 : 1 .. '!items!oSutlbe9wyBZccmf' @ 0 : 0; will stop at (end) 2025/05/01-23:23:12.774663 7f11153ff6c0 Manual compaction at level-0 from '!items!13IYF6BPUTivFZzB' @ 72057594037927935 : 1 .. '!items!oSutlbe9wyBZccmf' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

BIN
packs/scenes/000090.ldb Normal file

Binary file not shown.

0
packs/scenes/000093.log Normal file
View File

1
packs/scenes/CURRENT Normal file
View File

@ -0,0 +1 @@
MANIFEST-000091

0
packs/scenes/LOCK Normal file
View File

8
packs/scenes/LOG Normal file
View File

@ -0,0 +1,8 @@
2025/05/01-23:23:34.977246 7f1116ffd6c0 Recovering log #88
2025/05/01-23:23:34.986582 7f1116ffd6c0 Delete type=3 #86
2025/05/01-23:23:34.986642 7f1116ffd6c0 Delete type=0 #88
2025/05/01-23:27:45.512228 7f11153ff6c0 Level-0 table #94: started
2025/05/01-23:27:45.512262 7f11153ff6c0 Level-0 table #94: 0 bytes OK
2025/05/01-23:27:45.518665 7f11153ff6c0 Delete type=0 #92
2025/05/01-23:27:45.518856 7f11153ff6c0 Manual compaction at level-0 from '!scenes!DDibQQLAvyIq9y09' @ 72057594037927935 : 1 .. '!scenes!zvY1RwBhTfwdZIBa' @ 0 : 0; will stop at (end)
2025/05/01-23:27:45.518892 7f11153ff6c0 Manual compaction at level-1 from '!scenes!DDibQQLAvyIq9y09' @ 72057594037927935 : 1 .. '!scenes!zvY1RwBhTfwdZIBa' @ 0 : 0; will stop at (end)

15
packs/scenes/LOG.old Normal file
View File

@ -0,0 +1,15 @@
2025/05/01-23:18:27.084819 7f1116ffd6c0 Recovering log #82
2025/05/01-23:18:27.095491 7f1116ffd6c0 Delete type=3 #80
2025/05/01-23:18:27.095539 7f1116ffd6c0 Delete type=0 #82
2025/05/01-23:23:12.735355 7f11153ff6c0 Level-0 table #89: started
2025/05/01-23:23:12.738432 7f11153ff6c0 Level-0 table #89: 1551 bytes OK
2025/05/01-23:23:12.744606 7f11153ff6c0 Delete type=0 #87
2025/05/01-23:23:12.744906 7f11153ff6c0 Manual compaction at level-0 from '!scenes!DDibQQLAvyIq9y09' @ 72057594037927935 : 1 .. '!scenes!zvY1RwBhTfwdZIBa' @ 0 : 0; will stop at (end)
2025/05/01-23:23:12.751899 7f11153ff6c0 Manual compaction at level-1 from '!scenes!DDibQQLAvyIq9y09' @ 72057594037927935 : 1 .. '!scenes!zvY1RwBhTfwdZIBa' @ 0 : 0; will stop at '!scenes!zvY1RwBhTfwdZIBa' @ 18 : 1
2025/05/01-23:23:12.751905 7f11153ff6c0 Compacting 1@1 + 1@2 files
2025/05/01-23:23:12.755259 7f11153ff6c0 Generated table #90@1: 2 keys, 1586 bytes
2025/05/01-23:23:12.755289 7f11153ff6c0 Compacted 1@1 + 1@2 files => 1586 bytes
2025/05/01-23:23:12.761436 7f11153ff6c0 compacted to: files[ 0 0 1 0 0 0 0 ]
2025/05/01-23:23:12.761603 7f11153ff6c0 Delete type=2 #85
2025/05/01-23:23:12.761813 7f11153ff6c0 Delete type=2 #89
2025/05/01-23:23:12.774673 7f11153ff6c0 Manual compaction at level-1 from '!scenes!zvY1RwBhTfwdZIBa' @ 18 : 1 .. '!scenes!zvY1RwBhTfwdZIBa' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

View File

@ -1 +1 @@
MANIFEST-000046 MANIFEST-000205

View File

@ -1,7 +1,7 @@
2023/08/08-14:38:49.036954 7f5867fff6c0 Recovering log #44 2025/05/01-23:23:34.938221 7f1116ffd6c0 Recovering log #203
2023/08/08-14:38:49.153034 7f5867fff6c0 Delete type=3 #42 2025/05/01-23:23:34.947805 7f1116ffd6c0 Delete type=3 #201
2023/08/08-14:38:49.153108 7f5867fff6c0 Delete type=0 #44 2025/05/01-23:23:34.947853 7f1116ffd6c0 Delete type=0 #203
2023/08/08-14:54:21.558302 7f58677fe6c0 Level-0 table #49: started 2025/05/01-23:27:45.491261 7f11153ff6c0 Level-0 table #208: started
2023/08/08-14:54:21.558341 7f58677fe6c0 Level-0 table #49: 0 bytes OK 2025/05/01-23:27:45.491305 7f11153ff6c0 Level-0 table #208: 0 bytes OK
2023/08/08-14:54:21.572779 7f58677fe6c0 Delete type=0 #47 2025/05/01-23:27:45.498558 7f11153ff6c0 Delete type=0 #206
2023/08/08-14:54:21.573011 7f58677fe6c0 Manual compaction at level-0 from '!folders!00Hn2nNarlL7b0DR' @ 72057594037927935 : 1 .. '!items!yozTUjNuc2rEGjFK' @ 0 : 0; will stop at (end) 2025/05/01-23:27:45.518813 7f11153ff6c0 Manual compaction at level-0 from '!folders!00Hn2nNarlL7b0DR' @ 72057594037927935 : 1 .. '!items!yozTUjNuc2rEGjFK' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2023/08/08-14:36:00.338438 7f5afd5f96c0 Recovering log #40 2025/05/01-23:18:27.043700 7f11167fc6c0 Recovering log #199
2023/08/08-14:36:00.347864 7f5afd5f96c0 Delete type=3 #38 2025/05/01-23:18:27.054373 7f11167fc6c0 Delete type=3 #197
2023/08/08-14:36:00.347905 7f5afd5f96c0 Delete type=0 #40 2025/05/01-23:18:27.054431 7f11167fc6c0 Delete type=0 #199
2023/08/08-14:38:46.031269 7f58677fe6c0 Level-0 table #45: started 2025/05/01-23:23:12.728954 7f11153ff6c0 Level-0 table #204: started
2023/08/08-14:38:46.031315 7f58677fe6c0 Level-0 table #45: 0 bytes OK 2025/05/01-23:23:12.728976 7f11153ff6c0 Level-0 table #204: 0 bytes OK
2023/08/08-14:38:46.071808 7f58677fe6c0 Delete type=0 #43 2025/05/01-23:23:12.735241 7f11153ff6c0 Delete type=0 #202
2023/08/08-14:38:46.137889 7f58677fe6c0 Manual compaction at level-0 from '!folders!00Hn2nNarlL7b0DR' @ 72057594037927935 : 1 .. '!items!yozTUjNuc2rEGjFK' @ 0 : 0; will stop at (end) 2025/05/01-23:23:12.744865 7f11153ff6c0 Manual compaction at level-0 from '!folders!00Hn2nNarlL7b0DR' @ 72057594037927935 : 1 .. '!items!yozTUjNuc2rEGjFK' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
packs/traits/000192.ldb Normal file

Binary file not shown.

0
packs/traits/000207.log Normal file
View File

View File

@ -1 +1 @@
MANIFEST-000046 MANIFEST-000205

View File

@ -1,7 +1,7 @@
2023/08/08-14:38:49.127661 7f5afcdf86c0 Recovering log #44 2025/05/01-23:23:34.963229 7f1115ffb6c0 Recovering log #203
2023/08/08-14:38:49.237408 7f5afcdf86c0 Delete type=3 #42 2025/05/01-23:23:34.973922 7f1115ffb6c0 Delete type=3 #201
2023/08/08-14:38:49.237452 7f5afcdf86c0 Delete type=0 #44 2025/05/01-23:23:34.974025 7f1115ffb6c0 Delete type=0 #203
2023/08/08-14:54:21.594546 7f58677fe6c0 Level-0 table #49: started 2025/05/01-23:27:45.518950 7f11153ff6c0 Level-0 table #208: started
2023/08/08-14:54:21.594573 7f58677fe6c0 Level-0 table #49: 0 bytes OK 2025/05/01-23:27:45.518982 7f11153ff6c0 Level-0 table #208: 0 bytes OK
2023/08/08-14:54:21.600659 7f58677fe6c0 Delete type=0 #47 2025/05/01-23:27:45.525989 7f11153ff6c0 Delete type=0 #206
2023/08/08-14:54:21.607322 7f58677fe6c0 Manual compaction at level-0 from '!folders!DiwHbtGAkTYxtshX' @ 72057594037927935 : 1 .. '!items!zgNI2haxhBxBDBdl' @ 0 : 0; will stop at (end) 2025/05/01-23:27:45.546586 7f11153ff6c0 Manual compaction at level-0 from '!folders!DiwHbtGAkTYxtshX' @ 72057594037927935 : 1 .. '!items!zgNI2haxhBxBDBdl' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2023/08/08-14:36:00.351163 7f5afd5f96c0 Recovering log #40 2025/05/01-23:18:27.070994 7f11167fc6c0 Recovering log #199
2023/08/08-14:36:00.360537 7f5afd5f96c0 Delete type=3 #38 2025/05/01-23:18:27.081264 7f11167fc6c0 Delete type=3 #197
2023/08/08-14:36:00.360576 7f5afd5f96c0 Delete type=0 #40 2025/05/01-23:18:27.081417 7f11167fc6c0 Delete type=0 #199
2023/08/08-14:38:46.103419 7f58677fe6c0 Level-0 table #45: started 2025/05/01-23:23:12.715522 7f11153ff6c0 Level-0 table #204: started
2023/08/08-14:38:46.103439 7f58677fe6c0 Level-0 table #45: 0 bytes OK 2025/05/01-23:23:12.715566 7f11153ff6c0 Level-0 table #204: 0 bytes OK
2023/08/08-14:38:46.137624 7f58677fe6c0 Delete type=0 #43 2025/05/01-23:23:12.721964 7f11153ff6c0 Delete type=0 #202
2023/08/08-14:38:46.137971 7f58677fe6c0 Manual compaction at level-0 from '!folders!DiwHbtGAkTYxtshX' @ 72057594037927935 : 1 .. '!items!zgNI2haxhBxBDBdl' @ 0 : 0; will stop at (end) 2025/05/01-23:23:12.744818 7f11153ff6c0 Manual compaction at level-0 from '!folders!DiwHbtGAkTYxtshX' @ 72057594037927935 : 1 .. '!items!zgNI2haxhBxBDBdl' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

View File

@ -1265,6 +1265,7 @@ ul, li {
min-width: 12rem; min-width: 12rem;
} }
.item-name-label-short { .item-name-label-short {
margin-top: 4px;
flex-grow:1; flex-grow:1;
max-width: 4rem; max-width: 4rem;
min-width: 4rem; min-width: 4rem;
@ -1275,6 +1276,16 @@ ul, li {
max-width: 6rem; max-width: 6rem;
min-width: 6rem; min-width: 6rem;
} }
.item-name-label-medium2 {
margin-top: 4px;
flex-grow:0;
max-width: 10rem;
min-width: 10rem;
}
.item-name-label-free {
margin-top: 4px;
align-self: flex-start;
}
.item-name-label-long2 { .item-name-label-long2 {
margin-top: 4px; margin-top: 4px;
flex-grow:2; flex-grow:2;
@ -1287,10 +1298,17 @@ ul, li {
min-width: 9rem; min-width: 9rem;
} }
.item-field-label-short { .item-field-label-short {
margin-top: 4px;
flex-grow:1; flex-grow:1;
max-width: 4rem; max-width: 4rem;
min-width: 4rem; min-width: 4rem;
} }
.item-field-label-short-header {
margin-top: 4px;
flex-grow:1;
max-width: 2.2rem;
min-width: 2.2rem;
}
.item-field-label-medium { .item-field-label-medium {
flex-grow:1; flex-grow:1;
max-width: 6rem; max-width: 6rem;
@ -1321,12 +1339,21 @@ ul, li {
min-width:2rem; min-width:2rem;
max-width: 2rem; max-width: 2rem;
} }
.item-controls-fixed-full {
min-width:3rem;
max-width: 3rem;
}
.attribute-label { .attribute-label {
font-weight: bold; font-weight: bold;
} }
.flexrow-no-expand { .flexrow-no-expand {
flex-grow: 0; flex-grow: 0;
} }
.flexrow-start {
justify-content: flex-start;
align-content: flex-start;
align-self: flex-start;
}
.item-input-small { .item-input-small {
max-width: 16px; max-width: 16px;
max-height: 12px; max-height: 12px;

View File

@ -3,7 +3,7 @@
font-family: "MailartRubberstamp"; font-family: "MailartRubberstamp";
src: url('../fonts/MailartRubberstamp-Regular.woff') format("woff"); src: url('../fonts/MailartRubberstamp-Regular.woff') format("woff");
} }
:root { :root {
/* =================== 1. ACTOR SHEET FONT STYLES =========== */ /* =================== 1. ACTOR SHEET FONT STYLES =========== */
--window-header-title-font-size: 1.3rem; --window-header-title-font-size: 1.3rem;
@ -27,7 +27,7 @@
--actor-label-font-weight: 700; --actor-label-font-weight: 700;
--actor-label-color: rgba(70,67,49,0.76863); --actor-label-color: rgba(70,67,49,0.76863);
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */ /* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
--debug-background-color-red: rgba(255,0,0,0.32941); --debug-background-color-red: rgba(255,0,0,0.32941);
--debug-background-color-blue: rgba(29,0,255,0.32941); --debug-background-color-blue: rgba(29,0,255,0.32941);
--debug-background-color-green: rgba(84,255,0,0.32941); --debug-background-color-green: rgba(84,255,0,0.32941);
@ -454,9 +454,11 @@ section.sheet-body{padding: 0.25rem 0.5rem;}
/* background: rgb(245,245,240) url("../images/ui/fond4.webp") repeat left top;*/ /* background: rgb(245,245,240) url("../images/ui/fond4.webp") repeat left top;*/
nav.sheet-tabs a,
nav.sheet-tabs .item { nav.sheet-tabs .item {
position: relative; position: relative;
padding: 0 0.25rem; padding: 0 0.25rem;
color: beige;
} }
nav.sheet-tabs .item:after { nav.sheet-tabs .item:after {
@ -697,7 +699,7 @@ ul, li {
/* ======================================== */ /* ======================================== */
.tokenhudext { .tokenhudext {
display: flex; display: flex;
flex: 0 !important; flex: 0 !important;
font-weight: 600; font-weight: 600;
} }
@ -755,7 +757,7 @@ ul, li {
.skill-label { .skill-label {
font-size: 0.7rem; font-size: 0.7rem;
} }
.skill-good-checkbox { .skill-good-checkbox {
max-height: 10px; max-height: 10px;
max-width: 10px; max-width: 10px;
} }
@ -790,7 +792,7 @@ ul, li {
.sidebar-tab .directory-list .entity { .sidebar-tab .directory-list .entity {
border-top: 1px dashed rgba(0,0,0,0.25); border-top: 1px dashed rgba(0,0,0,0.25);
border-bottom: 0 none; border-bottom: 0 none;
padding: 0.25rem 0; padding: 0.25rem 0;
} }
.sidebar-tab .directory-list .entity:hover { .sidebar-tab .directory-list .entity:hover {
@ -804,10 +806,10 @@ ul, li {
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.chat-message .message-header .flavor-text, .chat-message .message-header .whisper-to { .chat-message .message-header .flavor-text, .chat-message .message-header .whisper-to {
font-size: 0.9rem; font-size: 0.9rem;
} }
.chat-result-text, .chat-result-text,
@ -978,7 +980,7 @@ ul, li {
border-radius: 0px; border-radius: 0px;
} }
#hotbar .bar-controls { #hotbar .bar-controls {
background: rgba(30, 25, 20, 1); background: rgba(30, 25, 20, 1);
border: 1px solid rgba(72, 46, 28, 1); border: 1px solid rgba(72, 46, 28, 1);
} }
@ -1042,7 +1044,7 @@ ul, li {
top: 1px; top: 1px;
position: absolute; position: absolute;
z-index: 1; z-index: 1;
/* Fade in tooltip */ /* Fade in tooltip */
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
@ -1148,7 +1150,7 @@ ul, li {
height: 60px; height: 60px;
} }
.dice-cell { .dice-cell {
padding-left: 12px; padding-left: 12px;
padding-right: 12px; padding-right: 12px;
width: 60px; width: 60px;
@ -1194,8 +1196,8 @@ ul, li {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
text-align: center; text-align: center;
} }
@ -1245,6 +1247,7 @@ ul, li {
min-width: 12rem; min-width: 12rem;
} }
.item-name-label-short { .item-name-label-short {
margin-top: 4px;
flex-grow:1; flex-grow:1;
max-width: 4rem; max-width: 4rem;
min-width: 4rem; min-width: 4rem;
@ -1255,6 +1258,16 @@ ul, li {
max-width: 6rem; max-width: 6rem;
min-width: 6rem; min-width: 6rem;
} }
.item-name-label-medium2 {
margin-top: 4px;
flex-grow:0;
max-width: 10rem;
min-width: 10rem;
}
.item-name-label-free {
margin-top: 4px;
align-self: flex-start;
}
.item-name-label-long2 { .item-name-label-long2 {
margin-top: 4px; margin-top: 4px;
flex-grow:2; flex-grow:2;
@ -1267,10 +1280,17 @@ ul, li {
min-width: 9rem; min-width: 9rem;
} }
.item-field-label-short { .item-field-label-short {
margin-top: 4px;
flex-grow:1; flex-grow:1;
max-width: 4rem; max-width: 4rem;
min-width: 4rem; min-width: 4rem;
} }
.item-field-label-short-header {
margin-top: 4px;
flex-grow:1;
max-width: 2.2rem;
min-width: 2.2rem;
}
.item-field-label-medium { .item-field-label-medium {
flex-grow:1; flex-grow:1;
max-width: 6rem; max-width: 6rem;
@ -1294,18 +1314,27 @@ ul, li {
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.item-filler { .item-filler {
flex-grow: 6; flex-grow: 6;
flex-shrink: 7; flex-shrink: 7;
} }
.item-controls-fixed { .item-controls-fixed {
min-width:2rem; min-width:2rem;
max-width: 2rem; max-width: 2rem;
} }
.item-controls-fixed-full {
min-width:3rem;
max-width: 3rem;
}
.attribute-label { .attribute-label {
font-weight: bold; font-weight: bold;
} }
.flexrow-no-expand { .flexrow-no-expand {
flex-grow: 0; flex-grow: 0;
}
.flexrow-start {
justify-content: flex-start;
align-content: flex-start;
align-self: flex-start;
} }
.item-input-small { .item-input-small {
max-width: 16px; max-width: 16px;

View File

@ -3,8 +3,10 @@
"esmodules": [ "esmodules": [
"modules/ecryme-main.js" "modules/ecryme-main.js"
], ],
"gridDistance": 1, "grid": {
"gridUnits": "m", "distance": 2,
"units": "m"
},
"languages": [ "languages": [
{ {
"lang": "fr", "lang": "fr",
@ -62,6 +64,18 @@
"ASSISTANT": "OWNER" "ASSISTANT": "OWNER"
} }
}, },
{
"label": "Scenes",
"type": "Scene",
"name": "scenes",
"path": "packs/scenes",
"system": "fvtt-ecryme",
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
},
{ {
"label": "Maneuvers", "label": "Maneuvers",
"type": "Item", "type": "Item",
@ -73,13 +87,25 @@
"PLAYER": "OBSERVER", "PLAYER": "OBSERVER",
"ASSISTANT": "OWNER" "ASSISTANT": "OWNER"
} }
},
{
"label": "Help/Aides",
"type": "JournalEntry",
"name": "help",
"path": "packs/help",
"system": "fvtt-ecryme",
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
} }
], ],
"license": "LICENSE.txt", "license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme/raw/branch/master/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-ecryme/raw/branch/master/system.json",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "13",
"verified": "11" "verified": "13"
}, },
"id": "fvtt-ecryme", "id": "fvtt-ecryme",
"primaryTokenAttribute": "secondary.health", "primaryTokenAttribute": "secondary.health",
@ -88,9 +114,18 @@
"styles": [ "styles": [
"styles/ecryme.css" "styles/ecryme.css"
], ],
"relationships": {
"requires": [
{
"id": "babele",
"type": "module",
"compatibility": {}
}
]
},
"title": "Ecryme, le Jeu de Rôles", "title": "Ecryme, le Jeu de Rôles",
"url": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme", "url": "https://www.uberwald.me/gitea/public/fvtt-ecryme",
"version": "11.0.16", "version": "13.0.0",
"download": "https://www.uberwald.me/gitea/uberwald/fvtt-ecryme/archive/fvtt-ecryme-v11.0.16.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-ecryme/archive/fvtt-ecryme-v13.0.0.zip",
"background": "systems/fvtt-ecryme/images/assets/ecryme_extract_panel_01.webp" "background": "systems/fvtt-ecryme/images/assets/ecryme_extract_panel_01.webp"
} }

View File

@ -1,7 +1,7 @@
{ {
"Actor": { "Actor": {
"types": [ "types": [
"pc","annency" "pc","annency", "npc"
], ],
"templates": { "templates": {
"biodata": { "biodata": {
@ -24,31 +24,38 @@
}, },
"core": { "core": {
"subactors": [], "subactors": [],
"equipmentfree": "",
"skills": { "skills": {
"physical": { "physical": {
"name": "ECRY.ui.physical", "name": "ECRY.ui.physical",
"pnjvalue": 0,
"skilllist": { "skilllist": {
"athletics": { "athletics": {
"key": "athletics",
"name": "ECRY.ui.athletics", "name": "ECRY.ui.athletics",
"max": 0, "max": 0,
"value": 0 "value": 0
}, },
"driving": { "driving": {
"key": "driving",
"name": "ECRY.ui.driving", "name": "ECRY.ui.driving",
"max": 0, "max": 0,
"value": 0 "value": 0
}, },
"fencing": { "fencing": {
"key": "fencing",
"name": "ECRY.ui.fencing", "name": "ECRY.ui.fencing",
"max": 0, "max": 0,
"value": 0 "value": 0
}, },
"brawling": { "brawling": {
"key": "brawling",
"name": "ECRY.ui.brawling", "name": "ECRY.ui.brawling",
"max": 0, "max": 0,
"value": 0 "value": 0
}, },
"shooting": { "shooting": {
"key": "shooting",
"name": "ECRY.ui.shooting", "name": "ECRY.ui.shooting",
"max": 0, "max": 0,
"value": 0 "value": 0
@ -57,28 +64,34 @@
}, },
"mental": { "mental": {
"name": "ECRY.ui.mental", "name": "ECRY.ui.mental",
"pnjvalue": 0,
"skilllist": { "skilllist": {
"anthropomecanology": { "anthropomecanology": {
"key": "anthropomecanology",
"name": "ECRY.ui.anthropomecanology", "name": "ECRY.ui.anthropomecanology",
"value": 0, "value": 0,
"max": 10 "max": 10
}, },
"ecrymology": { "ecrymology": {
"key": "ecrymology",
"name": "ECRY.ui.ecrymology", "name": "ECRY.ui.ecrymology",
"value": 0, "value": 0,
"max": 10 "max": 10
}, },
"traumatology": { "traumatology": {
"key": "traumatology",
"name": "ECRY.ui.traumatology", "name": "ECRY.ui.traumatology",
"value": 0, "value": 0,
"max": 10 "max": 10
}, },
"traversology": { "traversology": {
"key": "traversology",
"name": "ECRY.ui.traversology", "name": "ECRY.ui.traversology",
"value": 0, "value": 0,
"max": 10 "max": 10
}, },
"urbatechnology": { "urbatechnology": {
"key": "urbatechnology",
"name": "ECRY.ui.urbatechnology", "name": "ECRY.ui.urbatechnology",
"value": 0, "value": 0,
"max": 10 "max": 10
@ -87,28 +100,34 @@
}, },
"social": { "social": {
"name": "ECRY.ui.social", "name": "ECRY.ui.social",
"pnjvalue": 0,
"skilllist": { "skilllist": {
"quibbling": { "quibbling": {
"key": "quibbling",
"name": "ECRY.ui.quibbling", "name": "ECRY.ui.quibbling",
"value": 0, "value": 0,
"max": 10 "max": 10
}, },
"creativity": { "creativity": {
"key": "creativity",
"name": "ECRY.ui.creativity", "name": "ECRY.ui.creativity",
"value": 0, "value": 0,
"max": 10 "max": 10
}, },
"loquacity": { "loquacity": {
"key": "loquacity",
"name": "ECRY.ui.loquacity", "name": "ECRY.ui.loquacity",
"value": 0, "value": 0,
"max": 10 "max": 10
}, },
"guile": { "guile": {
"key": "guile",
"name": "ECRY.ui.guile", "name": "ECRY.ui.guile",
"value": 0, "value": 0,
"max": 10 "max": 10
}, },
"performance": { "performance": {
"key": "performance",
"name": "ECRY.ui.performance", "name": "ECRY.ui.performance",
"value": 0, "value": 0,
"max": 10 "max": 10
@ -196,6 +215,12 @@
"annency" "annency"
] ]
}, },
"npc": {
"templates": [
"biodata",
"core"
]
},
"pc": { "pc": {
"templates": [ "templates": [
"biodata", "biodata",
@ -260,6 +285,7 @@
"effect": 0 "effect": 0
}, },
"specialization": { "specialization": {
"bonus": 2,
"templates": [ "templates": [
"common" "common"
], ],

View File

@ -15,27 +15,40 @@
<div class="flexrow"> <div class="flexrow">
<ul> <ul>
<li class="flexrow item" data-item-id="{{spleen.id}}"> <li class="flexrow item" data-item-id="{{spleen.id}}">
<label class="item-name-label-medium">Spleen :</label> <label class="item-field-label-short">Spleen :</label>
<label class="item-name-label-long">{{spleen.name}}</label> <label class="item-name-label-long">{{spleen.name}}</label>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
{{#if spleen}} {{#if spleen}}
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed-full">
<a class="item-control item-add" data-type="trait" title="Create Trait"><i
class="fas fa-plus"></i></a>
<a class="item-control item-edit" data-type="trait" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" data-type="trait" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-add" data-type="trait" title="Delete Item"><i class="fas fa-plus"></i></a> <a class="item-control item-add" data-type="trait" title="Delete Item"><i
class="fas fa-trash"></i></a>
</div> </div>
{{/if}} {{/if}}
</li> </li>
<li class="item flexrow" data-item-id="{{ideal.id}}"> <li class="item flexrow" data-item-id="{{ideal.id}}">
<label class="item-name-label-medium">Ideal :</label> <label class="item-field-label-short">Ideal :</label>
<label class="item-name-label-long">{{ideal.name}}</label> <label class="item-name-label-long">{{ideal.name}}</label>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
{{#if ideal}} {{#if ideal}}
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed-full">
<a class="item-control item-add" data-type="trait" title="Create Trait"><i
class="fas fa-plus"></i></a>
<a class="item-control item-edit" data-type="trait" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" data-type="trait" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-add" data-type="trait" title="Delete Item"><i class="fas fa-plus"></i></a> <a class="item-control item-add" data-type="trait" title="Delete Item"><i
class="fas fa-trash"></i></a>
</div> </div>
{{/if}} {{/if}}
</li> </li>
<li class="item flexrow flexrow-no-expand flexrow-start ">
<label class="item-name-label-short">Traits :</label>
{{#each traits as |trait key|}}
<label class="item-name-label-free"><a data-item-id="{{trait._id}}" class="item-edit">{{trait.name}}</a>,&nbsp;</label>
{{/each}}
</li>
</ul> </ul>
</div> </div>
@ -72,10 +85,29 @@
<ul class="stat-list alternate-list item-list"> <ul class="stat-list alternate-list item-list">
<li class="item flexrow list-item items-title-bg"> <li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header impact-title"> <span class="item-name-label-header impact-title">
<h3><label class="items-title-text">{{localize category.name}} ({{valueAtIndex @root.impactsMalus <h3>
categkey}})</label></h3>
{{#if (eq @root.type "npc")}}
<a class="roll-skill-confront" data-category-key="{{categkey}}" data-skill-key="rawnpc">
<i class="fa-regular fa-swords"></i>
</a>
<a class="roll-skill" data-category-key="{{categkey}}" data-skill-key="rawnpc">
<i class="fa-solid fa-dice-d6"></i>
{{/if}}
<label class="items-title-text">{{localize category.name}} ({{valueAtIndex @root.impactsMalus
categkey}})</label>
{{#if (eq @root.type "npc")}}
</a>
<select class="item-field-label-short-header" type="text"
name="system.skills.{{categkey}}.pnjvalue" value="{{category.pnjvalue}}"
data-dtype="Number">
{{selectOptions @root.config.skillLevel selected=category.pnjvalue}}
</select>
{{/if}}
</h3>
</span> </span>
</li> </li>
{{#each category.skilllist as |skill skillkey|}} {{#each category.skilllist as |skill skillkey|}}
<li class="item flexrow list-item"> <li class="item flexrow list-item">
<span class="item-name-label-long"> <span class="item-name-label-long">
@ -89,26 +121,23 @@
<select class="item-field-label-short" type="text" <select class="item-field-label-short" type="text"
name="system.skills.{{categkey}}.skilllist.{{skillkey}}.value" value="{{skill.value}}" name="system.skills.{{categkey}}.skilllist.{{skillkey}}.value" value="{{skill.value}}"
data-dtype="Number"> data-dtype="Number">
{{#select skill.value}} {{selectOptions @root.config.skillLevel selected=skill.value}}
{{#each @root.config.skillLevel as |level key| }}
<option value="{{level}}">{{level}}</option>
{{/each}}
{{/select}}
</select> </select>
</li> </li>
<li class="item flexrow list-item"> <li class="item flexrow list-item">
<ul class="ul-level1"> <ul class="ul-level1">
{{#each skill.spec as |spec idx|}} {{#each skill.spec as |spec idx|}}
<li class="item flexrow list-item" data-item-id="{{spec._id}}" data-item-type="specialization"> <li class="item flexrow list-item" data-item-id="{{spec._id}}" data-item-type="specialization">
<a class="roll-spec" data-spec-id="{{spec._id}}"> <a class="roll-spec" data-category-key="{{categkey}}" data-skill-key="{{skillkey}}"
data-spec-id="{{spec._id}}">
<i class="fa-solid fa-dice-d6"></i> <i class="fa-solid fa-dice-d6"></i>
{{spec.name}} {{spec.name}}
</a> </a>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
<a class="item-control item-edit" data-type="specialization" title="Edit Item"><i <a class="item-control item-edit" data-type="specialization" title="Edit Item"><i
class="fas fa-edit"></i></a> class="fas fa-edit"></i></a>
<a class="item-control item-add" data-type="specialization" title="Delete Item"><i <a class="item-control item-delete" data-type="specialization" title="Delete Item"><i
class="fas fa-plus"></i></a> class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
{{/each}} {{/each}}
@ -141,11 +170,7 @@
</a></span> </a></span>
<select class="item-field-label-short" type="text" name="system.cephaly.skilllist.{{skillkey}}.value" <select class="item-field-label-short" type="text" name="system.cephaly.skilllist.{{skillkey}}.value"
value="{{skill.value}}" data-dtype="Number"> value="{{skill.value}}" data-dtype="Number">
{{#select skill.value}} {{selectOptions @root.config.skillLevel selected=skill.value}}
{{#each @root.config.skillLevel as |level key| }}
<option value="{{level}}">{{level}}</option>
{{/each}}
{{/select}}
</select> </select>
</li> </li>
{{/each}} {{/each}}
@ -155,7 +180,8 @@
<div> <div>
{{#if annency}} {{#if annency}}
<h3>{{localize "ECRY.ui.annency"}} : <a class="open-annency" data-annency-id="{{annency.id}}">{{annency.name}}<i class="fas fa-edit"></i></a></h3> <h3>{{localize "ECRY.ui.annency"}} : <a class="open-annency"
data-annency-id="{{annency.id}}">{{annency.name}}<i class="fas fa-edit"></i></a></h3>
<ul class="stat-list alternate-list item-list"> <ul class="stat-list alternate-list item-list">
<li class="item flexrow list-item"> <li class="item flexrow list-item">
<span class="item-name-label-long"> <span class="item-name-label-long">
@ -273,57 +299,22 @@
{{!-- Equipement Tab --}} {{!-- Equipement Tab --}}
<div class="tab equipment" data-group="primary" data-tab="equipment"> <div class="tab equipements" data-group="primary" data-tab="equipements">
<span class="item-name-label-header items-title-bg"> <span class="item-name-label-header items-title-bg">
<h3><label class="items-title-text">Equipements (saisie libre)</label></h3> <h3><label class="items-title-text">{{localize "ECRY.ui.equipmentfree"}}</label></h3>
</span> </span>
<div class="form-group small-editor"> <div class="form-group small-editor">
{{editor equipementlibre target="system.equipementlibre" button=true owner=owner editable=editable}} {{editor equipementlibre target="system.equipmentfree" button=true owner=owner editable=editable}}
</div> </div>
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg"> <li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header"> <span class="item-name-label-header">
<h3><label class="items-title-text">Armes</label></h3> <h3><label class="items-title-text">{{localize "ECRY.ui.equipment"}}s</label></h3>
</span> </span>
<span class="item-field-label-medium"> <span class="item-field-label-medium">
<label class="item-field-label-medium">Normaux</label> <label class="item-field-label-medium">{{localize "ECRY.ui.weight"}}</label>
</span>
<span class="item-field-label-medium">
<label class="item-field-label-medium">Particulier</label>
</span>
<span class="item-field-label-medium">
<label class="item-field-label-medium">Critique</label>
</span>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each armes as |arme key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{arme._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{arme.img}}" /></a>
<span class="item-name-label">{{arme.name}}</span>
<span class="item-field-label-medium"><label>{{arme.system.dommagenormale}}</label></span>
<span class="item-field-label-medium"><label>{{arme.system.dommagepart}}</label></span>
<span class="item-field-label-medium"><label>{{arme.system.dommagecritique}}</label></span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Equipements (Items)</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Q.</label>
</span> </span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
@ -331,11 +322,12 @@
</div> </div>
</li> </li>
{{#each equipements as |equip key|}} {{#each equipments as |equip key|}}
<li class="item list-item flexrow list-item-shadow" data-item-id="{{equip._id}}"> <li class="item list-item flexrow list-item-shadow" data-item-id="{{equip._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{equip.img}}" /></a> src="{{equip.img}}" /></a>
<span class="item-name-label">{{equip.name}}</span> <span class="item-name-label">{{equip.name}}</span>
<span class="item-field-label-medium">{{equip.system.weight}}</span>
<div class="item-filler">&nbsp;</div> <div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed"> <div class="item-controls item-controls-fixed">
@ -345,36 +337,6 @@
{{/each}} {{/each}}
</ul> </ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Sortilèges</label></h3>
</span>
<span class="item-field-label-medium">
<label class="short-label">Seuil</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each sorts as |sort key|}}
<li class="item list-item flexrow list-item-shadow" data-item-id="{{sort._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{sort.img}}" /></a>
<span class="item-name-label">{{sort.name}}</span>
<span class="item-field-label-medium">
<label class="short-label">{{sort.system.seuil}}</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<hr> <hr>
</div> </div>
@ -386,7 +348,7 @@
<div> <div>
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Lieu de naissance</label> <label class="item-name-label-medium">{{localize "ECRY.ui.bornplace"}}</label>
<input type="text" class="" name="system.biodata.lieunaissance" value="{{system.biodata.lieunaissance}}" <input type="text" class="" name="system.biodata.lieunaissance" value="{{system.biodata.lieunaissance}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
@ -395,22 +357,27 @@
<input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}" <input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="item flexrow">
<label class="item-name-label-medium">Profession</label>
<input type="text" class="" name="system.biodata.profession" value="{{system.biodata.profession}}"
data-dtype="String" />
</li>
</ul> </ul>
</div> </div>
<div> <div>
<ul> <ul>
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Résidence</label> <label class="item-name-label-medium">{{localize "ECRY.ui.residence"}}</label>
<input type="text" class="" name="system.biodata.residence" value="{{system.biodata.residence}}" <input type="text" class="" name="system.biodata.residence" value="{{system.biodata.residence}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Nationalité</label> <label class="item-name-label-medium">{{localize "ECRY.ui.origin"}}</label>
<input type="text" class="" name="system.biodata.nationalite" value="{{system.biodata.nationalite}}" <input type="text" class="" name="system.biodata.nationalite" value="{{system.biodata.nationalite}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Enfance</label> <label class="item-name-label-medium">{{localize "ECRY.ui.childhood"}}</label>
<input type="text" class="" name="system.biodata.enfance" value="{{system.biodata.enfance}}" <input type="text" class="" name="system.biodata.enfance" value="{{system.biodata.enfance}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>

View File

@ -16,14 +16,21 @@
<div> <div>
<ul> <ul>
<li>{{localize "ECRY.ui.cephaly"}} : {{localize skill.name}}</li> <li>{{localize "ECRY.ui.cephaly"}} : {{localize skill.name}}</li>
{{#if annency}}
<li>{{localize "ECRY.ui.annencybonus"}} {{annency.name}}: {{annencyBonus}}</li>
{{/if}}
{{#if (gt marginExecution 0)}} {{#if (gt marginExecution 0)}}
<li>{{localize "ECRY.ui.execution"}} {{executionTotal}} vs {{difficulty}} : {{marginExecution}}</li> <li>{{localize "ECRY.ui.execution"}} {{executionTotal}} vs {{difficulty}} : {{marginExecution}}</li>
<li>{{localize cephalySuccess}}</li> <li>{{localize cephalySuccess}}</li>
{{/if}} {{/if}}
{{#if (gt marginPreservation 0)}} {{#if (gt marginPreservation 0)}}
<li>{{localize "ECRY.ui.preservation"}} {{preservationTotal}} vs {{difficulty}} : {{marginPreservation}}</li> <li>{{localize "ECRY.ui.preservation"}} {{preservationTotal}} vs {{difficulty}} : {{marginPreservation}}</li>
<li>{{localize cephalyFailure}}</li> <li>{{localize cephalyFailure}}</li>
{{/if}} {{/if}}
</ul> </ul>
</div> </div>

View File

@ -23,7 +23,7 @@
<li>{{localize skill.name}}: {{skill.value}} </li> <li>{{localize skill.name}}: {{skill.value}} </li>
{{#if spec}} {{#if spec}}
<li>{{localize "ECRY.chat.specialization"}} {{spec.name}} (+2) </li> <li>{{localize "ECRY.chat.specialization"}} {{spec.name}} (+{{spec.system.bonus}}) </li>
{{/if}} {{/if}}
{{#each traitsBonus as |trait idx|}} {{#each traitsBonus as |trait idx|}}
@ -40,7 +40,14 @@
<li>{{localize "ECRY.chat.bonusmalustraits"}}: {{bonusMalusTraits}} </li> <li>{{localize "ECRY.chat.bonusmalustraits"}}: {{bonusMalusTraits}} </li>
{{/if}} {{/if}}
{{#if (isGM)}}
{{else}}
<li>{{localize "ECRY.ui.execution"}} : {{executionTotal}}</li>
<li>{{localize "ECRY.ui.preservation"}} : {{preservationTotal}}</li>
{{/if}}
</ul> </ul>
{{#if (isGM)}} {{#if (isGM)}}
{{#if (eq mode "cephaly")}} {{#if (eq mode "cephaly")}}
<div> <div>
@ -55,6 +62,10 @@
{{else}} {{else}}
<button class="button-select-confront">{{localize "ECRY.ui.selectconfront"}}</button> <button class="button-select-confront">{{localize "ECRY.ui.selectconfront"}}</button>
{{/if}} {{/if}}
{{else}}
<div>
{{localize "ECRY.chat.sentogm"}}
</div>
{{/if}} {{/if}}
</div> </div>

View File

@ -21,7 +21,7 @@
{{#if skill}} {{#if skill}}
<li>{{localize skill.name}}: {{skill.value}} </li> <li>{{localize skill.name}}: {{skill.value}} </li>
{{#if spec}} {{#if spec}}
<li>{{localize "ECRY.chat.specialization"}} {{spec.name}} (+2) </li> <li>{{localize "ECRY.chat.specialization"}} {{spec.name}} (+{{spec.system.bonus}}) </li>
{{/if}} {{/if}}
{{/if}} {{/if}}

View File

@ -55,20 +55,13 @@
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.skilltranscendence"}} : </span> <span class="roll-dialog-label">{{localize "ECRY.ui.skilltranscendence"}} : </span>
<select class="" id="roll-select-transcendence" data-type="Number"> <select class="" id="roll-select-transcendence" data-type="Number">
{{#select skillTranscendence}} {{selectOptions config.skillLevel selected=skillTranscendence}}
{{#for 0 skill.value 1}}
<option value="{{this}}">{{this}}</option>
{{/for}}
{{/select}}
</select> </select>
</div> </div>
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.transcendapply"}} : </span> <span class="roll-dialog-label">{{localize "ECRY.ui.transcendapply"}} : </span>
<select class="" id="roll-apply-transcendence" data-type="String"> <select class="" id="roll-apply-transcendence" data-type="String">
{{#select applyTranscendence}} {{selectOptions config.transcendanceOptions selected=applyTranscendence localize=true}}
<option value="execution">{{localize "ECRY.ui.execution"}}</option>
<option value="preservation">{{localize "ECRY.ui.preservation"}}</option>
{{/select}}
</select> </select>
</div> </div>
@ -100,19 +93,29 @@
{{/each}} {{/each}}
</select> </select>
</div> </div>
{{#if annency}}
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.annency"}} : {{annency.name}}</span>
<span class="roll-dialog-label">{{annency.system.base.description}}</span>
</div>
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.annencybonus"}}</span>
<select class="" id="annency-bonus" name="annencyBonus" data-type="String">
<option value="0">0</option>
<option value="1">+1</option>
<option value="2">+2</option>
<option value="3">+3</option>
<option value="4">+4</option>
<option value="5">+5</option>
</select>
</div>
{{/if}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Bonus/Malus : </span> <span class="roll-dialog-label">Bonus/Malus : </span>
<select id="bonusMalusPerso" name="bonusMalusPerso"> <select id="bonusMalusPerso" name="bonusMalusPerso" type="text" data-dtype="String">
{{#select bonusMalusPerso}} {{selectOptions config.bonusMalusPersoOptions selected=bonusMalusPerso labelAttr="label"}}
<option value="-3">-3</option>
<option value="-2">-2</option>
<option value="-1">-1</option>
<option value="0">0</option>
<option value="1">+1</option>
<option value="2">+2</option>
<option value="3">+3</option>
{{/select}}
</select> </select>
</div> </div>

View File

@ -14,22 +14,25 @@
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.skilltranscendence"}} : </span> <span class="roll-dialog-label">{{localize "ECRY.ui.skilltranscendence"}} : </span>
<select class="" id="roll-select-transcendence" data-type="Number"> <select class="" id="roll-select-transcendence" data-type="Number">
{{#select skillTranscendence}} {{selectOptions config.skillLevel selected=skillTranscendence}}
{{#for 0 skill.value 1}}
<option value="{{this}}">{{this}}</option>
{{/for}}
{{/select}}
</select> </select>
</div> </div>
{{#if forcedSpec}}
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.spec"}} : </span>
<span class="roll-dialog-label">{{forcedSpec.name}} (+{{forcedSpec.system.bonus}})</span>
</div>
{{else}}
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.spec"}} : </span> <span class="roll-dialog-label">{{localize "ECRY.ui.spec"}} : </span>
<select class="" id="roll-specialization" data-type="String" multiple> <select class="" id="roll-specialization" data-type="String" multiple>
{{#each skill.spec as |spec idx|}} {{#each skill.spec as |spec idx|}}
<option value="{{spec.id}}">{{spec.name}}</option> <option value="{{spec.id}}">{{spec.name}} (+{{spec.system.bonus}})</option>
{{/each}} {{/each}}
</select> </select>
</div> </div>
{{/if}}
{{#if spleen}} {{#if spleen}}
<div class="flexrow"> <div class="flexrow">
@ -68,16 +71,8 @@
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Bonus/Malus : </span> <span class="roll-dialog-label">Bonus/Malus : </span>
<select id="bonusMalusPerso" name="bonusMalusPerso"> <select type="text" id="bonusMalusPerso" name="bonusMalusPerso" data-dtype="String">
{{#select bonusMalusPerso}} {{selectOptions config.bonusMalusPersoOptions selected=bonusMalusPerso labelAttr="label"}}
<option value="-3">-3</option>
<option value="-2">-2</option>
<option value="-1">-1</option>
<option value="0">0</option>
<option value="1">+1</option>
<option value="2">+2</option>
<option value="3">+3</option>
{{/select}}
</select> </select>
</div> </div>

View File

@ -12,13 +12,8 @@
<div class="flexrow"> <div class="flexrow">
<span class="roll-dialog-label">Difficulté : </span> <span class="roll-dialog-label">Difficulté : </span>
<select class="" type="text" id="roll-difficulty" value="{{difficulty}}" data-dtype="Number"> <select class="" type="text" id="roll-difficulty" data-dtype="String">
{{#select difficulty}} {{selectOptions config.difficulty selected=difficulty localize=true labelAttr="difficulty"}}
{{#each config.difficulty as |diffData value| }}
<option value="{{diffData.value}}">{{localize diffData.difficulty}} / {{localize diffData.frequency}}
({{diffData.value}})</option>
{{/each}}
{{/select}}
</select> </select>
</div> </div>

View File

@ -22,22 +22,14 @@
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">{{localize "ECRY.ui.impactType"}}</label> <label class="item-name-label-long">{{localize "ECRY.ui.impactType"}}</label>
<select class="item-field-label-medium" type="text" name="system.impacttype" value="{{system.impacttype}}" data-dtype="String"> <select class="item-field-label-medium" type="text" name="system.impacttype" value="{{system.impacttype}}" data-dtype="String">
{{#select system.impacttype}} {{selectOptions config.impactTypes selected=system.impacttype localize=true }}
{{#each config.impactTypes as |type key| }}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select> </select>
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">{{localize "ECRY.ui.impactLevel"}}</label> <label class="item-name-label-long">{{localize "ECRY.ui.impactLevel"}}</label>
<select class="item-field-label-medium" type="text" name="system.impactlevel" value="{{system.impactlevel}}" data-dtype="String"> <select class="item-field-label-medium" type="text" name="system.impactlevel" value="{{system.impactlevel}}" data-dtype="String">
{{#select system.impactlevel}} {{selectOptions config.impactLevels selected=system.impactlevel localize=true }}
{{#each config.impactLevels as |level key| }}
<option value="{{key}}">{{localize level}}</option>
{{/each}}
{{/select}}
</select> </select>
</li> </li>
</ul> </ul>

View File

@ -22,14 +22,15 @@
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">{{localize "ECRY.ui.skill"}}</label> <label class="item-name-label-long">{{localize "ECRY.ui.skill"}}</label>
<select class="item-field-label-medium" type="text" name="system.skillkey" value="{{system.skillkey}}" data-dtype="String"> <select class="item-field-label-medium" type="text" name="system.skillkey" value="{{system.skillkey}}" data-dtype="String">
{{#select system.skillkey}} {{selectOptions config.skills selected=system.skillkey localize=true valueAttr="key" labelAttr="name"}}
{{#each config.skills as |skill key| }}
<option value="{{key}}">{{localize skill.name}}</option>
{{/each}}
{{/select}}
</select> </select>
</li> </li>
<li class="flexrow">
<label class="item-name-label-long">{{localize "ECRY.ui.bonus"}}</label>
<input type="text" class="item-field-label-short" name="system.bonus" value="{{system.bonus}}" data-dtype="Number"/>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -22,23 +22,14 @@
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">{{localize "ECRY.ui.traitType"}}</label> <label class="item-name-label-long">{{localize "ECRY.ui.traitType"}}</label>
<select class="item-field-label-medium" type="text" name="system.traitype" value="{{system.traitype}}" data-dtype="String"> <select class="item-field-label-medium" type="text" name="system.traitype" value="{{system.traitype}}" data-dtype="String">
{{#select system.traitype}} {{selectOptions config.traitTypes selected=system.traitype}}
{{#each config.traitTypes as |type key| }}
<option value="{{key}}">{{type}}</option>
{{/each}}
{{/select}}
</select> </select>
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">{{localize "ECRY.ui.niveauTrait"}}</label> <label class="item-name-label-long">{{localize "ECRY.ui.niveauTrait"}}</label>
<select class="item-field-label-medium" type="text" name="system.level" value="{{system.level}}" data-dtype="Number"> <select class="item-field-label-medium" type="text" name="system.level" value="{{system.level}}" data-dtype="String">
{{#select system.level}} {{selectOptions config.traitLevel selected=system.level labelAttr="text"}}
{{#each config.traitLevel as |level key| }}
<option value="{{level.value}}">{{level.text}}</option>
{{/each}}
{{/select}}
</select>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -22,11 +22,7 @@
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">{{localize "ECRY.ui.weapontype"}}</label> <label class="item-name-label-long">{{localize "ECRY.ui.weapontype"}}</label>
<select class="item-field-label-medium" type="text" name="system.weapontype" value="{{system.weapontype}}" data-dtype="String"> <select class="item-field-label-medium" type="text" name="system.weapontype" value="{{system.weapontype}}" data-dtype="String">
{{#select system.weapontype}} {{selectOptions config.weaponTypes selected=system.weapontype localize=true}}
{{#each config.weaponTypes as |type key| }}
<option value="{{key}}">{{localize type}}</option>
{{/each}}
{{/select}}
</select> </select>
</li> </li>

View File

@ -8,11 +8,7 @@
<label class="item-field-label-long">{{localize "ECRY.ui.cost"}}</label> <label class="item-field-label-long">{{localize "ECRY.ui.cost"}}</label>
<input type="text" class="item-field-label-short" name="system.cost" value="{{system.cost}}" data-dtype="Number" /> <input type="text" class="item-field-label-short" name="system.cost" value="{{system.cost}}" data-dtype="Number" />
<select class="item-field-label-medium" type="text" name="system.costunit" value="{{system.costunit}}" data-dtype="String"> <select class="item-field-label-medium" type="text" name="system.costunit" value="{{system.costunit}}" data-dtype="String">
{{#select system.costunit}} {{selectOptions config.costUnits selected=system.costunit localize=true labelAttr="name"}}
{{#each config.costUnits as |unit key| }}
<option value="{{key}}">{{localize unit.name}}</option>
{{/each}}
{{/select}}
</select> </select>
</li> </li>

View File

@ -2,6 +2,18 @@
"label": "Equipement", "label": "Equipement",
"mapping": { "mapping": {
"description": "system.description" "description": "system.description"
},
"folders": {
"Armor": "Armure",
"Weapons": "Armes",
"Clothing": "Vêtements",
"Food": "Nourriture",
"Lighting": "Eclairage",
"Miscellany" : "Divers",
"Musical instruments": "Instruments de musique",
"Reading, writing, recording": "Lecture, écriture, enregistrement",
"Travel equipment": "Equipement de voyage",
"Vehicle": "Véhicule"
}, },
"entries": { "entries": {
"Absinthe": { "Absinthe": {

View File

@ -2,6 +2,11 @@
"label": "Spécialisation", "label": "Spécialisation",
"mapping": { "mapping": {
"description": "system.description" "description": "system.description"
},
"folders": {
"Mental": "Mentale",
"Physical": "Physique",
"Spocial": "Sociale"
}, },
"entries": { "entries": {
"Aircraft": { "Aircraft": {

View File

@ -2,6 +2,9 @@
"label": "Traits", "label": "Traits",
"mapping": { "mapping": {
"description": "system.description" "description": "system.description"
},
"folders": {
"Maneuvers": "Manoeuvres"
}, },
"entries": { "entries": {
"Ability to stay calm": { "Ability to stay calm": {