From b4091f2211d4feb357f43d0983c2f04b75b5ad63 Mon Sep 17 00:00:00 2001
From: seregrauko <64831679+seregrauko@users.noreply.github.com>
Date: Mon, 12 Dec 2022 05:52:33 +0000
Subject: [PATCH] [Level Up - Advanced 5th Edition] - Bug fix and additional
feature
**2022-12-12 ** v.18 Paul V
Added Hit Dice Roller - maxes out the number of dice to roll as the current hit dice and reduces the HD by the number of dice rolled - also adds the result to current HP with a maximum of the HP max
Added Generic Initiative Bonus
Fixed Hit Point Maximum's attribute label it should have been HP_Max
Added Death Save roll button that Automatically checks the Success or Failure boxes.
Added Str, Dex, Int, Wis, Con, Cha settings windows to store save prof, indivudial save bonus and global save bonus
Recoded the Save buttons to use the new tech and the new global and individual bonuses
Added the Ability to whispher the GM rolls
Added Maneuver settings to add in Maneuver DC Bonus and Exertion point bonus, also added in current exertion points freely edited field
---
Level Up - Advanced 5th Edition/CHANGELOG.md | 9 +
Level Up - Advanced 5th Edition/levelup.css | 54 +-
Level Up - Advanced 5th Edition/levelup.html | 841 ++++++++++--------
.../translation.json | 15 +-
4 files changed, 552 insertions(+), 367 deletions(-)
diff --git a/Level Up - Advanced 5th Edition/CHANGELOG.md b/Level Up - Advanced 5th Edition/CHANGELOG.md
index 252e3da09f..3274cac52d 100644
--- a/Level Up - Advanced 5th Edition/CHANGELOG.md
+++ b/Level Up - Advanced 5th Edition/CHANGELOG.md
@@ -1,5 +1,14 @@
Change Log
==============================================
+**2022-12-12 ** v.18 Paul V
+ Added Hit Dice Roller - maxes out the number of dice to roll as the current hit dice and reduces the HD by the number of dice rolled - also adds the result to current HP with a maximum of the HP max
+ Added Generic Initiative Bonus
+ Fixed Hit Point Maximum's attribute label it should have been HP_Max
+ Added Death Save roll button that Automatically checks the Success or Failure boxes.
+ Added Str, Dex, Int, Wis, Con, Cha settings windows to store save prof, indivudial save bonus and global save bonus
+ Recoded the Save buttons to use the new tech and the new global and individual bonuses
+ Added the Ability to whispher the GM rolls
+ Added Maneuver settings to add in Maneuver DC Bonus and Exertion point bonus, also added in current exertion points freely edited field
**2022-12-05 ** v.17 Paul V
Fixed issue with NPC Skill and Attack rolls - converted the rolls to use the new Action button tech
Added Initative roll to NPC Sheet
diff --git a/Level Up - Advanced 5th Edition/levelup.css b/Level Up - Advanced 5th Edition/levelup.css
index 996ba75ef1..e6dbb5c4a3 100644
--- a/Level Up - Advanced 5th Edition/levelup.css
+++ b/Level Up - Advanced 5th Edition/levelup.css
@@ -992,7 +992,7 @@ div.sheet-miscscores {
width: 100%;
height: 100%;
margin: 5px;
- grid-column: 1 / span 16;
+ grid-column: 1 / span 8;
grid-row: 1;
}
div.sheet-display-initiative label[data-i18n-title="initiative"] > span {
@@ -1000,12 +1000,19 @@ div.sheet-miscscores {
text-align: center;
font-size: 1.1em;
}
+ div.sheet-display-initiative label[data-i18n-title="initiative"] > input {
+ border: none;
+ text-align: right;
+ font-size: 1em;
+ width: 30px !important;
+ height: 20px !important;
+ }
div.sheet-display-initiative label[data-i18n-title="initiativeroll"] {
border: none;
width: 100%;
height: 100%;
margin: 5px;
- grid-column: 5 ;
+ grid-column: 7 ;
grid-row: 1;
}
div.sheet-display-initiative label[data-i18n-title="initiative2nd"] {
@@ -1013,7 +1020,7 @@ div.sheet-miscscores {
width: 100%;
height: auto;
grid-row: 2;
- grid-column: 1 / span 6;
+ grid-column: 1 / span 8;
}
div.sheet-display-initiative label[data-i18n-title="initiative2nd"] > select {
border: none;
@@ -1201,8 +1208,8 @@ div.sheet-miscscores {
display: flex;
height: 16%;
width: 100%;
- gap: 1px 1px 1px 1px;
-/* margin: 1pt 1pt 3pt 1pt !important;*/
+/* gap: 1px 1px 1px 1px;
+ margin: 1pt 1pt 3pt 1pt !important;*/
text-align: center !important;
}
div.sheet-display-hd {
@@ -1226,13 +1233,10 @@ div.sheet-miscscores {
grid-column: 1 / span 7;
}
div.sheet-display-hd label[data-i18n-title="hit_dice"] > button {
-
- }
- div.sheet-display-hd label[data-i18n-title="hit_dice"] > span {
- border: none;
text-align: center !important;
- font-family:Times,serif;
- font-size: 1em;
+ font-family:Times,serif !important;
+ font-size: 0.9em !important;
+ font-weight: bold;
}
div.sheet-display-hd label[data-i18n-title="hit_dice"] > input {
border: none;
@@ -1343,14 +1347,15 @@ div.sheet-miscscores {
border: none;
width: 100%;
grid-row: 1;
- grid-column: 6 / span 12;
+ grid-column: 4 / span 12;
margin: 0px;
}
- div.sheet-display-death_saves label[data-i18n-title="death_saves"] > span {
+ div.sheet-display-death_saves label[data-i18n-title="death_saves"] > button {
+ text-align: center !important;
+ font-family:Times,serif !important;
+ font-size: 1em !important;
+ font-weight: bold;
border: none;
- text-align: center;
- font-family:Times,serif;
- font-size: 1em;
}
div.sheet-display-death_saves label[data-i18n-title="death_saves_success"] {
border: none;
@@ -3082,21 +3087,23 @@ div.sheet-combatmaneuvers {
border-radius: 10pt;
display: grid;
grid-template-rows: repeat(6,minmax(0,1fr));
- grid-template-columns: minmax(0,1fr);
+ grid-template-columns: repeat(2,minmax(0,1fr));
}
div.sheet-combatmaneuvers label[data-i18n-title="exertion_points"] > span[data-i18n="exertion_points"] {
text-align: center;
font-family:Times,serif;
font-size: 1em;
grid-row: 1;
+ grid-column: 1 / span 2;
}
div.sheet-combatmaneuvers label[data-i18n-title="exertion_points"] > span[data-i18n="exertion_form"] {
text-align: center;
font-family:Times,serif;
font-size: 0.7em;
grid-row: 2;
+ grid-column: 1 / span 2;
}
- div.sheet-combatmaneuvers label[data-i18n-title="exertion_points"] > input {
+ div.sheet-combatmaneuvers label[data-i18n-title="exertion_points"] > input[data-i18n-placeholder="exertion_points"] {
text-align: center;
font-family:Times,serif;
font-size: 1em;
@@ -3104,6 +3111,17 @@ div.sheet-combatmaneuvers {
grid-row: 3 / span 3;
width: 100%;
min-width: 100%;
+ grid-column: 2;
+ }
+ div.sheet-combatmaneuvers label[data-i18n-title="exertion_points"] > input[data-i18n-placeholder="current_exertion_points"] {
+ text-align: center;
+ font-family:Times,serif;
+ font-size: 1em;
+ border: none;
+ grid-row: 3 / span 3;
+ width: 100%;
+ min-width: 100%;
+ grid-column: 1;
}
div.sheet-combatmaneuvers label[data-i18n-title="maneuver"] {
width: 100%;
diff --git a/Level Up - Advanced 5th Edition/levelup.html b/Level Up - Advanced 5th Edition/levelup.html
index 37cf32f896..287221a367 100644
--- a/Level Up - Advanced 5th Edition/levelup.html
+++ b/Level Up - Advanced 5th Edition/levelup.html
@@ -289,7 +289,13 @@
-
+
+
+
+
+
+
+
@@ -424,16 +430,31 @@
-
+
+
+
save
-
- prof
+ y
+
@@ -573,6 +669,11 @@
initiative
+
+
+
+ bonus
+
@@ -631,12 +732,9 @@
- death_saves
+ death_saves
+
+
successes
@@ -1899,8 +1999,24 @@
exertion_points
exertion_form
-
+
+
+
+ y
+
+
maneuver
@@ -3715,7 +3831,14 @@ on("sheet:opened change:character_name", function(eventInfo) {
attrsToChange["misc1-action"] = "%{" + v["character_name"] + "|misc1-button}";
attrsToChange["misc2-action"] = "%{" + v["character_name"] + "|misc2-button}";
attrsToChange["initiative-action"] = "%{" + v["character_name"] + "|initiative-button}";
- attrsToChange["hit-dice-action"] = "%{" + v["character_name"] + "|hit-dice-button}";
+ attrsToChange["hitdice-action"] = "%{" + v["character_name"] + "|hitdice-button}";
+ attrsToChange["deathsave-action"] = "%{" + v["character_name"] + "|deathsave-button}";
+ attrsToChange["strengthsave-action"] = "%{" + v["character_name"] + "|strengthsave-button}";
+ attrsToChange["dexteritysave-action"] = "%{" + v["character_name"] + "|dexteritysave-button}";
+ attrsToChange["constitutionsave-action"] = "%{" + v["character_name"] + "|constitutionsave-button}";
+ attrsToChange["intelligencesave-action"] = "%{" + v["character_name"] + "|intelligencesave-button}";
+ attrsToChange["wisdomsave-action"] = "%{" + v["character_name"] + "|wisdomsave-button}";
+ attrsToChange["charismasave-action"] = "%{" + v["character_name"] + "|charismasave-button}";
setAttrs(attrsToChange);
});
});
@@ -3820,22 +3943,12 @@ on("sheet:opened change:character_name", function(eventInfo) {
});
});
});
- on("change:strength change:PB change:strength_save_prof change:rolladvdis sheet:opened", function () {
- getAttrs(["strength","strength_save_prof","PB","rolladvdis"], function (values) {
+ on("change:strength change:PB change:strength_save_prof sheet:opened", function () {
+ getAttrs(["strength","strength_save_prof","PB"], function (values) {
const strength = parseInt(values['strength'], 10)||0;
const prof = parseInt(values['PB'])||0;
var saveprof = values["strength_save_prof"]||0;
const modifier = Math.floor(strength/2) -5;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
-
- var setroll = "&{template:default} {{name=Strength Check}}{{check=[["+diceroll+"+"+modifier+"]]}}";
var savemod = modifier;
if (saveprof == 1) {
savemod = savemod + prof;
@@ -3843,57 +3956,32 @@ on("sheet:opened change:character_name", function(eventInfo) {
setAttrs({
strength_mod: modifier,
strength_save_mod: savemod,
- strengthroll: setroll,
});
});
});
- on("change:dexterity change:PB change:dexterity_save_prof change:rolladvdis sheet:opened", function () {
- getAttrs(["dexterity","dexterity_save_prof","PB","rolladvdis"], function (values) {
+ on("change:dexterity change:PB change:dexterity_save_prof sheet:opened", function () {
+ getAttrs(["dexterity","dexterity_save_prof","PB"], function (values) {
const dexterity = parseInt(values['dexterity'], 10)||0;
const prof = parseInt(values['PB'])||0;
var saveprof = values["dexterity_save_prof"]||0;
const modifier = Math.floor(dexterity/2) -5;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
-
- var setroll = "&{template:default} {{name=Dexterity Check}}{{check=[["+diceroll+"+"+modifier+"]]}}";
var savemod = modifier;
if (saveprof == 1) {
savemod = savemod + prof;
};
-
- var setinit = "&{template:default} !{{name=Dexterity Initiative}}{{roll=[["+diceroll+"+"+modifier+" &{tracker}]]}}" ;
setAttrs({
dexterity_mod: modifier,
dexterity_save_mod: savemod,
- dexterityroll: setroll,
- dexterity_init: setinit,
});
});
});
- on("change:constitution change:PB change:constitution_save_prof change:rolladvdis sheet:opened", function () {
- getAttrs(["constitution","constitution_save_prof","PB","rolladvdis"], function (values) {
+ on("change:constitution change:PB change:constitution_save_prof sheet:opened", function () {
+ getAttrs(["constitution","constitution_save_prof","PB"], function (values) {
const constitution = parseInt(values['constitution'], 10)||0;
const prof = parseInt(values['PB'])||0;
var saveprof = values["constitution_save_prof"]||0;
const modifier = Math.floor(constitution/2) -5;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
-
- var setroll = "&{template:default} {{name=Constitution Check}}{{check=[["+diceroll+"+"+modifier+"]]}}";
var savemod = modifier;
if (saveprof == 1) {
savemod = savemod + prof;
@@ -3901,26 +3989,15 @@ on("sheet:opened change:character_name", function(eventInfo) {
setAttrs({
constitution_mod: modifier,
constitution_save_mod: savemod,
- constitutionroll: setroll,
});
});
});
- on("change:intelligence change:PB change:intelligence_save_prof change:rolladvdis sheet:opened", function () {
- getAttrs(["intelligence","intelligence_save_prof","PB","rolladvdis"], function (values) {
+ on("change:intelligence change:PB change:intelligence_save_prof sheet:opened", function () {
+ getAttrs(["intelligence","intelligence_save_prof","PB"], function (values) {
const intelligence = parseInt(values['intelligence'], 10)||0;
const prof = parseInt(values['PB'])||0;
var saveprof = values["intelligence_save_prof"]||0;
const modifier = Math.floor(intelligence/2) -5;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
-
- var setroll = "&{template:default} {{name=Intelligence Check}}{{check=[["+diceroll+"+"+modifier+"]]}}";
var savemod = modifier;
if (saveprof == 1) {
savemod = savemod + prof;
@@ -3928,26 +4005,15 @@ on("sheet:opened change:character_name", function(eventInfo) {
setAttrs({
intelligence_mod: modifier,
intelligence_save_mod: savemod,
- intelligenceroll: setroll,
});
});
});
- on("change:wisdom change:PB change:wisdom_save_prof change:rolladvdis sheet:opened", function () {
- getAttrs(["wisdom","wisdom_save_prof","PB","rolladvdis"], function (values) {
+ on("change:wisdom change:PB change:wisdom_save_prof sheet:opened", function () {
+ getAttrs(["wisdom","wisdom_save_prof","PB"], function (values) {
const wisdom = parseInt(values['wisdom'], 10)||0;
const prof = parseInt(values['PB'])||0;
var saveprof = values["wisdom_save_prof"]||0;
const modifier = Math.floor(wisdom/2) -5;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
-
- var setroll = "&{template:default} {{name=Wisdom Check}}{{check=[["+diceroll+"+"+modifier+"]]}}";
var savemod = modifier;
if (saveprof == 1) {
savemod = savemod + prof;
@@ -3955,25 +4021,15 @@ on("sheet:opened change:character_name", function(eventInfo) {
setAttrs({
wisdom_mod: modifier,
wisdom_save_mod: savemod,
- wisdomroll: setroll,
});
});
});
- on("change:charisma change:PB change:charisma_save_prof change:rolladvdis sheet:opened", function () {
+ on("change:charisma change:PB change:charisma_save_prof sheet:opened", function () {
getAttrs(["charisma","charisma_save_prof","PB","rolladvdis"], function (values) {
const charisma = parseInt(values['charisma'], 10)||0;
const prof = parseInt(values['PB'])||0;
var saveprof = values["charisma_save_prof"]||0;
const modifier = Math.floor(charisma/2) -5;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
- var setroll = "&{template:default} {{name=Charisma Check}}{{check=[["+diceroll+"+"+modifier+"]]}}";
var savemod = modifier;
if (saveprof == 1) {
savemod = savemod + prof;
@@ -3981,117 +4037,134 @@ on("sheet:opened change:character_name", function(eventInfo) {
setAttrs({
charisma_mod: modifier,
charisma_save_mod: savemod,
- charismaroll: setroll,
});
});
});
- on("change:strength_save_mod change:rolladvdis sheet:opened", function() {
- getAttrs(["strength_save_mod","rolladvdis"], function(values) {
- var statsave = parseInt(values["strength_save_mod"])||0;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
- var setsaveroll = "&{template:default} {{name=Strength Save}}{{save=[["+diceroll+"+"+statsave+"]]}}";
- setAttrs({
- "strength_save_roll": setsaveroll,
- });
- });
- });
- on("change:dexterity_save_mod change:rolladvdis sheet:opened", function() {
- getAttrs(["dexterity_save_mod","rolladvdis"], function(values) {
- var statsave = parseInt(values["dexterity_save_mod"])||0;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
- var setsaveroll = "&{template:default} {{name=Dexterity Save}}{{save=[["+diceroll+"+"+statsave+"]]}}";
- setAttrs({
- "dexterity_save_roll": setsaveroll,
- });
- });
- });
- on("change:constitution_save_mod change:rolladvdis sheet:opened", function() {
- getAttrs(["constitution_save_mod","rolladvdis"], function(values) {
- var statsave = parseInt(values["constitution_save_mod"])||0;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
- var setsaveroll = "&{template:default} {{name=Constitution Save}}{{save=[["+diceroll+"+"+statsave+"]]}}";
- setAttrs({
- "constitution_save_roll": setsaveroll,
- });
- });
- });
- on("change:intelligence_save_mod change:rolladvdis sheet:opened", function() {
- getAttrs(["intelligence_save_mod","rolladvdis"], function(values) {
- var statsave = parseInt(values["intelligence_save_mod"])||0;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
- var setsaveroll = "&{template:default} {{name=Intelligence Save}}{{save=[["+diceroll+"+"+statsave+"]]}}";
- setAttrs({
- "intelligence_save_roll": setsaveroll,
- });
- });
- });
- on("change:wisdom_save_mod change:rolladvdis sheet:opened", function() {
- getAttrs(["wisdom_save_mod","rolladvdis"], function(values) {
- var statsave = parseInt(values["wisdom_save_mod"])||0;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
- var setsaveroll = "&{template:default} {{name=Wisdom Save}}{{save=[["+diceroll+"+"+statsave+"]]}}";
- setAttrs({
- "wisdom_save_roll": setsaveroll,
- });
- });
- });
- on("change:charisma_save_mod change:rolladvdis sheet:opened", function() {
- getAttrs(["charisma_save_mod","rolladvdis"], function(values) {
- var statsave = parseInt(values["charisma_save_mod"])||0;
- var rolladvdis = values["rolladvdis"]||"sta";
- var diceroll = "1d20"
- if (rolladvdis == "adv") {
- diceroll = "2d20kh1";
- };
- if (rolladvdis == "dis") {
- diceroll = "2d20dh1";
- };
- var setsaveroll = "&{template:default} {{name=Charisma Save}}{{save=[["+diceroll+"+"+statsave+"]]}}";
- setAttrs({
- "charisma_save_roll": setsaveroll,
- });
- });
- });
+on('clicked:strengthsave-button', async (info) => {
+ const values = await getAttrsAsync(['character_name','strength_save_mod','strength_save_bonus','globalsavebonus','rolladvdis','rollgmnormal']);
+ const savemod = parseInt(values.strength_save_mod)||0;
+ const savebonus = parseInt(values.strength_save_bonus)||0;
+ const charname = values.character_name || "";
+ const globalsavebonus = parseInt(values.globalsavebonus)||0;
+ const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
+
+ const bonus = savemod+savebonus+globalsavebonus;
+
+ var diceroll = "1d20";
+ if (rolladvdis == "adv") {diceroll = "2d20kh1";};
+ if (rolladvdis == "dis") {diceroll = "2d20dh1";};
+
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" Strength Save}}{{save=[["+diceroll+"+"+bonus+"]]}}");
+ finishRoll(results.rollId);
+});
+on('clicked:dexteritysave-button', async (info) => {
+ const values = await getAttrsAsync(['character_name','dexterity_save_mod','dexterity_save_bonus','globalsavebonus','rolladvdis','rollgmnormal']);
+ const savemod = parseInt(values.dexterity_save_mod)||0;
+ const savebonus = parseInt(values.dexterity_save_bonus)||0;
+ const charname = values.character_name || "";
+ const globalsavebonus = parseInt(values.globalsavebonus)||0;
+ const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
+
+ const bonus = savemod+savebonus+globalsavebonus;
+
+ var diceroll = "1d20";
+ if (rolladvdis == "adv") {diceroll = "2d20kh1";};
+ if (rolladvdis == "dis") {diceroll = "2d20dh1";};
+
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" Dexterity Save}}{{save=[["+diceroll+"+"+bonus+"]]}}");
+ finishRoll(results.rollId);
+});
+on('clicked:constitutionsave-button', async (info) => {
+ const values = await getAttrsAsync(['character_name','constitution_save_mod','constitution_save_bonus','globalsavebonus','rolladvdis','rollgmnormal']);
+ const savemod = parseInt(values.constitution_save_mod)||0;
+ const savebonus = parseInt(values.constitution_save_bonus)||0;
+ const charname = values.character_name || "";
+ const globalsavebonus = parseInt(values.globalsavebonus)||0;
+ const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
+
+ const bonus = savemod+savebonus+globalsavebonus;
+
+ var diceroll = "1d20";
+ if (rolladvdis == "adv") {diceroll = "2d20kh1";};
+ if (rolladvdis == "dis") {diceroll = "2d20dh1";};
+
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" Constitution Save}}{{save=[["+diceroll+"+"+bonus+"]]}}");
+ finishRoll(results.rollId);
+});
+on('clicked:intelligencesave-button', async (info) => {
+ const values = await getAttrsAsync(['character_name','intelligence_save_mod','intelligence_save_bonus','globalsavebonus','rolladvdis','rollgmnormal']);
+ const savemod = parseInt(values.intelligence_save_mod)||0;
+ const savebonus = parseInt(values.intelligence_save_bonus)||0;
+ const charname = values.character_name || "";
+ const globalsavebonus = parseInt(values.globalsavebonus)||0;
+ const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
+
+ const bonus = savemod+savebonus+globalsavebonus;
+
+ var diceroll = "1d20";
+ if (rolladvdis == "adv") {diceroll = "2d20kh1";};
+ if (rolladvdis == "dis") {diceroll = "2d20dh1";};
+
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" Intelligence Save}}{{save=[["+diceroll+"+"+bonus+"]]}}");
+ finishRoll(results.rollId);
+});
+on('clicked:wisdomsave-button', async (info) => {
+ const values = await getAttrsAsync(['character_name','wisdom_save_mod','wisdom_save_bonus','globalsavebonus','rolladvdis','rollgmnormal']);
+ const savemod = parseInt(values.wisdom_save_mod)||0;
+ const savebonus = parseInt(values.wisdom_save_bonus)||0;
+ const charname = values.character_name || "";
+ const globalsavebonus = parseInt(values.globalsavebonus)||0;
+ const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
+
+ const bonus = savemod+savebonus+globalsavebonus;
+
+ var diceroll = "1d20";
+ if (rolladvdis == "adv") {diceroll = "2d20kh1";};
+ if (rolladvdis == "dis") {diceroll = "2d20dh1";};
+
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" Wisdom Save}}{{save=[["+diceroll+"+"+bonus+"]]}}");
+ finishRoll(results.rollId);
+});
+on('clicked:charismasave-button', async (info) => {
+ const values = await getAttrsAsync(['character_name','charisma_save_mod','charisma_save_bonus','globalsavebonus','rolladvdis','rollgmnormal']);
+ const savemod = parseInt(values.charisma_save_mod)||0;
+ const savebonus = parseInt(values.charisma_save_bonus)||0;
+ const charname = values.character_name || "";
+ const globalsavebonus = parseInt(values.globalsavebonus)||0;
+ const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
+
+ const bonus = savemod+savebonus+globalsavebonus;
+
+ var diceroll = "1d20";
+ if (rolladvdis == "adv") {diceroll = "2d20kh1";};
+ if (rolladvdis == "dis") {diceroll = "2d20dh1";};
+
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" Charisma Save}}{{save=[["+diceroll+"+"+bonus+"]]}}");
+ finishRoll(results.rollId);
+});
on('clicked:acrobatics-button', async (info) => {
- const values = await getAttrsAsync(['character_name','acrobatics_exdice','acrobatics_specialty','acrobatics_check','acrobatics_check_bonus','passive_acrobatics_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','acrobatics_exdice','acrobatics_specialty','acrobatics_check','acrobatics_check_bonus','passive_acrobatics_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.acrobatics_check)||0;
const exdice = values.acrobatics_exdice||"0d6";
const specialty = values.acrobatics_specialty||"";
@@ -4109,6 +4182,7 @@ on('clicked:acrobatics-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4129,11 +4203,13 @@ on('clicked:acrobatics-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=Acrobatics ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=Acrobatics ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:animalhandling-button', async (info) => {
- const values = await getAttrsAsync(['character_name','animalhandling_exdice','animalhandling_specialty','animalhandling_check','animalhandling_check_bonus','passive_animalhandling_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','animalhandling_exdice','animalhandling_specialty','animalhandling_check','animalhandling_check_bonus','passive_animalhandling_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.animalhandling_check)||0;
const exdice = values.animalhandling_exdice||"0d6";
const specialty = values.animalhandling_specialty||"";
@@ -4151,6 +4227,7 @@ on('clicked:animalhandling-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4171,11 +4248,13 @@ on('clicked:animalhandling-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat||Wisdom, "+wis+"Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=animalhandling ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat||Wisdom, "+wis+"Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=animalhandling ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:arcana-button', async (info) => {
- const values = await getAttrsAsync(['character_name','arcana_exdice','arcana_specialty','arcana_check_bonus','passive_arcana','passive_arcana_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','arcana_exdice','arcana_specialty','arcana_check_bonus','passive_arcana','passive_arcana_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.arcana_check)||0;
const exdice = values.arcana_exdice||"0d6";
const specialty = values.arcana_specialty||"";
@@ -4193,6 +4272,7 @@ on('clicked:arcana-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4213,11 +4293,13 @@ on('clicked:arcana-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=arcana ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=arcana ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:athletics-button', async (info) => {
- const values = await getAttrsAsync(['character_name','athletics_exdice','athletics_specialty','athletics_check','athletics_check_bonus','passive_athletics_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','athletics_exdice','athletics_specialty','athletics_check','athletics_check_bonus','passive_athletics_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.athletics_check)||0;
const exdice = values.athletics_exdice||"0d6";
const specialty = values.athletics_specialty||"";
@@ -4235,6 +4317,7 @@ on('clicked:athletics-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4255,11 +4338,13 @@ on('clicked:athletics-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Strength, "+str+"|Dexterity, "+dex+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=athletics ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Strength, "+str+"|Dexterity, "+dex+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=athletics ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:culture-button', async (info) => {
- const values = await getAttrsAsync(['character_name','culture_exdice','culture_specialty','culture_check','culture_check_bonus','passive_culture_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','culture_exdice','culture_specialty','culture_check','culture_check_bonus','passive_culture_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.culture_check)||0;
const exdice = values.culture_exdice||"0d6";
const specialty = values.culture_specialty||"";
@@ -4277,6 +4362,7 @@ on('clicked:culture-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4297,11 +4383,13 @@ on('clicked:culture-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=culture ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=culture ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:deception-button', async (info) => {
- const values = await getAttrsAsync(['character_name','deception_exdice','deception_specialty','deception_check','deception_check_bonus','passive_deception_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','deception_exdice','deception_specialty','deception_check','deception_check_bonus','passive_deception_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.deception_check)||0;
const exdice = values.deception_exdice||"0d6";
const specialty = values.deception_specialty||"";
@@ -4319,6 +4407,7 @@ on('clicked:deception-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4339,11 +4428,13 @@ on('clicked:deception-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Charisma, "+cha+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=deception ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Charisma, "+cha+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=deception ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:engineering-button', async (info) => {
- const values = await getAttrsAsync(['character_name','engineering_exdice','engineering_specialty','engineering_check','engineering_check_bonus','passive_engineering_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','engineering_exdice','engineering_specialty','engineering_check','engineering_check_bonus','passive_engineering_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.engineering_check)||0;
const exdice = values.engineering_exdice||"0d6";
const specialty = values.engineering_specialty||"";
@@ -4361,6 +4452,7 @@ on('clicked:engineering-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4381,11 +4473,13 @@ on('clicked:engineering-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=engineering ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=engineering ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:history-button', async (info) => {
- const values = await getAttrsAsync(['character_name','history_exdice','history_specialty','history_check','history_check_bonus','passive_history_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','history_exdice','history_specialty','history_check','history_check_bonus','passive_history_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.history_check)||0;
const exdice = values.history_exdice||"0d6";
const specialty = values.history_specialty||"";
@@ -4403,6 +4497,7 @@ on('clicked:history-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4423,11 +4518,13 @@ on('clicked:history-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=history ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=history ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:insight-button', async (info) => {
- const values = await getAttrsAsync(['character_name','insight_exdice','insight_specialty','insight_check','insight_check_bonus','passive_insight_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','insight_exdice','insight_specialty','insight_check','insight_check_bonus','passive_insight_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.insight_check)||0;
const exdice = values.insight_exdice||"0d6";
const specialty = values.insight_specialty||"";
@@ -4445,6 +4542,7 @@ on('clicked:insight-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4464,11 +4562,13 @@ on('clicked:insight-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Wisdom, "+wis+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=insight ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Wisdom, "+wis+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=insight ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:intimidation-button', async (info) => {
- const values = await getAttrsAsync(['character_name','intimidation_exdice','intimidation_specialty','intimidation_check','intimidation_check_bonus','passive_intimidation_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','intimidation_exdice','intimidation_specialty','intimidation_check','intimidation_check_bonus','passive_intimidation_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.intimidation_check)||0;
const exdice = values.intimidation_exdice||"0d6";
const specialty = values.intimidation_specialty||"";
@@ -4486,6 +4586,7 @@ on('clicked:intimidation-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4506,11 +4607,13 @@ on('clicked:intimidation-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Charisma, "+cha+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=intimidation ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Charisma, "+cha+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=intimidation ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:investigation-button', async (info) => {
- const values = await getAttrsAsync(['character_name','investigation_exdice','investigation_specialty','investigation_check','investigation_check_bonus','passive_investigation_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','investigation_exdice','investigation_specialty','investigation_check','investigation_check_bonus','passive_investigation_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.investigation_check)||0;
const exdice = values.investigation_exdice||"0d6";
const specialty = values.investigation_specialty||"";
@@ -4528,6 +4631,7 @@ on('clicked:investigation-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4548,11 +4652,13 @@ on('clicked:investigation-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=investigation ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=investigation ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:medicine-button', async (info) => {
- const values = await getAttrsAsync(['character_name','medicine_exdice','medicine_specialty','medicine_check','medicine_check_bonus','passive_medicine_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','medicine_exdice','medicine_specialty','medicine_check','medicine_check_bonus','passive_medicine_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.medicine_check)||0;
const exdice = values.medicine_exdice||"0d6";
const specialty = values.medicine_specialty||"";
@@ -4570,6 +4676,7 @@ on('clicked:medicine-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4590,11 +4697,13 @@ on('clicked:medicine-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Wisdom, "+wis+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=medicine ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Wisdom, "+wis+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=medicine ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:nature-button', async (info) => {
- const values = await getAttrsAsync(['character_name','nature_exdice','nature_specialty','nature_check','nature_check_bonus','passive_nature_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','nature_exdice','nature_specialty','nature_check','nature_check_bonus','passive_nature_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.nature_check)||0;
const exdice = values.nature_exdice||"0d6";
const specialty = values.nature_specialty||"";
@@ -4612,6 +4721,7 @@ on('clicked:nature-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4632,11 +4742,13 @@ on('clicked:nature-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=nature ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=nature ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:perception-button', async (info) => {
- const values = await getAttrsAsync(['character_name','perception_exdice','perception_specialty','perception_check','perception_check_bonus','passive_perception_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','perception_exdice','perception_specialty','perception_check','perception_check_bonus','passive_perception_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.perception_check)||0;
const exdice = values.perception_exdice||"0d6";
const specialty = values.perception_specialty||"";
@@ -4654,6 +4766,7 @@ on('clicked:perception-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4674,11 +4787,13 @@ on('clicked:perception-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Wisdom, "+wis+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=perception ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Wisdom, "+wis+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=perception ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:performance-button', async (info) => {
- const values = await getAttrsAsync(['character_name','performance_exdice','performance_specialty','performance_check','performance_check_bonus','passive_performance_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','performance_exdice','performance_specialty','performance_check','performance_check_bonus','passive_performance_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.performance_check)||0;
const exdice = values.performance_exdice||"0d6";
const specialty = values.performance_specialty||"";
@@ -4696,6 +4811,7 @@ on('clicked:performance-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4716,11 +4832,13 @@ on('clicked:performance-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Charisma, "+cha+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=performance ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Charisma, "+cha+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=performance ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:persuasion-button', async (info) => {
- const values = await getAttrsAsync(['character_name','persuasion_exdice','persuasion_specialty','persuasion_check','persuasion_check_bonus','passive_persuasion_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','persuasion_exdice','persuasion_specialty','persuasion_check','persuasion_check_bonus','passive_persuasion_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.persuasion_check)||0;
const exdice = values.persuasion_exdice||"0d6";
const specialty = values.persuasion_specialty||"";
@@ -4738,6 +4856,7 @@ on('clicked:persuasion-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4758,11 +4877,13 @@ on('clicked:persuasion-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Charisma, "+cha+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=persuasion ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Charisma, "+cha+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=persuasion ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:religion-button', async (info) => {
- const values = await getAttrsAsync(['character_name','religion_exdice','religion_specialty','religion_check','religion_check_bonus','passive_religion_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','religion_exdice','religion_specialty','religion_check','religion_check_bonus','passive_religion_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.religion_check)||0;
const exdice = values.religion_exdice||"0d6";
const specialty = values.religion_specialty||"";
@@ -4780,6 +4901,7 @@ on('clicked:religion-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4800,11 +4922,13 @@ on('clicked:religion-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=religion ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Intelligence, "+intel+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=religion ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:sleightofhand-button', async (info) => {
- const values = await getAttrsAsync(['character_name','sleightofhand_exdice','sleightofhand_specialty','sleightofhand_check','sleightofhand_check_bonus','passive_sleightofhand_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','sleightofhand_exdice','sleightofhand_specialty','sleightofhand_check','sleightofhand_check_bonus','passive_sleightofhand_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.sleightofhand_check)||0;
const exdice = values.sleightofhand_exdice||"0d6";
const specialty = values.sleightofhand_specialty||"";
@@ -4822,6 +4946,7 @@ on('clicked:sleightofhand-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4842,11 +4967,13 @@ on('clicked:sleightofhand-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=sleightofhand ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=sleightofhand ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:stealth-button', async (info) => {
- const values = await getAttrsAsync(['character_name','stealth_exdice','stealth_specialty','stealth_check','stealth_check_bonus','passive_stealth_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','stealth_exdice','stealth_specialty','stealth_check','stealth_check_bonus','passive_stealth_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.stealth_check)||0;
const exdice = values.stealth_exdice||"0d6";
const specialty = values.stealth_specialty||"";
@@ -4864,6 +4991,7 @@ on('clicked:stealth-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4884,11 +5012,13 @@ on('clicked:stealth-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=stealth ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=stealth ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:survival-button', async (info) => {
- const values = await getAttrsAsync(['character_name','survival_exdice','survival_specialty','survival_check','survival_check_bonus','passive_survival_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','survival_exdice','survival_specialty','survival_check','survival_check_bonus','passive_survival_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.survival_check)||0;
const exdice = values.survival_exdice||"0d6";
const specialty = values.survival_specialty||"";
@@ -4906,6 +5036,7 @@ on('clicked:survival-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4926,11 +5057,13 @@ on('clicked:survival-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Wisdom, "+wis+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=survival ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Wisdom, "+wis+"|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=survival ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:vehicles-button', async (info) => {
- const values = await getAttrsAsync(['character_name','vehicles_exdice','vehicles_specialty','vehicles_check','vehicles_check_bonus','passive_vehicles_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','vehicles_exdice','vehicles_specialty','vehicles_check','vehicles_check_bonus','passive_vehicles_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.vehicles_check)||0;
const exdice = values.vehicles_exdice||"0d6";
const specialty = values.vehicles_specialty||"";
@@ -4948,6 +5081,7 @@ on('clicked:vehicles-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -4968,11 +5102,13 @@ on('clicked:vehicles-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=vehicles ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=vehicles ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:misc1-button', async (info) => {
- const values = await getAttrsAsync(['character_name','misc1_exdice','misc1_specialty','misc1_check','misc1_check_bonus','passive_misc1_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','misc1_exdice','misc1_specialty','misc1_check','misc1_check_bonus','passive_misc1_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.misc1_check)||0;
const exdice = values.misc1_exdice||"0d6";
const specialty = values.misc1_specialty||"";
@@ -4990,6 +5126,7 @@ on('clicked:misc1-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -5010,11 +5147,13 @@ on('clicked:misc1-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=misc1 ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=misc1 ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
on('clicked:misc2-button', async (info) => {
- const values = await getAttrsAsync(['character_name','misc2_exdice','misc2_specialty','misc2_check','misc2_check_bonus','passive_misc2_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','misc2_exdice','misc2_specialty','misc2_check','misc2_check_bonus','passive_misc2_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','intelligence_mod','wisdom_mod','dexterity_mod','constitution_mod','charisma_mod','jackofalltrades_check']);
const prof = parseInt(values.misc2_check)||0;
const exdice = values.misc2_exdice||"0d6";
const specialty = values.misc2_specialty||"";
@@ -5032,6 +5171,7 @@ on('clicked:misc2-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
const bonus = checkbonus+passivebonus+globalskillbonus+globalabilitybonus;
@@ -5052,7 +5192,9 @@ on('clicked:misc2-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll("&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=misc2 ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !?{Stat|Dexterity, "+dex+"|Strength, "+str+"|Constitution, "+con+"|Intelligence, "+intel+"|Wisdom, "+wis+"|Charisma, "+cha+"} ?{IncludeSpecialty|No, "+exdice+"|Yes, "+specdice+" } {{name=misc2 ("+specialty+") Roll}}{{roll=[["+diceroll+"+?{Stat}+"+finalbonus+"+?{IncludeSpecialty}cf<0cs>101]]}}");
finishRoll(results.rollId);
});
@@ -5558,7 +5700,7 @@ on("change:vehicles_check change:vehicles_check_bonus change:passive_vehicles_bo
on('clicked:initiative-button', async (info) => {
- const values = await getAttrsAsync(['character_name','initiativetype','athletics_check','athletics_check_bonus','passive_athletics_bonus','deception_check','deception_check_bonus','passive_deception_bonus','insight_check','insight_check_bonus','passive_insight_bonus','perception_check','perception_check_bonus','passive_perception_bonus','vehicles_check','vehicles_check_bonus','passive_vehicles_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','PB','strength_mod','wisdom_mod','dexterity_mod','charisma_mod','jackofalltrades_check']);
+ const values = await getAttrsAsync(['character_name','initiativetype','athletics_check','athletics_check_bonus','passive_athletics_bonus','deception_check','deception_check_bonus','passive_deception_bonus','insight_check','insight_check_bonus','passive_insight_bonus','perception_check','perception_check_bonus','passive_perception_bonus','vehicles_check','vehicles_check_bonus','passive_vehicles_bonus','globalskillbonus','globalabilitycheckbonus','rolladvdis','rollgmnormal','PB','strength_mod','wisdom_mod','dexterity_mod','charisma_mod','jackofalltrades_check','initiativebonus']);
const itype = values.initiativetype||"";
const athprof = parseInt(values.athletics_check)||0;
const athcheckbonus = parseInt(values.athletics_check_bonus)||0;
@@ -5585,7 +5727,9 @@ on('clicked:initiative-button', async (info) => {
const globalskillbonus = parseInt(values.globalskillbonus)||0;
const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
const jotbonus = Math.floor(profbonus/2);
+ const initbonus = parseInt(values.initiativebonus)||0;
var prof=0;
var checkbonus=0;
@@ -5599,27 +5743,27 @@ on('clicked:initiative-button', async (info) => {
if (itype == "1") {
if (perprof == 1) {jotprofbonus = profbonus;};
name = "Wisdom (Perception)";
- bonus = wis+perpassivebonus+percheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
+ bonus = wis+perpassivebonus+percheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus+initbonus;
}
if (itype == "2") {
if (athprof == 1) {jotprofbonus = profbonus;};
name = "Strength (Athletics)";
- bonus = str+athpassivebonus+athcheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
+ bonus = str+athpassivebonus+athcheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus+initbonus;
}
if (itype == "3") {
if (decprof == 1) {jotprofbonus = profbonus;};
name = "Charisma (Deception)";
- bonus = cha+decpassivebonus+deccheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
+ bonus = cha+decpassivebonus+deccheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus+initbonus;
}
if (itype == "4") {
if (insprof == 1) {jotprofbonus = profbonus;};
name = "Wisdom (Insight)";
- bonus = wis+inspassivebonus+inscheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
+ bonus = wis+inspassivebonus+inscheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus+initbonus;
}
if (itype == "5") {
if (vehperprof == 1) {jotprofbonus = profbonus;};
name = "Dexterity (Vehicles)";
- bonus = dex+vehpassivebonus+vehcheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
+ bonus = dex+vehpassivebonus+vehcheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus+initbonus;
}
if (itype == "6") {
name = "Dexterity (Base)";
@@ -5630,101 +5774,92 @@ on('clicked:initiative-button', async (info) => {
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll( "&{template:default} !{{name="+name+" Initiative}}{{roll=[["+diceroll+"+"+bonus+" &{tracker}]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !{{name="+name+" Initiative}}{{roll=[["+diceroll+"+"+bonus+" &{tracker}]]}}");
finishRoll(results.rollId);
});
-on('clicked:hit-dice-button', async (info) => {
- const values = await getAttrsAsync(['character_name']);
- const itype = values.initiativetype||"";
- const athprof = parseInt(values.athletics_check)||0;
- const athcheckbonus = parseInt(values.athletics_check_bonus)||0;
- const athpassivebonus = parseInt(values.passive_athletics_bonus)||0;
- const decprof = parseInt(values.deception_check)||0;
- const deccheckbonus = parseInt(values.deception_check_bonus)||0;
- const decpassivebonus = parseInt(values.passive_deception_bonus)||0;
- const insprof = parseInt(values.insight_check)||0;
- const inscheckbonus = parseInt(values.insight_check_bonus)||0;
- const inspassivebonus = parseInt(values.passive_insight_bonus)||0;
- const perprof = parseInt(values.perception_check)||0;
- const percheckbonus = parseInt(values.perception_check_bonus)||0;
- const perpassivebonus = parseInt(values.passive_perception_bonus)||0;
- const vehprof = parseInt(values.vehicles_check)||0;
- const vehcheckbonus = parseInt(values.vehicles_check_bonus)||0;
- const vehpassivebonus = parseInt(values.passive_vehicles_bonus)||0;
+
+on('clicked:hitdice-button', async (info) => {
+ const values = await getAttrsAsync(['character_name','HP','HP_max','hit_dice']);
const charname = values.character_name || "";
- const jot = parseInt(values.jackofalltrades_check)||0;
- const str = parseInt(values.strength_mod)||0;
- const dex = parseInt(values.dexterity_mod)||0;
- const wis = parseInt(values.wisdom_mod)||0;
- const cha = parseInt(values.charisma_mod)||0;
- const profbonus = parseInt(values.PB)||0;
- const globalskillbonus = parseInt(values.globalskillbonus)||0;
- const globalabilitybonus = parseInt(values.globalabilitycheckbonus)||0;
- const rolladvdis = values.rolladvdis||"sta";
- const jotbonus = Math.floor(profbonus/2);
+ const hp = parseInt(values.HP)||0;
+ const maxhp = parseInt(values.HP_max)||0;
+ const hitdice = parseInt(values.hit_dice)||0;
- var prof=0;
- var checkbonus=0;
- var passivebonus=0;
- var name = "";
- var statbonus=0;
+ var numofDice="1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20";
+ if (hitdice==1) { numofDice = "1";}
+ if (hitdice==2) { numofDice = "1|2"; }
+ if (hitdice==3) { numofDice = "1|2|3"; }
+ if (hitdice==4) { numofDice = "1|2|3|4"; }
+ if (hitdice==5) { numofDice = "1|2|3|4|5"; }
+ if (hitdice==6) { numofDice = "1|2|3|4|5|6"; }
+ if (hitdice==7) { numofDice = "1|2|3|4|5|6|7"; }
+ if (hitdice==8) { numofDice = "1|2|3|4|5|6|7|8"; }
+ if (hitdice==9) { numofDice = "1|2|3|4|5|6|7|8|9"; }
+ if (hitdice==10) { numofDice = "1|2|3|4|5|6|7|8|9|10"; }
+ if (hitdice==11) { numofDice = "1|2|3|4|5|6|7|8|9|10|11"; }
+ if (hitdice==12) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12"; }
+ if (hitdice==13) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12|13"; }
+ if (hitdice==14) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12|13|14"; }
+ if (hitdice==15) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15"; }
+ if (hitdice==16) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16"; }
+ if (hitdice==17) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17"; }
+ if (hitdice==18) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18"; }
+ if (hitdice==19) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19"; }
+ if (hitdice==20) { numofDice = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20"; }
- var jotprofbonus = 0;
- if (jot == 1) {jotprofbonus = jotbonus;};
-
- if (itype == "1") {
- if (perprof == 1) {jotprofbonus = profbonus;};
- name = "Wisdom (Perception)";
- bonus = wis+perpassivebonus+percheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
- }
- if (itype == "2") {
- if (athprof == 1) {jotprofbonus = profbonus;};
- name = "Strength (Athletics)";
- bonus = str+athpassivebonus+athcheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
- }
- if (itype == "3") {
- if (decprof == 1) {jotprofbonus = profbonus;};
- name = "Charisma (Deception)";
- bonus = cha+decpassivebonus+deccheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
- }
- if (itype == "4") {
- if (insprof == 1) {jotprofbonus = profbonus;};
- name = "Wisdom (Insight)";
- bonus = wis+inspassivebonus+inscheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
- }
- if (itype == "5") {
- if (vehperprof == 1) {jotprofbonus = profbonus;};
- name = "Dexterity (Vehicles)";
- bonus = dex+vehpassivebonus+vehcheckbonus+globalskillbonus+globalabilitybonus+jotprofbonus;
- }
- if (itype == "6") {
- name = "Dexterity (Base)";
- bonus = dex;
- }
-
- var diceroll = "1d20";
- if (rolladvdis == "adv") {diceroll = "2d20kh1";};
- if (rolladvdis == "dis") {diceroll = "2d20dh1";};
-
- const results = await startRoll( "&{template:default} !{{name="+name+" Initiative}}{{roll=[["+diceroll+"+"+bonus+" &{tracker}]]}}");
- finishRoll(results.rollId);
+ const results = await startRoll( "&{template:default} !?{NumberOfDice|"+numofDice+"}?{dicetype|d6|d8|d10|d12}{{name="+charname+" Hit Dice Roll}}{{roll=[[?{NumberOfDice}?{dicetype}]]}}");
+ const successes = results.results.roll.result;
+ const rolled = results.results.roll.dice.length;
+ const newhd = hitdice-rolled;
+ var newhp = hp+successes;
+ if (newhp > maxhp) {newhp = maxhp;}
+ var attrsToChange = {};
+ attrsToChange["HP"] = newhp;
+ attrsToChange["hit_dice"] = newhd;
+ setAttrs(attrsToChange);
+ finishRoll(results.rollId);
});
- on("change:PB change:strength_mod change:dexterity_mod sheet:opened", function() {
- getAttrs(["PB","strength_mod","dexterity_mod"], function(values) {
+on('clicked:deathsave-button', async (info) => {
+ const values = await getAttrsAsync(['character_name','death_saves_success','death_saves_fail']);
+ const charname = values.character_name || "";
+ const succ = parseInt(values.death_saves_success)||0;
+ const fail = parseInt(values.death_saves_fail)||0;
+
+ const results = await startRoll( "&{template:default} !{{name="+charname+" Death Save}}{{roll=[[1d20]]}}");
+
+ const successes = results.results.roll.result;
+
+ var newsucc = succ;
+ var newfail= fail;
+ if (successes > 9) { newsucc = succ+1;}
+ if (successes < 10) { newfail=fail+1; }
+ var attrsToChange = {};
+ attrsToChange["death_saves_success"] = newsucc;
+ attrsToChange["death_saves_fail"] = newfail;
+ setAttrs(attrsToChange);
+ finishRoll(results.rollId);
+});
+
+ on("change:PB change:strength_mod change:dexterity_mod change:maneuver_save_bonus change:exertion_points_bonus sheet:opened", function() {
+ getAttrs(["PB","strength_mod","dexterity_mod","maneuver_save_bonus","exertion_points_bonus"], function(values) {
var str = parseInt(values["strength_mod"])||0;
var dex = parseInt(values["dexterity_mod"])||0;
var profbonus = parseInt(values["PB"])||0;
+ var manbonus = parseInt(values["maneuver_save_bonus"])||0;
+ var exebonus = parseInt(values["exertion_points_bonus"])||0;
var stat = str;
if (str < dex) {
stat = dex;
};
setAttrs({
- "maneuver_savedc": 8 + stat + profbonus,
- "exertion_points": 2 * profbonus,
+ "maneuver_savedc": 8 + stat + profbonus + manbonus,
+ "exertion_points": (2 * profbonus) + exebonus,
});
});
});
@@ -5774,7 +5909,7 @@ on('clicked:hit-dice-button', async (info) => {
on("clicked:repeating_attacks:attack-button", async (info) => {
- const values = await getAttrsAsync(['character_name','repeating_attacks_attackname','repeating_attacks_attackbonus','repeating_attacks_attackdamage','repeating_attacks_attackdamagetype','repeating_attacks_attacknotes','rolladvdis']);
+ const values = await getAttrsAsync(['character_name','repeating_attacks_attackname','repeating_attacks_attackbonus','repeating_attacks_attackdamage','repeating_attacks_attackdamagetype','repeating_attacks_attacknotes','rolladvdis','rollgmnormal']);
const charname = values.character_name || "";
const name = values.repeating_attacks_attackname || "";
const bonus = values.repeating_attacks_attackbonus || "";
@@ -5782,6 +5917,7 @@ on("clicked:repeating_attacks:attack-button", async (info) => {
const damtype = values.repeating_attacks_attackdamagetype || "";
const notes = values.repeating_attacks_attacknotes || "";
const rolladvdis = values.rolladvdis || "";
+ const rollgmnormal = values.rollgmnormal||"normal";
var diceroll = "1d20";
if (rolladvdis == "adv") {
@@ -5791,16 +5927,19 @@ on("clicked:repeating_attacks:attack-button", async (info) => {
diceroll = "2d20dh1";
};
- const results = await startRoll("&{template:default} {{name="+charname+" : "+name+" Roll}}{{roll=[["+diceroll+"+"+bonus+"]]}}{{"+damtype+" damage=[["+dam+"]]}}{{Notes="+notes+"}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" : "+name+" Roll}}{{roll=[["+diceroll+"+"+bonus+"]]}}{{"+damtype+" damage=[["+dam+"]]}}{{Notes="+notes+"}}");
finishRoll(results.rollId);
});
on("clicked:repeating_tools:tool-button", async (info) => {
- const values = await getAttrsAsync(['character_name','repeating_tools_toolname','repeating_tools_toolbonus','rolladvdis']);
+ const values = await getAttrsAsync(['character_name','repeating_tools_toolname','repeating_tools_toolbonus','rolladvdis','rollgmnormal']);
const charname = values.character_name || "";
const name = values.repeating_tools_toolname || "";
const bonus = parseInt(values.repeating_tools_toolbonus) || 0;
const rolladvdis = values.rolladvdis || "";
+ const rollgmnormal = values.rollgmnormal||"normal";
var diceroll = "1d20";
if (rolladvdis == "adv") {
@@ -5810,18 +5949,21 @@ on("clicked:repeating_tools:tool-button", async (info) => {
diceroll = "2d20dh1";
};
- const results = await startRoll("&{template:default} {{name="+charname+" : "+name+" Roll}}{{roll=[["+diceroll+"+"+bonus+"]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" : "+name+" Roll}}{{roll=[["+diceroll+"+"+bonus+"]]}}");
finishRoll(results.rollId);
});
on("clicked:repeating_skills:skill-button", async (info) => {
- const values = await getAttrsAsync(['character_name','repeating_skills_skillname','repeating_skills_skillbonus','repeating_skills_skillexdice','rolladvdis']);
+ const values = await getAttrsAsync(['character_name','repeating_skills_skillname','repeating_skills_skillbonus','repeating_skills_skillexdice','rolladvdis','rollgmnormal']);
const charname = values.character_name || "";
const name = values.repeating_skills_skillname || "";
const bonus = parseInt(values.repeating_skills_skillbonus) || 0;
const exdice = values.repeating_skills_skillexdice || "";
const rolladvdis = values.rolladvdis || "";
+ const rollgmnormal = values.rollgmnormal||"normal";
var diceroll = "1d20";
if (rolladvdis == "adv") {
@@ -5831,21 +5973,26 @@ on("clicked:repeating_skills:skill-button", async (info) => {
diceroll = "2d20dh1";
};
- const results = await startRoll("&{template:default} {{name="+charname+" : "+name+" Roll}}{{roll=[["+diceroll+"+"+bonus+"+"+exdice+"]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} {{name="+charname+" : "+name+" Roll}}{{roll=[["+diceroll+"+"+bonus+"+"+exdice+"]]}}");
finishRoll(results.rollId);
});
on('clicked:npcinitiative-button', async (info) => {
- const values = await getAttrsAsync(['character_name','npcinitiative','rolladvdis']);
+ const values = await getAttrsAsync(['character_name','npcinitiative','rolladvdis','rollgmnormal']);
const charname = values.character_name || "";
const initbonus = parseInt(values.npcinitiative)||0;
const rolladvdis = values.rolladvdis||"sta";
+ const rollgmnormal = values.rollgmnormal||"normal";
var diceroll = "1d20";
if (rolladvdis == "adv") {diceroll = "2d20kh1";};
if (rolladvdis == "dis") {diceroll = "2d20dh1";};
- const results = await startRoll( "&{template:default} !{{name="+name+" Initiative}}{{roll=[["+diceroll+"+"+initbonus+" &{tracker}]]}}");
+ var gmroll = "";
+ if (rollgmnormal == "gm") { gmroll = "/w gm ";}
+ const results = await startRoll( gmroll+"&{template:default} !{{name="+name+" Initiative}}{{roll=[["+diceroll+"+"+initbonus+" &{tracker}]]}}");
finishRoll(results.rollId);
});
diff --git a/Level Up - Advanced 5th Edition/translation.json b/Level Up - Advanced 5th Edition/translation.json
index 4e86929e4e..329f313579 100644
--- a/Level Up - Advanced 5th Edition/translation.json
+++ b/Level Up - Advanced 5th Edition/translation.json
@@ -23,7 +23,7 @@
"actions": "Actions",
"activation": "Activation",
"Adept": "Adept",
- "advantage": "Advantage",
+ "advantage": "Adv",
"age": "Age",
"Alienist": "Alienist",
"animal": "Animal",
@@ -74,6 +74,7 @@
"character_appearance": "Character Appearance",
"character_background": "Character Background",
"charisma": "Charisma",
+ "charisma_save_bonus": "Charisma Save Bonus",
"cha": "Cha",
"Charlatan": "Charlatan",
"Circusfolk": "Circusfolk",
@@ -89,6 +90,7 @@
"con": "Con",
"condition immunities": "Condition Immunities",
"constitution": "Constitution",
+ "constitution_save_bonus": "Constitution Save Bonus",
"construct": "Construct",
"Cosmopolitan": "Cosmopolitan",
"cp": "C.P.",
@@ -122,9 +124,10 @@
"devotion": "Devotion",
"dex": "Dex",
"dexterity": "Dexterity",
+ "dexterity_save_bonus": "Dexterity Save Bonus",
"Diabolist": "Diabolist",
"diminutive": "Diminutive",
- "disadvantage": "Disadvantage",
+ "disadvantage": "Disad",
"dominion": "Dominion",
"dragon": "Dragon",
"Dragonborn": "Dragonborn",
@@ -151,6 +154,7 @@
"excellence": "Excellence",
"exertion_cost": "Exertion Cost",
"exertion_points": "Exertion Points",
+ "exertion_points_bonus": "Exertion Points Bonus",
"exertion_form": "2 x Proficiency Bonus",
"expended": "Expended",
"expertise_dice": "Expertise Dice",
@@ -181,7 +185,9 @@
"giant": "Giant",
"Gladiator": "Gladiator",
"global_skill_bonus": "Global Skill Bonus",
+ "global_save_bonus": "Global Save Bonus",
"global_ability_check_bonus": "Global Ability Check Bonus",
+ "gm": "GM",
"Gnome": "Gnome",
"Godbound": "Godbound",
"gp": "G.P.",
@@ -221,6 +227,7 @@
"insight_exdice": "",
"insight_check_bonus": "Insight Check Bonus",
"intelligence": "Intelligence",
+ "intelligence_save_bonus": "Intelligence Save Bonus",
"int": "Int",
"intimidation": "Intimidation",
"intimidation_specialty": "",
@@ -263,6 +270,7 @@
"maneuvers_known": "# Maneuvers Known:",
"maneuverdc": "Maneuver DC",
"maneuver_savedc": "Maneuver Save DC",
+ "maneuver_save_bonus": "Maneuver Save Bonus",
"maneuver_saveform": "8 + Proficiency + STR/DEX",
"Marauder": "Marauder",
"medicine": "Medicine",
@@ -295,6 +303,7 @@
"necrotic": "necrotic",
"Noble": "Noble",
"Nomad": "Nomad",
+ "normal": "Normal",
"notes": "Notes",
"npc": "NPC",
"npcnotes": "NPC Notes",
@@ -425,6 +434,7 @@
"Stout Halfling": "Stout Halfling",
"str": "Str",
"strength": "Strength",
+ "strength_save_bonus": "Strength Save Bonus",
"strife": "Strife",
"success": "Success",
"successes": "Successes",
@@ -478,6 +488,7 @@
"Wildling": "Wildling",
"wis": "Wis",
"wisdom": "Wisdom",
+ "wisdom_save_bonus": "Wisdom Save Bonus",
"Wizard": "Wizard",
"Wood Elf": "Wood Elf",
"wt": "wt",