PDA

View Full Version : How to Make "Percentile Dice"



S Ferguson
March 18th, 2013, 02:20
Would anyone know how to implement the "percentile dice" in RMC. I need something like this for another percentile game. Any help would be much appeciated.

JohnD
March 18th, 2013, 04:28
They're already there... dice box in bottom left corner. Or just right click on the d10 and choose the %.

S Ferguson
March 18th, 2013, 04:33
No. For another ruleset, silly.:p I want to know the secret of percentile dice rolls without having to go through the radial in another game system. That would make me happy.:)

Apparantly I'm easy to please.:)

Moon Wizard
March 18th, 2013, 05:25
I believe that the dice in the lower left portion of the desktop are just icons, and when you drag the icon, it adds a "d100" and a "d10" dice to the drag cursor. When the dice land, you have to check for d100 in the die results, and collapse in a d10 for each one. There is a processPercentiles function in the 3.5E and 4E rulesets that does the last part.

However, the open-ended or exploding rolls are a different beast, and I am not familiar with the RMC or SW implementations.

Regards,
JPG

S Ferguson
March 18th, 2013, 13:41
Thanks, that's what I needed to know. The open-ended rolls just automatically "roll and add" if the score is above 96, or below 05.

Cheers
SF

Dakadin
March 18th, 2013, 20:59
Sorry I had to work most of last weekend so didn't see this until now. Please let me know if you have any questions about the open ended rolls and I will help you find them. I know they gave me a bit of a headache when I first started looking at them. ;)

S Ferguson
March 18th, 2013, 22:25
I was actually wondering how you developed the simple percentile roll as depicted in the lower left hand corner of the screen. That would be a huge benefit to me if I can turn it into an extension for percentile games like BRP or CoC. How did you go about programming this?

Cheers,
SF

Dakadin
March 19th, 2013, 02:30
The previous developers created that. It definitely speeds up rolling dice in RM.:)

There is a panel name "Die" in the desktop\desktop_panels.xml file that uses the "RMDice" windowclass from the desktop\desktop_classes.xml file. The code for them is located in desktop\scripts\desktoppanel_d100.lua. You should be able to track down what you need from there unless you want to make them open ended.

S Ferguson
March 19th, 2013, 02:33
Thanks. I'll see what I can do. Then I'll probably come crawling back for answers;) .

S Ferguson
April 19th, 2013, 03:04
This is proving a little more difficult than it first appears. The base files for the percentile dice have "attachments" to so many different files, it would write over my rules if I implemented it straightforwardly. Any help in pairing down the files needed aside from the ones given, would be much appreciated.

Cheers,
SF

Ardem
April 19th, 2013, 06:58
Percentile rolling code is not had the exploding die code is harder to decifier.

I am wrapped, I have just learnt how to do, dice roll against a target numbers and worked out successes to display. Everything little advance I get in ruleset creation is a boon to your ego.

I am also making a ruleset from scratch, did you start with foundation or with another ruleset.

S Ferguson
April 19th, 2013, 07:07
I'd be happy with basic percentile rolls right about now. Open-ended rolls I can worry about later - much later.

Dakadin
April 19th, 2013, 07:52
If you are just trying to make a percentile roll, use the chatwindows throwdice function. Here is a link to the ruleset reference for the function: https://www.fantasygrounds.com/refdoc/chatwindow.xcp#throwDice

Here is an d100 example:

control.throwDice("dice", {"d100","d10"}, modifier, descriptionstring);

S Ferguson
April 19th, 2013, 15:32
Thanks guys. Gosh I love this forum.

Cheers,
SF

Dakadin
April 22nd, 2013, 06:20
Percentile rolling code is not had the exploding die code is harder to decifier.

I am wrapped, I have just learnt how to do, dice roll against a target numbers and worked out successes to display. Everything little advance I get in ruleset creation is a boon to your ego.

I am also making a ruleset from scratch, did you start with foundation or with another ruleset.

There are a couple problems with figuring out the exploding die code. First the information needs to be stored in the customdata that identifies the roll as an exploding roll. Then the chat windows onDiceLanded function is used to check the customdata and respond appropriately by rerolling any extra dice. It gets a bit complicated in the RMC ruleset because of all the different types of rolls so it can be hard tracking down what is happening in the code. The chat_chat.lua file contains the onDiceLanded function if you want to look at it.