This commit is contained in:
LeRatierBretonnien 2020-05-22 19:28:01 +02:00
parent 4ed1c804a0
commit 6c65c048a2
13 changed files with 318 additions and 308 deletions

View File

@ -18,6 +18,43 @@ export class RdDActorSheet extends ActorSheet {
/* -------------------------------------------- */
getData() {
let data = super.getData();
data.itemsByType = {};
for (const item of data.items) {
let list = data.itemsByType[item.type];
if (!list) {
list = [];
data.itemsByType[item.type] = list;
}
list.push(item);
}
data.competenceByCategory = {};
if (data.itemsByType.competence) {
for (const item of data.itemsByType.competence) {
console.log("Push...", item, item.data.categorie);
let list = data.competenceByCategory[item.data.categorie];
if (!list) {
list = [];
data.competenceByCategory[item.data.categorie] = list;
}
list.push(item);
}
}
data.data.materiel = this._checkNull(data.itemsByType['objet']);
data.data.armes = this._checkNull(data.itemsByType['arme']);
data.data.armures = this._checkNull(data.itemsByType['armure']);
data.data.livres = this._checkNull(data.itemsByType['livre']);
data.data.potions = this._checkNull(data.itemsByType['potions']);
data.data.competenceByCategory = data.competenceByCategory;
return data;
}
/* -------------------------------------------- */
/** @override */
activateListeners(html) {
super.activateListeners(html);

View File

@ -9,14 +9,7 @@ export class RdDActor extends Actor {
const actorData = this.data;
const data = actorData.data;
const flags = actorData.flags;
const comp = { "base": [],
"mêlée": [],
"tir": [],
"particulières": [],
"spécialisées": [],
"connaissances": [],
"draconic": []
}
// Make separate methods for each Actor type (character, npc, etc.) to keep
// things organized.
if (actorData.type === 'personnage') this._prepareCharacterData(actorData);
@ -27,12 +20,6 @@ export class RdDActor extends Actor {
*/
_prepareCharacterData(actorData) {
for (let i of actorData.items)
{
if (i.type === "compétence") {
comp[i.catégorie].push( i );
}
}
}
/** @override */

View File

@ -7,28 +7,16 @@ export class RdDItemSheet extends ItemSheet {
/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["worldbuilding", "sheet", "item"],
template: "systems/worldbuilding/templates/item-sheet.html",
classes: ["foundryvtt-reve-de-dragon", "sheet", "item"],
template: "systems/foundryvtt-reve-de-dragon/templates/item-sheet.html",
width: 520,
height: 480,
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
height: 480
//tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description"}]
});
}
/* -------------------------------------------- */
/** @override */
getData() {
const data = super.getData();
data.dtypes = ["String", "Number", "Boolean"];
for ( let attr of Object.values(data.data.attributes) ) {
attr.isCheckbox = attr.dtype === "Boolean";
}
return data;
}
/* -------------------------------------------- */
/** @override */
setPosition(options={}) {
const position = super.setPosition(options);
@ -46,41 +34,28 @@ export class RdDItemSheet extends ItemSheet {
// Everything below here is only needed if the sheet is editable
if (!this.options.editable) return;
// Select competence categorie
html.find("#categorie").on("click", this._onClickSelectCategorie.bind(this) );
}
/* -------------------------------------------- */
// Add or Remove Attribute
html.find(".attributes").on("click", ".attribute-control", this._onClickAttributeControl.bind(this));
async _onClickSelectCategorie(event) {
event.preventDefault();
const category = event.currentTarget.value;
let level = CONFIG.RDD.level_category[category];
this.object.data.data.base = level;
$("#base").val( level );
}
/* -------------------------------------------- */
/**
* Listen for click events on an attribute control to modify the composition of attributes in the sheet
* @param {MouseEvent} event The originating left click event
* @private
*/
async _onClickAttributeControl(event) {
event.preventDefault();
const a = event.currentTarget;
const action = a.dataset.action;
const attrs = this.object.data.data.attributes;
const form = this.form;
// Add new attribute
if ( action === "create" ) {
const nk = Object.keys(attrs).length + 1;
let newKey = document.createElement("div");
newKey.innerHTML = `<input type="text" name="data.attributes.attr${nk}.key" value="attr${nk}"/>`;
newKey = newKey.children[0];
form.appendChild(newKey);
await this._onSubmit(event);
}
// Remove existing attribute
else if ( action === "delete" ) {
const li = a.closest(".attribute");
li.parentElement.removeChild(li);
await this._onSubmit(event);
}
get template()
{
let type = this.item.type;
return `systems/foundryvtt-reve-de-dragon/templates/item-${type}-sheet.html`;
}
/* -------------------------------------------- */
@ -88,28 +63,6 @@ export class RdDItemSheet extends ItemSheet {
/** @override */
_updateObject(event, formData) {
// Handle the free-form attributes list
const formAttrs = expandObject(formData).data.attributes || {};
const attributes = Object.values(formAttrs).reduce((obj, v) => {
let k = v["key"].trim();
if ( /[\s\.]/.test(k) ) return ui.notifications.error("Attribute keys may not contain spaces or periods");
delete v["key"];
obj[k] = v;
return obj;
}, {});
// Remove attributes which are no longer used
for ( let k of Object.keys(this.object.data.data.attributes) ) {
if ( !attributes.hasOwnProperty(k) ) attributes[`-=${k}`] = null;
}
// Re-combine formData
formData = Object.entries(formData).filter(e => !e[0].startsWith("data.attributes")).reduce((obj, e) => {
obj[e[0]] = e[1];
return obj;
}, {_id: this.object._id, "data.attributes": attributes});
// Update the Item
return this.object.update(formData);
}
}

View File

@ -1,21 +1,54 @@
/**
* A simple and flexible system for world-building using an arbitrary collection of character and item attributes
* Author: Atropos
* RdD system
* Author: LeRatierBretonnien
* Software License: GNU GPLv3
*/
/* -------------------------------------------- */
const RDD = {}
RDD.level_category = {
"generale": "-4",
"particuliere": "-8",
"speciale": "-11",
"connaissance": "-11",
"draconic": "-11",
"melee": "-6",
"tir": "-8",
"lancer": "-8"
}
/* -------------------------------------------- */
// Import Modules
import { RdDActor } from "./actor.js";
import { RdDItemSheet } from "./item-sheet.js";
import { RdDActorSheet } from "./actor-sheet.js";
/* -------------------------------------------- */
// Handlers management
const preloadHandlebarsTemplates = async function () {
const templatePaths = [
//Character Sheets
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html',
//Items
'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-categorie.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html',
'systems/foundryvtt-reve-de-dragon/templates/competence-base.html'
];
return loadTemplates(templatePaths);
}
/* -------------------------------------------- */
/* Foundry VTT Initialization */
/* -------------------------------------------- */
Hooks.once("init", async function() {
console.log(`Initializing Reve de Dragon System`);
// preload handlebars templates
preloadHandlebarsTemplates();
/**
* Set an initiative formula for the system
* @type {String}
@ -27,7 +60,8 @@ Hooks.once("init", async function() {
// Define custom Entity classes
CONFIG.Actor.entityClass = RdDActor;
CONFIG.RDD = RDD;
// Register sheet application classes
Actors.unregisterSheet("core", ActorSheet);
Actors.registerSheet("foundryvtt-reve-de-dragon", RdDActorSheet, { makeDefault: true });

View File

@ -1,14 +1,14 @@
.worldbuilding {
.foundryvtt-reve-de-dragon {
/* Sheet Tabs */
/* Items List */
/* Attributes */
}
.worldbuilding .window-content {
.foundryvtt-reve-de-dragon .window-content {
height: 100%;
padding: 5px;
overflow-y: hidden;
}
.worldbuilding .sheet-header {
.foundryvtt-reve-de-dragon .sheet-header {
height: 100px;
overflow: hidden;
display: flex;
@ -17,84 +17,84 @@
justify-content: flex-start;
margin-bottom: 10px;
}
.worldbuilding .sheet-header .profile-img {
.foundryvtt-reve-de-dragon .sheet-header .profile-img {
flex: 0 0 100px;
height: 100px;
margin-right: 10px;
}
.worldbuilding .sheet-header .header-fields {
.foundryvtt-reve-de-dragon .sheet-header .header-fields {
flex: 1;
height: 100px;
}
.worldbuilding .sheet-header h1.charname {
.foundryvtt-reve-de-dragon .sheet-header h1.charname {
height: 50px;
padding: 0px;
margin: 5px 0;
border-bottom: 0;
}
.worldbuilding .sheet-header h1.charname input {
.foundryvtt-reve-de-dragon .sheet-header h1.charname input {
width: 100%;
height: 100%;
margin: 0;
}
.worldbuilding .resource {
.foundryvtt-reve-de-dragon .resource {
width: 50%;
height: 40px;
margin-top: 10px;
float: left;
text-align: center;
}
.worldbuilding .resource input {
.foundryvtt-reve-de-dragon .resource input {
width: 100px;
height: 28px;
}
.worldbuilding .tabs {
.foundryvtt-reve-de-dragon .tabs {
height: 40px;
border-top: 1px solid #AAA;
border-bottom: 1px solid #AAA;
}
.worldbuilding .tabs .item {
.foundryvtt-reve-de-dragon .tabs .item {
line-height: 40px;
font-weight: bold;
}
.worldbuilding .tabs .item.active {
.foundryvtt-reve-de-dragon .tabs .item.active {
text-decoration: underline;
text-shadow: none;
}
.worldbuilding .sheet-body {
.foundryvtt-reve-de-dragon .sheet-body {
overflow: hidden;
}
.worldbuilding .sheet-body .tab {
.foundryvtt-reve-de-dragon .sheet-body .tab {
height: 100%;
overflow-y: auto;
}
.worldbuilding .editor,
.worldbuilding .editor-content {
.foundryvtt-reve-de-dragon .editor,
.foundryvtt-reve-de-dragon .editor-content {
height: 100%;
}
.worldbuilding .item-list {
.foundryvtt-reve-de-dragon .item-list {
list-style: none;
margin: 7px 0;
padding: 0;
overflow-y: auto;
}
.worldbuilding .item-list .item {
.foundryvtt-reve-de-dragon .item-list .item {
height: 30px;
line-height: 24px;
padding: 3px 0;
border-bottom: 1px solid #BBB;
}
.worldbuilding .item-list .item img {
.foundryvtt-reve-de-dragon .item-list .item img {
flex: 0 0 24px;
margin-right: 5px;
}
.worldbuilding .item-list .item-name {
.foundryvtt-reve-de-dragon .item-list .item-name {
margin: 0;
}
.worldbuilding .item-list .item-controls {
.foundryvtt-reve-de-dragon .item-list .item-controls {
flex: 0 0 36px;
}
.worldbuilding .attributes-header {
.foundryvtt-reve-de-dragon .attributes-header {
padding: 5px;
margin: 5px 0;
background: rgba(0, 0, 0, 0.05);
@ -103,18 +103,18 @@
text-align: center;
font-weight: bold;
}
.worldbuilding .attributes-header .attribute-label {
.foundryvtt-reve-de-dragon .attributes-header .attribute-label {
flex: 1.5;
}
.worldbuilding .attributes-header .attribute-control {
.foundryvtt-reve-de-dragon .attributes-header .attribute-control {
flex: 0 0 20px;
}
.worldbuilding .attributes-list {
.foundryvtt-reve-de-dragon .attributes-list {
list-style: none;
margin: 0;
padding: 0;
}
.worldbuilding .attributes-list li > * {
.foundryvtt-reve-de-dragon .attributes-list li > * {
margin: 0 3px;
height: 28px;
line-height: 24px;
@ -123,17 +123,24 @@
border-radius: 0;
border-bottom: 1px solid #AAA;
}
.worldbuilding .attributes-list a.attribute-control {
.foundryvtt-reve-de-dragon .attributes-list a.attribute-control {
flex: 0 0 20px;
text-align: center;
line-height: 28px;
border: none;
}
.worldbuilding.sheet.actor {
.foundryvtt-reve-de-dragon.sheet.actor {
min-width: 560px;
min-height: 420px;
}
.worldbuilding.sheet.item {
.foundryvtt-reve-de-dragon.sheet.item {
min-width: 460px;
min-height: 400px;
}
//Editor
.editor {
border: $section-border;
height: 300px;
width: 100%;
}

View File

@ -1,162 +0,0 @@
.worldbuilding {
.window-content {
height: 100%;
padding: 5px;
overflow-y: hidden;
}
.sheet-header {
height: 100px;
overflow: hidden;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
margin-bottom: 10px;
.profile-img {
flex: 0 0 100px;
height: 100px;
margin-right: 10px;
}
.header-fields {
flex: 1;
height: 100px;
}
h1.charname {
height: 50px;
padding: 0px;
margin: 5px 0;
border-bottom: 0;
input {
width: 100%;
height: 100%;
margin: 0;
}
}
}
.resource {
width: 50%;
height: 40px;
margin-top: 10px;
float: left;
text-align: center;
input {
width: 100px;
height: 28px;
}
}
/* Sheet Tabs */
.tabs {
height: 40px;
border-top: 1px solid #AAA;
border-bottom: 1px solid #AAA;
.item {
line-height: 40px;
font-weight: bold;
}
.item.active {
text-decoration: underline;
text-shadow: none;
}
}
.sheet-body {
overflow: hidden;
.tab {
height: 100%;
overflow-y: auto;
}
}
.editor, .editor-content {
height: 100%;
}
/* Items List */
.item-list {
list-style: none;
margin: 7px 0;
padding: 0;
overflow-y: auto;
.item {
height: 30px;
line-height: 24px;
padding: 3px 0;
border-bottom: 1px solid #BBB;
img {
flex: 0 0 24px;
margin-right: 5px;
}
}
.item-name {
margin: 0;
}
.item-controls {
flex: 0 0 36px;
}
}
/* Attributes */
.attributes-header {
padding: 5px;
margin: 5px 0;
background: rgba(0, 0, 0, 0.05);
border: 1px solid #AAA;
border-radius: 2px;
text-align: center;
font-weight: bold;
.attribute-label {
flex: 1.5;
}
.attribute-control {
flex: 0 0 20px;
}
}
.attributes-list {
list-style: none;
margin: 0;
padding: 0;
li > * {
margin: 0 3px;
height: 28px;
line-height: 24px;
background: transparent;
border: none;
border-radius: 0;
border-bottom: 1px solid #AAA;
}
a.attribute-control {
flex: 0 0 20px;
text-align: center;
line-height: 28px;
border: none;
}
}
}
.worldbuilding.sheet.actor {
min-width: 560px;
min-height: 420px;
}
.worldbuilding.sheet.item {
min-width: 460px;
min-height: 400px;
}

View File

@ -5,7 +5,7 @@
"version": 0.2,
"minimumCoreVersion": "0.5.7",
"compatibleCoreVersion": "0.5.7",
"templateVersion": 3,
"templateVersion": 4,
"author": "LeRatierBretonnien",
"esmodules": ["module/simple.js"],
"styles": ["styles/simple.css"],

View File

@ -121,36 +121,45 @@
}
},
"Item": {
"types": ["objet", "arme", "armure", "compétence", "sort", "herbe", "ingrédient", "livre", "potion"],
"types": ["objet", "arme", "armure", "competence", "sort", "herbe", "ingredient", "livre", "potion", "munition"],
"objet": {
"description": "",
"quantité": 1,
"poids": 0,
"attributs": {}
"quantite": 1,
"encombrement": 0,
"equipe": false
},
"arme": {
"description": "",
"quantité": 1,
"poids": 0,
"attributs": {}
"quantite": 1,
"encombrement": 0,
"equipe": false,
"dommages": 0
},
"munition": {
"description": "",
"quantite": 1,
"encombrement": 0,
"equipe": false
},
"armure": {
"description": "",
"quantité": 1,
"poids": 0,
"attributs": {}
"quantite": 1,
"encombrement": 0,
"equipe": false,
"pa": 0,
},
"compétence": {
"competence": {
"niveau": 0,
"base": 0,
"catégorie": "",
"categorie": "",
"xp": 0,
"description": ""
"description": "Compétence : ...",
"defaut_carac": ""
},
"sort": {
"description": "",
"draconic": "",
"difficulté": 0,
"difficulte": 0,
"portée": 0
},
"herbe": {
@ -161,15 +170,18 @@
"ingredient": {
"description": "",
"niveau": 0,
"encombrement": 0,
"base": 0
},
"livre": {
"description": "",
"difficulté": 0,
"taches": 0
"difficulte": 0,
"taches": 0,
"encombrement": 0
},
"potion": {
"description": ""
"description": "",
"encombrement": 0
}
}
}

View File

@ -21,7 +21,7 @@
{{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="carac">Caractéristiques</a>
<a class="item" data-tab="compétences">Compétences</a>
<a class="item" data-tab="competences">Compétences</a>
<a class="item" data-tab="description">Description</a>
<a class="item" data-tab="items">Items</a>
<a class="item" data-tab="attributes">Attributes</a>
@ -49,25 +49,86 @@
</div>
{{!-- Compétences Tab --}}
<div class="tab compétences" data-group="primary" data-tab="compétences">
<header class="compétences-header flexrow">
<span class="compétences-key">Nom</span>
<span class="compétences-value">Valeur</span>
<span class="compétences-label">XP</span>
<div class="tab competences" data-group="primary" data-tab="competences">
<header class="competences-header flexrow">
<span class="competences-key">Compétences de base</span>
<span class="competences-value">Niveau</span>
<span class="competences-label">XP</span>
</header>
<ol class="compétences-list">
{{#each data.items as |com key|}}
<li class="attribute flexrow" data-attribute="{{key}}">
<span class="attribute-label" name="data.carac.{{key}}.label">{{carac.label}}</span>
<input class="attribute-value" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}"/>
<input class="attribute-xp" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number"/>
<ol class="item-list">
{{#each data.competenceByCategory.generale as |comp key|}}
<li class="item flexrow" data-attribute="{{key}}">
<span class="attribute-label" name="data.competenceByCategory.generale[{{key}}].name">{{comp.name}}</span>
<input class="attribute-value" type="text" name="data.competenceByCategory.generale[{{key}}].data.niveau" value="{{comp.data.niveau}}" data-dtype="number"/>
<input class="attribute-xp" type="text" name="data.competenceByCategory.generale[{{key}}].data.xp" value="{{comp.data.xp}}" data-dtype="number"/>
</li>
{{/each}}
</ol>
<header class="competences-header flexrow">
<span class="competences-key">Compétences Particulières</span>
<span class="competences-value">Niveau</span>
<span class="competences-label">XP</span>
</header>
<ol class="item-list">
{{#each data.competenceByCategory.particuliere as |comp key|}}
<li class="item flexrow" data-attribute="{{key}}">
<span class="attribute-label" name="data.competenceByCategory.particuliere[{{key}}].name">{{comp.name}}</span>
<input class="attribute-value" type="text" name="data.competenceByCategory.particuliere[{{key}}].data.niveau" value="{{comp.data.niveau}}" data-dtype="number"/>
<input class="attribute-xp" type="text" name="data.competenceByCategory.particuliere[{{key}}].data.xp" value="{{comp.data.xp}}" data-dtype="number"/>
</li>
{{/each}}
</ol>
<header class="competences-header flexrow">
<span class="competences-key">Compétences Spécialisées</span>
<span class="competences-value">Niveau</span>
<span class="competences-label">XP</span>
</header>
<ol class="item-list">
{{#each data.competenceByCategory.specialisee as |comp key|}}
<li class="item flexrow" data-attribute="{{key}}">
<span class="attribute-label" name="data.competenceByCategory.specialisee[{{key}}].name">{{comp.name}}</span>
<input class="attribute-value" type="text" name="data.competenceByCategory.specialisee[{{key}}].data.niveau" value="{{comp.data.niveau}}" data-dtype="number"/>
<input class="attribute-xp" type="text" name="data.competenceByCategory.specialisee[{{key}}].data.xp" value="{{comp.data.xp}}" data-dtype="number"/>
</li>
{{/each}}
</ol>
<header class="competences-header flexrow">
<span class="competences-key">Connaissances</span>
<span class="competences-value">Niveau</span>
<span class="competences-label">XP</span>
</header>
<ol class="item-list">
{{#each data.competenceByCategory.connaissance as |comp key|}}
<li class="item flexrow" data-attribute="{{key}}">
<span class="attribute-label" name="data.competenceByCategory.connaissance[{{key}}].name">{{comp.name}}</span>
<input class="attribute-value" type="text" name="data.competenceByCategory.connaissance[{{key}}].data.niveau" value="{{comp.data.niveau}}" data-dtype="number"/>
<input class="attribute-xp" type="text" name="data.competenceByCategory.connaissance[{{key}}].data.xp" value="{{comp.data.xp}}" data-dtype="number"/>
</li>
{{/each}}
</ol>
<header class="competences-header flexrow">
<span class="competences-key">Draconic</span>
<span class="competences-value">Niveau</span>
<span class="competences-label">XP</span>
</header>
<ol class="item-list">
{{#each data.competenceByCategory.draconic as |comp key|}}
<li class="item flexrow" data-attribute="{{key}}">
<span class="attribute-label" name="data.competenceByCategory.draconic[{{key}}].name">{{comp.name}}</span>
<input class="attribute-value" type="text" name="data.competenceByCategory.draconic[{{key}}].data.niveau" value="{{comp.data.niveau}}" data-dtype="number"/>
<input class="attribute-xp" type="text" name="data.competenceByCategory.draconic[{{key}}].data.xp" value="{{comp.data.xp}}" data-dtype="number"/>
</li>
{{/each}}
</ol>
</div>
{{!-- Biography Tab --}}
<div class="tab biography" data-group="primary" data-tab="description">
<div class="tab biography" data-group="primary" data-tab="description" style="height:200px">
{{editor content=data.biographie target="data.biographie" button=true owner=owner editable=editable}}
</div>

View File

@ -0,0 +1,5 @@
<option value="0">0</option>
<option value="-4">-4</option>
<option value="-6">-6</option>
<option value="-8">-8</option>
<option value="-11">-11</option>

View File

@ -0,0 +1,17 @@
<option value="apparence">Apparence</option>
<option value="constitution">Constitution</option>
<option value="force">Force</option>
<option value="agilite">Agilité</option>
<option value="dexterite">Dextérité</option>
<option value="vue">Vue</option>
<option value="ouie">Ouïe</option>
<option value="odoratgout">Odorat-Gout</option>
<option value="volonte">Volonté</option>
<option value="intellect">Intellect</option>
<option value="empathie">Empathie</option>
<option value="reve">Rêve</option>
<option value="chance">Chance</option>
<option value="melee">Mêlée</option>
<option value="melee">Tir</option>
<option value="melee">Lancer</option>
<option value="melee">Dérobée</option>

View File

@ -0,0 +1,8 @@
<option value="generale">generale</option>
<option value="particuliere">Particulières</option>
<option value="specialisee">Spécialisées</option>
<option value="connaissance">Connaissances</option>
<option value="tir">Tir</option>
<option value="lancer">Lancer</option>
<option value="melee">Mêlée</option>
<option value="draconic">Draconic</option>

View File

@ -0,0 +1,51 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
</div>
</header>
{{!-- Sheet Body --}}
<section class="sheet-body">
<div class="form-group">
<label for="categorie">Catégorie </label>
<select name="data.categorie" id="categorie" data-dtype="String">
{{#select item.data.categorie}}
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-categorie.html"}}
{{/select}}
</select>
</div>
<div class="form-group">
<label for="niveau">Niveau </label>
<input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/>
</div>
<div class="form-group">
<label for="xp">XP </label>
<input class="attribute-value" type="text" name="data.xp" value="{{data.xp}}" data-dtype="Number"/>
</div>
<div class="form-group">
<label for="base">Niveau de base </label>
<select name="data.base" id="base" data-dtype="Number">
{{#select item.data.base}}
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-base.html"}}
{{/select}}
</select>
</div>
<div class="form-group">
<label for="carac_defaut">Caractéristique par défaut </label>
<select name="data.carac_defaut" id="carac_defaut" data-dtype="String">
{{#select item.data.carac_defaut}}
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html"}}
{{/select}}
</select>
</div>
<header class="header-field">
<span>Description : </span>
</header>
<div class="form-group" style="height:200px">
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
</div>
</section>
</form>