diff --git a/images/icons/AGI.webp b/images/icons/AGI.webp
new file mode 100644
index 0000000..1970a5e
Binary files /dev/null and b/images/icons/AGI.webp differ
diff --git a/images/icons/COM.webp b/images/icons/COM.webp
new file mode 100644
index 0000000..7ab706a
Binary files /dev/null and b/images/icons/COM.webp differ
diff --git a/images/icons/DEF.webp b/images/icons/DEF.webp
new file mode 100644
index 0000000..7c06940
Binary files /dev/null and b/images/icons/DEF.webp differ
diff --git a/images/icons/FOC.webp b/images/icons/FOC.webp
new file mode 100644
index 0000000..d1c5da2
Binary files /dev/null and b/images/icons/FOC.webp differ
diff --git a/images/icons/MND.webp b/images/icons/MND.webp
new file mode 100644
index 0000000..3f5c566
Binary files /dev/null and b/images/icons/MND.webp differ
diff --git a/images/icons/MR.webp b/images/icons/MR.webp
new file mode 100644
index 0000000..813eff3
Binary files /dev/null and b/images/icons/MR.webp differ
diff --git a/images/icons/Momentum.webp b/images/icons/Momentum.webp
new file mode 100644
index 0000000..b16d7d0
Binary files /dev/null and b/images/icons/Momentum.webp differ
diff --git a/images/icons/PER.webp b/images/icons/PER.webp
new file mode 100644
index 0000000..88a9e49
Binary files /dev/null and b/images/icons/PER.webp differ
diff --git a/images/icons/PHY.webp b/images/icons/PHY.webp
new file mode 100644
index 0000000..6d714ea
Binary files /dev/null and b/images/icons/PHY.webp differ
diff --git a/images/icons/SOC.webp b/images/icons/SOC.webp
new file mode 100644
index 0000000..038f1bc
Binary files /dev/null and b/images/icons/SOC.webp differ
diff --git a/images/icons/STL.webp b/images/icons/STL.webp
new file mode 100644
index 0000000..461ce31
Binary files /dev/null and b/images/icons/STL.webp differ
diff --git a/images/icons/STR.webp b/images/icons/STR.webp
new file mode 100644
index 0000000..7ae1a20
Binary files /dev/null and b/images/icons/STR.webp differ
diff --git a/modules/pegasus-actor-sheet.js b/modules/pegasus-actor-sheet.js
index 45bbb61..95e2fc7 100644
--- a/modules/pegasus-actor-sheet.js
+++ b/modules/pegasus-actor-sheet.js
@@ -16,7 +16,7 @@ export class PegasusActorSheet extends ActorSheet {
return mergeObject(super.defaultOptions, {
classes: ["fvtt-pegasus-rpg", "sheet", "actor"],
template: "systems/fvtt-pegasus-rpg/templates/actor-sheet.html",
- width: 640,
+ width: 920,
height: 720,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "stats" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
@@ -58,6 +58,10 @@ export class PegasusActorSheet extends ActorSheet {
role: duplicate(this.actor.getRole()),
effects: duplicate(this.actor.getEffects()),
moneys: duplicate(this.actor.getMoneys()),
+ encCapacity: this.actor.getEncumbranceCapacity(),
+ containersTree: this.actor.containersTree,
+ encCurrent: this.actor.encCurrent,
+ encHindrance: this.actor.encHindrance,
options: this.options,
owner: this.document.isOwner,
editScore: this.options.editScore,
@@ -180,6 +184,13 @@ export class PegasusActorSheet extends ActorSheet {
this.actor.incDecQuantity( li.data("item-id"), +1 );
} );
+ html.find('.momentum-minus').click(event => {
+ this.actor.modifyMomentum( -1 )
+ } )
+ html.find('.momentum-plus').click(event => {
+ this.actor.modifyMomentum( 1 )
+ } )
+
html.find('.unarmed-attack').click((event) => {
this.actor.rollUnarmedAttack();
});
@@ -298,7 +309,11 @@ export class PegasusActorSheet extends ActorSheet {
/* -------------------------------------------- */
async _onDropItem(event, dragData) {
+ console.log(">>>>>> DROPPED!!!!")
let item = await PegasusUtility.searchItem( dragData)
+ if (item == undefined) {
+ item = this.actor.items.get( dragData.data._id )
+ }
this.actor.preprocessItem( event, item, true )
super._onDropItem(event, dragData)
}
diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js
index ac3b40c..d6d0f19 100644
--- a/modules/pegasus-actor.js
+++ b/modules/pegasus-actor.js
@@ -61,6 +61,8 @@ export class PegasusActor extends Actor {
if (this.type == 'character') {
this.computeNRGHealth();
+ this.data.data.encCapacity = this.getEncumbranceCapacity()
+ this.buildContainerTree()
}
super.prepareDerivedData();
@@ -71,6 +73,12 @@ export class PegasusActor extends Actor {
super._preUpdate(changed, options, user);
}
+
+ /* -------------------------------------------- */
+ getEncumbranceCapacity() {
+ return this.data.data.statistics.str.value * 25
+ }
+
/* -------------------------------------------- */
getActivePerks() {
let perks = this.data.items.filter(item => item.type == 'perk' && item.data.data.active);
@@ -287,6 +295,63 @@ export class PegasusActor extends Actor {
return duplicate(this.data.items.filter(item => item.type == "equipment") || [])
}
+ /* ------------------------------------------- */
+ async buildContainerTree() {
+ let equipments = duplicate(this.data.items.filter(item => item.type == "equipment") || [] )
+ for (let equip1 of equipments) {
+ if ( equip1.data.iscontainer) {
+ equip1.data.contents = []
+ equip1.data.contentsEnc = 0
+ for (let equip2 of equipments) {
+ if ( equip1._id != equip2._id && equip2.data.containerid == equip1._id ) {
+ equip1.data.contents.push(equip2)
+ equip1.data.contentsEnc += equip2.data.weight
+ }
+ }
+ }
+ }
+
+ let enc = 0
+ for( let item of equipments) {
+ if (item.data.equipped) {
+ if ( item.data.iscontainer) {
+ enc += item.data.contentsEnc
+ } else {
+ enc += item.data.weight
+ }
+ }
+ }
+ this.encCurrent = enc
+ this.containersTree = equipments.filter( item => item.data.containerid == "") // Returns the root of equipements without container
+
+ // Manages slow effect
+ let overCapacity = Math.floor(this.encCurrent / this.getEncumbranceCapacity() )
+ this.encHindrance = Math.floor(this.encCurrent / this.getEncumbranceCapacity() )
+
+ //console.log("Capacity", overCapacity, this.encCurrent / this.getEncumbranceCapacity() )
+ let effect = this.data.items.find(item => item.type == "effect" && item.data.data.slow)
+ if (overCapacity >= 4 ) {
+ if ( !effect) {
+ effect = await PegasusUtility.getEffectFromCompendium("Slowed")
+ effect.data.slow = true
+ this.createEmbeddedDocuments('Item', [effect])
+ }
+ } else {
+ if (effect) {
+ this.deleteEmbeddedDocuments('Item', [effect.id])
+ }
+ }
+ }
+
+ /* -------------------------------------------- */
+ modifyMomentum( incDec) {
+ let momentum = duplicate(this.data.data.momentum)
+ momentum.value += incDec
+ if ( momentum.value >= 0 && momentum.value <= momentum.max ){
+ this.update( { 'data.momentum': momentum})
+ }
+ }
+
/* -------------------------------------------- */
getActiveEffects(matching = it => true) {
let array = Array.from(this.getEmbeddedCollection("ActiveEffect").values());
@@ -306,20 +371,50 @@ export class PegasusActor extends Actor {
return this.data.data.attributes[attrKey];
}
+ /* -------------------------------------------- */
+ async addObjectToContainer( itemId, containerId ) {
+ let container = this.data.items.find( item => item.id == containerId && item.data.data.iscontainer)
+ let object = this.data.items.find( item => item.id == itemId )
+ console.log("Found", container, object)
+ if ( container ) {
+ if ( object.data.data.iscontainer) {
+ ui.notifications.warn("Only 1 level of container allowed")
+ return
+ }
+ let alreadyInside = this.data.items.filter( item => item.data.data.containerid && item.data.data.containerid == containerId);
+ if ( alreadyInside.length >= container.data.data.containercapacity ) {
+ ui.notifications.warn("Container is already full !")
+ return
+ } else {
+ await this.updateEmbeddedDocuments( "Item", [{ _id: object.id, 'data.containerid':containerId }] )
+ }
+ } else if ( object && object.data.data.containerid) { // remove from container
+ console.log("Removeing: ", object)
+ await this.updateEmbeddedDocuments( "Item", [{ _id: object.id, 'data.containerid':"" }]);
+ }
+ }
+
/* -------------------------------------------- */
async preprocessItem(event, item, onDrop = false) {
+ console.log("Pre-process !!!", item)
if (item.data.type == 'race') {
this.applyRace(item.data)
} else if (item.data.type == 'ability') {
this.applyAbility(item.data, [], true)
if (!onDrop) {
await this.createEmbeddedDocuments('Item', [item.data])
+ return
}
} else {
if (!onDrop) {
await this.createEmbeddedDocuments('Item', [item.data])
+ return
}
}
+
+ let dropID = $(event.target).parents(".item").attr("data-item-id") // Only relevant if container drop
+ let objectID = item.id || item._id
+ this.addObjectToContainer( objectID, dropID )
}
/* -------------------------------------------- */
@@ -343,7 +438,7 @@ export class PegasusActor extends Actor {
getSubActors() {
let subActors = [];
for (let id of this.data.data.subactors) {
- subActors.push(duplicate(game.actors.get(id)));
+ subActors.push( duplicate(game.actors.get(id)) )
}
return subActors;
}
@@ -879,6 +974,10 @@ export class PegasusActor extends Actor {
if (this.data.data.combat.hindrancedice > 0) {
effectsList.push({ label: "Health/Delirium Hindrance", type: "hindrance", applied: false, value: this.data.data.combat.hindrancedice })
}
+ let overCapacity = Math.floor(this.encCurrent / this.getEncumbranceCapacity() )
+ if (overCapacity > 0 ) {
+ effectsList.push({ label: "Encumbrance Hindrance", type: "hindrance", applied: false, value: overCapacity })
+ }
let effects = this.data.items.filter(item => item.type == 'effect')
for (let effect of effects) {
effect = duplicate(effect)
@@ -962,6 +1061,7 @@ export class PegasusActor extends Actor {
rollData.statMod = rollData.stat.mod
rollData.specList = this.getRelevantSpec(statKey)
rollData.selectedSpec = "0"
+ rollData.img = `systems/fvtt-pegasus-rpg/images/icons/${rollData.stat.abbrev}.webp`
}
this.addEffects(rollData)
@@ -1044,6 +1144,7 @@ export class PegasusActor extends Actor {
rollData.specList = [spec]
rollData.selectedSpec = spec._id
rollData.specName = spec.name
+ rollData.img = spec.img
rollData.specDicesLevel = spec.data.level
this.startRoll(rollData)
} else {
@@ -1083,6 +1184,7 @@ export class PegasusActor extends Actor {
rollData.armor = armor
rollData.title = `Armor : ${armor.name}`
rollData.isResistance = true;
+ rollData.img = armor.img
rollData.otherDicesLevel = armor.data.resistance
this.startRoll(rollData);
@@ -1102,6 +1204,8 @@ export class PegasusActor extends Actor {
rollData.mode = "power"
rollData.power = power
rollData.title = `Power : ${power.name}`
+ rollData.img = power.img
+
this.startRoll(rollData);
} else {
ui.notifications.warn("Power not found !", powerId);
diff --git a/modules/pegasus-main.js b/modules/pegasus-main.js
index 76bdf04..f2c76cf 100644
--- a/modules/pegasus-main.js
+++ b/modules/pegasus-main.js
@@ -48,7 +48,7 @@ Hooks.once("init", async function () {
/* -------------------------------------------- */
game.socket.on("system.fvtt-pegasus-rpg", data => {
- PegasusUtility.onSocketMesssage(data);
+ PegasusUtility.onSocketMesssage(data)
});
/* -------------------------------------------- */
diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js
index b296835..4c28783 100644
--- a/modules/pegasus-utility.js
+++ b/modules/pegasus-utility.js
@@ -38,6 +38,9 @@ export class PegasusUtility {
Handlebars.registerHelper('upper', function (text) {
return text.toUpperCase();
});
+ Handlebars.registerHelper('lower', function (text) {
+ return text.toLowerCase()
+ });
Handlebars.registerHelper('upperFirst', function (text) {
if (typeof text !== 'string') return text
return text.charAt(0).toUpperCase() + text.slice(1)
@@ -65,6 +68,18 @@ export class PegasusUtility {
this.specs = specs.map(i => i.toObject());
}
+ /* -------------------------------------------- */
+ static async addItemDropToActor(actor, item) {
+ actor.preprocessItem("none", item, false)
+ let chatData = {
+ user: game.user.id,
+ rollMode: game.settings.get("core", "rollMode"),
+ whisper: [game.user.id].concat(ChatMessage.getWhisperRecipients('GM')),
+ content: `
The item ${item.name} has been dropped on the actor ${actor.name}
= token.x && x <= (token.x + token.width)
&& y >= token.y && y <= (token.y + token.height)) {
let item = await this.searchItem(data)
- token.actor.preprocessItem("none", item, false)
- console.log("Dropped !!!", item, token)
+ if (game.user.isGM || token.actor.isOwner) {
+ this.addItemDropToActor(token.actor, item)
+ } else {
+ game.socket.emit("system.fvtt-pegasus-rpg", { name: "msg_gm_item_drop", data: { actorId: token.actor.id, itemId: item.id, isPack: item.pack } })
+ }
return
}
}
@@ -188,7 +206,9 @@ export class PegasusUtility {
'systems/fvtt-pegasus-rpg/templates/partial-options-level.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-range.html',
'systems/fvtt-pegasus-rpg/templates/partial-options-equipment-types.html',
- 'systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html'
+ 'systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html',
+ 'systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html',
+ 'systems/fvtt-pegasus-rpg/templates/partial-actor-status.html'
]
return loadTemplates(templatePaths);
}
@@ -196,7 +216,7 @@ export class PegasusUtility {
/* -------------------------------------------- */
static async getEffectFromCompendium(effectName) {
effectName = effectName.toLowerCase()
- let effect = game.items.find(item => item.data.type == 'effect' && item.name.toLowerCase() == effectName)
+ let effect = game.items.contents.find(item => item.type == 'effect' && item.name.toLowerCase() == effectName)
if (!effect) {
let effects = await this.loadCompendium('fvtt-pegasus.effect', item => item.name.toLowerCase() == effectName)
let objs = effects.map(i => i.toObject())
@@ -325,17 +345,6 @@ export class PegasusUtility {
}
}
- /* -------------------------------------------- */
- static clearDefenseState(defenderId) {
- this.defenderStore[defenderId] = undefined;
- }
- /* -------------------------------------------- */
- static storeDefenseState(rollData) {
- game.socket.emit("system.fvtt-weapons-of-the-gods", {
- name: "msg_update_defense_state", data: { defenderId: rollData.defenderId, rollId: rollData.rollId }
- });
- this.updateDefenseState(rollData.defenderId, rollData.rollId);
- }
/* -------------------------------------------- */
static updateRollData(rollData) {
@@ -358,13 +367,23 @@ export class PegasusUtility {
}
/* -------------------------------------------- */
- static onSocketMesssage(msg) {
- //console.log("SOCKET MESSAGE", msg.name, game.user.character.id, msg.data.defenderId);
+ static async onSocketMesssage(msg) {
+ console.log("SOCKET MESSAGE", msg.name)
if (msg.name == "msg_update_defense_state") {
- this.updateDefenseState(msg.data.defenderId, msg.data.rollId);
+ this.updateDefenseState(msg.data.defenderId, msg.data.rollId)
}
if (msg.name == "msg_update_roll") {
- this.updateRollData(msg.data);
+ this.updateRollData(msg.data)
+ }
+ if (msg.name == "msg_gm_item_drop" && game.user.isGM) {
+ let actor = game.actors.get( msg.data.actorId )
+ let item
+ if (msg.data.isPack) {
+ item = await fromUuid("Compendium." + msg.data.isPack + "." + msg.data.itemId)
+ } else {
+ item = game.items.get(msg.data.itemId)
+ }
+ this.addItemDropToActor( actor, item )
}
}
@@ -503,9 +522,6 @@ export class PegasusUtility {
content: await renderTemplate(`systems/fvtt-pegasus-rpg/templates/chat-generic-result.html`, rollData)
});
- if (rollData.defender) {
- this.storeDefenseState(rollData);
- }
// Init stuf
if (rollData.isInit) {
let combat = game.combats.get(rollData.combatId)
@@ -543,11 +559,11 @@ export class PegasusUtility {
index = i;
}
}
- let bestScore = (bestRoll * 10) + index;
- rollData.bestScore = bestScore;
- rollData.finalScore = bestScore + rollData.negativeModifier + rollData.positiveModifier;
+ let bestScore = (bestRoll * 10) + index
+ rollData.bestScore = bestScore
+ rollData.finalScore = bestScore + rollData.negativeModifier + rollData.positiveModifier
- this.saveRollData(rollData);
+ this.saveRollData(rollData)
this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-weapons-of-the-gods/templates/chat-generic-result.html`, rollData)
@@ -598,18 +614,19 @@ export class PegasusUtility {
chatGM.whisper = this.getUsers(user => user.isGM);
chatGM.content = "Blinde message of " + game.user.name + " " + chatOptions.content;
console.log("blindMessageToGM", chatGM);
- game.socket.emit("system.fvtt-weapons-of-the-gods", { msg: "msg_gm_chat_message", data: chatGM });
+ game.socket.emit("system.fvtt-pegasus-rgp", { msg: "msg_gm_chat_message", data: chatGM });
}
+
/* -------------------------------------------- */
static async searchItem(dataItem) {
- let item;
+ let item
if (dataItem.pack) {
- item = await fromUuid("Compendium." + dataItem.pack + "." + dataItem.id);
+ item = await fromUuid("Compendium." + dataItem.pack + "." + dataItem.id)
} else {
item = game.items.get(dataItem.id)
- }
- return item;
+ }
+ return item
}
/* -------------------------------------------- */
diff --git a/styles/simple.css b/styles/simple.css
index 421b406..7c3d130 100644
--- a/styles/simple.css
+++ b/styles/simple.css
@@ -1,5 +1,5 @@
/* ==================== (A) Fonts ==================== */
-
+
:root {
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
--window-header-title-font-size: 1.3rem;
@@ -217,8 +217,9 @@ table {border: 1px solid #7a7971;}
-webkit-box-flex: 0;
-ms-flex: 0 0 128px;
flex: 0 0 128px;
- height: 128px;
width: 128px;
+ height: auto;
+ max-height:260px;
margin-right: 10px;
object-fit: cover;
object-position: 50% 0;
@@ -384,9 +385,26 @@ table {border: 1px solid #7a7971;}
.window-app.sheet .window-content .sheet-header input[type="text"], .window-app.sheet .window-content .sheet-header input[type="number"], .window-app.sheet .window-content .sheet-header input[type="password"], .window-app.sheet .window-content .sheet-header input[type="date"], .window-app.sheet .window-content .sheet-header input[type="time"] {
color: rgba(36, 37, 37, 0.75);
- background: rgba(255, 255, 255, 0.05);
- border: 0 none;
+ background: rgba(245, 245, 241, 0.95);
+ border: 1 none;
margin-bottom: 0.25rem;
+ margin-left: 2px;
+}
+
+.window-app.sheet .window-content .sheet-body input[type="text"], .window-app.sheet .window-content .sheet-body input[type="number"], .window-app.sheet .window-content .sheet-body input[type="password"], .window-app.sheet .window-content .sheet-body input[type="date"], .window-app.sheet .window-content .sheet-body input[type="time"] {
+ color: rgba(36, 37, 37, 0.75);
+ background: rgba(245, 245, 241, 0.95);
+ border: 1 none;
+ margin-bottom: 0.25rem;
+ margin-left: 2px;
+}
+
+.window-app.sheet .window-content .sheet-body select, .window-app.sheet .window-content .sheet-header select {
+ color: rgba(36, 37, 37, 0.75);
+ background: rgba(245, 245, 241, 0.95);
+ border: 1 none;
+ margin-bottom: 0.25rem;
+ margin-left: 2px;
}
.window-app .window-content, .window-app.sheet .window-content .sheet-body{
@@ -522,6 +540,12 @@ ul, li {
padding: 0.125rem;
flex: 1 1 5rem;
}
+.list-item-shadow {
+ background:rgba(87, 60, 32, 0.35);
+}
+.list-item-shadow2 {
+ background:rgba(87, 60, 32, 0.25);
+}
.item-display-show {
display: block;
}
@@ -531,11 +555,9 @@ ul, li {
.conteneur-type {
background: rgb(200, 10, 100, 0.25);
}
-
.item-quantite {
margin-left: 0.5rem;
}
-
.list-item-margin1 {
margin-left: 1rem;
}
@@ -585,6 +607,7 @@ ul, li {
}
.roll-dialog-label {
margin: 4px 0;
+ min-width: 96px;
}
.short-label {
@@ -884,6 +907,7 @@ ul, li {
background: rgba(220,220,210,0.75);
border: 2px solid #545469;
}
+
.chat-message .chat-icon {
border: 0;
padding: 2px 6px 2px 2px;
@@ -892,6 +916,23 @@ ul, li {
height: 64px;
}
+.stat-icon {
+ border: 0;
+ padding: 2px 2px 2px 2px;
+ max-width:32px;
+ max-height:32px;
+ width: auto;
+ height: auto;
+}
+.combat-icon {
+ border: 0;
+ padding: 2px 2px 2px 2px;
+ max-width:24px;
+ max-height:24px;
+ width: auto;
+ height: auto;
+}
+
#sidebar-tabs {
flex: 0 0 32px;
box-sizing: border-box;
@@ -916,23 +957,6 @@ ul, li {
}
-/*#sidebar #sidebar-tabs i.fa-comments:before, #sidebar #sidebar-tabs i.fa-fist-raised:before, #sidebar #sidebar-tabs i.fa-users:before, #sidebar #sidebar-tabs i.fa-map:before, #sidebar #sidebar-tabs i.fa-suitcase:before, #sidebar #sidebar-tabs i.fa-book-open:before, #sidebar #sidebar-tabs i.fa-th-list:before, #sidebar #sidebar-tabs i.fa-music:before, #sidebar #sidebar-tabs i.fa-atlas:before, #sidebar #sidebar-tabs i.fa-cogs:before {content: "";}
-#sidebar #sidebar-tabs i.fa-comments {background: url("img/ui/icon_sidebar_chat.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-fist-raised {background: url("img/ui/icon_sidebar_fight.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-users {background: url("img/ui/icon_sidebar_actor.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-map {background: url("img/ui/icon_sidebar_scene.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-suitcase {background: url("img/ui/icon_sidebar_item.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-book-open {background: url("img/ui/icon_sidebar_journal.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-th-list {background: url("img/ui/icon_sidebar_rolltable.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-music {background: url("img/ui/icon_sidebar_music.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-atlas {background: url("img/ui/icon_sidebar_compendium.svg") no-repeat;}
-#sidebar #sidebar-tabs i.fa-cogs {background: url("img/ui/icon_sidebar_settings.svg") no-repeat;}
-
-#combat #combat-controls {
- box-shadow: inset 0 0 2rem rgba(0,0,0,0.5);
-}
-*/
-
/*--------------------------------------------------------------------------*/
/* Control, Tool, hotbar & navigation */
@@ -1216,3 +1240,113 @@ ul, li {
height: 54px;
position:relative;
}
+
+/* =================== 1. ACTOR SHEET FONT STYLES =========== *//*
+Agility AGI: #02a41d Also Used for Ranged Damage
+Mind MND: #a100fe
+Social SOC: #fd7100
+Strength STR: #5f3d00 Also Used For Melee Damage
+Physique PHY: #990304 Also used For Damage Resistance
+Combat COM: 0136ff Also Used for Melee Attack
+Defence DEF: #88826a Also used in the Defence on Combat Tab
+Stealth STL: #505050
+Perception PER: #f9c801 Also Used for Ranged Damage
+Focus FOC: #ff0084
+*/
+.color-class-agi,
+.color-class-range {
+ background-color: #02a41d;
+ background: #02a41d;
+}
+.color-class-mnd {
+ background-color: #a100fe;
+}
+.color-class-soc {
+ background-color: #fd7100;
+}
+.color-class-str,
+.color-class-meleedmg {
+ background-color: #5f3d00;
+}
+.color-class-phy,
+.color-class-dmgres {
+ background-color: #990304;
+}
+.color-class-com,
+.color-class-melee {
+ background-color: #0136ff;
+}
+.color-class-def,
+.color-class-defence {
+ background-color: #88826a;
+}
+.color-class-stl {
+ background-color: #505050;
+}
+.color-class-per,
+.color-class-ranged {
+ background-color: #f9c801;
+}
+.color-class-foc {
+ background-color: #ff0084;
+}
+.color-class-common {
+ background: rgba(185, 183, 40, 0.45);
+}
+.status-small-label {
+ font-size: 0.65rem;
+}
+.combat-button {
+ min-height: 26px;
+ max-height: 26px;
+ margin-top: 4px;
+}
+.no-grow {
+ flex-grow: 1;
+ max-width: 24px;
+}
+.status-col-name {
+ max-width: 48px;
+}
+.status-block {
+ max-width: 128px;
+}
+.momentum-block {
+ max-width: 128px;
+ justify-content: flex-start;
+}
+.stat-item {
+ flex-grow: 1;
+ justify-content: flex-start;
+ margin: 2px;
+}
+.stat-block {
+ min-width: 160px;
+}
+.stat-margin {
+ margin-left: 4px;
+ margin-top: 6px;
+}
+.combat-margin {
+ margin-left: 4px;
+ margin-top: 3px;
+}
+.stat-text-white {
+ color: white;
+}
+.item-stat-roll {
+ max-height: 42px;
+}
+.item-stat-roll select, .item-stat-roll input {
+ margin-top: 4px;
+ margin-right: 2px;
+}
+.table-momentum {
+ background: none;
+ border: 0;
+}
+.img-no-border {
+ max-width: 48px;
+ max-height: 48px;
+ border: 0;
+}
\ No newline at end of file
diff --git a/styles/unused.html b/styles/unused.html
new file mode 100644
index 0000000..5f8d30b
--- /dev/null
+++ b/styles/unused.html
@@ -0,0 +1,60 @@
+{{!-- Carac Tab --}}
+
+
+
+
+
+
+
+ {{#each data.secondary as |stat2 key|}}
+ {{#if stat2.iscombat}}
+
+ {{stat2.label}} :
+
+ Cur
+ Max
+ {{/if}}
+{{/each}}
+
+
+ {{data.momentum.label}}:
+ Cur
+ Max
+
diff --git a/system.json b/system.json
index 0ec3154..eea1697 100644
--- a/system.json
+++ b/system.json
@@ -180,9 +180,9 @@
"styles": [
"styles/simple.css"
],
- "templateVersion": 81,
+ "templateVersion": 86,
"title": "Pegasus RPG",
"url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg",
- "version": "0.4.21",
+ "version": "0.5.1",
"background" : "./images/ui/pegasus_welcome_page.webp"
}
diff --git a/template.json b/template.json
index 2fa5b6d..f9646b2 100644
--- a/template.json
+++ b/template.json
@@ -41,13 +41,15 @@
"abbrev": "AGI",
"level": 1,
"value": 1,
- "mod": 0
+ "mod": 0,
+ "col": 1
},
"mnd":{
"label": "Mind",
"abbrev": "MND",
"level": 1,
"value": 1,
+ "col": 1,
"mod": 0
},
"soc":{
@@ -55,6 +57,7 @@
"abbrev": "SOC",
"level": 1,
"value": 1,
+ "col": 1,
"mod": 0
},
"str":{
@@ -62,6 +65,7 @@
"abbrev": "STR",
"level": 1,
"value": 1,
+ "col": 1,
"mod": 0
},
"phy":{
@@ -69,6 +73,7 @@
"abbrev": "PHY",
"level": 1,
"value": 1,
+ "col": 1,
"mod": 0
},
"com":{
@@ -76,6 +81,7 @@
"abbrev": "COM",
"level": 1,
"value": 1,
+ "col": 2,
"mod": 0
},
"def":{
@@ -83,6 +89,7 @@
"abbrev": "DEF",
"level": 1,
"value": 1,
+ "col": 2,
"mod": 0
},
"stl":{
@@ -90,6 +97,7 @@
"abbrev": "STL",
"level": 1,
"value": 1,
+ "col": 2,
"mod": 0
},
"per":{
@@ -97,6 +105,7 @@
"abbrev": "PER",
"level": 1,
"value": 1,
+ "col": 2,
"mod": 0
},
"foc":{
@@ -104,6 +113,7 @@
"abbrev": "FOC",
"level": 1,
"value": 1,
+ "col": 2,
"mod": 0
}
},
@@ -148,7 +158,7 @@
"max": 0
},
"stealthhealth": {
- "label": "Stealth Health",
+ "label": "STL Health",
"type": "value",
"value": 0,
"ismax": true,
@@ -156,7 +166,7 @@
"max": 0
},
"socialhealth": {
- "label": "Social Health",
+ "label": "SOC Health",
"type": "value",
"value": 0,
"ismax": true,
@@ -371,6 +381,9 @@
"otherdice": false,
"effects": [],
"activated": false,
+ "iscontainer": false,
+ "containercapacity": 0,
+ "containerid": "",
"description":""
},
"money" : {
diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html
index 0159e9b..93ad6f7 100644
--- a/templates/actor-sheet.html
+++ b/templates/actor-sheet.html
@@ -6,11 +6,66 @@
-
-
-
+
+
+
+
+
+
+ {{#each data.statistics as |stat key|}}
+ {{#if (eq stat.col 1)}}
+ {{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}}
+ {{/if}}
+ {{/each}}
+
+
-
+
+
+ {{#each data.statistics as |stat key|}}
+ {{#if (eq stat.col 2)}}
+ {{> systems/fvtt-pegasus-rpg/templates/partial-actor-stat-block.html stat=stat key=key}}
+ {{/if}}
+ {{/each}}
+
+
+
+
+ {{> systems/fvtt-pegasus-rpg/templates/partial-actor-status.html}}
+
+
+
+
+
@@ -19,10 +74,9 @@
{{!-- Sheet Tab Navigation --}}
- Statistics
+ Combat
Specialisations
Powers/Abilities
- Combat
Equipment
Biography
@@ -30,220 +84,83 @@
{{!-- Sheet Body --}}
- {{!-- Carac Tab --}}
-
-
-
- {{!-- Other Tab --}}
-
-
-
-
- Specialisations
-
-
- {{#each specs as |spec key|}}
-
-
- {{spec.name}}
- {{upper spec.data.statistic}}
- {{spec.data.dice}}
- {{#if spec.data.ispowergroup}}
- {{#if spec.data.powersactivated}}
- Deactivate
- {{else}}
- Activate
- {{/if}}
- {{else}}
-
- {{/if}}
-
-
- {{/each}}
-
-
-
-
-
-
-
{{!-- Combat Tab --}}
-
-
-
-
- Combat Dice Pools
-
-
-
-
- Stun
-
-
-
-
- Effects
-
-
- {{#each effects as |effect key|}}
-
-
- {{effect.name}}
- {{upperFirst effect.data.type}}
- {{upperFirst effect.data.genre}}
- Lvl:{{effect.data.effectlevel}}
- {{upper effect.data.stataffected}}
-
-
-
+
+
+
-
- {{/each}}
-
+
+
+
+
+
+
+
+
@@ -251,7 +168,7 @@
{{#each perks as |perk key|}}
-
+
{{perk.name}}
Lvl:{{perk.data.level}}
@@ -306,10 +223,67 @@
{{/each}}
+
+
+
Effects
+
+
+ {{#each effects as |effect key|}}
+
+
+ {{effect.name}}
+ {{upperFirst effect.data.type}}
+ {{upperFirst effect.data.genre}}
+ Lvl:{{effect.data.effectlevel}}
+ {{upper effect.data.stataffected}}
+
+
+ {{/each}}
+
+
+ {{!-- Other Tab --}}
+
+
+
+
+ Specialisations
+
+
+ {{#each specs as |spec key|}}
+
+
+ {{spec.name}}
+ {{upper spec.data.statistic}}
+ {{spec.data.dice}}
+ {{#if spec.data.ispowergroup}}
+ {{#if spec.data.powersactivated}}
+ Deactivate
+ {{else}}
+ Activate
+ {{/if}}
+ {{else}}
+
+ {{/if}}
+
+
+ {{/each}}
+
+
+
+
+
+
+
{{!-- Powers Tab --}}
@@ -326,13 +300,12 @@
-
Powers
{{#each powers as |power key|}}
-
+
{{#if power.data.rollneeded}}
@@ -369,13 +342,12 @@
{{/each}}
-
Abilities
{{#each abilities as |ability key|}}
-
+
{{ability.name}}
@@ -391,13 +363,20 @@
{{!-- Equipement Tab --}}
-
+
+
+
Encumbrance
+ Current : {{encCurrent}}
+ Capacity : {{encCapacity}}
+ Hindrance : {{encHindrance}}
+
+
-
Money
+ Money
{{#each moneys as |money key|}}
-
+
{{money.name}}
@@ -412,46 +391,12 @@
{{/each}}
-
-
Equipment
-
-
- {{#each equipments as |equip key|}}
-
-
- {{equip.name}}
- {{upperFirst equip.data.type}}
- Qty {{equip.data.quantity}}
-
- {{#if (count equip.data.effects)}}
- {{#if equip.data.activated}}
- Deactivate
- {{else}}
- Activate
- {{/if}}
- {{else}}
-
- {{/if}}
-
- Qty {{equip.data.quantity}}
-
-
- {{/each}}
-
-
-
-
-
Weapons
+ Weapons
{{#each weapons as |weapon key|}}
-
+
{{weapon.name}}
@@ -475,13 +420,12 @@
{{/each}}
-
-
Armors & Shields
+ Armors & Shields
{{#each armors as |armor key|}}
-
+
{{armor.name}}
@@ -528,6 +472,65 @@
{{/each}}
+
+
Equipment
+
+
+ {{#each containersTree as |equip key|}}
+
+
+ {{equip.name}}
+ {{upperFirst equip.data.type}}
+ Qty {{equip.data.quantity}}
+
+ {{#if (count equip.data.effects)}}
+ {{#if equip.data.activated}}
+ Deactivate
+ {{else}}
+ Activate
+ {{/if}}
+ {{else}}
+
+ {{/if}}
+
+ {{#if equip.data.iscontainer}}
+ Enc:{{equip.data.contentsEnc}}
+ {{/if}}
+
+
+
+
+ {{#each equip.data.contents as |subgear key|}}
+
+
+ {{subgear.name}}
+ {{upperFirst subgear.data.type}}
+ Qty {{subgear.data.quantity}}
+ {{#if (count subgear.data.effects)}}
+ {{#if subgear.data.activated}}
+ Deactivate
+ {{else}}
+ Activate
+ {{/if}}
+ {{else}}
+
+ {{/if}}
+
+ {{/each}}
+
+ {{/each}}
+
+
+
+
{{!-- Biography Tab --}}
diff --git a/templates/item-equipment-sheet.html b/templates/item-equipment-sheet.html
index 033fefb..28cb292 100644
--- a/templates/item-equipment-sheet.html
+++ b/templates/item-equipment-sheet.html
@@ -54,6 +54,14 @@
Weight
+
Is a container ?
+
+
+ {{#if data.iscontainer}}
+
Container capacity
+
+
+ {{/if}}
Cost
diff --git a/templates/partial-actor-stat-block.html b/templates/partial-actor-stat-block.html
new file mode 100644
index 0000000..8b858af
--- /dev/null
+++ b/templates/partial-actor-stat-block.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+ {{#select stat.value}}
+ {{{@root.optionsDiceList}}}
+ {{/select}}
+
+
+
\ No newline at end of file
diff --git a/templates/partial-actor-status.html b/templates/partial-actor-status.html
new file mode 100644
index 0000000..1b0f75c
--- /dev/null
+++ b/templates/partial-actor-status.html
@@ -0,0 +1,37 @@
+
+
+
\ No newline at end of file
diff --git a/templates/roll-dialog-generic.html b/templates/roll-dialog-generic.html
index d7a55da..75c582d 100644
--- a/templates/roll-dialog-generic.html
+++ b/templates/roll-dialog-generic.html
@@ -23,8 +23,8 @@
{{#if specList}}
- Spec Name :
-
+ Spec :
+
{{#select selectedSpec}}
None
{{#each specList as |spec idx|}}
@@ -35,6 +35,7 @@
{{/if}}
+
Spec Dice :