PDA

View Full Version : Exploding Upwards and Downwards



augustgames
March 24th, 2024, 10:58
I am strugging through the proper text string to do the following:

Scenario One
Roll 3 dice.
20s explode (roll another die and add to value)
1s implode (roll another die and subract from value)
Pick the HIGHEST adjusted value (of the three adjusted die values)

Scenario Two
Roll 3 dice.
20s explode (roll another die and add to value)
1s implode (roll another die and subract from value)
Pick the LOWEST adjusted value (of the three adjusted die values)


I tried /roll {3d20!r1}k1 for Scenario one. The 20s reroll but the 1s do not.

I tried /roll {3d20!r1}kl1 for secenario two. The 20s reroll but the 1s do not. I also tried /roll {3d20!r<2!!<21}kl1 and I get the same issue.

I have spent a few hours on this. I would appreciate any advice. Thanks.

damned
March 24th, 2024, 12:38
Capability is not built in you would need to make your own die roll.
https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996640101/Rolling+Dice

LordEntrails
March 24th, 2024, 22:18
FG doesn't have any 'implode' type ability for die rolls. Yoiu can 'explode', and you can 'keep', but no ability to re-roll and subtract if a die is a 1.

Moon Wizard
March 24th, 2024, 22:43
Technically, there is an ability to explode low as well as explode high. However, they can not be mixed and matched. So, as @damned mentioned, it would need to be handled within ruleset/extension code.

Regards,
JPG

LordEntrails
March 25th, 2024, 01:41
I don't see in the linked wiki page the format for a die expression to re-roll low and subtract the re-rolled value from the initial roll. How would that be done by itself?

Moon Wizard
March 25th, 2024, 02:08
Example:


/roll 3d6l


Regards,
JPG

augustgames
March 25th, 2024, 02:50
Thanks. Too bad you can't mix. Looks like it's a bit more work than expected.

LordEntrails
March 25th, 2024, 03:35
Thanks Moon

johnecc
March 26th, 2024, 10:52
@LordEntrails, the Rolemaster system makes use of this. It has an open ended d100 roll, if result is >=96 rolls again and adds, result of <=4? then rerolls and subtracts.

LordEntrails
March 26th, 2024, 15:32
@LordEntrails, the Rolemaster system makes use of this. It has an open ended d100 roll, if result is >=96 rolls again and adds, result of <=4? then rerolls and subtracts.
Thanks, I was curious what system(s) used such. I need to get into more systems :)

augustgames
March 28th, 2024, 14:34
So I think I am starting on the custom dice coding. My lua dust is falling away (been over 22 years). I have been poking around but can't seem to find some good documentation on :

Displaying the output to the chat widown (Print does not seem to do it)
Showing the actual dice roll in the chat window (less important).

Any good links would be appreciated.

Thanks all!

Trenloe
March 28th, 2024, 15:07
This thread is a good reference: https://www.fantasygrounds.com/forums/showthread.php?35531-Coding-dice-rolls-(actions)-in-CoreRPG

The "onRoll" event uses Comm.deliverChatMessage to display the result of the roll, which is constructed with ActionsManager.createActionMessage

The Comm package is a good reference for what can be displayed: https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996644567/Comm

augustgames
March 29th, 2024, 04:48
Thanks again Trenloe! I owe you two beers now.