diff --git a/vampire-v5/README.md b/vampire-v5/README.md index edf42f164b..2e4a707de6 100644 --- a/vampire-v5/README.md +++ b/vampire-v5/README.md @@ -1,45 +1,12 @@ -# Character sheet for Vampire The Maquerade, 5th Edition (v1.1) +# Character sheet for Vampire The Maquerade, 5th Edition (v1.2) -## User Guide (Please read) +## Known Bugs -While this sheet is designed to be as intuitive as possible and to aid in stream lining your game there are several key features which are worth being aware of. +When running with the API script, errors may occur if the player enters a name with tilde (\~), this is because the tilde is symbol I've used to identify names. There are no plans to fix this as this was introduce to enable full names. -1. Custom fonts. While the sheet as default fonts it is also programmed to use custom fonts. If you want access to them, when in your game click the shield icon in the right of your address bar and select to allow the script. -2. Inline vs API rolling. If your ST is a Roll20 Pro-account holder they should have access to the API script, in this case we highly recommend you ensure the check box at the top of each character sheet (just below the tabs) is checked. This will unlock a number of different features including banners, re-rolls, custom dice displayed that will make you gaming experience a lot more streamlined. Unfortunately this functionality cannot be ported to Inline rolling due to programmatic restraints. - -Notes on Inline rolls. -1. Many of the buttons on the sheet will do much of the rolling for you, either calculating how many dice you need or aiding you with selection. In cases where Hunger dice are used (Attribute, Ability, Discipline rolls). If you dice pool is 3, but your hunger is 4, then 4 hunger dice will be rolled and the number of successes may be misleading. By hovering your mouse over the number of successes you can determine what dice rolls were made and you can take the first 3. This is not an issue for the API rolls. -2. To find out exactly what dice have been rolled, hover the mouse over the number of successes. In rolls where the Hunger dice are used (Attribute, Ability, Discipline rolls) if you fail, check to see if you rolled a 1 on the Hunger dice. If this is the case then consult the rules to determine how to proceed (Page 207, 208). Further, in this case the number of vampire dice will be negative, please ignore this. -3. If the number on number of successes is green, you may have rolled a critical success. Hover the mouse over and count how many 10's a rolled to determine if you rolled a critical (Page 120) or a messy critical success (Page 206, 207). Please note, the extra 2 successes for a Crit are not automatically added. - - -Notes on API rolls -1. The number of hunger dice is correctly calculated. Thus a dice pool of 3 while you have 4 hunger will only roll 3 dice. -2. The dice rolled are already displayed. For standard rolls banners will display if your roll is a Crit (Page 120), Messy Crit (Page 206, 207), Zero successes (This is the Miss/Fail banner) (Page 122). -3. In the event you roll a 1 on a Hunger dice The Beast Banner will appear. This is a warning. If the ST says you did not make the required number of successes then consult the rules to determine what happens (Page 207, 208). -4. In the event your dicepool should be zero you will be given one dice to roll. A banner stating "Last Resort" will occur, while this has no offical rules ST's may like to implement custom rules if players decide to try their luck. -5. Willpower rolls are determined by the number of full checkboxes (damaged ones do not count) -6. Remorse is calculated automatically based on rules stated on Page 239. -7. Under each roll is a Reroll button, this will reroll the same roll. - -Extra notes: -1. Discipline rolls already account for the bonus due to Blood Potency -2. Currently Frenzy is the only roll that requests a DC, this is because in API mode banner displayed changes depending on if you meet the DC or not. If enough people want it, the request for a DC can be moved to every roll (For API Mode), this has currently been left off as it enables the ST to be more flexible when deciding on difficulty. (Page 219, 240) -3. The Willpower Re-roll button is there to aid you if you want to spend a point of willpower. Please declare how many dice you wish to re-roll before rolling as the API version current rolls 3 dice automatically (the Inline version will ask you how many dice to roll). -4. Mouse over text has been added in some locations and should help clear up some confusions. - -### Rolls Section - -There are two sections in the Custom Rolls section currently. The top section is for people with access to the API, the bottom is for those with Inline rolling. This is a great section to store all your individual discipline rolls or any rolls you make often. -There are a couple points to note about this section. -1. Disciplines can't be referred to in the drop down, so please use the section below where you can enter a value. (This is a coding restraint, I've yet to overcome). -2. Clicking the Hunger checkbox will apply Hunger to your roll -3. Clicking the Blood Potency checkbox will apply Blood Potency according to discipline rules (Page 216) - -### Coterie Section - -The final button is where you can store all your Coterie information. I highly recommend your ST creates a single character sheet for your Coterie alone and shares it with all players. Here you can note shared backgrounds, merits and flaws, your haven and domain. +## User Guide and Installation Instructions (Please read) +While this sheet is designed to be as intuitive as possible and to aid in stream lining your game there are several key features which are worth being aware of. As such we highly recommend you read the [VtM 5th Edition Sheet Guide](https://wiki.roll20.net/Vampire_The_Masquerade_5th_edition#Welcome_to_The_World_of_Darkness). The [VtM 5th Edition Sheet Guide](https://wiki.roll20.net/Vampire_The_Masquerade_5th_edition#Welcome_to_The_World_of_Darkness) also contains installation instructions and details about the API script. ## About Us and Thanks @@ -50,6 +17,7 @@ Kudos to: Andreas J. (UserID: 1223200), Matt Zaldivar, Brian Shields, Benjamin B A very special thank to https://game-icons.net The below icons were used and are licensed under a Creative Commons Attribution 3.0 Unported License. Water fountain icon - by Delapouite under CC BY 3.0 Oppression icon - by Lorc under CC BY 3.0 Prayer icon - by Lorc under CC BY 3.0 Ent Mouth icon - by Lorc under CC BY 3.0 Spattericon - by Lorc under CC BY 3.0 Wolverine claws icon - by Lorc under CC BY 3.0 Half heart icon - by Lorc under CC BY 3.0 Embraced energy iconby Lorc under CC BY 3.0 +If your name doesn't appear here I apologies, the Thank you section on the sheet should be kept up to date. ## Installation instructions. If you have access to Roll20 @@ -74,16 +42,20 @@ In the event you only have access to these files and need to do so manually. Notes: The Banners folder contains many of the images made (in part) by Martinez A. with use of the sterling work available at https://game-icons.net (See Kudos) -Please note this is version 1.0, a set of updates are in progress. +Please note this is version 1.2, a set of updates are in progress. ## Bugs and Updates -If you think anything is missing or you see any bugs, please message me via my [Roll20 Account](https://app.roll20.net/users/117780/ Roll20 Account) - -The issue with Inline rolls is known about and will be fixed by 11/09/18 +If you think anything is missing or you see any bugs, please message me via my [Roll20 Account](https://app.roll20.net/users/117780/) ## Versions +### Version 1.2 +Fixed inline rolls so they now display hunger and vampire dice correctly if hunger dice pool is greater than the initial dice pool. +Fixed Predator Rolls +Fixed bug where the character name would not always appear. +Fixed bug where if a player had speech marks in the name and ran in API mode it would not work properly. + ### Version 1.1 Bug fixing to ensure the names are correctly displayed. Added the capacity to roll humanity. diff --git a/vampire-v5/VTM Dice Mechanics.js b/vampire-v5/VTM_Dice_Mechanics.js similarity index 94% rename from vampire-v5/VTM Dice Mechanics.js rename to vampire-v5/VTM_Dice_Mechanics.js index e9cf162d0f..d25fce7a99 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.1). +// Vampire the Masquerade 5e Dice Mechanics by Momtahan K (Version 1.2). // // 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. @@ -7,7 +7,7 @@ // Portions of the materials are the copyrights and trademarks of White Wolf Publishing AB, and are used with permission. All rights reserved. For more in formation please visit whitewolf.com // // With the exception of materials under the copyright of White Wolf all extra code should be considered under -// GNU General Public License v3 or later (GPL-3.0-or-later) Copyright 2018 +// GNU General Public License v3 or later (GPL-3.0-or-later) Copyright 2018 held my Momtahan.K // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -26,6 +26,12 @@ // Effectively feel free to use, edit and modify the code to your hearts content. As I understand it this will only cause an issue if you // try to use it for commerical gain. This has been added to ensure the community benefits from it. +// Versions +// Version 1.2 +// Updated images to a different location. Fixed bugs where players name would not appear for specific rolls. Fixed bug in which speech marks in a players name would cause issues. +// Version 1.1 +// Bug fixes and updated images to a different location + // Guide to use the code // The first two lines I am no longer sure if they work and require testing. @@ -55,9 +61,9 @@ // !vtm humanity o# m# // Used for humanity roll. // // Optional Flags: -// An extra variable (c"custom name ") may be added to any of these rolls to display a custom name in the roll template. Note: As a coding querk please have a space after the name but before the close in the speech marks. -// Example !vtm roll w5 r1 c"Prince Wolf " will roll 5 black die, 1 red die and the character will have the name - Prince Wolf -// An extra variable (t"custom name") may be added to any of these rolls to display the roll type. This is text below the custom name +// An extra variable (c~custom name ~) may be added to any of these rolls to display a custom name in the roll template. Note: As a coding querk please have a space after the name but before the close in the tilde. +// Example !vtm roll w5 r1 c~Prince Wolf ~ will roll 5 black die, 1 red die and the character will have the name - Prince Wolf +// An extra variable (t~custom name~) may be added to any of these rolls to display the roll type. This is text below the custom name // Adding b# to a skill roll will add the value/2.0 to the number of vampire dice. This is used for blood potency when handling disciplines // If needs be both the Frenzy, Remorse and Humanity Roll can be updated to use real values. For now however I'm going to leave it. @@ -321,7 +327,7 @@ function processVampireDiceScript(run, dc) { } } - let thebeast = ''; + let thebeast = ''; if (run.rouseStatRoll) { if (diceTotals.successScore > 0) { @@ -373,11 +379,11 @@ function addRollDeclarations(diceTotals, outputMessage, endTemplateSection, theb if (diceTotals.successScore == 0 && vtmGlobal.luckydice) { let lastResort = ''; outputMessage += "{{Fate=" + lastResort + endTemplateSection; - let miss = ''; + let miss = ''; outputMessage += "{{Miss=" + miss + endTemplateSection; } else if (diceTotals.successScore == 0) { //outputMessage += "{{Fate=" + "Total failure" + endTemplateSection; - let miss = ''; + let miss = ''; outputMessage += "{{Miss=" + miss + endTemplateSection; } else if (vtmGlobal.luckydice) { let lastResort = ''; @@ -385,10 +391,10 @@ function addRollDeclarations(diceTotals, outputMessage, endTemplateSection, theb } if ((diceTotals.muddyCritScore >= 2) || (diceTotals.muddyCritScore === 1 && (diceTotals.critScore >= 1))) { - let messy = ''; + let messy = ''; outputMessage += "{{Messy=" + messy + endTemplateSection; } else if (diceTotals.critScore >= 2) { - let crit = ''; + let crit = ''; outputMessage += "{{Crit=" + crit + endTemplateSection; } @@ -500,6 +506,8 @@ function performInlineRolls(msg) { }; function handleSkillRoll(input) { + log("Atr/Skill Roll"); + log(input); let hunger = input.hunger; let dicepool = input.attribute + input.modifier; if (input.type === "skill") { @@ -587,6 +595,8 @@ function handleFrenzyRoll(input) { } function handleSimpleRoll(input) { + log("Simple Roll"); + log(input); var run = { blackDice: input.willpower, redDice: input.hunger, @@ -598,6 +608,8 @@ function handleSimpleRoll(input) { } function handleRemorseRoll(input) { + log("Remorse Roll"); + log(input); let dice = input.willpower + input.modifier; if (dice <= 0) { vtmGlobal.luckydice = true; @@ -616,6 +628,8 @@ function handleRemorseRoll(input) { } function handleHumanityRoll(input) { + log("Humanity Roll") + log(run); let dice = input.skill + input.modifier; if (dice <= 0) { vtmGlobal.luckydice = true; @@ -628,8 +642,6 @@ function handleHumanityRoll(input) { user: input.user, rollname: input.rollname }; - log("humanity"); - log(run); return ["!vtm", run]; } @@ -715,6 +727,7 @@ function calculateVariables(argv, who) { let value = parseInt(entry.substring(1), 10); input.difficulty = value; } else if (input.type === "remorse") { + log("remorse variable") // Used for remorse rolls let totalValue = parseInt(entry.substring(1), 10); let totalRemorse = updateMultiboxValue(totalValue); @@ -823,9 +836,9 @@ on("chat:message", function (msg) { log(msg); var chatCommand = msg.content; - vtmGlobal.reroll = chatCommand.replace(/\"/g, '"'); + vtmGlobal.reroll = chatCommand.replace(/\"/g, '"').replace(/\~/g, '~'); - var argv = [].concat.apply([], chatCommand.split('"').map(function (v, i) { + var argv = [].concat.apply([], chatCommand.split('~').map(function (v, i) { return i % 2 ? v : v.split(' ') })).filter(Boolean); log("Post Splitting"); @@ -836,8 +849,6 @@ on("chat:message", function (msg) { let input = calculateVariables(argv, msg.who); let run = calculateRunScript(input); let dc = calculateDc(run); - log("Process roll"); - log(run); return processScriptTabs(run, msg.who, dc); } else if (argv[1] === "log" || argv[1] === "graphics" || argv[1] === "test" || argv[1] === "hero" || argv[1] === "lupine") { return processScriptTabs(argv, msg.who, baseDc()); diff --git a/vampire-v5/sheet.json b/vampire-v5/sheet.json index 2405017b9e..6e7ea34fa6 100644 --- a/vampire-v5/sheet.json +++ b/vampire-v5/sheet.json @@ -4,7 +4,9 @@ "authors": "Momtahan K., Martinez A., Obi", "roll20userid":"117780, 143652, 95940", "preview": "preview.png", - "instructions": "Please read the README.md or the Guide section of the sheet. To use the sheet, the different buttons next to each Attribute enables you to provide a modifier. The Check-box toggle at the top of the sheet allows for toggling between Standard In-line Rolls and Rolling with the API (This will only work if the \"Vampire The Masquerade 5th Edition Dice Mechanics\" API script has been loaded via API settings). Each sheet is set to roll with the Inline, non-API rolls by default. API rolling requires a Pro-level subscription. When using Inline rolls, place the mouse of the number of successes to see the dice rolled. Importantly when using Inline if your dicepool is 3 and your hunger is 4, 4 dice will be rolled, make sure to remove any extra successes or effects. Each button is coded (to the best of my knowledge) to match VTM5e rules. The ROLLS section provides an area for custom rolls, this is useful for Discipline rolls that you will have to remake. As you can't select the disciplines in the Trait 2 combo box, please use the second set of custom rolls and type the value in manually. On pressing the COTERIE button a second set of headings will appear. It is recommended that the ST has one character sheet shared with all players, so they may all type the coterie details into a single sheet. By default Chrome (and likely Firefox) will stop the custom font, at the right of the address bar in your browser is a shield. If you click the shield and select Load unsafe scripts, this will provide access to the custom font. Inline rolls may show negative numbers if your hunger is larger than your dice pool, see the Guide section for details, this is being fixed." + "version": 1.2, + "patreon":"https://www.justgiving.com/fundraising/vtm-5thed-character-sheet-red-cross", + "instructions": "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 7eb92ead35..4b02d8f26f 100644 --- a/vampire-v5/vampirev5.html +++ b/vampire-v5/vampirev5.html @@ -1,5 +1,5 @@ + + +
+ + + + + On completion of this sheet we sat down and had a chat and we all agreed that it would be great + if some good could come from it. Therefore if you like our work and want to show your appreciate + please make a donation to any of the following charities.
+
Red Cross: https://www.justgiving.com/fundraising/vtm-5thed-character-sheet-red-cross

