PDA

View Full Version : [5E] Hide 3D Dice



7H3LaughingMan
October 19th, 2016, 23:38
Alright, this is my first extension and it might not be 100% bug free. I know some people were asking for a means to get ride of the 3D Dice and so far there are just some half working workarounds to this issue.

This extension works by first removing the dice themselves from the ruleset like similar extensions. It then re-adds them back as custom dice so that Fantasy Grounds can still understand what a d20 is but prevents them from showing up. Finally, there are some changes to how the ActionManager rolls dice so that it isn't throwing dice around. Instead it is going to do a math.random to determine the results.

You shouldn't have issues with items/spells/etc. from the modules since they should still roll their damage properly. However, you can have issues if you are adding a custom item or changing the damage of an item/spell. So there is a Dice Table that you can open as a GM by typing in "/openwindow diceTable". You should get a small window with all the basic dice that you can drag and drop into the dice fields. At the moment this window can't be opened by players and I am not sure how to do that bit yet.

Players can still manually throw dice from their character sheets if they drag it from the sheet into the chatbox. I am pretty sure this isn't something that can be 100% removed. If they do this it will still roll the dice but they will get an immediate result before the dice is done. Of course the result won't match was was rolled from the 3D Dice so players might think something is broken. Players should be able to still drag and drop the dice into a Dice Tower and the GM will see the results.

If you notice any issues please let me know so that I can look into it. Hope you guys enjoy this extension.

Trenloe
October 19th, 2016, 23:56
Nice one. Is this specific to 5e? Or could it be tagged as being used by any ruleset based on CoreRPG?

7H3LaughingMan
October 20th, 2016, 00:29
Nice one. Is this specific to 5e? Or could it be tagged as being used by any ruleset based on CoreRPG?

In theory it should work, but I haven't really tested it make sure. It can also have issues if a ruleset uses different dice since you get errors if you remove a dice that is already removed. Or if there is a new dice that isn't accounted for it will still show.

Rades
May 10th, 2018, 08:33
Hi, I'm not sure if you're still updating this extension, but it looks like the most recent FG update made this extension start giving script errors:

Script Error: [string "scripts/manager_action_attack.lua"]:482: attempt to call field 'outputResult' (a nil value)

Script Error: [string "scripts/manager_action_damage.lua"]:1357: attempt to call field 'outputResult' (a nil value)

These errors pop up whenever an attack roll or damage roll is made against another target. Tested with Hide Dice being the only active extension.

If you're no longer updating this extension I understand, but just wanted to bring it to your attention! Thanks!

Snippels
November 7th, 2018, 19:29
Hi,

I made a small modification to run this extension with PFRPG However, I've the same issues like Rades :-(

Script Error: [string "scripts/manager_action_attack.lua"]:661: attempt to call field 'outputResult' (a nil value)

Does anyone have an idea how to resolve this?
Or at least give me a hint so I am able to figure it out myself?

Regards,
Roland

Trenloe
November 7th, 2018, 20:55
Hi,

I made a small modification to run this extension with PFRPG However, I've the same issues like Rades :-(

Script Error: [string "scripts/manager_action_attack.lua"]:661: attempt to call field 'outputResult' (a nil value)

Does anyone have an idea how to resolve this?
Or at least give me a hint so I am able to figure it out myself?

Regards,
Roland
Welcome to the FG forums!

The problem is this - in order for FG to still recognise dice that have been removed from the desktop, the extension developer had to modify the ManagerActions global script package. This modification was based off manager_actions.lua from 2 years ago. This file has had updates since then and so the code it is based on is no longer compatible with the FG actions code as it is now.

You could try making the needed modifications yourself - based off the latest \scripts\manager_actions.lua in the CoreRPG ruleset.

In the extension there is \scripts\manager_actions.lua (the script being used) and \scripts\manager_actions.bak - which I presume is the original file that the code was based on. Do a compare of these 2 files to see what changes the extension did to the original, and now see about merging those changes into the most recent file from CoreRPG.

And then be prepared to do this every time this file changes with a future CoreRPG FG update... ;)

Snippels
November 7th, 2018, 22:01
Thank you Trenloe!

With your info, the fix was easy. The function outputResult(..) is missing in the lua file of the OP's extension. I'd like to do some testing next week and see if it works stable.

Am I allowed to post my modified version of this extension in this thread?
If yes, is there something I'd have to respect, e.g. giving credits to 7H3LaughingMan or changing the author tag in extensions.xml?

Trenloe
November 7th, 2018, 22:09
With your info, the fix was easy. The function outputResult(..) is missing in the lua file of the OP's extension. I'd like to do some testing next week and see if it works stable.
It probably isn't just a case of adding the outputResult function to get full compatibility with FG v3.3.6A code.


Am I allowed to post my modified version of this extension in this thread?
If yes, is there something I'd have to respect, e.g. giving credits to 7H3LaughingMan or changing the author tag in extensions.xml?
Yeah, 7H3LaughingMan hasn't been active on these forums for about a year. So it's fine to post a modified version of their extension in this thread. Please keep them as the original author, and you can add something like "compatibility edits by Snippels" or something similar to a chat window announcement message - info here: https://www.fantasygrounds.com/refdoc/announcement.xcp

7H3LaughingMan
November 8th, 2018, 13:31
Yeah, 7H3LaughingMan hasn't been active on these forums for about a year.

Not anymore! Just been busy with working full-time, going to school full-time, and taking care of my two year old and 5 month old. The little ones take a lot out of you and haven't had personal time in forever.

However, yeah due to the nature of how this extension works if any edits are made to the scripts it overrides it can potentially cause errors. Anyone is free to update this to newer versions if they want.

Trenloe
November 8th, 2018, 14:50
Good to hear from you and know you’re OK. Other than pesky real life getting in the way of personal time!


Anyone is free to update this to newer versions if they want.
Thanks!

Snippels
November 8th, 2018, 19:16
Anyone is free to update this to newer versions if they want.

Thanks 7H3LaughingMan!

I just updated your original version to be used with PFRPG and made it compatible with FG v.3.3.6.

As this is my first experiment with extensions, I cannot guarantee that it's free of errors.