Various fixes and enhancements

This commit is contained in:
LeRatierBretonnien 2025-02-03 23:00:59 +01:00
parent a72e671f75
commit 92396da997
69 changed files with 762 additions and 330 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 KiB

View File

@ -52,6 +52,7 @@ export class TeDeumActorPJSheet extends ActorSheet {
pointsArmuresLourdes: this.actor.getNbArmures(), pointsArmuresLourdes: this.actor.getNbArmures(),
nbArmuresLourdes: this.actor.getNbArmuresLourdesActuel(), nbArmuresLourdes: this.actor.getNbArmuresLourdesActuel(),
santeModifier: this.actor.getSanteModifier(), santeModifier: this.actor.getSanteModifier(),
educations: this.actor.getEducations(),
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }), description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }), notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
options: this.options, options: this.options,

View File

@ -97,6 +97,11 @@ export class TeDeumActor extends Actor {
return nb return nb
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
getEducations() {
let educations = this.items.filter(item => item.type == 'education')
return educations
}
/* -------------------------------------------- */
getCompetences() { getCompetences() {
let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'competence') || []) let comp = foundry.utils.duplicate(this.items.filter(item => item.type == 'competence') || [])
return comp; return comp;

View File

@ -1,5 +1,5 @@
import { TeDeumUtility } from "../common/tedeum-utility.js"; import { TeDeumUtility } from "../common/tedeum-utility.js";
import { TeDeumActor } from "../actors/tedeum-actor.js";
export class TeDeumCharacterCreator { export class TeDeumCharacterCreator {
/*--------------------------------------------*/ /*--------------------------------------------*/
@ -20,7 +20,6 @@ export class TeDeumCharacterCreator {
for (let stage in game.system.tedeum.config.etapesEducation) { for (let stage in game.system.tedeum.config.etapesEducation) {
this.stages[stage] = { selectedItem: null, items: [] } this.stages[stage] = { selectedItem: null, items: [] }
} }
console.log(this.stages, game.system.tedeum.etapesEducation)
const educations = await TeDeumUtility.loadCompendium("fvtt-te-deum.education") const educations = await TeDeumUtility.loadCompendium("fvtt-te-deum.education")
for (let edu of educations) { for (let edu of educations) {
@ -32,6 +31,7 @@ export class TeDeumCharacterCreator {
/*--------------------------------------------*/ /*--------------------------------------------*/
increaseCompetence(compName) { increaseCompetence(compName) {
if (compName === "" || compName == undefined || compName == "undefined") { return }
compName = compName.toLowerCase() compName = compName.toLowerCase()
if (!this.competenceBonus[compName]) { if (!this.competenceBonus[compName]) {
this.competenceBonus[compName] = { value: 1 } this.competenceBonus[compName] = { value: 1 }
@ -45,7 +45,7 @@ export class TeDeumCharacterCreator {
let fullResponses = [] let fullResponses = []
for (let key in question.reponses) { for (let key in question.reponses) {
let response = question.reponses[key] let response = question.reponses[key]
fullResponses.push({ id: key, label: `${response.reponse} (${response.compName} +1)` }) fullResponses.push({ id: key, label: `${response.reponse} (${TeDeumUtility.upperFirst( response.compName)} +1)` })
} }
return fullResponses return fullResponses
} }
@ -53,9 +53,15 @@ export class TeDeumCharacterCreator {
/*--------------------------------------------*/ /*--------------------------------------------*/
processReponsesRadio(question) { processReponsesRadio(question) {
let fullResponses = {} let fullResponses = {}
let selected = true
for (let key in question.reponses) { for (let key in question.reponses) {
let response = question.reponses[key] let response = question.reponses[key]
fullResponses[key] = `${response.reponse} (${response.compName} +1)` if (response.toSelect) {
fullResponses[key] = { label: `${response.reponse}`, competences: response.compList, selected }
} else {
fullResponses[key] = { label: `${response.reponse} (${response.compName} +1)`, selected }
}
selected = false
} }
return fullResponses return fullResponses
} }
@ -89,17 +95,16 @@ export class TeDeumCharacterCreator {
} }
/*--------------------------------------------*/ /*--------------------------------------------*/
processCompetences(stage) { processCompetences(compList) {
for (let compKey in stage.system.competences) { for (let compName in compList) {
let comp = stage.system.competences[compKey] this.increaseCompetence(compName)
if (comp.valid && comp.compName !== "") {
this.increaseCompetence(comp.compName)
}
} }
} }
/*--------------------------------------------*/ /*--------------------------------------------*/
async askQuestionnaire(stage, context) { async askQuestionnaire(stage, context) {
context.subtitle = "Questionnaire"
for (let key in stage.system.questionnaire) { for (let key in stage.system.questionnaire) {
let question = stage.system.questionnaire[key] let question = stage.system.questionnaire[key]
if (question.question === "") { break } if (question.question === "") { break }
@ -107,6 +112,8 @@ export class TeDeumCharacterCreator {
context.question = question.question context.question = question.question
context.responses = this.processReponses(question) context.responses = this.processReponses(question)
context.responsesRadio = this.processReponsesRadio(question) context.responsesRadio = this.processReponsesRadio(question)
context.competences = {}
context.responseKey = "reponse1" // By default
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-select-questions.hbs", context) const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-select-questions.hbs", context)
const choiceResult = await foundry.applications.api.DialogV2.wait({ const choiceResult = await foundry.applications.api.DialogV2.wait({
@ -129,24 +136,138 @@ export class TeDeumCharacterCreator {
}, },
rejectClose: false, // Click on Close button will not launch an error rejectClose: false, // Click on Close button will not launch an error
render: (event, dialog) => { render: (event, dialog) => {
$(".questionnaire-radio").click(event => {
let responseKey = $(event.target).data("response-key")
context.responseKey = responseKey
})
$(".questionnaire-select-competence").change(event => {
// Get the responseKey data
let responseKey = $(event.target).data("response-key")
let compName = event.target.value
console.log("Questionnaire Change", responseKey, compName)
context.competences[responseKey] = compName.toLowerCase()
})
} }
}) })
if (choiceResult == null) { return } if (choiceResult == null) {
let selectedResponse = question.reponses[choiceResult.responseKey] this.currentStage = "cancelled"
console.log(choiceResult, selectedResponse, question) return
this.increaseCompetence(selectedResponse.compName) }
let selectedResponse = question.reponses[context.responseKey]
let compName = context.competences[context.responseKey] || selectedResponse.compName
this.increaseCompetence(compName)
} }
} }
/*------------- -------------------------------*/
async askCompetences(stage, context) {
context.subtitle = "Choix des Compétences"
context.fixedCompetences = {}
context.selectCompetences = {}
for (let compKey in stage.system.competences) {
let comp = stage.system.competences[compKey]
if (comp.valid && comp.compName !== "") {
if (comp.toSelect) {
context.hasSelectCompetences = true
context.selectCompetences[comp.compName] = TeDeumUtility.upperFirst(comp.compName)
} else {
context.fixedCompetences[comp.compName] = TeDeumUtility.upperFirst(comp.compName)
}
}
}
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-select-competences.hbs", context)
const choiceResult = await foundry.applications.api.DialogV2.wait({
window: { title: context.title },
classes: ["fvtt-te-deum"],
content,
buttons: [
{
label: context.label,
callback: (event, button, dialog) => {
const output = Array.from(button.form.elements).reduce((obj, input) => {
if (input.name) obj[input.name] = input.value
return obj
}, {})
return output
},
},
],
actions: {
},
rejectClose: false, // Click on Close button will not launch an error
render: (event, dialog) => {
}
})
if (choiceResult == null) {
this.currentStage = "cancelled"
return
}
context.fixedCompetences[choiceResult.selectedCompetence] = choiceResult.selectedCompetence
this.processCompetences(context.fixedCompetences)
// Handle specific case when multiple skills can be selected (ie compagnon case)
if ( stage.system.hasCompetencesOpt ) {
context.fixedCompetences = []
context.hasSelectCompetences = true
for (let i = 0; i < stage.system.competencesOptNumber; i++) {
context.competences = {}
context.selectCompetences = {}
for (let compKey in stage.system.competencesOpt) {
let comp = stage.system.competencesOpt[compKey]
if (comp.compName !== "") {
context.selectCompetences[comp.compName] = TeDeumUtility.upperFirst(comp.compName)
}
}
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-select-competences.hbs", context)
const choiceResult = await foundry.applications.api.DialogV2.wait({
window: { title: context.title },
classes: ["fvtt-te-deum"],
content,
buttons: [
{
label: context.label,
callback: (event, button, dialog) => {
const output = Array.from(button.form.elements).reduce((obj, input) => {
if (input.name) obj[input.name] = input.value
return obj
}, {})
return output
},
},
],
actions: {
},
rejectClose: false, // Click on Close button will not launch an error
render: (event, dialog) => {
}
})
if (choiceResult == null) {
this.currentStage = "cancelled"
return
}
context.fixedCompetences[choiceResult.selectedCompetence] = choiceResult.selectedCompetence
this.processCompetences(context.fixedCompetences)
}
}
}
/*------------- -------------------------------*/ /*------------- -------------------------------*/
async askCarac(stage, context) { async askCarac(stage, context) {
context.subtitle = "Choix des Caractéristiques"
let selected = []
for (let i = 0; i < stage.system.nbChoixCarac; i++) { for (let i = 0; i < stage.system.nbChoixCarac; i++) {
context.caracList = [] context.caracList = []
for (let caracKey in stage.system.caracteristiques) { for (let caracKey in stage.system.caracteristiques) {
let carac = stage.system.caracteristiques[caracKey] let carac = stage.system.caracteristiques[caracKey]
if (selected.includes(carac.caracId)) { continue }
context.caracList.push(game.system.tedeum.config.caracteristiques[carac.caracId]) context.caracList.push(game.system.tedeum.config.caracteristiques[carac.caracId])
} }
context.competences = stage.system.competences
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-select-carac.hbs", context) const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-select-carac.hbs", context)
const choiceResult = await foundry.applications.api.DialogV2.wait({ const choiceResult = await foundry.applications.api.DialogV2.wait({
@ -171,21 +292,26 @@ export class TeDeumCharacterCreator {
render: (event, dialog) => { render: (event, dialog) => {
} }
}) })
if (choiceResult == null) { return } if (choiceResult == null) {
this.currentStage = "cancelled"
return
}
this.caracBonus[choiceResult.carac].value += 1 this.caracBonus[choiceResult.carac].value += 1
selected.push(choiceResult.carac)
} }
} }
/*--------------------------------------------*/ /*--------------------------------------------*/
async renderOrigineSociale(stage) { async renderOrigineSociale(stage) {
let context = { let context = {
title: "Création de personnage - Origine Sociale", title: "Création de personnage",
subtitle: "Origine Sociale",
sexeChoice: { "homme": "Homme", "femme": "Femme" }, sexeChoice: { "homme": "Homme", "femme": "Femme" },
religionChoice: { "catholique": "Catholique", "protestante": "Protestante" }, religionChoice: { "catholique": "Catholique", "protestante": "Protestante" },
origineChoice: game.system.tedeum.config.origineSociale origineChoice: game.system.tedeum.config.origineSociale
} }
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-origine.hbs", context)
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-origine.hbs", context)
const label = "Valider le choix de l'Origine Sociale" const label = "Valider le choix de l'Origine Sociale"
const choiceResult = await foundry.applications.api.DialogV2.wait({ const choiceResult = await foundry.applications.api.DialogV2.wait({
window: { title: context.title }, window: { title: context.title },
@ -209,13 +335,17 @@ export class TeDeumCharacterCreator {
render: (event, dialog) => { } render: (event, dialog) => { }
}) })
if (choiceResult == null) { return } if (choiceResult == null) {
this.currentStage = "cancelled"
console.log(choiceResult) return
}
this.sexe = choiceResult.sexe this.sexe = choiceResult.sexe
this.religion = choiceResult.religion this.religion = choiceResult.religion
this.origineSociale = foundry.utils.duplicate(game.system.tedeum.config.origineSociale[choiceResult.origineSociale]) this.origineSociale = foundry.utils.duplicate(game.system.tedeum.config.origineSociale[choiceResult.origineSociale])
for (let key in this.origineSociale.caracteristiques) {
this.caracBonus[key].value += this.origineSociale.caracteristiques[key]
}
this.currentStage = "pouponniere" this.currentStage = "pouponniere"
} }
@ -228,22 +358,28 @@ export class TeDeumCharacterCreator {
let context = { let context = {
title: "Création de personnage - La Pouponnière", title: "Création de personnage - La Pouponnière",
subtitle: "Choix de la Pouponnière",
label: "Valider le choix de la Pouponnière", label: "Valider le choix de la Pouponnière",
choices: pouponniereItems choices: pouponniereItems,
caracBonus: this.caracBonus,
competenceBonus: this.competenceBonus
} }
let choiceResult = await this.askStageName(context) let choiceResult = await this.askStageName(context)
if (choiceResult == null) { return } if (choiceResult == null) {
this.currentStage = "cancelled"
return
}
this.pouponniere = foundry.utils.duplicate(stage.items.find(item => item.id === choiceResult.selectedItem)) this.pouponniere = foundry.utils.duplicate(stage.items.find(item => item.id === choiceResult.selectedItem))
context.title = `La Pouponnière - ${this.pouponniere.name}`
TeDeumUtility.prepareEducationContent(this.pouponniere); TeDeumUtility.prepareEducationContent(this.pouponniere);
console.log(choiceResult, this.pouponniere)
context.label = "Valider l'augmentation de caracteristique" context.label = "Valider l'augmentation de caracteristique"
await this.askCarac(this.pouponniere, context) await this.askCarac(this.pouponniere, context)
this.processCompetences(this.pouponniere) context.label = "Valider l'augmentation de compétences"
await this.askCompetences(this.pouponniere, context)
context.title = "Création de personnage - La Pouponnière - Questions"
context.label = "Valider cette réponse" context.label = "Valider cette réponse"
await this.askQuestionnaire(this.pouponniere, context) await this.askQuestionnaire(this.pouponniere, context)
@ -256,24 +392,28 @@ export class TeDeumCharacterCreator {
let grimaudsItems = stage.items.filter(item => item.system.accessible[this.origineSociale.id].isaccessible) let grimaudsItems = stage.items.filter(item => item.system.accessible[this.origineSociale.id].isaccessible)
let context = { let context = {
title: "Création de personnage - Les Petits Grimauds", title: "Les Petits Grimauds",
label: "Valider le choix des Petits Grimauds", label: "Valider le choix des Petits Grimauds",
choices: grimaudsItems choices: grimaudsItems,
caracBonus: this.caracBonus,
competenceBonus: this.competenceBonus
} }
let choiceResult = await this.askStageName(context) let choiceResult = await this.askStageName(context)
if (choiceResult == null) { return } if (choiceResult == null) {
this.currentStage = "cancelled"
return
}
this.grimauds = foundry.utils.duplicate(stage.items.find(item => item.id === choiceResult.selectedItem)) this.grimauds = foundry.utils.duplicate(stage.items.find(item => item.id === choiceResult.selectedItem))
context.title = `LesPetits Grimauds - ${this.grimauds.name}"`
TeDeumUtility.prepareEducationContent(this.grimauds); TeDeumUtility.prepareEducationContent(this.grimauds);
console.log(choiceResult, this.grimauds)
context.label = "Valider l'augmentation de caracteristique" context.label = "Valider l'augmentation de caracteristique"
await this.askCarac(this.grimauds, context) await this.askCarac(this.grimauds, context)
context.label = "Valider l'augmentation de compétences"
await this.askCompetences(this.grimauds, context)
this.processCompetences(this.grimauds)
context.title = "Création de personnage - Les Petits Grimauds - Questions"
context.label = "Valider cette réponse" context.label = "Valider cette réponse"
await this.askQuestionnaire(this.grimauds, context) await this.askQuestionnaire(this.grimauds, context)
@ -288,22 +428,27 @@ export class TeDeumCharacterCreator {
let context = { let context = {
title: "Création de personnage - Les Roses de la Vie", title: "Création de personnage - Les Roses de la Vie",
label: "Valider le choix des Roses de la Vie", label: "Valider le choix des Roses de la Vie",
choices: rosesItems choices: rosesItems,
caracBonus: this.caracBonus,
competenceBonus: this.competenceBonus
} }
let choiceResult = await this.askStageName(context) let choiceResult = await this.askStageName(context)
if (choiceResult == null) { return } if (choiceResult == null) {
this.currentStage = "cancelled"
return
}
this.roses = foundry.utils.duplicate(stage.items.find(item => item.id === choiceResult.selectedItem)) this.roses = foundry.utils.duplicate(stage.items.find(item => item.id === choiceResult.selectedItem))
context.title = `Les Roses de la Vie - ${this.roses.name}`
TeDeumUtility.prepareEducationContent(this.roses); TeDeumUtility.prepareEducationContent(this.roses);
console.log(choiceResult, this.roses)
context.label = "Valider l'augmentation de caracteristique" context.label = "Valider l'augmentation de caracteristique"
await this.askCarac(this.roses, context) await this.askCarac(this.roses, context)
context.label = "Valider l'augmentation de compétences"
await this.askCompetences(this.roses, context)
this.processCompetences(this.roses)
context.title = "Création de personnage - Les Roses de la Vie - Questions"
context.label = "Valider cette réponse" context.label = "Valider cette réponse"
await this.askQuestionnaire(this.roses, context) await this.askQuestionnaire(this.roses, context)
@ -312,26 +457,41 @@ export class TeDeumCharacterCreator {
/*--------------------------------------------*/ /*--------------------------------------------*/
async renderAgeViril(stage) { async renderAgeViril(stage) {
// Filter available pouponniere from origineSociale let virilDebouche = this.roses.system.debouches
let ageVirilItems = stage.items.filter(item => item.system.accessible[this.origineSociale.id].isaccessible) let ageVirilItems = []
for (let key in virilDebouche) {
let debouche = virilDebouche[key]
if (debouche.debouche === "") { continue }
let deboucheItem = stage.items.find(item => item.name.toLowerCase().includes(debouche.debouche.toLowerCase()))
if (deboucheItem) {
ageVirilItems.push(deboucheItem)
} else {
console.log(`Debouche ${debouche.debouche} not found !`)
}
}
let context = { let context = {
title: "Création de personnage - L'Age Viril", title: "Création de personnage - L'Age Viril",
label: "Valider le choix de l'Age Viril", label: "Valider le choix de l'Age Viril",
choices: ageVirilItems choices: ageVirilItems,
caracBonus: this.caracBonus,
competenceBonus: this.competenceBonus
} }
let choiceResult = await this.askStageName(context) let choiceResult = await this.askStageName(context)
if (choiceResult == null) { return } if (choiceResult == null) {
this.currentStage = "cancelled"
return
}
this.ageViril = foundry.utils.duplicate(stage.items.find(item => item.id === choiceResult.selectedItem)) this.ageViril = foundry.utils.duplicate(stage.items.find(item => item.id === choiceResult.selectedItem))
context.title = `L'Age Viril - ${this.ageViril.name}`
TeDeumUtility.prepareEducationContent(this.ageViril); TeDeumUtility.prepareEducationContent(this.ageViril);
console.log(choiceResult, this.ageViril)
context.label = "Valider l'augmentation de caracteristique" context.label = "Valider l'augmentation de caracteristique"
await this.askCarac(this.ageViril, context) await this.askCarac(this.ageViril, context)
context.label = "Valider l'augmentation de compétences"
this.processCompetences(this.ageViril) await this.askCompetences(this.ageViril, context)
this.currentStage = "finished" this.currentStage = "finished"
} }
@ -356,11 +516,78 @@ export class TeDeumCharacterCreator {
case "ageviril": case "ageviril":
await this.renderAgeViril(stage) await this.renderAgeViril(stage)
break break
case "cancelled":
return
break
} }
} }
console.log("Carac Bonus", this.caracBonus) console.log("Carac Bonus", this.caracBonus)
console.log("Competence Bonus", this.competenceBonus) console.log("Competence Bonus", this.competenceBonus)
let actor = await TeDeumActor.create({name: "Nouveau personnage", type: "pj"})
let updates = {}
for (let key in this.caracBonus) {
updates[`system.caracteristiques.${key}.value`] = Number(this.caracBonus[key].value)+1
}
updates['system.genre'] = this.sexe
updates['system.religion'] = this.religion
updates['system.statutocial'] = this.origineSociale.label
updates['system.equipmentfree'] = this.ageViril.system.trousseau
actor.update( updates);
// Process competences : increase know skills
let updateComp = []
let toAdd = []
for (let compName in this.competenceBonus) {
let comp = actor.items.find( i => i.type == "competence" && i.name.toLowerCase() === compName.toLowerCase())
if (comp) {
updateComp.push({ _id: comp._id, "system.score": this.competenceBonus[compName].value })
} else {
toAdd.push( compName)
}
}
actor.updateEmbeddedDocuments("Item", updateComp)
// Process adding skills
let compendiumSkill = TeDeumUtility.getCompetences()
let compToAdd = [ this.pouponniere, this.grimauds, this.roses, this.ageViril ]
for (let compName of toAdd) {
let comp = compendiumSkill.find( i => i.name.toLowerCase() === compName.toLowerCase())
comp.system.score = this.competenceBonus[compName].value
compToAdd.push(comp)
}
await actor.createEmbeddedDocuments('Item', compToAdd)
let newArgent = this.origineSociale.cagnotte * this.ageViril.system.cagnotteMultiplier
newArgent /= this.ageViril.system.cagnotteDivider
await actor.update({ [`system.fortune.${this.origineSociale.cagnotteUnit}`]: newArgent})
actor.render(true)
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-finished.hbs", context)
const label = "Terminer"
const choiceResult = await foundry.applications.api.DialogV2.wait({
window: { title: context.title },
classes: ["fvtt-te-deum"],
content,
buttons: [
{
label: label,
callback: (event, button, dialog) => {
const output = Array.from(button.form.elements).reduce((obj, input) => {
if (input.name) obj[input.name] = input.value
return obj
}, {})
return output
},
},
],
actions: {
},
rejectClose: false, // Click on Close button will not launch an error
render: (event, dialog) => { }
})
} }
} }

View File

@ -146,22 +146,22 @@ export const TEDEUM_CONFIG = {
livre: { label: "Livres", id: "livre", value: 100 } livre: { label: "Livres", id: "livre", value: 100 }
}, },
etapesEducation: { etapesEducation: {
pouponniere: { label: "La Pouponnière", value: "pouponniere", agemin: 0, agemax: 6, nbCompetences: 2, nbCaracteristiques: 3, hasQuestionnaire: true, hasMultiplier: false }, pouponniere: { label: "La Pouponnière", value: "pouponniere", agemin: 0, agemax: 6, nbCompetences: 2, nbCaracteristiques: 3, hasQuestionnaire: true, hasDebouches: false, hasMultiplier: false, canCompetencesOpt: false },
petitsgrimauds: { label: "La classe des Petits Grimauds", value: "petitsgrimauds", agemin: 7, agemax: 12,nbCompetences: 10, nbCaracteristiques: 3, hasQuestionnaire: true, hasMultiplier: false }, petitsgrimauds: { label: "La classe des Petits Grimauds", value: "petitsgrimauds", agemin: 7, agemax: 12,nbCompetences: 10, nbCaracteristiques: 3, hasDebouches: false, hasQuestionnaire: true, hasMultiplier: false, canCompetencesOpt: false },
rosevie: { label: "Les Roses de la Vie", value: "rosevie", agemin: 13, agemax: 16, nbCompetences: 2, nbCaracteristiques: 3, hasQuestionnaire: true, hasMultiplier: false }, rosevie: { label: "Les Roses de la Vie", value: "rosevie", agemin: 13, agemax: 16, nbCompetences: 2, nbCaracteristiques: 3, hasQuestionnaire: true, hasDebouches: true, hasMultiplier: false, canCompetencesOpt: false },
ageviril: { label: "L'Age Viril", value: "ageviril", agemin: 17, agemax: 17, nbCompetences: 9, nbCaracteristiques: 2, hasQuestionnaire: false, hasMultiplier: true }, ageviril: { label: "L'Age Viril", value: "ageviril", agemin: 17, agemax: 17, nbCompetences: 9, nbCaracteristiques: 2, hasQuestionnaire: false, hasDebouches: false, hasMultiplier: true, canCompetencesOpt: true },
}, },
origineSociale: { origineSociale: {
noblesseepee: { label: "Noblesse d'épée", id: "noblesseepee", caracteristiques: {entregent: 1, puissance: 1}, cagnotte: 10, cagnotteUnit: "livre", value: 1 }, noblesseepee: { label: "Noblesse d'épée", id: "noblesseepee", caracteristiques: {entregent: 1, puissance: 1}, cagnotte: 10, cagnotteUnit: "livres", value: 1 },
noblessecloche: { label: "Noblesse de cloche", id: "noblessecloche", caracteristiques: {entregent: 1, savoir: 1}, cagnotte: 50, cagnotteUnit: "livre", value: 2 }, noblessecloche: { label: "Noblesse de cloche", id: "noblessecloche", caracteristiques: {entregent: 1, savoir: 1}, cagnotte: 50, cagnotteUnit: "livres", value: 2 },
hautenoblesse: { label: "Haute noblesse (Illégitime)", id: "hautenoblesse", caracteristiques: {complexion: 1, puissance: 1}, cagnotte: 20, cagnotteUnit: "livre", value: 3 }, hautenoblesse: { label: "Haute noblesse (Illégitime)", id: "hautenoblesse", caracteristiques: {complexion: 1, puissance: 1}, cagnotte: 20, cagnotteUnit: "livres", value: 3 },
hautebourgeoisie: { label: "Haute bourgeoisie", id: "hautebourgeoisie", caracteristiques: {savoir: 1, sensibilite: 1}, cagnotte: 60, cagnotteUnit: "livre",value: 4 }, hautebourgeoisie: { label: "Haute bourgeoisie", id: "hautebourgeoisie", caracteristiques: {savoir: 1, sensibilite: 1}, cagnotte: 60, cagnotteUnit: "livres",value: 4 },
petitebourgeoisie: { label: "Petite bourgeoisie (Marchands)", caracteristiques: {entregent: 1, sensibilite: 1}, cagnotte: 20, cagnotteUnit: "livre",id: "petitebourgeoisie", value: 5 }, petitebourgeoisie: { label: "Petite bourgeoisie (Marchands)", caracteristiques: {entregent: 1, sensibilite: 1}, cagnotte: 20, cagnotteUnit: "livres",id: "petitebourgeoisie", value: 5 },
artisan: { label: "Artisans", id: "artisan", caracteristiques: {adresse: 1, sensibilite: 1}, cagnotte: 10, cagnotteUnit: "livre",value: 6 }, artisan: { label: "Artisans", id: "artisan", caracteristiques: {adresse: 1, sensibilite: 1}, cagnotte: 10, cagnotteUnit: "livres",value: 6 },
laboureur: { label: "Laboureurs", id: "laboureur", caracteristiques: {entregent: 1, complexion: 1}, cagnotte: 10, cagnotteUnit: "livre",value: 7 }, laboureur: { label: "Laboureurs", id: "laboureur", caracteristiques: {entregent: 1, complexion: 1}, cagnotte: 10, cagnotteUnit: "livres",value: 7 },
domesticite: { label: "Domesticité", id: "domesticite", caracteristiques: {entregent: 1, adresse: 1}, cagnotte: 2, cagnotteUnit: "sol",value: 8 }, domesticite: { label: "Domesticité", id: "domesticite", caracteristiques: {entregent: 1, adresse: 1}, cagnotte: 2, cagnotteUnit: "sous",value: 8 },
paysannerie: { label: "Paysannerie", id: "paysannerie", caracteristiques: {puissance: 1, complexion: 1}, cagnotte: 1, cagnotteUnit: "sol", value: 9 }, paysannerie: { label: "Paysannerie", id: "paysannerie", caracteristiques: {puissance: 1, complexion: 1}, cagnotte: 1, cagnotteUnit: "sous", value: 9 },
gueux: { label: "Gueux", id: "gueux", caracteristiques: {adresse: 1, complexion: 1}, cagnotte: 4, cagnotteUnit: "denier", value: 10 }, gueux: { label: "Gueux", id: "gueux", caracteristiques: {adresse: 1, complexion: 1}, cagnotte: 4, cagnotteUnit: "deniers", value: 10 },
}, },
bonusMalus: [ bonusMalus: [
{ value: "-2", label: "-2 niveaux" }, { value: "-2", label: "-2 niveaux" },

View File

@ -6,6 +6,19 @@ export class TeDeumUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static async init() { static async init() {
Hooks.on('renderChatLog', (log, html, data) => TeDeumUtility.chatListeners(html)); Hooks.on('renderChatLog', (log, html, data) => TeDeumUtility.chatListeners(html));
Hooks.on("renderActorDirectory", (app, html, data) => {
if (game.user.can('ACTOR_CREATE')) {
const button = document.createElement('button');
button.style.width = '90%';
button.innerHTML = 'Créer un Personnage'
button.addEventListener('click', () => {
let cr = new game.system.tedeum.TeDeumCharacterCreator();
cr.init()
})
html.find('.header-actions').after(button)
}
})
//Hooks.on("getChatLogEntryContext", (html, options) => TeDeumUtility.chatMenuManager(html, options)); //Hooks.on("getChatLogEntryContext", (html, options) => TeDeumUtility.chatMenuManager(html, options));
} }
@ -64,6 +77,9 @@ export class TeDeumUtility {
Handlebars.registerHelper('getCaracDescription', function (key, value) { Handlebars.registerHelper('getCaracDescription', function (key, value) {
return game.system.tedeum.config.descriptionValeur[Number(value)][key] return game.system.tedeum.config.descriptionValeur[Number(value)][key]
}) })
Handlebars.registerHelper('getEducationEtape', function (key) {
return game.system.tedeum.config.etapesEducation[key].label
})
Handlebars.registerHelper('isGM', function () { Handlebars.registerHelper('isGM', function () {
return game.user.isGM return game.user.isGM
@ -76,6 +92,31 @@ export class TeDeumUtility {
for (let i of this.competences) { for (let i of this.competences) {
this.competencesList[i.name.toLowerCase()] = { name: i.name, id: i._id } this.competencesList[i.name.toLowerCase()] = { name: i.name, id: i._id }
} }
this.competencesList = Object.entries(this.competencesList).sort().reduce((o, [k, v]) => (o[k] = v, o), {})
}
/* -------------------------------------------- */
static async importDefaultScene() {
let exists = game.scenes.find(j => j.name == "Te Deum");
if (!exists) {
const scenes = await TeDeumUtility.loadCompendium("fvtt-te-deum.scenes")
let newDocuments = scenes.filter(i => i.name == "Te Deum");
if (newDocuments) {
await game.scenes.documentClass.create(newDocuments);
game.scenes.find(i => i.name == "Te Deum").activate();
}
}
}
/* -------------------------------------------- */
static welcomeMessage() {
if (game.user.isGM) {
ChatMessage.create({
user: game.user.id,
whisper: [game.user.id],
content: `<div id="welcome-message-tedeum"><span class="rdd-roll-part">
<strong>Bienvenu dans Te Deum Pour Un Massacre !</strong>` });
}
} }
/*-------------------------------------------- */ /*-------------------------------------------- */
@ -89,22 +130,25 @@ export class TeDeumUtility {
/*-------------------------------------------- */ /*-------------------------------------------- */
static prepareEducationContent(formData) { static prepareEducationContent(formData) {
let nbCompetences = game.system.tedeum.config.etapesEducation[formData.system.etape].nbCompetences let etape = game.system.tedeum.config.etapesEducation[formData.system.etape]
let nbCompetences = etape.nbCompetences
for (let key in formData.system.competences) { for (let key in formData.system.competences) {
formData.system.competences[key].valid = false formData.system.competences[key].valid = false
} }
for (let i = 1; i <= nbCompetences; i++) { for (let i = 1; i <= nbCompetences; i++) {
formData.system.competences[`comp${i}`].valid = true formData.system.competences[`comp${i}`].valid = true
} }
let nbCaracteristiques = game.system.tedeum.config.etapesEducation[formData.system.etape].nbCaracteristiques let nbCaracteristiques = etape.nbCaracteristiques
for (let key in formData.system.caracteristiques) { for (let key in formData.system.caracteristiques) {
formData.system.caracteristiques[key].valid = false formData.system.caracteristiques[key].valid = false
} }
for (let i = 1; i <= nbCaracteristiques; i++) { for (let i = 1; i <= nbCaracteristiques; i++) {
formData.system.caracteristiques[`carac${i}`].valid = true formData.system.caracteristiques[`carac${i}`].valid = true
} }
formData.hasQuestionnaire = game.system.tedeum.config.etapesEducation[formData.system.etape].hasQuestionnaire; formData.hasQuestionnaire = etape.hasQuestionnaire;
formData.hasMultiplier = game.system.tedeum.config.etapesEducation[formData.system.etape].hasMultiplier; formData.hasMultiplier = etape.hasMultiplier;
formData.hasDebouches = etape.hasDebouches;
formData.canCompetencesOpt = etape.canCompetencesOpt;
} }
/*-------------------------------------------- */ /*-------------------------------------------- */
@ -183,7 +227,8 @@ export class TeDeumUtility {
const templatePaths = [ const templatePaths = [
'systems/fvtt-te-deum/templates/actors/editor-notes-gm.hbs', 'systems/fvtt-te-deum/templates/actors/editor-notes-gm.hbs',
'systems/fvtt-te-deum/templates/items/partial-item-nav.hbs', 'systems/fvtt-te-deum/templates/items/partial-item-nav.hbs',
'systems/fvtt-te-deum/templates/items/partial-item-description.hbs' 'systems/fvtt-te-deum/templates/items/partial-item-description.hbs',
'systems/fvtt-te-deum/templates/dialogs/partial-creator-status.hbs'
] ]
return loadTemplates(templatePaths); return loadTemplates(templatePaths);
} }

View File

@ -22,6 +22,7 @@ export class TeDeumEducationSchema extends foundry.abstract.TypeDataModel {
}); });
return caracs; return caracs;
}, {})); }, {}));
schema.competences = new fields.SchemaField(Array.fromRange(10, 1).reduce((comps, i) => { schema.competences = new fields.SchemaField(Array.fromRange(10, 1).reduce((comps, i) => {
comps[`comp${i}`] = new fields.SchemaField({ comps[`comp${i}`] = new fields.SchemaField({
compName: new fields.StringField({ required: true, blank: true, initial: "" }), compName: new fields.StringField({ required: true, blank: true, initial: "" }),
@ -30,6 +31,15 @@ export class TeDeumEducationSchema extends foundry.abstract.TypeDataModel {
return comps; return comps;
}, {})); }, {}));
schema.hasCompetencesOpt = new fields.BooleanField({initial: false})
schema.competencesOptNumber = new fields.NumberField({ ...requiredInteger, initial: 1, min:0 })
schema.competencesOpt = new fields.SchemaField(Array.fromRange(14, 1).reduce((comps, i) => {
comps[`comp${i}`] = new fields.SchemaField({
compName: new fields.StringField({ required: true, blank: true, initial: "" })
});
return comps;
}, {}));
schema.questionnaire = new fields.SchemaField(Array.fromRange(8, 1).reduce((questions, i) => { schema.questionnaire = new fields.SchemaField(Array.fromRange(8, 1).reduce((questions, i) => {
questions[`question${i}`] = new fields.SchemaField({ questions[`question${i}`] = new fields.SchemaField({
question: new fields.StringField({ required: true, blank: true, initial: "" }), question: new fields.StringField({ required: true, blank: true, initial: "" }),
@ -52,10 +62,18 @@ export class TeDeumEducationSchema extends foundry.abstract.TypeDataModel {
return questions; return questions;
}, {})); }, {}));
schema.debouches = new fields.SchemaField(Array.fromRange(24, 1).reduce((debouches, i) => {
debouches[`debouche${i}`] = new fields.SchemaField({
debouche: new fields.StringField({ required: true, blank: true, initial: "" })
})
return debouches;
}, {}));
schema.cagnotteMultiplier = new fields.NumberField({ ...requiredDouble, initial: 1.0, min: 0 }); schema.cagnotteMultiplier = new fields.NumberField({ ...requiredDouble, initial: 1.0, min: 0 });
schema.cagnotteDivider = new fields.NumberField({ ...requiredDouble, initial: 1.0, min: 0 }); schema.cagnotteDivider = new fields.NumberField({ ...requiredDouble, initial: 1.0, min: 0 });
schema.description = new fields.HTMLField({ required: true, blank: true }); schema.description = new fields.HTMLField({ required: true, blank: true });
schema.trousseau = new fields.StringField({ required: true, blank: true, initial: "" });
return schema; return schema;
} }

View File

@ -33,7 +33,7 @@ export class TeDeumPJSchema extends foundry.abstract.TypeDataModel {
); );
schema.fortune = new fields.SchemaField({ schema.fortune = new fields.SchemaField({
"ecu": new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), "ecus": new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
"livres": new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) , "livres": new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) ,
"sous": new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) , "sous": new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) ,
"deniers": new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) "deniers": new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
@ -42,7 +42,8 @@ export class TeDeumPJSchema extends foundry.abstract.TypeDataModel {
schema.description = new fields.HTMLField({required: true, blank: true}); schema.description = new fields.HTMLField({required: true, blank: true});
schema.connaissances = new fields.HTMLField({required: true, blank: true}); schema.connaissances = new fields.HTMLField({required: true, blank: true});
schema.vetements = new fields.HTMLField({required: true, blank: true}); schema.vetements = new fields.HTMLField({required: true, blank: true});
//schema.descriptiongraces = new fields.HTMLField({required: true, blank: true}); schema.equipmentfree = new fields.HTMLField({required: true, blank: true});
schema.genre = new fields.StringField({required: true, choices: ["Homme", "Femme"], initial: "Femme"}); schema.genre = new fields.StringField({required: true, choices: ["Homme", "Femme"], initial: "Femme"});
schema.age = new fields.StringField({ required: false, blank: true, initial: undefined }); schema.age = new fields.StringField({ required: false, blank: true, initial: undefined });
schema.statutocial = new fields.StringField({ required: false, blank: true, initial: undefined }); schema.statutocial = new fields.StringField({ required: false, blank: true, initial: undefined });

View File

@ -92,16 +92,6 @@ Hooks.once("init", async function () {
TeDeumUtility.init() TeDeumUtility.init()
}); });
/* -------------------------------------------- */
function welcomeMessage() {
if (game.user.isGM) {
ChatMessage.create({
user: game.user.id,
whisper: [game.user.id],
content: `<div id="welcome-message-tedeum"><span class="rdd-roll-part">
<strong>Bienvenu dans Te Deum Pour Un Massacre !</strong>` });
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Foundry VTT Initialization */ /* Foundry VTT Initialization */
@ -125,7 +115,8 @@ Hooks.once("ready", function () {
) )
TeDeumUtility.ready(); TeDeumUtility.ready();
welcomeMessage(); TeDeumUtility.importDefaultScene()
TeDeumUtility.welcomeMessage();
}) })

View File

@ -1 +1 @@
MANIFEST-000030 MANIFEST-000068

View File

@ -1,7 +1,7 @@
2025/01/31-11:46:44.844175 7ff40d5f96c0 Recovering log #28 2025/02/03-22:58:38.814947 7f5b477fe6c0 Recovering log #66
2025/01/31-11:46:44.854119 7ff40d5f96c0 Delete type=3 #26 2025/02/03-22:58:38.869766 7f5b477fe6c0 Delete type=3 #64
2025/01/31-11:46:44.854226 7ff40d5f96c0 Delete type=0 #28 2025/02/03-22:58:38.869877 7f5b477fe6c0 Delete type=0 #66
2025/01/31-11:54:21.927622 7ff4077fe6c0 Level-0 table #33: started 2025/02/03-23:00:39.704731 7f5b463ff6c0 Level-0 table #71: started
2025/01/31-11:54:21.927655 7ff4077fe6c0 Level-0 table #33: 0 bytes OK 2025/02/03-23:00:39.704771 7f5b463ff6c0 Level-0 table #71: 0 bytes OK
2025/01/31-11:54:21.934817 7ff4077fe6c0 Delete type=0 #31 2025/02/03-23:00:39.711745 7f5b463ff6c0 Delete type=0 #69
2025/01/31-11:54:21.941818 7ff4077fe6c0 Manual compaction at level-0 from '!folders!InCQeTRdT5jXMX82' @ 72057594037927935 : 1 .. '!items!wxIHkrq98eQ3cOvp' @ 0 : 0; will stop at (end) 2025/02/03-23:00:39.725416 7f5b463ff6c0 Manual compaction at level-0 from '!folders!InCQeTRdT5jXMX82' @ 72057594037927935 : 1 .. '!items!wxIHkrq98eQ3cOvp' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2025/01/31-10:35:52.195113 7ff40ddfa6c0 Recovering log #24 2025/02/03-22:55:39.422885 7f5b477fe6c0 Recovering log #62
2025/01/31-10:35:52.204734 7ff40ddfa6c0 Delete type=3 #22 2025/02/03-22:55:39.432766 7f5b477fe6c0 Delete type=3 #60
2025/01/31-10:35:52.204791 7ff40ddfa6c0 Delete type=0 #24 2025/02/03-22:55:39.432891 7f5b477fe6c0 Delete type=0 #62
2025/01/31-11:04:13.723993 7ff4077fe6c0 Level-0 table #29: started 2025/02/03-22:56:09.836871 7f5b463ff6c0 Level-0 table #67: started
2025/01/31-11:04:13.724023 7ff4077fe6c0 Level-0 table #29: 0 bytes OK 2025/02/03-22:56:09.836910 7f5b463ff6c0 Level-0 table #67: 0 bytes OK
2025/01/31-11:04:13.731157 7ff4077fe6c0 Delete type=0 #27 2025/02/03-22:56:09.845000 7f5b463ff6c0 Delete type=0 #65
2025/01/31-11:04:13.737704 7ff4077fe6c0 Manual compaction at level-0 from '!folders!InCQeTRdT5jXMX82' @ 72057594037927935 : 1 .. '!items!wxIHkrq98eQ3cOvp' @ 0 : 0; will stop at (end) 2025/02/03-22:56:09.845233 7f5b463ff6c0 Manual compaction at level-0 from '!folders!InCQeTRdT5jXMX82' @ 72057594037927935 : 1 .. '!items!wxIHkrq98eQ3cOvp' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000030 MANIFEST-000068

View File

@ -1,7 +1,7 @@
2025/01/31-11:46:44.857100 7ff40cdf86c0 Recovering log #28 2025/02/03-22:58:38.873517 7f5b47fff6c0 Recovering log #66
2025/01/31-11:46:44.867698 7ff40cdf86c0 Delete type=3 #26 2025/02/03-22:58:38.934682 7f5b47fff6c0 Delete type=3 #64
2025/01/31-11:46:44.867759 7ff40cdf86c0 Delete type=0 #28 2025/02/03-22:58:38.934746 7f5b47fff6c0 Delete type=0 #66
2025/01/31-11:54:21.921258 7ff4077fe6c0 Level-0 table #33: started 2025/02/03-23:00:39.711892 7f5b463ff6c0 Level-0 table #71: started
2025/01/31-11:54:21.921301 7ff4077fe6c0 Level-0 table #33: 0 bytes OK 2025/02/03-23:00:39.711920 7f5b463ff6c0 Level-0 table #71: 0 bytes OK
2025/01/31-11:54:21.927470 7ff4077fe6c0 Delete type=0 #31 2025/02/03-23:00:39.718489 7f5b463ff6c0 Delete type=0 #69
2025/01/31-11:54:21.941807 7ff4077fe6c0 Manual compaction at level-0 from '!folders!2wTJBj3dicRKzNOE' @ 72057594037927935 : 1 .. '!items!ufvhWG5V8pX0qrtR' @ 0 : 0; will stop at (end) 2025/02/03-23:00:39.725430 7f5b463ff6c0 Manual compaction at level-0 from '!folders!2wTJBj3dicRKzNOE' @ 72057594037927935 : 1 .. '!items!ufvhWG5V8pX0qrtR' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2025/01/31-10:35:52.207464 7ff40d5f96c0 Recovering log #24 2025/02/03-22:55:39.435305 7f5b46ffd6c0 Recovering log #62
2025/01/31-10:35:52.217843 7ff40d5f96c0 Delete type=3 #22 2025/02/03-22:55:39.448063 7f5b46ffd6c0 Delete type=3 #60
2025/01/31-10:35:52.217933 7ff40d5f96c0 Delete type=0 #24 2025/02/03-22:55:39.448145 7f5b46ffd6c0 Delete type=0 #62
2025/01/31-11:04:13.711638 7ff4077fe6c0 Level-0 table #29: started 2025/02/03-22:56:09.811365 7f5b463ff6c0 Level-0 table #67: started
2025/01/31-11:04:13.711706 7ff4077fe6c0 Level-0 table #29: 0 bytes OK 2025/02/03-22:56:09.811409 7f5b463ff6c0 Level-0 table #67: 0 bytes OK
2025/01/31-11:04:13.717727 7ff4077fe6c0 Delete type=0 #27 2025/02/03-22:56:09.825285 7f5b463ff6c0 Delete type=0 #65
2025/01/31-11:04:13.737680 7ff4077fe6c0 Manual compaction at level-0 from '!folders!2wTJBj3dicRKzNOE' @ 72057594037927935 : 1 .. '!items!ufvhWG5V8pX0qrtR' @ 0 : 0; will stop at (end) 2025/02/03-22:56:09.845202 7f5b463ff6c0 Manual compaction at level-0 from '!folders!2wTJBj3dicRKzNOE' @ 72057594037927935 : 1 .. '!items!ufvhWG5V8pX0qrtR' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000026 MANIFEST-000064

View File

@ -1,7 +1,7 @@
2025/01/31-11:46:44.830669 7ff40ddfa6c0 Recovering log #24 2025/02/03-22:58:38.713094 7f5b46ffd6c0 Recovering log #62
2025/01/31-11:46:44.841211 7ff40ddfa6c0 Delete type=3 #22 2025/02/03-22:58:38.811025 7f5b46ffd6c0 Delete type=3 #60
2025/01/31-11:46:44.841295 7ff40ddfa6c0 Delete type=0 #24 2025/02/03-22:58:38.811091 7f5b46ffd6c0 Delete type=0 #62
2025/01/31-11:54:21.935004 7ff4077fe6c0 Level-0 table #29: started 2025/02/03-23:00:39.698334 7f5b463ff6c0 Level-0 table #67: started
2025/01/31-11:54:21.935040 7ff4077fe6c0 Level-0 table #29: 0 bytes OK 2025/02/03-23:00:39.698390 7f5b463ff6c0 Level-0 table #67: 0 bytes OK
2025/01/31-11:54:21.941608 7ff4077fe6c0 Delete type=0 #27 2025/02/03-23:00:39.704554 7f5b463ff6c0 Delete type=0 #65
2025/01/31-11:54:21.941830 7ff4077fe6c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!yx4k7lQHGcom99mk' @ 0 : 0; will stop at (end) 2025/02/03-23:00:39.725398 7f5b463ff6c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!yx4k7lQHGcom99mk' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2025/01/31-10:35:52.181034 7ff407fff6c0 Recovering log #20 2025/02/03-22:55:39.408463 7f5b4c9fa6c0 Recovering log #58
2025/01/31-10:35:52.190874 7ff407fff6c0 Delete type=3 #18 2025/02/03-22:55:39.419892 7f5b4c9fa6c0 Delete type=3 #56
2025/01/31-10:35:52.190954 7ff407fff6c0 Delete type=0 #20 2025/02/03-22:55:39.419948 7f5b4c9fa6c0 Delete type=0 #58
2025/01/31-11:04:13.731297 7ff4077fe6c0 Level-0 table #25: started 2025/02/03-22:56:09.755630 7f5b463ff6c0 Level-0 table #63: started
2025/01/31-11:04:13.731324 7ff4077fe6c0 Level-0 table #25: 0 bytes OK 2025/02/03-22:56:09.755689 7f5b463ff6c0 Level-0 table #63: 0 bytes OK
2025/01/31-11:04:13.737594 7ff4077fe6c0 Delete type=0 #23 2025/02/03-22:56:09.767928 7f5b463ff6c0 Delete type=0 #61
2025/01/31-11:04:13.737713 7ff4077fe6c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!yx4k7lQHGcom99mk' @ 0 : 0; will stop at (end) 2025/02/03-22:56:09.795616 7f5b463ff6c0 Manual compaction at level-0 from '!folders!4OPhigzcPv46qbWW' @ 72057594037927935 : 1 .. '!items!yx4k7lQHGcom99mk' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000032 MANIFEST-000074

View File

@ -1,7 +1,7 @@
2025/01/31-11:46:44.870558 7ff407fff6c0 Recovering log #30 2025/02/03-22:58:38.937489 7f5b4c9fa6c0 Recovering log #72
2025/01/31-11:46:44.881583 7ff407fff6c0 Delete type=3 #28 2025/02/03-22:58:38.996464 7f5b4c9fa6c0 Delete type=3 #70
2025/01/31-11:46:44.881667 7ff407fff6c0 Delete type=0 #30 2025/02/03-22:58:38.996519 7f5b4c9fa6c0 Delete type=0 #72
2025/01/31-11:54:21.913634 7ff4077fe6c0 Level-0 table #35: started 2025/02/03-23:00:39.718801 7f5b463ff6c0 Level-0 table #77: started
2025/01/31-11:54:21.913684 7ff4077fe6c0 Level-0 table #35: 0 bytes OK 2025/02/03-23:00:39.718847 7f5b463ff6c0 Level-0 table #77: 0 bytes OK
2025/01/31-11:54:21.921092 7ff4077fe6c0 Delete type=0 #33 2025/02/03-23:00:39.725264 7f5b463ff6c0 Delete type=0 #75
2025/01/31-11:54:21.941791 7ff4077fe6c0 Manual compaction at level-0 from '!folders!9PQi3Lv54rpcxavo' @ 72057594037927935 : 1 .. '!items!zGlRtP7zSnkjuuue' @ 0 : 0; will stop at (end) 2025/02/03-23:00:39.725442 7f5b463ff6c0 Manual compaction at level-0 from '!folders!9PQi3Lv54rpcxavo' @ 72057594037927935 : 1 .. '!items!zGlRtP7zSnkjuuue' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2025/01/31-10:35:52.220665 7ff40cdf86c0 Recovering log #26 2025/02/03-22:55:39.451121 7f5b47fff6c0 Recovering log #68
2025/01/31-10:35:52.230157 7ff40cdf86c0 Delete type=3 #24 2025/02/03-22:55:39.461341 7f5b47fff6c0 Delete type=3 #66
2025/01/31-10:35:52.230214 7ff40cdf86c0 Delete type=0 #26 2025/02/03-22:55:39.461419 7f5b47fff6c0 Delete type=0 #68
2025/01/31-11:04:13.717844 7ff4077fe6c0 Level-0 table #31: started 2025/02/03-22:56:09.739226 7f5b463ff6c0 Level-0 table #73: started
2025/01/31-11:04:13.717874 7ff4077fe6c0 Level-0 table #31: 0 bytes OK 2025/02/03-22:56:09.739289 7f5b463ff6c0 Level-0 table #73: 0 bytes OK
2025/01/31-11:04:13.723869 7ff4077fe6c0 Delete type=0 #29 2025/02/03-22:56:09.755387 7f5b463ff6c0 Delete type=0 #71
2025/01/31-11:04:13.737691 7ff4077fe6c0 Manual compaction at level-0 from '!folders!9PQi3Lv54rpcxavo' @ 72057594037927935 : 1 .. '!items!zGlRtP7zSnkjuuue' @ 0 : 0; will stop at (end) 2025/02/03-22:56:09.795602 7f5b463ff6c0 Manual compaction at level-0 from '!folders!9PQi3Lv54rpcxavo' @ 72057594037927935 : 1 .. '!items!zGlRtP7zSnkjuuue' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

View File

@ -1 +1 @@
MANIFEST-000030 MANIFEST-000068

View File

@ -1,7 +1,7 @@
2025/01/31-11:46:44.884470 7ff40ddfa6c0 Recovering log #28 2025/02/03-22:58:39.000429 7f5b46ffd6c0 Recovering log #66
2025/01/31-11:46:44.894138 7ff40ddfa6c0 Delete type=3 #26 2025/02/03-22:58:39.053445 7f5b46ffd6c0 Delete type=3 #64
2025/01/31-11:46:44.894195 7ff40ddfa6c0 Delete type=0 #28 2025/02/03-22:58:39.053656 7f5b46ffd6c0 Delete type=0 #66
2025/01/31-11:54:21.948160 7ff4077fe6c0 Level-0 table #33: started 2025/02/03-23:00:39.725538 7f5b463ff6c0 Level-0 table #71: started
2025/01/31-11:54:21.948194 7ff4077fe6c0 Level-0 table #33: 0 bytes OK 2025/02/03-23:00:39.725596 7f5b463ff6c0 Level-0 table #71: 0 bytes OK
2025/01/31-11:54:21.955532 7ff4077fe6c0 Delete type=0 #31 2025/02/03-23:00:39.731775 7f5b463ff6c0 Delete type=0 #69
2025/01/31-11:54:21.968494 7ff4077fe6c0 Manual compaction at level-0 from '!items!17mjvwS8R3B6LloG' @ 72057594037927935 : 1 .. '!items!zUYIVOuFpRur9aAR' @ 0 : 0; will stop at (end) 2025/02/03-23:00:39.756486 7f5b463ff6c0 Manual compaction at level-0 from '!items!17mjvwS8R3B6LloG' @ 72057594037927935 : 1 .. '!items!zUYIVOuFpRur9aAR' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2025/01/31-10:35:52.236046 7ff407fff6c0 Recovering log #24 2025/02/03-22:55:39.466809 7f5b4c9fa6c0 Recovering log #62
2025/01/31-10:35:52.246980 7ff407fff6c0 Delete type=3 #22 2025/02/03-22:55:39.476938 7f5b4c9fa6c0 Delete type=3 #60
2025/01/31-10:35:52.247064 7ff407fff6c0 Delete type=0 #24 2025/02/03-22:55:39.477075 7f5b4c9fa6c0 Delete type=0 #62
2025/01/31-11:04:13.756831 7ff4077fe6c0 Level-0 table #29: started 2025/02/03-22:56:09.782715 7f5b463ff6c0 Level-0 table #67: started
2025/01/31-11:04:13.756871 7ff4077fe6c0 Level-0 table #29: 0 bytes OK 2025/02/03-22:56:09.782754 7f5b463ff6c0 Level-0 table #67: 0 bytes OK
2025/01/31-11:04:13.763061 7ff4077fe6c0 Delete type=0 #27 2025/02/03-22:56:09.795445 7f5b463ff6c0 Delete type=0 #65
2025/01/31-11:04:13.763275 7ff4077fe6c0 Manual compaction at level-0 from '!items!17mjvwS8R3B6LloG' @ 72057594037927935 : 1 .. '!items!zUYIVOuFpRur9aAR' @ 0 : 0; will stop at (end) 2025/02/03-22:56:09.795640 7f5b463ff6c0 Manual compaction at level-0 from '!items!17mjvwS8R3B6LloG' @ 72057594037927935 : 1 .. '!items!zUYIVOuFpRur9aAR' @ 0 : 0; will stop at (end)

View File

@ -1 +1 @@
MANIFEST-000030 MANIFEST-000068

View File

@ -1,7 +1,7 @@
2025/01/31-11:46:44.896163 7ff40d5f96c0 Recovering log #28 2025/02/03-22:58:39.056439 7f5b477fe6c0 Recovering log #66
2025/01/31-11:46:44.906324 7ff40d5f96c0 Delete type=3 #26 2025/02/03-22:58:39.113609 7f5b477fe6c0 Delete type=3 #64
2025/01/31-11:46:44.906382 7ff40d5f96c0 Delete type=0 #28 2025/02/03-22:58:39.113751 7f5b477fe6c0 Delete type=0 #66
2025/01/31-11:54:21.955722 7ff4077fe6c0 Level-0 table #33: started 2025/02/03-23:00:39.731972 7f5b463ff6c0 Level-0 table #71: started
2025/01/31-11:54:21.955751 7ff4077fe6c0 Level-0 table #33: 0 bytes OK 2025/02/03-23:00:39.732009 7f5b463ff6c0 Level-0 table #71: 0 bytes OK
2025/01/31-11:54:21.961763 7ff4077fe6c0 Delete type=0 #31 2025/02/03-23:00:39.738907 7f5b463ff6c0 Delete type=0 #69
2025/01/31-11:54:21.968509 7ff4077fe6c0 Manual compaction at level-0 from '!items!1icaxIywAwDXQcMz' @ 72057594037927935 : 1 .. '!items!ysGehYm1VkMWrI22' @ 0 : 0; will stop at (end) 2025/02/03-23:00:39.756507 7f5b463ff6c0 Manual compaction at level-0 from '!items!1icaxIywAwDXQcMz' @ 72057594037927935 : 1 .. '!items!ysGehYm1VkMWrI22' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2025/01/31-10:35:52.250782 7ff40ddfa6c0 Recovering log #24 2025/02/03-22:55:39.480778 7f5b477fe6c0 Recovering log #62
2025/01/31-10:35:52.261073 7ff40ddfa6c0 Delete type=3 #22 2025/02/03-22:55:39.490923 7f5b477fe6c0 Delete type=3 #60
2025/01/31-10:35:52.261148 7ff40ddfa6c0 Delete type=0 #24 2025/02/03-22:55:39.490983 7f5b477fe6c0 Delete type=0 #62
2025/01/31-11:04:13.749864 7ff4077fe6c0 Level-0 table #29: started 2025/02/03-22:56:09.768155 7f5b463ff6c0 Level-0 table #67: started
2025/01/31-11:04:13.749896 7ff4077fe6c0 Level-0 table #29: 0 bytes OK 2025/02/03-22:56:09.768198 7f5b463ff6c0 Level-0 table #67: 0 bytes OK
2025/01/31-11:04:13.756656 7ff4077fe6c0 Delete type=0 #27 2025/02/03-22:56:09.782479 7f5b463ff6c0 Delete type=0 #65
2025/01/31-11:04:13.763260 7ff4077fe6c0 Manual compaction at level-0 from '!items!1icaxIywAwDXQcMz' @ 72057594037927935 : 1 .. '!items!ysGehYm1VkMWrI22' @ 0 : 0; will stop at (end) 2025/02/03-22:56:09.795627 7f5b463ff6c0 Manual compaction at level-0 from '!items!1icaxIywAwDXQcMz' @ 72057594037927935 : 1 .. '!items!ysGehYm1VkMWrI22' @ 0 : 0; will stop at (end)

BIN
packs/scenes/000005.ldb Normal file

Binary file not shown.

BIN
packs/scenes/000009.ldb Normal file

Binary file not shown.

1
packs/scenes/CURRENT Normal file
View File

@ -0,0 +1 @@
MANIFEST-000006

0
packs/scenes/LOCK Normal file
View File

7
packs/scenes/LOG Normal file
View File

@ -0,0 +1,7 @@
2025/02/03-22:58:39.184051 7f5b4c9fa6c0 Recovering log #4
2025/02/03-22:58:39.237212 7f5b4c9fa6c0 Delete type=3 #2
2025/02/03-22:58:39.237307 7f5b4c9fa6c0 Delete type=0 #4
2025/02/03-23:00:39.746652 7f5b463ff6c0 Level-0 table #9: started
2025/02/03-23:00:39.750249 7f5b463ff6c0 Level-0 table #9: 1475 bytes OK
2025/02/03-23:00:39.756314 7f5b463ff6c0 Delete type=0 #7
2025/02/03-23:00:39.756534 7f5b463ff6c0 Manual compaction at level-0 from '!scenes!FJXugdbkBpEJEdR6' @ 72057594037927935 : 1 .. '!scenes!FJXugdbkBpEJEdR6' @ 0 : 0; will stop at (end)

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

@ -0,0 +1,5 @@
2025/02/03-22:55:39.520711 7f5b4c9fa6c0 Delete type=3 #1
2025/02/03-22:56:09.795741 7f5b463ff6c0 Level-0 table #5: started
2025/02/03-22:56:09.801852 7f5b463ff6c0 Level-0 table #5: 1348 bytes OK
2025/02/03-22:56:09.811173 7f5b463ff6c0 Delete type=0 #3
2025/02/03-22:56:09.845181 7f5b463ff6c0 Manual compaction at level-0 from '!scenes!T55C6Rrtsfqgk7A9' @ 72057594037927935 : 1 .. '!scenes!T55C6Rrtsfqgk7A9' @ 0 : 0; will stop at (end)

Binary file not shown.

0
packs/simples/000070.log Normal file
View File

View File

@ -1 +1 @@
MANIFEST-000030 MANIFEST-000068

View File

@ -1,7 +1,7 @@
2025/01/31-11:46:44.908555 7ff40cdf86c0 Recovering log #28 2025/02/03-22:58:39.116335 7f5b47fff6c0 Recovering log #66
2025/01/31-11:46:44.919483 7ff40cdf86c0 Delete type=3 #26 2025/02/03-22:58:39.180738 7f5b47fff6c0 Delete type=3 #64
2025/01/31-11:46:44.919542 7ff40cdf86c0 Delete type=0 #28 2025/02/03-22:58:39.180880 7f5b47fff6c0 Delete type=0 #66
2025/01/31-11:54:21.961885 7ff4077fe6c0 Level-0 table #33: started 2025/02/03-23:00:39.739100 7f5b463ff6c0 Level-0 table #71: started
2025/01/31-11:54:21.961918 7ff4077fe6c0 Level-0 table #33: 0 bytes OK 2025/02/03-23:00:39.739142 7f5b463ff6c0 Level-0 table #71: 0 bytes OK
2025/01/31-11:54:21.968366 7ff4077fe6c0 Delete type=0 #31 2025/02/03-23:00:39.746461 7f5b463ff6c0 Delete type=0 #69
2025/01/31-11:54:21.968523 7ff4077fe6c0 Manual compaction at level-0 from '!items!1bAL2MQVpVBd0c5Z' @ 72057594037927935 : 1 .. '!items!zs67k4sxCid6oTK3' @ 0 : 0; will stop at (end) 2025/02/03-23:00:39.756517 7f5b463ff6c0 Manual compaction at level-0 from '!items!1bAL2MQVpVBd0c5Z' @ 72057594037927935 : 1 .. '!items!zs67k4sxCid6oTK3' @ 0 : 0; will stop at (end)

View File

@ -1,7 +1,7 @@
2025/01/31-10:35:52.264998 7ff40d5f96c0 Recovering log #24 2025/02/03-22:55:39.493788 7f5b46ffd6c0 Recovering log #62
2025/01/31-10:35:52.275223 7ff40d5f96c0 Delete type=3 #22 2025/02/03-22:55:39.503575 7f5b46ffd6c0 Delete type=3 #60
2025/01/31-10:35:52.275287 7ff40d5f96c0 Delete type=0 #24 2025/02/03-22:55:39.503705 7f5b46ffd6c0 Delete type=0 #62
2025/01/31-11:04:13.743745 7ff4077fe6c0 Level-0 table #29: started 2025/02/03-22:56:09.825483 7f5b463ff6c0 Level-0 table #67: started
2025/01/31-11:04:13.743773 7ff4077fe6c0 Level-0 table #29: 0 bytes OK 2025/02/03-22:56:09.825510 7f5b463ff6c0 Level-0 table #67: 0 bytes OK
2025/01/31-11:04:13.749756 7ff4077fe6c0 Delete type=0 #27 2025/02/03-22:56:09.836693 7f5b463ff6c0 Delete type=0 #65
2025/01/31-11:04:13.763245 7ff4077fe6c0 Manual compaction at level-0 from '!items!1bAL2MQVpVBd0c5Z' @ 72057594037927935 : 1 .. '!items!zs67k4sxCid6oTK3' @ 0 : 0; will stop at (end) 2025/02/03-22:56:09.845218 7f5b463ff6c0 Manual compaction at level-0 from '!items!1bAL2MQVpVBd0c5Z' @ 72057594037927935 : 1 .. '!items!zs67k4sxCid6oTK3' @ 0 : 0; will stop at (end)

View File

@ -381,6 +381,15 @@ table {
padding: 0 3px; padding: 0 3px;
} }
.questionnaire-reponse {
max-width: 42rem;
margin-left: 1rem;
}
.questionnaire-element {
margin-top: 0.5rem;
}
input[type="text"], select[type="text"] { input[type="text"], select[type="text"] {
background: white; background: white;
color: #494e6b; color: #494e6b;
@ -1015,7 +1024,7 @@ ul, li {
color: #CCC; color: #CCC;
} }
& > img { & > img {
content: url(../images/ui/te-deum_logo_small_01.webp); content: url(../images/ui/logo_tedeum_pause.webp);
height: 200px; height: 200px;
width: 200px; width: 200px;
top: -200px; top: -200px;
@ -1023,7 +1032,7 @@ ul, li {
} }
} }
#logo { #logo {
content: url(../images/ui/te-deum_logo_small_01.webp); content: url(../images/ui/logo_tedeum_pause.webp);
width: 100px; width: 100px;
height: 60px; height: 60px;
} }
@ -1233,3 +1242,19 @@ ul, li {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.fvtt-te-deum-character-creator {
font-family: "GreatPrimer";
font-size: 0.9rem;
.field-title {
font-weight: bold;
}
.status-section {
display: block;
max-width: 34rem;
}
}
.item-name-label {
min-width: 12rem;
}

View File

@ -361,6 +361,15 @@ table {
padding: 0 3px; padding: 0 3px;
} }
.questionnaire-reponse {
max-width: 42rem;
margin-left: 1rem;
}
.questionnaire-element {
margin-top: 0.5rem;
}
input[type="text"], select[type="text"] { input[type="text"], select[type="text"] {
background: white; background: white;
color: #494e6b; color: #494e6b;
@ -1170,3 +1179,21 @@ ul, li {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.fvtt-te-deum-character-creator {
font-family: "GreatPrimer";
font-size: 0.9rem;
}
.fvtt-te-deum-character-creator .field-title {
font-weight: bold;
}
.fvtt-te-deum-character-creator .status-section {
display: block;
max-width: 34rem;
}
.item-name-label {
min-width: 12rem;
}

View File

@ -105,6 +105,18 @@
"PLAYER": "OBSERVER", "PLAYER": "OBSERVER",
"ASSISTANT": "OWNER" "ASSISTANT": "OWNER"
} }
},
{
"label": "Scenes",
"type": "Scene",
"name": "scenes",
"path": "packs/scenes",
"system": "fvtt-te-deum",
"flags": {},
"ownership": {
"PLAYER": "OBSERVER",
"ASSISTANT": "OWNER"
}
} }
], ],
"license": "LICENSE.txt", "license": "LICENSE.txt",
@ -126,7 +138,7 @@
"url": "https://www.uberwald.me/gitea/public/fvtt-te-deum", "url": "https://www.uberwald.me/gitea/public/fvtt-te-deum",
"version": "12.0.9", "version": "12.0.9",
"download": "https://www.uberwald.me/gitea/public/fvtt-te-deum/archive/fvtt-te-deum-v12.0.9.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-te-deum/archive/fvtt-te-deum-v12.0.9.zip",
"background": "", "background": "systems/fvtt-te-deum/images/ui/tdeum_welcome_page_01.webp",
"flags": { "flags": {
"hotReload": { "hotReload": {
"extensions": [ "extensions": [

View File

@ -1,7 +1,7 @@
{ {
"Actor": { "Actor": {
"types": ["pj", "pnj"], "types": ["pj", "pnj"],
"htmlFields": ["description"], "htmlFields": ["description", "equipmentfree"],
"pj": {}, "pj": {},
"pnj": {} "pnj": {}
}, },

View File

@ -318,6 +318,16 @@
{{!-- Equipement Tab --}} {{!-- Equipement Tab --}}
<div class="tab equipements" data-group="primary" data-tab="equipements"> <div class="tab equipements" data-group="primary" data-tab="equipements">
<div class="form-group">
{{#each system.fortune as |fortune key|}}
<div class="flexrow">
<label class="item-field item-field-label-medium">{{upperFirst key}}</label>
<input type="text" class="input-numeric-short" name="system.fortune.{{key}}.value" value="{{fortune}}"
data-dtype="Number" />
</div>
{{/each}}
</div>
<span class="item-name-label-header items-title-bg"> <span class="item-name-label-header items-title-bg">
<h3><label class="items-title-text">Zone libre</label></h3> <h3><label class="items-title-text">Zone libre</label></h3>
</span> </span>
@ -355,9 +365,6 @@
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
<hr>
</div> </div>
{{!-- Biography Tab --}} {{!-- Biography Tab --}}
@ -366,14 +373,19 @@
<div class="grid grid-2col"> <div class="grid grid-2col">
<div> <div>
<ul class="item-list alternate-list"> <ul class="item-list alternate-list">
<li class="item flexrow">
<label class="item-name-label-medium">Genre</label>
<input type="text" class="" name="system.genre" value="{{system.genre}}"
data-dtype="String" />
</li>
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Lieu de naissance</label> <label class="item-name-label-medium">Lieu de naissance</label>
<input type="text" class="" name="system.lieunaissance" value="{{system.biodata.lieunaissance}}" <input type="text" class="" name="system.lieunaissance" value="{{system.lieunaissance}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Age</label> <label class="item-name-label-medium">Age</label>
<input type="text" class="" name="system.biodata.age" value="{{system.biodata.age}}" <input type="text" class="" name="system.age" value="{{system.age}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
</ul> </ul>
@ -381,24 +393,53 @@
<div> <div>
<ul> <ul>
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Statut social</label> <label class="item-name-label-medium">Origine sociale</label>
<input type="text" class="" name="system.statutocial" value="{{system.biodata.residence}}" <input type="text" class="" name="system.statutocial" value="{{system.statutocial}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Charges et Titres</label> <label class="item-name-label-medium">Charges et Titres</label>
<input type="text" class="" name="system.chargestitre" value="{{system.biodata.nationalite}}" <input type="text" class="" name="system.chargestitre" value="{{system.chargestitre}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
<li class="item flexrow"> <li class="item flexrow">
<label class="item-name-label-medium">Religion</label> <label class="item-name-label-medium">Religion</label>
<input type="text" class="" name="system.biodata.enfance" value="{{system.biodata.enfance}}" <input type="text" class="" name="system.religion" value="{{system.religion}}"
data-dtype="String" /> data-dtype="String" />
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<hr>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-field-label-long">
<h3><label class="item-field-label-long">Education</label></h3>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
</div>
</li>
{{#each educations as |education key|}}
<li class="item list-item flexrow list-item-shadow item-id" data-item-id="{{education._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{education.img}}" /></a>
<span class="item-name-label">{{ education.name}}</span>
<span class="item-name-label">{{getEducationEtape education.system.etape}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Editer une éducation"><i class="fas fa-edit"></i></a>
{{#if @root.isGM}}
<a class="item-control item-delete" title="Supprimer une éducation"><i class="fas fa-trash"></i></a>
{{/if}}
</div>
</li>
{{/each}}
</ul>
<hr> <hr>
<span class="item-name-label-header items-title-bg"> <span class="item-name-label-header items-title-bg">
<h3><label class="items-title-text">Background</label></h3> <h3><label class="items-title-text">Background</label></h3>

View File

@ -0,0 +1,17 @@
<div class="fvtt-te-deum-character-creator">
<h3>Création de personnage terminée !</h3>
<div class="form-group">
L'ensemble des choix a été appliqué sur la fiche de personnage nouvellement créée.
Le Trousseau issu de l'Age Viril a été copié dans zone d'équipement libre de la fiche de personnage, à vous de créer les objets de jeu nécessaires (armes, richesses, etc.).
Vous devez maintenant choisir un Grâce, en fonction des pré-requis de votre personnage, et l'appliquer sur la fiche de personnage.
Vous pouvez également choisir un nom pour votre personnage, et le renseigner dans la fiche de personnage.
Enfin, vous pouvez choisir un portrait pour votre personnage.
</div>
</div>

View File

@ -1,6 +1,7 @@
<div class="fvtt-te-deum-character-creator"> <div class="fvtt-te-deum-character-creator">
<h2>{{title}}</h2> <h3>{{title}}</h3>
<h4>{{subtitle}}</h4>
<div class="form-group"> <div class="form-group">
<select name="sexe"> <select name="sexe">

View File

@ -1,18 +1,14 @@
<div class="fvtt-te-deum-character-creator"> <div class="fvtt-te-deum-character-creator">
<h2>{{title}}</h2> <h3>{{title}}</h3>
<h4>{{subtitle}}</h4>
<div class="form-group"> <div class="form-group">
<select name="carac"> <select name="carac">
{{selectOptions caracList valueAttr="id" labelAttr="label"}} {{selectOptions caracList valueAttr="id" labelAttr="label"}}
</select> </select>
</div> </div>
{{#each competences as |comp idx|}} {{> systems/fvtt-te-deum/templates/dialogs/partial-creator-status.hbs}}
{{#if comp.valid}}
<div class="form-group">
<label>Compétence +1 : {{comp.compName}}</label>
</div>
{{/if}}
{{/each}}
</div> </div>

View File

@ -0,0 +1,22 @@
<div class="fvtt-te-deum-character-creator">
<h3>{{title}}</h3>
<h4>{{subtitle}}</h4>
{{#each fixedCompetences as |compName idx|}}
<div class="form-group">
<label>Compétence +1 : {{upperFirst compName}}</label>
</div>
{{/each}}
{{#if hasSelectCompetences}}
<div class="form-group">
<select name="selectedCompetence">
{{selectOptions selectCompetences }}
</select>
</div>
{{/if}}
{{> systems/fvtt-te-deum/templates/dialogs/partial-creator-status.hbs}}
</div>

View File

@ -1,12 +1,29 @@
<div class="fvtt-te-deum-character-creator"> <div class="fvtt-te-deum-character-creator">
<h2>{{title}}</h2> <h3>{{title}}</h3>
<h4>{{subtitle}}</h4>
<div class="form-group"> <div class="form-group">
{{question}} {{question}}
</div> </div>
<div class="flexcol"> <div class="questionnaire-reponse">
{{radioBoxes 'responseKey' responsesRadio checked="reponse1" valueAttr="id" labelAttr="label"}} {{#each responsesRadio as |response key|}}
</div> <div class="questionnaire-element">
<input class="questionnaire-radio" type="radio" name="responseKey" data-response-key="{{key}}" value="{{key}}" {{#if response.selected}}checked{{/if}}>
<label>{{response.label}}</label>
{{#if response.competences}}
<select class="questionnaire-select-competence" data-response-key="{{key}}">
{{#each response.competences as |competence|}}
<option value="{{competence.compName}}">{{upperFirst competence.compName}}</option>
{{/each}}
</select>
{{/if}}
</div>
{{/each}}
</div>
{{> systems/fvtt-te-deum/templates/dialogs/partial-creator-status.hbs}}
</div> </div>

View File

@ -1,10 +1,14 @@
<div class="fvtt-te-deum-character-creator"> <div class="fvtt-te-deum-character-creator">
<h2>{{title}}</h2> <h3>{{title}}</h3>
<h4>{{subtitle}}</h4>
<div class="form-group"> <div class="form-group">
<select name="selectedItem"> <select name="selectedItem">
{{selectOptions choices valueAttr="id" labelAttr="name"}} {{selectOptions choices valueAttr="id" labelAttr="name"}}
</select> </select>
</div> </div>
{{> systems/fvtt-te-deum/templates/dialogs/partial-creator-status.hbs}}
</div> </div>

View File

@ -1,90 +0,0 @@
{{#if skill}}
<div class="flexrow">
<span class="roll-dialog-label">{{localize skill.name}} : </span>
<span class="roll-dialog-label">{{skill.value}}</span>
</div>
{{#if impactMalus}}
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.impactmalus"}} : </span>
<span class="roll-dialog-label">{{impactMalus}}</span>
</div>
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.skilltranscendence"}} : </span>
<select class="" id="roll-select-transcendence" data-type="Number">
{{#select skillTranscendence}}
{{#for 0 skill.value 1}}
<option value="{{this}}">{{this}}</option>
{{/for}}
{{/select}}
</select>
</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">
<span class="roll-dialog-label">{{localize "ECRY.ui.spec"}} : </span>
<select class="" id="roll-specialization" data-type="String" multiple>
{{#each skill.spec as |spec idx|}}
<option value="{{spec.id}}">{{spec.name}} (+{{spec.system.bonus}})</option>
{{/each}}
</select>
</div>
{{/if}}
{{#if spleen}}
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.applyspleen"}} {{spleen.name}}</span>
<input type="checkbox" class="item-field-label-short" id="roll-use-spleen" {{checked useSpleen}} />
</div>
{{/if}}
{{#if ideal}}
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.applyideal"}} {{ideal.name}}</span>
<input type="checkbox" class="item-field-label-short" id="roll-use-ideal" {{checked useIdeal}} />
</div>
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.traitbonus"}} : </span>
<select class="" id="roll-trait-bonus" data-type="String" multiple>
{{#each traits as | trait idx|}}
<option value="{{trait._id}}">{{trait.name}} ({{trait.system.level}})</option>
{{/each}}
</select>
</div>
<div class="flexrow">
<span class="roll-dialog-label">{{localize "ECRY.ui.traitmalus"}} : </span>
<select class="" id="roll-trait-malus" data-type="String" multiple>
{{#each traits as | trait idx|}}
<option value="{{trait._id}}">{{trait.name}} ({{trait.system.level}})</option>
{{/each}}
</select>
</div>
{{/if}}
<div class="flexrow">
<span class="roll-dialog-label">Bonus/Malus : </span>
<select id="bonusMalusPerso" name="bonusMalusPerso">
{{#select bonusMalusPerso}}
<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>
</div>

View File

@ -0,0 +1,15 @@
<hr>
<div class="status-section">
<div>
<label class="field-title">Caractéristiques : </label>
{{#each caracBonus as |bonus key|}}
<label class="">{{upperFirst key}} +{{bonus.value}} / </label>
{{/each}}
</div>
<div>
<label class="field-title">Compétences : </label>
{{#each competenceBonus as |bonus key|}}
<label class="">{{upperFirst key}} +{{bonus.value}} /</label>
{{/each}}
</div>
</div>

View File

@ -25,16 +25,22 @@
</select> </select>
</li> </li>
{{#if hasMultiplier}}
{{else}}
{{#each system.accessible as |access accId|}} {{#each system.accessible as |access accId|}}
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">{{getConfigLabel "origineSociale" accId}}</label> <label class="item-name-label-long">{{getConfigLabel "origineSociale" accId}}</label>
<input type="checkbox" name="system.accessible.{{accId}}.isaccessible" {{checked access.isaccessible}} /> <input type="checkbox" name="system.accessible.{{accId}}.isaccessible" {{checked access.isaccessible}} />
</li> </li>
{{/each}} {{/each}}
{{/if}}
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">Nombre de bonus de Caractéristiques</label> <label class="item-name-label-long">Nombre de bonus de Caractéristiques</label>
<input type="text" class="item-field-label-short " name="system.nbChoixCarac" value="{{system.nbChoixCarac}}" data-dtype="Number" /> <input type="text" class="item-field-label-short " name="system.nbChoixCarac"
value="{{system.nbChoixCarac}}" data-dtype="Number" />
</li> </li>
{{#each system.caracteristiques as |carac caracKey|}} {{#each system.caracteristiques as |carac caracKey|}}
{{#if carac.valid}} {{#if carac.valid}}
@ -61,21 +67,47 @@
{{/if}} {{/if}}
{{/each}} {{/each}}
{{#if canCompetencesOpt}}
<li class="flexrow">
<label class="item-name-label-long">Compétences à choisir ?</label>
<input type="checkbox" name="system.hasCompetencesOpt" {{checked system.hasCompetencesOpt}} />
</li>
{{#if system.hasCompetencesOpt}}
<li class="flexrow">
<label class="item-name-label-long">Nombre de compétences à choisir</label>
<input type="text" class="item-field-label-short" name="system.competencesOptNumber"
value="{{system.competencesOptNumber}}" data-dtype="Number" />
</li>
{{#each system.competencesOpt as |comp compKey|}}
<li class="flexrow">
<label class="item-name-label-long">Compétence +1</label>
<select name="system.competencesOpt.{{compKey}}.compName">
{{selectOptions @root.competences selected=comp.compName labelAttr="name" blank=""}}
</select>
</li>
{{/each}}
{{/if}}
{{/if}}
{{#if hasMultiplier}} {{#if hasMultiplier}}
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">Multiplicateur de cagnotte</label> <label class="item-name-label-long">Multiplicateur de cagnotte</label>
<input type="text" class="item-field-label-short" <input type="text" class="item-field-label-short" name="system.cagnotteMultiplier"
name="system.cagnotteMultiplier" value="{{system.cagnotteMultiplier}}" value="{{system.cagnotteMultiplier}}" data-dtype="Number" />
data-dtype="Number" />
</li> </li>
<li class="flexrow"> <li class="flexrow">
<label class="item-name-label-long">Diviseur de cagnotte</label> <label class="item-name-label-long">Diviseur de cagnotte</label>
<input type="text" class="item-field-label-short" <input type="text" class="item-field-label-short" name="system.cagnotteDivider"
name="system.cagnotteDivider" value="{{system.cagnotteDivider}}" value="{{system.cagnotteDivider}}" data-dtype="Number" />
data-dtype="Number" /> </li>
<li class="flexrow">
<label>Trousseau</label>
<textarea name="system.trousseau" cols="30" rows="5"/>{{system.trousseau}} </textarea>
</li> </li>
{{/if}} {{/if}}
{{#if hasQuestionnaire}} {{#if hasQuestionnaire}}
{{#each system.questionnaire as |question quesKey|}} {{#each system.questionnaire as |question quesKey|}}
<hr> <hr>
@ -89,10 +121,12 @@
data-dtype="String" /> data-dtype="String" />
<label class="item-name-label-long">Choix multiple?</label> <label class="item-name-label-long">Choix multiple?</label>
<input type="checkbox" name="system.questionnaire.{{quesKey}}.reponses.{{repKey}}.toSelect" {{checked reponse.toSelect}} /> <input type="checkbox" name="system.questionnaire.{{quesKey}}.reponses.{{repKey}}.toSelect" {{checked
reponse.toSelect}} />
{{#if reponse.toSelect}} {{#if reponse.toSelect}}
{{#each reponse.compList as |comp compKey|}} {{#each reponse.compList as |comp compKey|}}
<select class="item-name-label-medium" name="system.questionnaire.{{quesKey}}.reponses.{{repKey}}.compList.{{compKey}}.compName"> <select class="item-name-label-medium"
name="system.questionnaire.{{quesKey}}.reponses.{{repKey}}.compList.{{compKey}}.compName">
{{selectOptions @root.competences selected=comp.compName labelAttr="name" blank=""}} {{selectOptions @root.competences selected=comp.compName labelAttr="name" blank=""}}
</select> </select>
{{/each}} {{/each}}
@ -108,6 +142,16 @@
{{/each}} {{/each}}
{{/if}} {{/if}}
{{#if hasDebouches}}
<label>Débouchés possibles à l'Age Viril</label>
{{#each system.debouches as |debouche debKey|}}
<li class="flexrow">
<input type="text" name="system.debouches.{{debKey}}.debouche" value="{{debouche.debouche}}"/>
</li>
{{/each}}
{{/if}}
</ul> </ul>
</div> </div>
</div> </div>