Range Problem ....

15 views
Skip to first unread message

alc

unread,
Dec 15, 2009, 10:29:25 AM12/15/09
to Rollon Plugin
Hi,

I'm trying to use the Rollon plugin to generate from a table that does
no start at 1 and it seems to be ignoring my dice settings and taking
the range from the table.

This would be fine if it didn't generate values that do no exist in
the table.

For example:-

I have a tiddler with containing a definition list like this

;4-7
:Asteroid Belt
;8-9
:Barren
;10
:Desert (Rock)
;11-12
:Garden (Very Thin atmosphere)
;13-14
:Garden (Thin atmosphere)
;15-16
:Garden (Standard atmosphere)
;17-18
:Garden (Dense atmosphere)
;19-21
:Hostile
;22-24
:Garden (Very Dense atmosphere)

and I am using the following rollon macro call

<<rollon dice:4d6 times:24 table:"WORLD TYPE TABLE" separator:'<br>'
overWrite:true>>

Since I'm rolling 4d6 the values 1-3 should not occur but I get
"Couldn't find range encompassing value 3" (for values 1-3) in the
results.

If I remove the table:"WORLD TYPE TABLE" from the above call then
everything works as expected producing a set of 24 4d6 dice rolls.

Any suggestions on how to fix this?

have fun
alc

majyc

unread,
Dec 15, 2009, 10:39:01 AM12/15/09
to Rollon Plugin
Hm. I'm not sure what's going on there, but I'll have a look. I have
some vacation coming up at the end of this week, so I hope to have
some time to look at this and the bug that Mark found.

Joshua

Thrown Away

unread,
Dec 15, 2009, 12:07:18 PM12/15/09
to rollon...@googlegroups.com
Hi Joshua,

Having had a squint at the code as far as I can see, not being a JavaScript programmer, there are two problems:-

1) It looks like it is not using the dice for a definition list which maybe by design.

Though personally I'd like to be able to specifiy a dice expression for a definition list since there are numerous examples of tables in RPG's that use say a difficulty modifier to restrict the range of results from a table.

2) While the code checks for a high value it doesn't check for the lowest value in the definition list.

The code does  r = Math.ceil(Math.random() * high);  instead of something like r = Math.ceil(Math.ramdom() * ( high - low )) + low;  where low is the lowest value found in the definition list.


As I said I'm not that familar with JavaScript so this maybe all be a red herrings. :)

have fun
alc

--

You received this message because you are subscribed to the Google Groups "Rollon Plugin" group.
To post to this group, send email to rollon...@googlegroups.com.
To unsubscribe from this group, send email to rollon-plugi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rollon-plugin?hl=en.



Reply all
Reply to author
Forward
0 new messages