From 916872f9c849ee89b8b3076a1f9d5efcd4554dcc Mon Sep 17 00:00:00 2001 From: Kian Momtahan Date: Thu, 23 Feb 2023 08:56:44 +0000 Subject: [PATCH] Added Whisper --- vampire-v5/README.md | 3 + vampire-v5/VTM_Dice_Mechanics.js | 15 +- vampire-v5/sheet.json | 2 +- vampire-v5/vampirev5.html | 301 +++++++++++++++++-------------- 4 files changed, 178 insertions(+), 143 deletions(-) diff --git a/vampire-v5/README.md b/vampire-v5/README.md index b4413a2151..d857e10492 100644 --- a/vampire-v5/README.md +++ b/vampire-v5/README.md @@ -52,6 +52,9 @@ If you think anything is missing or you see any bugs, please message me via my [ ## Versions +### Version 2.5 +Added whispering and minor bug fix where two skills where the wrong way around. Added Cost and Duration fields to Disciplines + ### Version 2.4 Added ability to hide attributes of 6+ diff --git a/vampire-v5/VTM_Dice_Mechanics.js b/vampire-v5/VTM_Dice_Mechanics.js index 342c211096..7987d3fe0a 100644 --- a/vampire-v5/VTM_Dice_Mechanics.js +++ b/vampire-v5/VTM_Dice_Mechanics.js @@ -1,4 +1,4 @@ -// Vampire the Masquerade 5e Dice Mechanics by Momtahan K (Version 1.3). +// Vampire the Masquerade 5e Dice Mechanics by Momtahan K (Version 1.4). // // The following code is an adaptation of that produced by Roll20 user Konrad J. for "Hero Quest Dice Mechanics". // Many thanks for providing this code free to use. @@ -27,6 +27,8 @@ // try to use it for commerical gain. This has been added to ensure the community benefits from it. // Versions +// Version 1.4 +// Enabled GM Whisper rolls // Version 1.3 // Bug fix. Macros previously may have caused issues, removing some error checking to fix this issue. // Version 1.2 @@ -115,7 +117,8 @@ var vtmGlobal = { diceTestEnabled: false, diceLogRolledOnOneLine: false, luckydice: false, - reroll: "" + reroll: "", + whisper: "" }; function rollVTMDice(diceQty, type, dc) { @@ -303,7 +306,7 @@ function processVampireDiceScript(run, dc) { } let endTemplateSection = "}} "; - let outputMessage = "&{template:wod} {{name=" + user + endTemplateSection; + let outputMessage = vtmGlobal.whisper + "&{template:wod} {{name=" + user + endTemplateSection; if (run.rollname) { outputMessage += "{{Rollname=" + run.rollname + endTemplateSection; @@ -728,6 +731,12 @@ function calculateVariables(argv, who) { // The number of successes required (used for only certain rolls) let value = parseInt(entry.substring(1), 10); input.difficulty = value; + } else if (identifier === "g") { + i++; + let value = argv[i]; + if (value != undefined) { + vtmGlobal.whisper= value.trim(); + } } else if (input.type === "remorse") { log("remorse variable") // Used for remorse rolls diff --git a/vampire-v5/sheet.json b/vampire-v5/sheet.json index 411de367f7..9a857865fd 100644 --- a/vampire-v5/sheet.json +++ b/vampire-v5/sheet.json @@ -4,7 +4,7 @@ "authors": "Momtahan K., Martinez A., Obi", "roll20userid": "117780, 143652, 95940", "preview": "preview.png", - "version": 2.1, + "version": 2.5, "patreon": "https://www.justgiving.com/fundraising/vtm-5thed-character-sheet-red-cross", "tipeee:": "https://www.justgiving.com/fundraising/vtm-5thed-character-sheet-red-cross", "instructions": "Warning updating to Version 2.0 will cause powers to disappear as their formatting has changed. Please copy them before updating then transfer back! For setup instruction, details on how to install the API script and how to get the most of the guide please check out the [Sheet Guide](https://wiki.roll20.net/Vampire_The_Masquerade_5th_edition#Welcome_to_The_World_of_Darkness) or the Guide section of the sheet. \n\n If you have a Pro-account be sure to include the [VTM 5th Edition Dice Mechanics API Script](https://github.com/Roll20/roll20-api-scripts/tree/master/vampire-v5) available on the Roll20 API script repository. \n\n Known Issue: Having tilde (~) in a players name can cause issues if using the API script.", diff --git a/vampire-v5/vampirev5.html b/vampire-v5/vampirev5.html index 82b126d06a..f67f075d29 100644 --- a/vampire-v5/vampirev5.html +++ b/vampire-v5/vampirev5.html @@ -1,5 +1,5 @@