diff --git a/lang/en.json b/lang/en.json
index 077404a..0973a13 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -1,3 +1,17 @@
-{
-
-}
\ No newline at end of file
+ {
+ "ACTOR": {
+ "TypeCharacter": "Character"
+ },
+ "ITEM": {
+ "TypeSkill": "Skill",
+ "TypePerk": "Perk",
+ "TypePower": "Power",
+ "TypeTalent": "Talent",
+ "TypeAdvantage": "Advantage",
+ "TypeMartialart": "Martial art",
+ "TypeLimitation": "Limitation",
+ "TypeComplication": "Complication",
+ "TypeEquipment": "Equipment",
+ "TypeCurrency": "Currency"
+ }
+ }
\ No newline at end of file
diff --git a/modules/hero6-actor.js b/modules/hero6-actor.js
index 43948c8..c20cb3b 100644
--- a/modules/hero6-actor.js
+++ b/modules/hero6-actor.js
@@ -91,7 +91,7 @@ export class Hero6Actor extends Actor {
/* -------------------------------------------- */
getMoneys() {
- let comp = this.items.filter(item => item.type == 'money');
+ let comp = this.items.filter(item => item.type == 'currency');
Hero6Utility.sortArrayObjectsByName(comp)
return comp;
}
@@ -163,10 +163,52 @@ export class Hero6Actor extends Actor {
}
return item;
}
+ /* -------------------------------------------- */
+ prepareSkill(skill) {
+ skill.roll = 0
+ skill.charac = "N/A"
+ if (skill.system.skillfamiliarity) {
+ skill.roll = 8;
+ } else if (skill.system.skillprofiency) {
+ skill.roll = 10;
+ } else if (skill.system.skilltype == "agility") {
+ skill.charac = "DEX"
+ let charac = duplicate(this.system.characteristics.dex)
+ this.prepareCharacValues(charac)
+ skill.roll = charac.roll
+ } else if (skill.system.skilltype == "interaction") {
+ skill.charac = "PRE"
+ let charac = duplicate(this.system.characteristics.pre)
+ this.prepareCharacValues(charac)
+ skill.roll = charac.roll
+ } else if (skill.system.skilltype == "intellect") {
+ skill.charac = "INT"
+ let charac = duplicate(this.system.characteristics.int)
+ this.prepareCharacValues(charac)
+ skill.roll = charac.roll
+ } else if (skill.system.skilltype == "background") {
+ skill.roll = 11
+ } else if (skill.system.skilltype == "custom") {
+ if (skill.system.characteristic == "manual") {
+ skill.roll = skill.system.base
+ } else {
+ skill.charac = skill.system.characteristic
+ let charac = duplicate(this.system.characteristics[skill.system.characteristic])
+ this.prepareCharacValues(charac)
+ skill.roll = charac.roll
+ }
+ }
+ if (skill.system.levels > 0) {
+ skill.roll += skill.system.levels
+ }
+ }
/* -------------------------------------------- */
getSkills() {
let comp = duplicate(this.items.filter(item => item.type == 'skill') || [])
+ for (let skill of comp) {
+ this.prepareSkill(skill)
+ }
Hero6Utility.sortArrayObjectsByName(comp)
return comp
}
@@ -177,8 +219,8 @@ export class Hero6Actor extends Actor {
}
async getPowers() {
let comp = duplicate(this.items.filter(item => item.type == 'power') || [])
- for(let c of comp) {
- c.enrichDescription = c.name + "
" + await TextEditor.enrichHTML(c.system.description, {async: true})
+ for (let c of comp) {
+ c.enrichDescription = c.name + "
" + await TextEditor.enrichHTML(c.system.description, { async: true })
}
Hero6Utility.sortArrayObjectsByName(comp)
return comp
@@ -192,7 +234,7 @@ export class Hero6Actor extends Actor {
let comp = duplicate(this.items.filter(item => item.type == 'martialart') || [])
Hero6Utility.sortArrayObjectsByName(comp)
return comp
- }
+ }
getComplications() {
let comp = duplicate(this.items.filter(item => item.type == 'complication') || [])
Hero6Utility.sortArrayObjectsByName(comp)
@@ -296,7 +338,7 @@ export class Hero6Actor extends Actor {
/* -------------------------------------------- */
async incDecHP(formula) {
- let dmgRoll = new Roll(formula+"[dark-starsorange]").roll({ async: false })
+ let dmgRoll = new Roll(formula + "[dark-starsorange]").roll({ async: false })
await Hero6Utility.showDiceSoNice(dmgRoll, game.settings.get("core", "rollMode"))
let hp = duplicate(this.system.secondary.hp)
hp.value = Number(hp.value) + Number(dmgRoll.total)
@@ -377,14 +419,14 @@ export class Hero6Actor extends Actor {
}
/* -------------------------------------------- */
- prepareCharacValues( charac) {
+ prepareCharacValues(charac) {
charac.total = charac.value
- charac.roll = 9 + Math.floor((charac.value)/5)
+ charac.roll = 9 + Math.floor((charac.value) / 5)
}
prepareCharac() {
let characs = duplicate(this.system.characteristics)
- for(let key in characs) {
- this.prepareCharacValues( characs[key])
+ for (let key in characs) {
+ this.prepareCharacValues(characs[key])
}
return characs
}
@@ -483,10 +525,13 @@ export class Hero6Actor extends Actor {
}
/* -------------------------------------------- */
rollItem(itemId) {
- let item = this.items.get( itemId)
+ let item = this.items.get(itemId)
let rollData = this.getCommonRollData()
rollData.mode = "item"
rollData.item = duplicate(item)
+ if ( item.type == "skill") {
+ this.prepareSkill(rollData.item)
+ }
this.startRoll(rollData)
}
diff --git a/modules/hero6-utility.js b/modules/hero6-utility.js
index 4eac5f5..a55b5d5 100644
--- a/modules/hero6-utility.js
+++ b/modules/hero6-utility.js
@@ -46,7 +46,7 @@ export class Hero6Utility {
return __locationNames[key]
})
Handlebars.registerHelper('isSkillCustom', function (key) {
- if (key == "custom" || key == "background" ) {
+ if (key == "custom" ) {
return true;
}
return false
@@ -304,7 +304,7 @@ export class Hero6Utility {
target = rollData.charac.roll
}
if (rollData.item) {
- target = rollData.item.system.roll
+ target = rollData.item.roll || rollData.item.system.roll
}
// Performs roll
@@ -328,9 +328,7 @@ export class Hero6Utility {
if ( myRoll.terms[0].total == 18) { // Always a failure
rollData.isSuccess = false
}
- if (rollData.isSuccess ) {
- rollData.margin = target - rollData.result
- }
+ rollData.margin = target - rollData.result
let msg = await this.createChatWithRollMode(rollData.alias, {
content: await renderTemplate(`systems/fvtt-hero-system-6/templates/chat/chat-generic-result.hbs`, rollData)
diff --git a/styles/simple.css b/styles/simple.css
index 0ec8363..6233119 100644
--- a/styles/simple.css
+++ b/styles/simple.css
@@ -447,7 +447,7 @@ form .form-group label {
.window-app .window-content, .window-app.sheet .window-content .sheet-body{
font-size: 0.8rem;
- background: url("../images/ui/pc_sheet_bg.webp") repeat left top;
+ /*background: url("../images/ui/pc_sheet_bg.webp") repeat left top;*/
background: rgba(228, 240, 240, 0.75);
color: rgba(66, 66, 64, 0.95);
}
@@ -546,7 +546,7 @@ ul, li {
}
.sheet li {
- margin: 0.010rem;
+ margin: 0.1rem;
padding: 0.25rem;
}
.header-fields li {
@@ -574,10 +574,10 @@ ul, li {
}
.list-item {
- margin: 0.125rem;
+ margin: 0.2rem;
/*box-shadow: inset 0px 0px 1px #00000096;*/
/*border-radius: 0.25rem;*/
- padding: 0.125rem;
+ padding: 0.2rem;
flex: 1 1 5rem;
display: flex !important;
}
@@ -1425,6 +1425,11 @@ Focus FOC: #ff0084
max-width: 16rem;
min-width: 16rem;
}
+.item-field-label-long3 {
+ flex-grow:1;
+ max-width: 30rem;
+ min-width: 30rem;
+}
.item-field-label-long4 {
flex-grow:1;
max-width: 40rem;
@@ -1451,3 +1456,7 @@ Focus FOC: #ff0084
min-width:2rem;
max-width: 2rem;
}
+.biodata-portrait {
+ min-height: 512px;
+ min-width: 256px;
+}
\ No newline at end of file
diff --git a/system.json b/system.json
index a22bd51..bd3fbff 100644
--- a/system.json
+++ b/system.json
@@ -91,7 +91,7 @@
"styles": [
"styles/simple.css"
],
- "version": "10.0.13",
+ "version": "10.0.14",
"compatibility": {
"minimum": "10",
"verified": "10",
@@ -99,7 +99,7 @@
},
"title": "Hero System v6 for FoundrtVTT (Official)",
"manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/raw/branch/main/system.json",
- "download": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/archive/fvtt-hero-system-6-v10.0.13.zip",
+ "download": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/archive/fvtt-hero-system-6-v10.0.14.zip",
"url": "https://www.uberwald.me/gitea/uberwald/",
"background": "images/ui/hro6_welcome_page.webp",
"id": "fvtt-hero-system-6"
diff --git a/template.json b/template.json
index c80c22a..c1af951 100644
--- a/template.json
+++ b/template.json
@@ -208,7 +208,8 @@
"martialart",
"limitation",
"complication",
- "equipment"
+ "equipment",
+ "currency"
],
"templates": {
"common": {
@@ -238,6 +239,12 @@
"items": {}
}
},
+ "currency": {
+ "quantity": 0,
+ "templates": [
+ "common"
+ ]
+ },
"advantage": {
"templates": [
"common"
diff --git a/templates/actors/actor-sheet.hbs b/templates/actors/actor-sheet.hbs
index 4fd6bd8..2b91dd7 100644
--- a/templates/actors/actor-sheet.hbs
+++ b/templates/actors/actor-sheet.hbs
@@ -6,56 +6,58 @@