Compare commits

..

3 Commits

Author SHA1 Message Date
1de5086efa Data model change 2022-07-25 19:14:25 +02:00
918d69e677 Data model change 2022-07-25 19:13:52 +02:00
dbf9c01cd7 Data model change 2022-07-25 09:08:55 +02:00
9 changed files with 66 additions and 256 deletions

View File

@ -80,7 +80,7 @@ export class CrucibleActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getEncumbranceCapacity() { getEncumbranceCapacity() {
return this.data.data.statistics.str.value * 25 return 1;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -129,9 +129,6 @@ export class CrucibleActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
getSkills() { getSkills() {
let comp = duplicate(this.data.items.filter(item => item.type == 'skill') || []); let comp = duplicate(this.data.items.filter(item => item.type == 'skill') || []);
for (let c of comp) {
c.data.dice = CrucibleUtility.getDiceFromLevel(c.data.level);
}
return comp; return comp;
} }

View File

@ -86,6 +86,8 @@ export class CrucibleUtility {
const templatePaths = [ const templatePaths = [
'systems/fvtt-crucible-rpg/templates/editor-notes-gm.html', 'systems/fvtt-crucible-rpg/templates/editor-notes-gm.html',
'systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html',
'systems/fvtt-crucible-rpg/templates/partial-actor-status.html',
'systems/fvtt-crucible-rpg/templates/partial-options-abilities.html', 'systems/fvtt-crucible-rpg/templates/partial-options-abilities.html',
'systems/fvtt-crucible-rpg/templates/partial-item-nav.html', 'systems/fvtt-crucible-rpg/templates/partial-item-nav.html',
'systems/fvtt-crucible-rpg/templates/partial-item-description.html', 'systems/fvtt-crucible-rpg/templates/partial-item-description.html',

View File

@ -148,11 +148,11 @@
"styles": [ "styles": [
"styles/simple.css" "styles/simple.css"
], ],
"templateVersion": 4, "templateVersion": 8,
"title": "Crucible RPG", "title": "Crucible RPG",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/raw/master/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v0.1.6.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg/archive/fvtt-crucible-rpg-v0.1.8.zip",
"url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg", "url": "https://www.uberwald.me/gitea/public/fvtt-crucible-rpg",
"version": "0.1.6", "version": "0.1.8",
"background" : "./images/ui/crucible_welcome_page.webp" "background" : "./images/ui/crucible_welcome_page.webp"
} }

View File

@ -22,36 +22,43 @@
"str":{ "str":{
"label": "Strength", "label": "Strength",
"abbrev": "str", "abbrev": "str",
"col": 1,
"value": 1 "value": 1
}, },
"agi":{ "agi":{
"label": "Agility", "label": "Agility",
"abbrev": "agi", "abbrev": "agi",
"col": 1,
"value": 1 "value": 1
}, },
"dex":{ "dex":{
"label": "Dexterity", "label": "Dexterity",
"abbrev": "dex", "abbrev": "dex",
"col": 1,
"value": 1 "value": 1
}, },
"con":{ "con":{
"label": "Constitution", "label": "Constitution",
"abbrev": "con", "abbrev": "con",
"col": 1,
"value": 1 "value": 1
}, },
"int":{ "int":{
"label": "Intelligence", "label": "Intelligence",
"abbrev": "int", "abbrev": "int",
"col": 2,
"value": 1 "value": 1
}, },
"wit":{ "wit":{
"label": "Wits", "label": "Wits",
"abbrev": "wit", "abbrev": "wit",
"col": 2,
"value": 1 "value": 1
}, },
"cha":{ "cha":{
"label": "Charisma", "label": "Charisma",
"abbrev": "cha", "abbrev": "cha",
"col": 2,
"value": 1 "value": 1
} }
}, },
@ -118,6 +125,12 @@
"cost": 0, "cost": 0,
"description":"" "description":""
}, },
"shield": {
"shielddie": "",
"equipped": false,
"cost": 0,
"description":""
},
"equipment": { "equipment": {
"equiptype": "", "equiptype": "",
"cost": 0, "cost": 0,

View File

@ -11,60 +11,28 @@
<div class="flexrow"> <div class="flexrow">
<div class="stat-item"> <div class="stat-item">
<ul> <ul>
{{#each data.statistics as |stat key|}} {{#each data.abilities as |ability key|}}
{{#if (eq stat.col 1)}} {{#if (eq ability.col 1)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}} {{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}}
{{/if}} {{/if}}
{{/each}} {{/each}}
<li class="item flexrow list-item color-class-pool item-stat-roll" data-attr-key="pool">
<span class="stat-icon">
<img class="stat-icon" src="icons/dice/d12black.svg">
</span>
<span class="stat-label stat-margin" name="pool">
<h4 class="stat-text-white stat-margin"><a class="generic-pool-roll stat-margin"
data-stat-key="pool">Dice Pool</a></h4>
</span>
</li>
</ul> </ul>
</div> </div>
<div class="stat-item"> <div class="stat-item">
<ul> <ul>
{{#each data.statistics as |stat key|}} {{#each data.abilities as |ability key|}}
{{#if (eq stat.col 2)}} {{#if (eq ability.col 2)}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}} {{> systems/fvtt-crucible-rpg/templates/partial-actor-ability-block.html ability=ability key=key}}
{{/if}} {{/if}}
{{/each}} {{/each}}
<li class="item flexrow list-item color-class-mr item-stat-roll" data-attr-key="mr">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/MR.webp">
</span>
<span class="stat-label stat-margin" name="mr">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="mr">MR</a>
</h4>
</span>
<select class="status-small-label color-class-common" type="text" name="data.mr.value"
value="{{data.mr.value}}" data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select data.mr.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common"
name="data.mr.mod" value="{{data.mr.mod}}" data-dtype="Number" {{#unless
@root.editScore}}disabled{{/unless}} />
</li>
</ul> </ul>
</div> </div>
<div class="stat-item status-block"> <div class="stat-item status-block">
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-status.html}} {{> systems/fvtt-crucible-rpg/templates/partial-actor-status.html}}
</div> </div>
<!--
<label class="status-small-label">Active NRG</label>
<input type="text" class="padd-right status-small-label no-grow" name="data.nrg.activated" value="{{data.nrg.activated}}" data-dtype="Number"/>
-->
</div> </div>
</div> </div>
</div> </div>
@ -73,9 +41,9 @@
{{!-- Sheet Tab Navigation --}} {{!-- Sheet Tab Navigation --}}
<nav class="sheet-tabs tabs" data-group="primary"> <nav class="sheet-tabs tabs" data-group="primary">
<a class="item" data-tab="skills">Skills</a>
<a class="item" data-tab="combat">Combat</a> <a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="specs">Specialisations</a> <a class="item" data-tab="lore">Lore</a>
<a class="item" data-tab="powers">Powers/Abilities</a>
<a class="item" data-tab="equipment">Equipment</a> <a class="item" data-tab="equipment">Equipment</a>
<a class="item" data-tab="biodata">Biography</a> <a class="item" data-tab="biodata">Biography</a>
</nav> </nav>
@ -83,6 +51,41 @@
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">
{{!-- Skills Tab --}}
<div class="tab items" data-group="primary" data-tab="skills">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Skills</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Ability</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Score</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Background</label>
</span>
</li>
{{#each skills as |skill key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{skill._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{skill.img}}" /></a>
<span class="item-name-label"><a class="roll-spec">{{skill.name}}</a></span>
<span class="item-field-label-short">{{upper skill.data.ability}}</span>
<span class="item-field-label-short">{{skill.data.dice}}</span>
<span class="item-field-label-long">&nbsp;-&nbsp;</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{!-- Combat Tab --}} {{!-- Combat Tab --}}
<div class="tab fight" data-group="primary" data-tab="combat"> <div class="tab fight" data-group="primary" data-tab="combat">
<div class="flexcol"> <div class="flexcol">
@ -317,55 +320,9 @@
</div> </div>
</div> </div>
{{!-- Other Tab --}}
<div class="tab items" data-group="primary" data-tab="specs">
<ul class="stat-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Specialisations</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Stat</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Dice</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Powergroup</label>
</span>
</li>
{{#each specs as |spec key|}}
<li class="item stat flexrow list-item list-item-shadow" data-item-id="{{spec._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{spec.img}}" /></a>
<span class="item-name-label"><a class="roll-spec">{{spec.name}}</a></span>
<span class="item-field-label-short">{{upper spec.data.statistic}}</span>
<span class="item-field-label-short">{{spec.data.dice}}</span>
{{#if spec.data.ispowergroup}}
{{#if spec.data.powersactivated}}
<span class="item-field-label-long"><a class="spec-group-deactivate">Deactivate</a></span>
{{else}}
<span class="item-field-label-long"><a class="spec-group-activate">Activate</a></span>
{{/if}}
{{else}}
<span class="item-field-label-long">&nbsp;-&nbsp;</span>
{{/if}}
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
{{!-- Powers Tab --}} {{!-- Powers Tab --}}
<div class="tab fight" data-group="primary" data-tab="powers"> <div class="tab fight" data-group="primary" data-tab="lore">
<div class="flexcol"> <div class="flexcol">

View File

@ -1,143 +0,0 @@
<div class="chat-message-header">
<img class="actor-icon" src="{{img}}" alt="{{alias}}" />
<h4 class=chat-actor-name>{{name}}</h4>
</div>
<hr>
<div class="flexcol">
{{#if (eq step "select-race")}}
<div>Select a race from the list below</div>
<table class="table-create-actor">
{{#each races as |race index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{race._id}}">{{race.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{race._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-race-optionnal")}}
<div>The selected Race has some optionnal abilities. Select one ability by clicking the relevant button below<br>
Remaining abilities to select : {{nboptionnal}}
</div>
<table class="table-create-actor">
{{#each optionnalabilities as |ability index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{ability._id}}">{{ability.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{ability._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-race-stats")}}
<div>Select Stats to gain +1 modifier : <br>
Remaining stats to select : {{numberstats}}
</div>
<table class="table-create-actor">
{{#each stats as |stat key|}}
{{#if @root.statsonlyonce}}
{{#if stat.used}}
{{else}}
<tr>
<td>{{stat.label}} ({{stat.abbrev}})</td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-stat-key="{{key}}" >Select it !</a></td>
</tr>
{{/if}}
{{else}}
<tr>
<td>{{stat.label}} ({{stat.abbrev}})</td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-stat-key="{{key}}" >Select it !</a></td>
</tr>
{{/if}}
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-race-perks")}}
<div>Now select {{nbraceperks}} Perk(s) for your character
</div>
<table class="table-create-actor">
{{#each raceperks as |perk index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{perk._id}}">{{perk.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{perk._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role")}}
<div>Now select a Role for your character.
</div>
<table class="table-create-actor">
{{#each roles as |role index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{role._id}}">{{role.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{role._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role-start-spec")}}
<div>Choose 1 Specialisation at +1DT :
</div>
<table class="table-create-actor">
{{#each rolestartspec as |spec index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{spec._id}}">{{spec.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{spec._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role-stat")}}
<div>Choose 1 Stat at +1DT :
</div>
<table class="table-create-actor">
{{#each rolestats as |rolestat key|}}
<tr>
<td>{{rolestat.label}}</td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-stat-key="{{rolestat.abbrev}}">Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role-spec")}}
<div>Now select a specialisation at +{{dt}}DT.
</div>
<table class="table-create-actor">
{{#each rolespec as |spec index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{spec._id}}">{{spec.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{spec._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "select-role-perk")}}
<div>Now select a Perk.
</div>
<table class="table-create-actor">
{{#each roleperks as |perk index|}}
<tr>
<td><a class="view-item-from-chat" data-step="{{@root.step}}" data-item-id="{{perk._id}}">{{perk.name}}</a></td>
<td><a class="chat-card-button chat-create-actor" data-step-name="{{@root.step}}" data-item-id="{{perk._id}}" >Select it !</a></td>
</tr>
{{/each}}
</table>
{{/if}}
{{#if (eq step "character-end")}}
<div>Follow the next steps from the rulebook page 50 !. You can now spend 150 CDPs to customise your character.
</div>
{{/if}}
</div>

View File

@ -5,7 +5,7 @@
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1> <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
</div> </div>
</header> </header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}} {{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">

View File

@ -5,7 +5,7 @@
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1> <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
</div> </div>
</header> </header>
{{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}} {{> systems/fvtt-crucible-rpg/templates/partial-item-nav.html}}
{{!-- Sheet Body --}} {{!-- Sheet Body --}}
<section class="sheet-body"> <section class="sheet-body">

View File

@ -1,16 +0,0 @@
<li class="item flexrow list-item color-class-{{lower stat.abbrev}} item-stat-roll" data-attr-key="{{key}}">
<span class="stat-icon">
<img class="stat-icon" src="systems/fvtt-pegasus-rpg/images/icons/{{stat.abbrev}}.webp">
</span>
<span class="stat-label stat-margin" name="{{key}}">
<h4 class="stat-text-white stat-margin"><a class="roll-stat stat-margin" data-stat-key="{{key}}">{{stat.abbrev}}</a></h4>
</span>
<select class="status-small-label color-class-common" type="text" name="data.statistics.{{key}}.value" value="{{stat.value}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.value}}
{{{@root.optionsDiceList}}}
{{/select}}
</select>
<input type="text" class="input-numeric-short padd-right status-small-label color-class-common" name="data.statistics.{{key}}.mod" value="{{stat.mod}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}} />
</li>