View Full Version : Insta-Dice Extension - Support
jharp
August 1st, 2021, 23:05
This is the support thread for the Insta-Dice extension. This extension is designed to save a DM time while rolling on more complicated and embedded loot tables. The extension is designed only for the session host and can be used at any time by either holding Shift-Alt prior to rolling or holding Shift-Alt after a roll has been initiated on a roll table.
Available at: https://forge.fantasygrounds.com/shop/items/163/view
Releases
v1.0.10
Fix: Incompatibility with dicejail and dicejail_smelter
v1.0.9
Fix: Dice shapes were broken.
Fix: Colored dice were broken.
Fix: /IDRoll <diceexpr> "Optional description" works provided the extension is enabled, but does not depend on the default usage.
v1.0.8
Added: Configuration for allowing the GM to use Insta-Dice by default (Off by default)
Added: Configuration for allowing the GM to share the Insta-Dice function with players (Off by default)
Added: Configuration by players to allow them to use Insta-Dice by default. (Off by default)
Fix: /IDRoll <dice expr> now works for GM and players independent of the enable/disable status.
v1.0.7
Changed: Moved the configuration of Insta-Dice to the options menu under Ma's Tools.
Added: /IDRoll <dice expr> will now do an Insta-Dice dice roll independent of the enable/disable status.
v1.0.0
Initial release
Known Issues
Insta-Dice does not support rulesets with non-standard dice. IE Conan. It is unlikely I can fix this for any ruleset that is not outside the Vault.
jharp
August 30th, 2021, 17:23
Confirmed compatible with v4.1.5
Confirmed compatible with upcoming ruleset changes.
Weissrolf
November 2nd, 2021, 21:00
Could you please add an option to always roll Insta-Dice without having to hold Shift-Alt (maybe inverting the behavior of Shift-Alt then)? Thank you! :o
jharp
November 2nd, 2021, 21:15
Will do.
Weissrolf
November 2nd, 2021, 21:18
Great, thank you. The Instance Dice extension (different author) does not work for Pathfinder 2 persistent damage while yours does, so our group would use that function.
jharp
November 2nd, 2021, 21:30
Not familiar with persistent damage so if there are any other features that would make my extension work better for you let me know.
Weissrolf
November 2nd, 2021, 22:29
Persistent damage is rolled after a characters turn ends, including a flat D20 check against 15+ to see if the condition ends. The other extension does the rolls, but the results are not applied, yours works.
I assume your extension is based on math.random? It's a rather weak random number generator, but still better than 3D dice (on top of saving time to watch rather strange roll physics). Maybe have the extension do a couple of hidden rolls at load time to better initialize math.random?!
Thanks again for the quick reply and adding user wishes. ;)
jharp
November 3rd, 2021, 00:32
Persistent damage is rolled after a characters turn ends, including a flat D20 check against 15+ to see if the condition ends. The other extension does the rolls, but the results are not applied, yours works.
I assume your extension is based on math.random? It's a rather weak random number generator, but still better than 3D dice (on top of saving time to watch rather strange roll physics). Maybe have the extension do a couple of hidden rolls at load time to better initialize math.random?!
Thanks again for the quick reply and adding user wishes. ;)
Ok, I've done base testing with some added options.
New Options
"Insta-Dice: Default method for GM?" allows the GM to use Insta-Dice as the default with shift-alt performing the normal roll mechanism.
"Insta-Dice: Enable for players?" allows the GM to give the same functionality to players.
"Insta-Dice: PC default method?" (only available for players - defaults to No) allows the players to use Insta-Dice as the default with shift-alt performing the normal roll mechanism.
49783 -- Player view of options.
I'll look into the math.random you mentioned and see if I can seed it better.
Jason
Weissrolf
November 3rd, 2021, 01:06
Perfect, thank you. I will report back should I encounter any issues.
jharp
November 3rd, 2021, 01:14
I'll update the first post once approval of the build is obtained.
Weissrolf
November 16th, 2021, 08:27
Ahoi. We encountered two issues, one of which forced us to disable the extension for our PC rolls.
1. Critical damage rolls do not double the number of dice (or the dice result). So 1d8+1 turns into 1d8+2 instead of 2d8+2 (or 1d8+1 x 2).
2. This one is cosmetic: Dice rolls done from a character sheet are shown with a leading 0 (zero). So instead of 1d20 it displays 1d020. This does not happen when dice are rolled from the desktop/table.
jharp
November 16th, 2021, 15:19
Ahoi. We encountered two issues, one of which forced us to disable the extension for our PC rolls.
1. Critical damage rolls do not double the number of dice (or the dice result). So 1d8+1 turns into 1d8+2 instead of 2d8+2 (or 1d8+1 x 2).
2. This one is cosmetic: Dice rolls done from a character sheet are shown with a leading 0 (zero). So instead of 1d20 it displays 1d020. This does not happen when dice are rolled from the desktop/table.
#2 is a known side effect and cannot be fixed sadly.
#1 - I will need to know a place where it works (ie critical damage rolls double automatically) and then I will test my fix against that. Insta-Dice doesn't interpret dice rolls, it modifies and passes them on. So I would think this would work if it works at all without the extension.
Let me know how I can test #1 and I'll look to providing a fix.
Thanks,
Jason
Weissrolf
November 16th, 2021, 17:06
With Insta-Dice double damage crit rolls never seem to work, neither automatically nor manually. Manually usually works by holding shift while doing any damage-roll, but with Insta-Dice it only rolls the normal number of dice (while doubling the fixed bonus).
5E Sample Campaign:
Insta-Dice off:
https://i.imgur.com/fQYZGqD.png8
Insta-Dice on:
https://i.imgur.com/Cf9qpL8.png
As you can see FGU tries to do the second roll, but the outcome is 0 (zero).
jharp
November 16th, 2021, 21:35
I think I see a solution for both issues. It will take me a couple days to work out my solution.
Jason
jharp
November 17th, 2021, 22:04
Both issues are now fixed in 1.0.9. Awaiting approval on forge.
Jason
Weissrolf
November 17th, 2021, 22:39
Great, seems to work now. Bonus points for the correct dice symbols now showing up in chat instead of a simple circle. Thanks a lot. :)
Weissrolf
November 17th, 2021, 22:45
One more thingy: Insta-Dice does not work its magic when the /die command is used in chat. ;)
jharp
November 17th, 2021, 22:56
use /IDRoll instead
Jason
Weissrolf
November 17th, 2021, 23:08
Great, thanks! :)
Weissrolf
November 25th, 2021, 10:55
Before I go to length to test this: Does Insta-Dice use anything on top of simple math.random? Do you use a single seed for all rolls or a new seed for each roll?
I ask because Insta-Dice results on my 5900X + Windows 11 are statistically more random compared to results using Instant Dice (math.random using a single seed) on my 9900K + Windows 10 from one year ago. This can be OS dependent (math.random uses rand()) or coincidence, because I only compared two sets of 1 mio rolls (one set per each extension).
Unfortunately rolling via the extension takes longer than expected, aka the extension takes relatively long for each single roll when you try to do 1 mio rolls. So creating multiple or larger sets takes too long for me to pursue.
jharp
November 25th, 2021, 15:34
Insta-Dice simply uses the non-physics based rolling mechanism already built into FG. So whatever FG uses is what Insta-Dice uses. I'm willing to guess the pseudo-rand on Windows 11 is better than Windows 10.
Insta-Dice, at launch, sets the seed once and does 4 or 5 math.random() (simply for giggles). I doubt that makes any difference, although it is a more recent addition.
Jason
nephranka
March 16th, 2022, 01:44
I did find one conflict with an ext: The Dice smelter. When Insta dice is active the smelter throws an error.
https://www.fantasygrounds.com/forums/showthread.php?72274-CoreRPG-Dice-Jail-and-the-Dice-Jail-Smelt
jharp
March 16th, 2022, 03:15
I did find one conflict with an ext: The Dice smelter. When Insta dice is active the smelter throws an error.
https://www.fantasygrounds.com/forums/showthread.php?72274-CoreRPG-Dice-Jail-and-the-Dice-Jail-Smelt
Can you give me a screen shot of the error. I've seen a couple messages and want to know what you are seeing.
Jason
jharp
March 16th, 2022, 03:51
@nephranka As an immediate work around you can disable Insta-Dice before you smelt and turn it back on after.
I have a better fix going into Forge but will take up to a day to get approved. This fix simply doesn't allow use of Insta-Dice during the post-Smelt test roll. Once the smelting test process is complete it reallows Insta-Dice rolls.
Version 1.0.10 submitted on Forge to fix this.
Jason
nephranka
March 16th, 2022, 11:10
@nephranka As an immediate work around you can disable Insta-Dice before you smelt and turn it back on after.
I have a better fix going into Forge but will take up to a day to get approved. This fix simply doesn't allow use of Insta-Dice during the post-Smelt test roll. Once the smelting test process is complete it reallows Insta-Dice rolls.
Version 1.0.10 submitted on Forge to fix this.
Jason
Cool. I came to the same conclusion about turning it off. The error is:
[ERROR] Script execution error: [string "scripts/manager_dice.lua"]:248: bad argument #1 to 'ipairs' (table expected, got string)
Thanks for the fix!
jharp
March 16th, 2022, 17:35
Version 1.0.10 is now live.
nephranka
March 16th, 2022, 17:39
Version 1.0.10 is now live.
Cool. Thnaks!
nephranka
March 16th, 2022, 22:20
Gave it a run and it still throws the same error with v1.0.10.
Edit: Correction. I had manual dice set to on that caused the problem. If I set the option for manual dice to off then it works as you described. I get vdice for the smelt.
jharp
March 16th, 2022, 22:36
Ok. I see the error you speak of when manual dice is set on. This is actually the same error I get without my fix but the root cause is how the dice jail sets up the test roll. The don't follow the convention that is expected.
So in the case of Insta-Dice I just check for the broken dice roll and set it to ignore it. The Manual dice roll is a SmiteWorks thing and since they are following the convention I'm thinking they will rightfully point the finger at dice jail.
If you exclude Insta-Dice from you extensions you will see the same error on manual roll.
Jason
nephranka
March 16th, 2022, 22:38
Ok. I see the error you speak of when manual dice is set on. This is actually the same error I get without my fix but the root cause is how the dice jail sets up the test roll. The don't follow the convention that is expected.
So in the case of Insta-Dice I just check for the broken dice roll and set it to ignore it. The Manual dice roll is a SmiteWorks thing and since they are following the convention I'm thinking they will rightfully point the finger at dice jail.
If you exclude Insta-Dice from you extensions you will see the same error on manual roll.
Jason
Came to the same conclusion. Sorry for the false alarm but we are good now. Your work around does the trick.
jharp
May 26th, 2022, 04:07
My FG Forge account is in restricted mode at the moment. I expect it will be remedied soon but in the meantime I'm not certain what will occur to your ability to use this module. Let me know if it doesn't work anymore.
Jason
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.