While I am maintaining this repo anyone who makes a donation, can message me via https://app.roll20.net/users/117780 + and get their name added to our list of supports.
+ + + +
@@ -3074,47 +3126,43 @@
  1. Custom fonts. While the sheet has default fonts it is also programmed to use a number of custom - fonts. If you want access to them when in your game, click the shield icon in the right of your - address bar and select to allow the script (Firefox may behave has similar setting). + fonts. If you want access to them when in your game please do the following. For Chrome: Click + the shield icon in the right of your address bar and select to allow the script. For Firefox: + Click the "i" icon in the left of your address bar. Click the arrow to "Show connection details" + and then click the button to "Disable protection for now".
  2. Inline vs API rolling. If your ST is a Roll20 Pro-account holder they should have access to the - API script. In this case we highly recommend you pester them to ensure you can use them and check - the check box at the top of each character sheet (just below the tabs). This will unlock a number - of different features including banners, re-rolls and custom dice displayed that will make you - gaming experience a lot more streamlined. It will also mean there are less manual steps for each - roll. Unfortunately this functionality can not be ported to Inline rolling due to programmatic - restraints. + "Vampire The Masquerade 5th Edition Dice Mechanics" API script. In this case we highly recommend + you pester them to ensure you can use it and check the check box at the top of each character + sheet (just below the tabs). This will unlock a number of different features including banners, + re-rolls and custom dice displayed that will make you gaming experience a lot more streamlined. + It will also mean there are less manual steps for each roll. Unfortunately this functionality + can not be ported to Inline rolling due to programmatic restraints.
  3. (Pro-account holders) To install the API script: Go to Settings -> API Settings. If the "Vampire The Masquerade 5th Edition Dice Mechanics" API is available and uploaded to Roll20, select it - in the dropdown menu. You are now good to go. If it is not, please perform the following extra - steps. Click New Script and call it hq.js (any name will do, but its a nice nod to Konrad's work). - Copy the contents VTM Dice Mechanics.js (as found alongside this character sheet in the Roll20 - Github repository) in the hq.js window and press save. That's it.
  4. + in the dropdown menu and press save. You are now good to go. If it is not, please perform the + following extra steps. Click New Script and call it hq.js (any name will do, but its a nice nod + to Konrad's work). Copy the contents VTM Dice Mechanics.js (as found alongside this character + sheet in the Roll20 Github repository) in the hq.js window and press save. That's it.
-

Inline rolls.

+

Inline rolls.

  1. Many of the buttons on the sheet will do much of the rolling for you, either calculating how - many dice you need or aiding you with selection. In cases where Hunger dice are used (Attribute, - Ability, Discipline rolls), the Hunger dice are automatically subtracted from your Vampire dice - and rolled as a separate pool. However, if you dice pool is 3 but your hunger is 4, then 4 hunger - dice will be rolled and the number of successes may be misleading. By hovering your mouse over - the number of successes you can determine what dice rolls were made and you can take the first - 3. This is not an issue for the API rolls.
  2. + many dice you need or aiding you with selection.
  3. To find out exactly what dice have been rolled, hover the mouse over the number of successes. In rolls where the Hunger dice are used (Attribute, Ability, Discipline rolls) if you fail, check to see if you rolled a 1 on the Hunger dice. If this is the case then consult the rules to determine - how to proceed (Page 207, 208). Further, in this case the number of vampire dice will be negative, - please ignore this.
  4. -
  5. On a roll if the number of successes is green, you may have rolled a critical success. Hover + how to proceed (Page 207, 208).
  6. +
  7. On a roll, if the number of successes is green, you may have rolled a critical success. Hover the mouse over and count how many 10's a rolled to determine if you rolled a critical (Page 120) or a messy critical success (Page 206, 207). Please note, the extra 2 successes for a Crit are not automatically added. @@ -3130,9 +3178,6 @@
      -
    1. - The number of hunger dice is correctly calculated. Thus a dice pool of 3 while you have 4 hunger will only roll 3 dice. -
    2. The dice rolls are already displayed. For standard rolls banners will display if your roll is a Crit (Page 120), Messy Crit (Page 206, 207), Zero successes (This is the Miss/Fail banner) (Page 122). Moreover the extra @@ -3149,7 +3194,7 @@ like to implement custom rules if players decide to try their luck and fails.
    3. - Willpower rolls are determined by the number of full checkboxes, damaged ones do not count. (Page 119) + Willpower rolls are determined by the number of full check boxes, damaged ones do not count. (Page 119)
    4. Remorse is calculated automatically based on rules stated on Page 239. @@ -3181,9 +3226,7 @@ when deciding on difficulty. (Page 219, 240)
    5. - The Willpower Re-roll button is there to aid you if you want to spend a point of willpower. Please declare how many dice - you wish to re-roll before rolling as the API version current rolls 3 dice automatically (the - Inline version will ask you how many dice to roll). + The Willpower re-roll button is there to aid you if you want to spend a point of willpower.
    6. Mouse over text has been added in some locations and should help clear up some confusion. @@ -3201,8 +3244,8 @@ There are two sections in the Custom Rolls section currently. The top section is for people with access to the API, the bottom - is for those who are using the In-line rolling. This is a great section to store all your individual - discipline rolls or any rolls you make often. There are however a couple points to note about this section. + is for those who are using the Inline rolling. This is a great section to store all your individual discipline + rolls or any rolls you make often. There are however a couple points to note about this section.