RPTools.net

Discussion and Support

Skip to content

It is currently Sat Sep 23, 2017 10:15 pm 






Reply to topic  [ 10 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Thu Oct 09, 2008 10:43 am
Posts: 5
 Post subject: Random Number Picker – Formula Dé
PostPosted: Thu Oct 09, 2008 11:20 am 
Basically, I'd like to make some Formula Dé dice. There are six dice representing the six gears on your car. There's : a d4, 6, 8, 12, 20, & 30. The issue is that the dice don't all go through the standard range of numbers. For example, I believe the d30 only has numbers 20-30.

Is there a way to input what numbers are on each facet and just have it pick a random number from those available?


Last edited by brunnjon on Wed Oct 15, 2008 3:52 pm, edited 1 time in total.

Top
 Profile  
 
User avatar  Offline
RPTools Founder
 
Joined: Tue Jan 31, 2006 11:10 am
Posts: 277
Location: Austin, TX
 Post subject:
PostPosted: Mon Oct 13, 2008 2:52 pm 
Not really no.

Your best bet is to figure out the cooresponding equation, since it is not technically d30 (that would imply a 30 sided die).

If you want to create an expression that generates the numbers 20-30 (inclusive of both 20 and 30) then d11+19 should work as long as you are looking for a standard distribution of the numbers.

d11 -> 1, 2, 3, ... 11

_________________
~Giliath


Top
 Profile  
 
 Offline
Kobold
 
Joined: Tue Aug 19, 2008 10:01 am
Posts: 18
Location: Tampere, Finland
 Post subject:
PostPosted: Tue Oct 14, 2008 1:25 pm 
Unfortunately the distribution of the numbers is not standard. MapTool and tables could be a way to implement those dice, but if you don't need anything else from it then it might be too heavy application just for rolling the dice.

Or, as Giliath said, figure out the equation and use that. The d4 used in the game is easy since it really is a d2. Rest are trickier since, for example, the d8 has numbers 4,5,6,6,7,7,8,8. Might not even be possible to do without tables.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Thu Sep 11, 2008 1:04 pm
Posts: 925
 Post subject:
PostPosted: Tue Oct 14, 2008 4:10 pm 
Krattack wrote:
Unfortunately the distribution of the numbers is not standard. MapTool and tables could be a way to implement those dice, but if you don't need anything else from it then it might be too heavy application just for rolling the dice.

Or, as Giliath said, figure out the equation and use that. The d4 used in the game is easy since it really is a d2. Rest are trickier since, for example, the d8 has numbers 4,5,6,6,7,7,8,8. Might not even be possible to do without tables.


Actually you can do it real easily with List.
Code:
[ResultList = "4,5,6,6,7,7,8,8"]
[DiceRoll = 1d8-1]
{"Result is " + listGet(ResultList, DiceRoll)}

The -1 is in there cause List always start at 0. ;)


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Oct 09, 2008 10:43 am
Posts: 5
 Post subject:
PostPosted: Wed Oct 15, 2008 1:17 pm 
Sorry in advance, I know you get it all the time. But I don't know what "List" means. Is this something I would need to incorporate into the "functions.js" script?


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Thu Sep 11, 2008 1:04 pm
Posts: 925
 Post subject:
PostPosted: Wed Oct 15, 2008 1:36 pm 
brunnjon wrote:
Sorry in advance, I know you get it all the time. But I don't know what "List" means. Is this something I would need to incorporate into the "functions.js" script?


List is basically like the name says it's a list of items separated by comma. As in the ResultList variable. You can then pick items out of the list and use them for various things. In this case you have a List of all the possible results like in my example 8 possible results for the 8 sided die. Then when the dice rolls it takes one from the list.

It doesn't need incorporated in functions.js it was added to MapTool build 42. For a list of the commands you can find it at this link http://forums.rptools.net/viewtopic.php?t=5437


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Oct 09, 2008 10:43 am
Posts: 5
 Post subject:
PostPosted: Wed Oct 15, 2008 2:27 pm 
This is exactly what I was looking for! Thank you!


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Oct 09, 2008 10:43 am
Posts: 5
 Post subject:
PostPosted: Wed Oct 15, 2008 3:50 pm 
Everything seems to be working great.

Next question. Is there a way to Hide the list and the chosen list number and just spit out the result?

For the D30 it will show all 30 numbers on the list, then which list number it chose then finally the die roll related to the list number.

Like I said, it's great...does exactly what I NEED it to do. So...not griping :) But can I clean it up a bit?


Top
 Profile  
 
 Offline
Giant
 
Joined: Wed Jul 30, 2008 2:43 pm
Posts: 199
 Post subject:
PostPosted: Wed Oct 15, 2008 5:41 pm 
brunnjon wrote:
Everything seems to be working great.

Next question. Is there a way to Hide the list and the chosen list number and just spit out the result?

For the D30 it will show all 30 numbers on the list, then which list number it chose then finally the die roll related to the list number.

Like I said, it's great...does exactly what I NEED it to do. So...not griping :) But can I clean it up a bit?


Begin the things you want to hide with H:

For example,

[H: DiceRoll = 1d8-1]


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Oct 09, 2008 10:43 am
Posts: 5
 Post subject:
PostPosted: Wed Oct 15, 2008 10:30 pm 
Gods among men...all of you. Thanks all. This was the only thing we needed to figure out...and it's perfect. Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 10 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman