Merge pull request #98 from TheLastScrub/jalenml/special-training
Special Training
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
## Release/Patch Notes
|
||||
|
||||
### Version 1.4.0 - TBD
|
||||
|
||||
- Feature [Github #70] - Added ability to track and roll Special Training.
|
||||
- Enhancement - Slight restyle of Skill section of sheet, saving space.
|
||||
|
||||
### Version 1.3.5 - 2023-11-20
|
||||
|
||||
- Working on improving the process for packing a new build, but some things have gone wrong. So no actual changes here, just iterating forward on the build to avoid some issues that cropped up.
|
||||
|
||||
+22
-1
@@ -129,7 +129,7 @@ form.program-style {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
input.breaking-point-hit{
|
||||
input.breaking-point-hit {
|
||||
color: rgb(117, 0, 0);
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -224,6 +224,14 @@ input.breaking-point-hit{
|
||||
.flex-thin-border {
|
||||
border: 1px solid #999;
|
||||
border-radius: 2px;
|
||||
border-left-color: darkslategray;
|
||||
border-left-width: 4px;
|
||||
}
|
||||
|
||||
/* Make sure Special Training boxes are the same height
|
||||
as all other skill boxes */
|
||||
.flex-thin-border.special-training-box {
|
||||
min-height: 27px;
|
||||
}
|
||||
|
||||
.flex-mid-border {
|
||||
@@ -440,6 +448,18 @@ input.breaking-point-hit{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.deltagreen .skill-and-training-controls {
|
||||
flex: 0 0 80px;
|
||||
}
|
||||
|
||||
.deltagreen .action-pill {
|
||||
padding: 2px;
|
||||
border-radius: 2.5px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: bold;
|
||||
background-color: rgba(0, 0, 0, 0.185);
|
||||
}
|
||||
|
||||
a.btn-tiny {
|
||||
height: 26px;
|
||||
margin-left: 5px;
|
||||
@@ -495,6 +515,7 @@ input.percentile-skill-input {
|
||||
flex: 0 0 40px;
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
height: unset;
|
||||
}
|
||||
|
||||
input.checkbox-skill-input {
|
||||
|
||||
+10
-1
@@ -44,7 +44,7 @@
|
||||
"DG.Skills.unarmed_combat": "Unarmed Combat",
|
||||
"DG.Skills.unnatural": "Unnatural",
|
||||
|
||||
"DG.Skills.AddTypedOrCustomSkill": "Add Typed or Custom Skill",
|
||||
"DG.Skills.AddTypedOrCustomSkill": "Add Typed/Custom Skill",
|
||||
"DG.Skills.AddSkill": "Add Skill",
|
||||
"DG.Skills.Apply": "Apply",
|
||||
"DG.Skills.ApplySkillImprovements": "Apply Skill Improvements",
|
||||
@@ -65,6 +65,15 @@
|
||||
"DG.TypeSkills.Science": "Science",
|
||||
"DG.TypeSkills.Other": "Other",
|
||||
|
||||
"DG.SpecialTraining.Dialog.CreateSpecialTraining": "Add Special Training",
|
||||
"DG.SpecialTraining.Dialog.DropDown.CustomSkills": "Custom/Typed Skills",
|
||||
"DG.SpecialTraining.Dialog.DropDown.Skills": "Skills",
|
||||
"DG.SpecialTraining.Dialog.DropDown.Statistics": "Statistics",
|
||||
"DG.SpecialTraining.Dialog.EditSpecialTraining": "Edit Special Training",
|
||||
"DG.SpecialTraining.Dialog.NameLabel": "Name",
|
||||
"DG.SpecialTraining.Dialog.SkillLabel": "Skill or Stat",
|
||||
"DG.SpecialTraining.Dialog.Title": "Create/Edit Special Training",
|
||||
|
||||
"DG.Attributes.HP": "HP",
|
||||
"DG.Attributes.WP": "WP",
|
||||
"DG.Attributes.SAN": "SAN",
|
||||
|
||||
+167
-4
@@ -1,5 +1,6 @@
|
||||
/* globals $ game Roll ChatMessage AudioHelper ActorSheet mergeObject Dialog TextEditor ActiveEffect ui duplicate fromUuidSync */
|
||||
/* globals $ game Roll ChatMessage AudioHelper ActorSheet mergeObject Dialog TextEditor ActiveEffect ui duplicate fromUuidSync renderTemplate randomID */
|
||||
|
||||
import DG from "../config.js";
|
||||
import {
|
||||
DGPercentileRoll,
|
||||
DGLethalityRoll,
|
||||
@@ -17,7 +18,7 @@ export default class DeltaGreenActorSheet extends ActorSheet {
|
||||
classes: ["deltagreen", "sheet", "actor"],
|
||||
template: "systems/deltagreen/templates/actor/actor-sheet.html",
|
||||
width: 700,
|
||||
height: 800,
|
||||
height: 770,
|
||||
tabs: [
|
||||
{
|
||||
navSelector: ".sheet-tabs",
|
||||
@@ -66,6 +67,44 @@ export default class DeltaGreenActorSheet extends ActorSheet {
|
||||
this._prepareCharacterItems(data);
|
||||
}
|
||||
|
||||
// Prepare a simplified version of the special training for display on sheet.
|
||||
if (this.actor.type !== "vehicle") {
|
||||
const specialTraining = this.actor.system.specialTraining.map(
|
||||
(training) => {
|
||||
const simplifiedTraining = {
|
||||
name: training.name,
|
||||
id: training.id,
|
||||
key: training.attribute,
|
||||
};
|
||||
// Convert the machine-readable name to a human-readable one.
|
||||
switch (true) {
|
||||
// Stats
|
||||
case DG.statistics.includes(training.attribute):
|
||||
simplifiedTraining.attribute = training.attribute.toUpperCase();
|
||||
simplifiedTraining.targetNumber =
|
||||
this.actor.system.statistics[training.attribute].value;
|
||||
break;
|
||||
// Skills
|
||||
case DG.skills.includes(training.attribute):
|
||||
simplifiedTraining.attribute =
|
||||
this.actor.system.skills[training.attribute].label;
|
||||
simplifiedTraining.targetNumber =
|
||||
this.actor.system.skills[training.attribute].proficiency;
|
||||
break;
|
||||
// Typed Skills
|
||||
default:
|
||||
simplifiedTraining.attribute =
|
||||
this.actor.system.typedSkills[training.attribute].label;
|
||||
simplifiedTraining.targetNumber =
|
||||
this.actor.system.typedSkills[training.attribute].proficiency;
|
||||
break;
|
||||
}
|
||||
return simplifiedTraining;
|
||||
},
|
||||
);
|
||||
data.specialTraining = specialTraining;
|
||||
}
|
||||
|
||||
switch (this.actor.type) {
|
||||
case "agent":
|
||||
data.enrichedDescription = await TextEditor.enrichHTML(
|
||||
@@ -237,8 +276,8 @@ export default class DeltaGreenActorSheet extends ActorSheet {
|
||||
|
||||
// Rollable abilities - bind to everything with the 'Rollable' class
|
||||
html.find(".rollable").click(this._onRoll.bind(this));
|
||||
html.find('.rollable').contextmenu(this._onRoll.bind(this)); // this is for right-click, which triggers the roll modifier dialogue for most rolls
|
||||
|
||||
html.find(".rollable").contextmenu(this._onRoll.bind(this)); // this is for right-click, which triggers the roll modifier dialogue for most rolls
|
||||
|
||||
html.find(".toggle-untrained").click(() =>
|
||||
this.actor.update({
|
||||
"system.showUntrainedSkills": !this.actor.system.showUntrainedSkills,
|
||||
@@ -304,6 +343,27 @@ export default class DeltaGreenActorSheet extends ActorSheet {
|
||||
this.actor.update({ [`system.typedSkills.-=${targetskill}`]: null });
|
||||
});
|
||||
|
||||
html.find(".special-training-action").click((event) => {
|
||||
event.preventDefault();
|
||||
const action = event.currentTarget.getAttribute("data-action");
|
||||
const targetID = event.currentTarget.getAttribute("data-id");
|
||||
this._showSpecialTrainingDialog(action, targetID);
|
||||
});
|
||||
|
||||
// Handle deletion of Special Training
|
||||
html.find(".special-training-delete").click((event) => {
|
||||
event.preventDefault();
|
||||
const targetID = event.target.getAttribute("data-id");
|
||||
const specialTrainingArray = duplicate(this.actor.system.specialTraining);
|
||||
// Get the index of the training to be deleted
|
||||
const index = specialTrainingArray.findIndex(
|
||||
(training) => training.id === targetID,
|
||||
);
|
||||
|
||||
specialTrainingArray.splice(index, 1);
|
||||
this.actor.update({ "system.specialTraining": specialTrainingArray });
|
||||
});
|
||||
|
||||
html.find(".apply-skill-improvements").click((event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -686,6 +746,107 @@ export default class DeltaGreenActorSheet extends ActorSheet {
|
||||
}
|
||||
}
|
||||
|
||||
async _showSpecialTrainingDialog(action, targetID) {
|
||||
const specialTraining = this.actor.system.specialTraining.find(
|
||||
(training) => training.id === targetID,
|
||||
);
|
||||
|
||||
// Prepare simplified stat list
|
||||
const statList = Object.entries(this.actor.system.statistics).map(
|
||||
([key, stat]) => ({
|
||||
key,
|
||||
label: game.i18n.localize(`DG.Attributes.${key}`),
|
||||
targetNumber: stat.value * 5,
|
||||
}),
|
||||
);
|
||||
|
||||
// Prepare simplified skill list
|
||||
const skillList = Object.entries(this.actor.system.skills).map(
|
||||
([key, skill]) => ({
|
||||
key,
|
||||
label: skill.label,
|
||||
targetNumber: skill.proficiency,
|
||||
}),
|
||||
);
|
||||
|
||||
// Prepare simplified typed/custom skill list
|
||||
const typedSkillList = Object.entries(this.actor.system.typedSkills).map(
|
||||
([key, skill]) => ({
|
||||
key,
|
||||
group: skill.group,
|
||||
label: skill.label,
|
||||
targetNumber: skill.proficiency,
|
||||
}),
|
||||
);
|
||||
|
||||
// Prepare the template to feed to Dialog.
|
||||
const content = await renderTemplate(
|
||||
"systems/deltagreen/templates/dialog/special-training.html",
|
||||
{
|
||||
name: specialTraining?.name || "",
|
||||
currentAttribute: specialTraining?.attribute || "",
|
||||
statList,
|
||||
skillList,
|
||||
typedSkillList,
|
||||
},
|
||||
);
|
||||
|
||||
const buttonLabel = game.i18n.localize(
|
||||
`DG.SpecialTraining.Dialog.${action}SpecialTraining`,
|
||||
);
|
||||
|
||||
// Prepare and render dialog with above template.
|
||||
new Dialog({
|
||||
content,
|
||||
title: game.i18n.localize("DG.SpecialTraining.Dialog.Title"),
|
||||
default: "confirm",
|
||||
buttons: {
|
||||
confirm: {
|
||||
label: buttonLabel,
|
||||
callback: (btn) => {
|
||||
const specialTrainingLabel = btn
|
||||
.find("[name='special-training-label']")
|
||||
.val();
|
||||
const specialTrainingAttribute = btn
|
||||
.find("[name='special-training-skill']")
|
||||
.val();
|
||||
if (action === "Create")
|
||||
this._createSpecialTraining(
|
||||
specialTrainingLabel,
|
||||
specialTrainingAttribute,
|
||||
);
|
||||
if (action === "Edit")
|
||||
this._editSpecialTraining(
|
||||
specialTrainingLabel,
|
||||
specialTrainingAttribute,
|
||||
targetID,
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
}).render(true);
|
||||
}
|
||||
|
||||
_createSpecialTraining(label, attribute) {
|
||||
const specialTrainingArray = duplicate(this.actor.system.specialTraining);
|
||||
specialTrainingArray.push({
|
||||
name: label,
|
||||
attribute,
|
||||
id: randomID(),
|
||||
});
|
||||
this.actor.update({ "system.specialTraining": specialTrainingArray });
|
||||
}
|
||||
|
||||
_editSpecialTraining(label, attribute, id) {
|
||||
const specialTrainingArray = duplicate(this.actor.system.specialTraining);
|
||||
const specialTraining = specialTrainingArray.find(
|
||||
(training) => training.id === id,
|
||||
);
|
||||
specialTraining.name = label;
|
||||
specialTraining.attribute = attribute;
|
||||
this.actor.update({ "system.specialTraining": specialTrainingArray });
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset
|
||||
* @param {Event} event The originating click event
|
||||
@@ -750,6 +911,7 @@ export default class DeltaGreenActorSheet extends ActorSheet {
|
||||
rollType: dataset.rolltype,
|
||||
key: dataset.key,
|
||||
actor: this.actor,
|
||||
specialTrainingName: dataset?.name || null, // Only applies to Special Training Rolls
|
||||
item,
|
||||
};
|
||||
|
||||
@@ -759,6 +921,7 @@ export default class DeltaGreenActorSheet extends ActorSheet {
|
||||
case "stat":
|
||||
case "skill":
|
||||
case "sanity":
|
||||
case "special-training":
|
||||
case "weapon":
|
||||
roll = new DGPercentileRoll("1D100", {}, rollOptions);
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* In config.js we can create constants that may be used all around the code base.
|
||||
* I tried to get some of these values from `game.system` but it seems they
|
||||
* aren't loaded yet when this is called. Oh well, this shouldn't really ever
|
||||
* change.
|
||||
*/
|
||||
|
||||
const DG = {
|
||||
// All the base skills
|
||||
skills: [
|
||||
"accounting",
|
||||
"alertness",
|
||||
"anthropology",
|
||||
"archeology",
|
||||
"artillery",
|
||||
"athletics",
|
||||
"bureaucracy",
|
||||
"computer_science",
|
||||
"criminology",
|
||||
"demolitions",
|
||||
"disguise",
|
||||
"dodge",
|
||||
"drive",
|
||||
"firearms",
|
||||
"first_aid",
|
||||
"forensics",
|
||||
"heavy_machiner",
|
||||
"heavy_weapons",
|
||||
"history",
|
||||
"humint",
|
||||
"law",
|
||||
"medicine",
|
||||
"melee_weapons",
|
||||
"navigate",
|
||||
"occult",
|
||||
"persuade",
|
||||
"pharmacy",
|
||||
"psychotherapy",
|
||||
"ride",
|
||||
"search",
|
||||
"sigint",
|
||||
"stealth",
|
||||
"surgery",
|
||||
"survival",
|
||||
"swim",
|
||||
"unarmed_combat",
|
||||
"unnatural",
|
||||
"ritual",
|
||||
],
|
||||
|
||||
// All the base rollable stats.
|
||||
statistics: ["str", "con", "dex", "int", "pow", "cha"],
|
||||
};
|
||||
|
||||
export default DG;
|
||||
+59
-36
@@ -72,51 +72,38 @@ export class DGPercentileRoll extends DGRoll {
|
||||
* @param {String} [options.key] The key of the skill, stat, etc. to use as a basis for this roll.
|
||||
* @param {DeltaGreenActor} [options.actor] The actor that this roll originates from.
|
||||
* @param {DeltaGreenItem} [options.item] Optional - The item from which the roll originates.
|
||||
* @param {DeltaGreenItem} [options.specialTrainingName] Optional - Special training rolls have names that are different from the roll key.
|
||||
*/
|
||||
constructor(formula = "1D100", data = {}, options) {
|
||||
super("1D100", {}, options);
|
||||
|
||||
const skillKeys = Object.keys(this.actor.system.skills);
|
||||
const typedSkillKeys = Object.keys(this.actor.system.typedSkills);
|
||||
const statKeys = Object.keys(this.actor.system.statistics);
|
||||
// Set roll info for Skill, Stat, Typed Skill, and non-custom Weapon Percentile rolls.
|
||||
const { target, localizedKey } = this.getRollInfoFromKey(
|
||||
this.key,
|
||||
this.actor.system,
|
||||
);
|
||||
this.target = target;
|
||||
this.localizedKey = localizedKey;
|
||||
|
||||
// Set roll info for other Percentile rolls
|
||||
switch (this.type) {
|
||||
case "stat":
|
||||
this.target = this.actor.system.statistics[this.key].x5;
|
||||
this.localizedKey = game.i18n.localize(`DG.Attributes.${this.key}`);
|
||||
case "special-training":
|
||||
this.specialTrainingName = options.specialTrainingName;
|
||||
this.localizedKey = `${this.specialTrainingName} - (${this.localizedKey})`;
|
||||
break;
|
||||
case "skill":
|
||||
// Set up a target number and localized roll based on whether the skill is regular or typed.
|
||||
if (skillKeys.includes(this.key)) {
|
||||
this.target = this.actor.system.skills[this.key].proficiency;
|
||||
this.localizedKey = game.i18n.localize(`DG.Skills.${this.key}`);
|
||||
}
|
||||
if (typedSkillKeys.includes(this.key)) {
|
||||
const skill = this.actor.system.typedSkills[this.key];
|
||||
this.target = skill.proficiency;
|
||||
this.localizedKey = `${skill.group} (${skill.label})`;
|
||||
case "weapon":
|
||||
// If this weapon uses a custom target for rolls, we set that explicitly.
|
||||
if (this.key === "custom") {
|
||||
this.target = this.item.system.customSkillTarget;
|
||||
this.localizedKey = game.i18n.localize("DG.ItemWindow.Custom");
|
||||
}
|
||||
// Add a the weapon's internal modifier.
|
||||
this.modifier += this.item.system.skillModifier;
|
||||
break;
|
||||
case "sanity":
|
||||
this.target = this.actor.system.sanity.value;
|
||||
this.localizedKey = game.i18n.localize("DG.Attributes.SAN");
|
||||
break;
|
||||
case "weapon":
|
||||
// Set up target number and localized key depending on whether the weapon uses a custom number,
|
||||
// a skill, or a stat for its roll.
|
||||
if (this.key === "custom") {
|
||||
this.target = this.item.system.customSkillTarget;
|
||||
this.localizedKey = game.i18n.localize("DG.ItemWindow.Custom");
|
||||
} else if (skillKeys.includes(this.key)) {
|
||||
this.target = this.actor.system.skills[this.key].proficiency;
|
||||
this.localizedKey = game.i18n.localize(`DG.Skills.${this.key}`);
|
||||
} else if (statKeys.includes(this.key)) {
|
||||
this.target = this.actor.system.statistics[this.key].x5;
|
||||
this.localizedKey = game.i18n.localize(`DG.Attributes.${this.key}`);
|
||||
}
|
||||
// Add a the weapon's internal modifier.
|
||||
this.modifier += this.item.system.skillModifier;
|
||||
break;
|
||||
case "luck":
|
||||
this.target = 50;
|
||||
this.localizedKey = game.i18n.localize("DG.Luck");
|
||||
@@ -291,6 +278,39 @@ export class DGPercentileRoll extends DGRoll {
|
||||
return this.createMessage(html, label, rollMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function, called in the DGPercentileRoll constructor.
|
||||
* If this roll key corresponds to a stat, skill,
|
||||
* or typedSkill, get pertinent info.
|
||||
*
|
||||
* This is used for Stat, Skill, Typed Skill, Weapon, and Special Training Rolls.
|
||||
*
|
||||
* @returns {Object} - Contains the roll target and localized version of the key.
|
||||
*/
|
||||
getRollInfoFromKey() {
|
||||
const actorData = this.actor.system;
|
||||
const skillKeys = Object.keys(actorData.skills);
|
||||
const typedSkillKeys = Object.keys(actorData.typedSkills);
|
||||
const statKeys = Object.keys(actorData.statistics);
|
||||
|
||||
let target = null;
|
||||
let localizedKey = null;
|
||||
if (statKeys.includes(this.key)) {
|
||||
target = actorData.statistics[this.key].x5;
|
||||
localizedKey = game.i18n.localize(`DG.Attributes.${this.key}`);
|
||||
}
|
||||
if (skillKeys.includes(this.key)) {
|
||||
target = actorData.skills[this.key].proficiency;
|
||||
localizedKey = game.i18n.localize(`DG.Skills.${this.key}`);
|
||||
}
|
||||
if (typedSkillKeys.includes(this.key)) {
|
||||
const skill = actorData.typedSkills[this.key];
|
||||
target = skill.proficiency;
|
||||
localizedKey = `${skill.group} (${skill.label})`;
|
||||
}
|
||||
return { target, localizedKey };
|
||||
}
|
||||
|
||||
/**
|
||||
* "Inhuman" stat being rolled, logic is different per page 188 of the Handler's Guide.
|
||||
* Note - originally implemented by Uriele, but my attempt at merging conficts went poorly, so re-implementing.
|
||||
@@ -504,10 +524,13 @@ export class DGDamageRoll extends DGRoll {
|
||||
this.options.rollMode || game.settings.get("core", "rollMode");
|
||||
let label = this.formula;
|
||||
try {
|
||||
label = `${game.i18n.localize("DG.Roll.Rolling",)} <b>${game.i18n.localize("DG.Roll.Damage").
|
||||
toUpperCase()}</b> ${game.i18n.localize("DG.Roll.For",)} ${this.item.name}`;
|
||||
} catch(ex) {
|
||||
//console.log(ex);
|
||||
label = `${game.i18n.localize("DG.Roll.Rolling")} <b>${game.i18n
|
||||
.localize("DG.Roll.Damage")
|
||||
.toUpperCase()}</b> ${game.i18n.localize("DG.Roll.For")} ${
|
||||
this.item.name
|
||||
}`;
|
||||
} catch (ex) {
|
||||
// console.log(ex);
|
||||
label = `Rolling <b>DAMAGE</b> for <b>${label.toUpperCase()}</b>`;
|
||||
}
|
||||
return this.createMessage(this.total, label, rollMode);
|
||||
|
||||
@@ -12,6 +12,7 @@ export default async function preloadHandlebarsTemplates() {
|
||||
"systems/deltagreen/templates/actor/unnatural-sheet.html",
|
||||
"systems/deltagreen/templates/actor/npc-sheet.html",
|
||||
"systems/deltagreen/templates/actor/cv-partial.html",
|
||||
"systems/deltagreen/templates/actor/custom-skills-partial.html",
|
||||
"systems/deltagreen/templates/dialog/modify-percentile-roll.html",
|
||||
"systems/deltagreen/templates/actor/vehicle-sheet.html",
|
||||
"systems/deltagreen/templates/actor/help-and-licensing-partial.html",
|
||||
|
||||
+4
-2
@@ -234,7 +234,8 @@
|
||||
"proficiency": 0,
|
||||
"failure": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"specialTraining": []
|
||||
},
|
||||
"unnatural_skills": {
|
||||
"skills": {
|
||||
@@ -423,7 +424,8 @@
|
||||
"proficiency": 0
|
||||
}
|
||||
},
|
||||
"typedSkills": {}
|
||||
"typedSkills": {},
|
||||
"specialTraining": []
|
||||
}
|
||||
},
|
||||
"unnatural": {
|
||||
|
||||
@@ -112,14 +112,14 @@
|
||||
|
||||
{{#if (keepSanityPrivate)}}
|
||||
<input class="percentile-skill-input" type="text" name="system.skills.{{key}}.proficiency" value="??" data-dtype="Number" {{#if skill.isCalculatedValue}} disabled {{/if}}/>
|
||||
<input type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
|
||||
<input class="checkbox-skill-input" type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
|
||||
title="{{localize 'DG.Tooltip.SkillFailCheckbox'}}"
|
||||
/>
|
||||
{{/if}}
|
||||
|
||||
{{#unless (keepSanityPrivate)}}
|
||||
<input class="percentile-skill-input" type="text" name="system.skills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number" {{#if skill.isCalculatedValue}} disabled {{/if}}/>
|
||||
<input type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
|
||||
<input class="checkbox-skill-input" type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
|
||||
title="{{localize 'DG.Tooltip.SkillFailCheckbox'}}"
|
||||
/>
|
||||
{{/unless}}
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
{{#if_not_eq key 'ritual' }}
|
||||
<input class="percentile-skill-input" type="text" name="system.skills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number" {{#if skill.isCalculatedValue}} disabled {{/if}}/>
|
||||
<input type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
|
||||
<input class="checkbox-skill-input" type="checkbox" name="system.skills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}}
|
||||
title="{{localize 'DG.Tooltip.SkillFailCheckbox'}}"
|
||||
/>
|
||||
{{/if_not_eq}}
|
||||
@@ -137,29 +137,9 @@
|
||||
{{/each}}
|
||||
</div>
|
||||
|
||||
{{!-- Custom Skills and Special Training --}}
|
||||
<div>
|
||||
<div class="item-controls skill-util-buttons">
|
||||
<a class="item-control typed-skill-add"><i class="fas fa-plus"></i>{{localize 'DG.Skills.AddTypedOrCustomSkill'}}</a>
|
||||
<a class="item-control apply-skill-improvements">{{localize 'DG.Skills.ApplySkillImprovements'}}<i class="fas fa-plus"></i></a>
|
||||
</div>
|
||||
<div class="grid-2col">
|
||||
{{#each actor.system.typedSkills as |skill key|}}
|
||||
<div class="item flexrow flex-group-center flex-thin-border">
|
||||
<label class="{{if_gt skill.proficiency 0 'rollable' 'not-rollable'}} skill-label" data-key="{{key}}" data-rolltype="skill" data-roll="d100" data-target="{{skill.proficiency}}" data-label="{{skill.label}}"
|
||||
{{#if skill.proficiency}}title="{{localize 'DG.Tooltip.SkillLabel'}}"{{/if}}
|
||||
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
|
||||
>
|
||||
{{skill.group}} ({{skill.label}})
|
||||
</label>
|
||||
<input class="percentile-skill-input" type="text" name="system.typedSkills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number"/>
|
||||
<input type="checkbox" name="system.typedSkills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}} />
|
||||
<div class="item-controls">
|
||||
<a class="item-control typed-skill-edit" title="Edit Skill"><i class="fas fa-edit" data-typedskill="{{key}}" ></i></a>
|
||||
<a class="item-control typed-skill-delete" title="Delete Skill"><i class="fas fa-trash" data-typedskill="{{key}}" ></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{> "systems/deltagreen/templates/actor/custom-skills-partial.html" actorType="agent"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -263,7 +243,7 @@
|
||||
<div class="item-name">{{localize 'DG.Mental.Motivations'}}</div>
|
||||
<div class="item-name">{{localize 'DG.Mental.Disorders'}}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="motivation"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="motivation"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -311,7 +291,7 @@
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.DamageOrLethality'}}</span>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.ArmorPiercing'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -381,7 +361,7 @@
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -425,7 +405,7 @@
|
||||
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -484,7 +464,7 @@
|
||||
<div class="item-name">{{localize 'DG.Bonds.Relationship'}}</div>
|
||||
<div class="item-name">{{localize 'DG.Bonds.Score'}}</div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="bond"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="bond"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<div class="item-controls skill-util-buttons">
|
||||
<a class="item-control typed-skill-add action-pill"><i class="fas fa-plus"></i>{{localize 'DG.Skills.AddTypedOrCustomSkill'}}</a>
|
||||
<a class="item-control special-training-action action-pill" data-action="Create"><i class="fas fa-plus"></i>{{localize 'Add Special Training'}}</a>
|
||||
{{#if_eq actorType "agent"}}
|
||||
<a class="item-control apply-skill-improvements action-pill">{{localize 'DG.Skills.ApplySkillImprovements'}}<i class="fas fa-dice"></i></a>
|
||||
{{/if_eq}}
|
||||
</div>
|
||||
<div class="grid-2col">
|
||||
{{#each actor.system.typedSkills as |skill key|}}
|
||||
<div class="item flexrow flex-group-center flex-thin-border">
|
||||
<div class="flexrow">
|
||||
<label class="{{if_gt skill.proficiency 0 'rollable' 'not-rollable'}} skill-label" data-key="{{key}}" data-rolltype="skill" data-roll="d100" data-target="{{skill.proficiency}}" data-label="{{skill.label}}"
|
||||
{{#if skill.proficiency}}title="{{localize 'DG.Tooltip.SkillLabel'}}"{{/if}}
|
||||
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
|
||||
>
|
||||
{{skill.group}} ({{skill.label}})
|
||||
</label>
|
||||
<input class="percentile-skill-input" type="text" name="system.typedSkills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number"/>
|
||||
{{#if_eq actorType "agent"}}
|
||||
<input class="checkbox-skill-input" type="checkbox" name="system.typedSkills.{{key}}.failure" {{checked skill.failure}} data-dtype="Boolean" {{#if skill.cannotBeImprovedByFailure}} disabled {{/if}} />
|
||||
{{/if_eq}}
|
||||
</div>
|
||||
<div class="item-controls skill-and-training-controls">
|
||||
<a class="item-control typed-skill-edit" title="Edit Skill"><i class="fas fa-edit" data-typedskill="{{key}}" ></i></a>
|
||||
<a class="item-control typed-skill-delete" title="Delete Skill"><i class="fas fa-trash" data-typedskill="{{key}}" ></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#each specialTraining as |training|}}
|
||||
<div class="item flexrow flex-group-center flex-thin-border special-training-box">
|
||||
<label class="{{if_gt training.targetNumber 0 'rollable' 'not-rollable'}}" data-key="{{training.key}}" data-name="{{training.name}}" data-rolltype="special-training">
|
||||
{{training.name}} ({{training.attribute}} - {{training.targetNumber}})
|
||||
</label>
|
||||
<div class="item-controls skill-and-training-controls">
|
||||
<a class="item-control special-training-action" data-action="Edit" data-id="{{training.id}}" title="Edit Training"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control special-training-delete" title="Delete Training" data-id="{{training.id}}" ><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
@@ -128,29 +128,7 @@
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control typed-skill-add"><i class="fas fa-plus"></i>{{localize 'DG.Skills.AddTypedOrCustomSkill'}}</a>
|
||||
</div>
|
||||
<div class="grid-2col">
|
||||
{{#each actor.system.typedSkills as |skill key|}}
|
||||
{{#if (hideSkillBasedOnProficiencyAndUserChoice ../actor.system.showUntrainedSkills skill.proficiency)}}
|
||||
<div class="item flexrow flex-group-center flex-thin-border">
|
||||
<label class="{{if_gt skill.proficiency 0 'rollable' 'not-rollable'}} skill-label" data-rolltype="skill" data-roll="d100" data-target="{{skill.proficiency}}" data-key="{{key}}"
|
||||
{{#if skill.proficiency}}title="{{localize 'DG.Tooltip.SkillLabel'}}"{{/if}}
|
||||
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
|
||||
>
|
||||
{{skill.group}} ({{skill.label}})
|
||||
</label>
|
||||
<input class="percentile-skill-input" type="text" name="system.typedSkills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number"/>
|
||||
|
||||
<div class="item-controls">
|
||||
<a class="item-control typed-skill-edit" title="Edit Skill"><i class="fas fa-edit" data-typedskill="{{key}}" ></i></a>
|
||||
<a class="item-control typed-skill-delete" title="Delete Skill"><i class="fas fa-trash" data-typedskill="{{key}}" ></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{> "systems/deltagreen/templates/actor/custom-skills-partial.html"}}
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
@@ -180,7 +158,7 @@
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.DamageOrLethality'}}</span>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.ArmorPiercing'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -250,7 +228,7 @@
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -294,7 +272,7 @@
|
||||
<div class="item-name"></div>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -121,29 +121,7 @@
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<div class="item-controls">
|
||||
<a class="item-control typed-skill-add"><i class="fas fa-plus"></i>{{localize 'DG.Skills.AddTypedOrCustomSkill'}}</a>
|
||||
</div>
|
||||
<div class="grid-2col">
|
||||
{{#each actor.system.typedSkills as |skill key|}}
|
||||
{{#if (hideSkillBasedOnProficiencyAndUserChoice ../actor.system.showUntrainedSkills skill.proficiency)}}
|
||||
<div class="item flexrow flex-group-center flex-thin-border">
|
||||
<label class="{{if_gt skill.proficiency 0 'rollable' 'not-rollable'}} skill-label" data-rolltype="skill" data-key="{{key}}"
|
||||
{{#if skill.proficiency}}title="{{localize 'DG.Tooltip.SkillLabel'}}"{{/if}}
|
||||
{{#unless skill.proficiency}}title="{{localize 'DG.Tooltip.CannotRollSkillLabel'}}"{{/unless}}
|
||||
>
|
||||
{{skill.group}} ({{skill.label}})
|
||||
</label>
|
||||
<input class="percentile-skill-input" type="text" name="system.typedSkills.{{key}}.proficiency" value="{{skill.proficiency}}" data-dtype="Number"/>
|
||||
|
||||
<div class="item-controls">
|
||||
<a class="item-control typed-skill-edit" title="Edit Skill"><i class="fas fa-edit" data-typedskill="{{key}}" ></i></a>
|
||||
<a class="item-control typed-skill-delete" title="Delete Skill"><i class="fas fa-trash" data-typedskill="{{key}}" ></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{> "systems/deltagreen/templates/actor/custom-skills-partial.html"}}
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
@@ -173,7 +151,7 @@
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.DamageOrLethality'}}</span>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.ArmorPiercing'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="weapon"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -242,7 +220,7 @@
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -286,7 +264,7 @@
|
||||
<div class="item-name"></div>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.ArmorRating'}}</span>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="armor"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
<div class="item-name"></div>
|
||||
<span class="centered-item-property">{{localize 'DG.Gear.Equipped'}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
<a class="item-control item-create action-pill" title="Create item" data-type="gear"><i class="fas fa-plus"></i> {{localize 'DG.Generic.AddButtonLabel'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<form class="flexcol">
|
||||
<div class="flexrow">
|
||||
<label>
|
||||
{{localize "DG.SpecialTraining.Dialog.NameLabel"}}
|
||||
</label>
|
||||
<input type="text" name="special-training-label" value="{{name}}"/>
|
||||
</div>
|
||||
<div class="flexrow">
|
||||
<label>
|
||||
{{localize "DG.SpecialTraining.Dialog.SkillLabel"}}
|
||||
</label>
|
||||
{{#select currentAttribute}}
|
||||
<select name="special-training-skill">
|
||||
<optgroup label="{{localize "DG.SpecialTraining.Dialog.DropDown.Statistics"}}">
|
||||
{{#each statList as |stat|}}
|
||||
<option value="{{stat.key}}" data-type="stat">
|
||||
{{stat.label}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
<optgroup label="{{localize "DG.SpecialTraining.Dialog.DropDown.Skills"}}">
|
||||
{{#each skillList as |skill|}}
|
||||
<option value="{{skill.key}}" data-type="skill">
|
||||
{{skill.label}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
<optgroup label="{{localize "DG.SpecialTraining.Dialog.DropDown.CustomSkills"}}">
|
||||
{{#each typedSkillList as |skill|}}
|
||||
<option value="{{skill.key}}" data-type="typedSkill">
|
||||
{{skill.group}} ({{skill.label}})
|
||||
</option>
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
</select>
|
||||
{{/select}}
|
||||
</div>
|
||||
</form>
|
||||
Reference in New Issue
Block a user