# RPTools.net

Discussion and Support

It is currently Sat Feb 17, 2018 4:11 pm

 Page 1 of 1 [ 10 posts ]
Author Message
 brunnjon   Kobold Joined: Thu Oct 09, 2008 10:43 amPosts: 5
 Post subject: Random Number Picker – Formula DéPosted: 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.

 giliath   RPTools Founder Joined: Tue Jan 31, 2006 11:10 amPosts: 277Location: Austin, TX
 Post subject: Posted: 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

 Krattack   Kobold Joined: Tue Aug 19, 2008 10:01 amPosts: 18Location: Tampere, Finland
 Post subject: Posted: 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.

 PyroMancer2k   Dragon Joined: Thu Sep 11, 2008 1:04 pmPosts: 925
 Post subject: Posted: 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.

 brunnjon   Kobold Joined: Thu Oct 09, 2008 10:43 amPosts: 5
 Post subject: Posted: 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?

 PyroMancer2k   Dragon Joined: Thu Sep 11, 2008 1:04 pmPosts: 925
 Post subject: Posted: 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

 brunnjon   Kobold Joined: Thu Oct 09, 2008 10:43 amPosts: 5
 Post subject: Posted: Wed Oct 15, 2008 2:27 pm
This is exactly what I was looking for! Thank you!

 brunnjon   Kobold Joined: Thu Oct 09, 2008 10:43 amPosts: 5
 Post subject: Posted: 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?

 knizia.fan   Giant Joined: Wed Jul 30, 2008 2:43 pmPosts: 199
 Post subject: Posted: 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]

 brunnjon   Kobold Joined: Thu Oct 09, 2008 10:43 amPosts: 5
 Post subject: Posted: 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!

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 10 posts ]

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

 Search for: Jump to: Select a forum ------------------ General    Announcements    Ideas for New Applications    General Discussion    Developer Notes       Java Programming Info    User Creations       Requests for HELLLLP!       Tilesets, Token Libraries, and Complete Maps          Token Libraries          Tilesets/Graphics for Map-making          Complete Maps       Campaign Frameworks          D&D 5e Frameworks          D&D 4e Frameworks          [D&D3.5 + Pathfinder] Campaign Macros          Shadowrun 4e Frameworks          Savage Worlds Frameworks       Published Module Support       Tutorials          Graphics, Images, Tokens, Maps          Drop-In Macros and Scripts          Campaign Frameworks       Drop-In Macro Resources    Links & External Resources    Looking For Group       "Living" Campaigns       Dungeons and Dragons       Savage Worlds       WoD       Wargaming    Documentation Requests/Discussion    Session Report-Back Tools    MapTool       How To       Macros       Feature Requests          Resolved       Bug Reports          Resolved       WIP - User FAQ       Testing    MapTool 1.4    TokenTool    DiceTool    InitiativeTool    CharacterTool       Support: d20 D&D       Support: D&D 4e       Support: Hero System       Support: Savage Worlds       Support: GURPS Other    RPTools Sightings    Running Campaigns       Thiera's College of Adventurers       Age of Might       Scales of War       Renwold       Dead Men Walking       Dark Sun - 4th Edition       Warhammer Fantasy Roleplay       Return of Uchly Namen       Insert Campaign Here       Antium       The Mystic Moon       World of Lagal       GangerRun       FB Scales of War       Sellswords of Eberron          Archive       Orbs of Chaos       World of Omegus       Keep on the Shadowfell - 4E       Rise of the Runelords       Aurith In The Age Of Steam       Widdershins       Nos's Pathfinder Campaign       Falcons Hollow       Verwirrte Welten       With it or on it       Starter Set - Jeff

### 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