- At 14:01 2005.10.01, Éric Beaudoin wrote:
>At 13:58 2005.10.01, Éric Beaudoin wrote:

Ha coffee, let's do this again.

>>11/30 is not accurate (I need coffee). It should be 7/36. So if you drop the 1, you roll a d35 and divide the result by 7 and this is the same as rolling a d6 and re-rolling once if you get a one. So in rnd(35) return a random value in [ 0 .. 34 ], the dice expression would be floor(rnd(35)/7)+1.

>

>I really need that cooffee, I forgot to account the 1/36 to get the one and nothing pop up right. I'll try again later after my coffee.

We want a formula that has the same probabilistic result as the event rolling a d6 and re-rolling the d6 once if the result for the first roll is 1.

The probability to get a result of 1 is 1/36. The probability to get any of the other result (2, 3, 4, 5 and 6) is 7/36.

Let rnd(36) returns a random value that is >= 0 and < 36

customroll() = floor((rnd(36)+6)/7)+1

If we use d36 as a function that return a value that is >= 1 and <= 36, we have the following

customroll() = floor((d36+5)/7)+1

I think I got it this time. It's really easy so it makes you wonder what I was thinking earlier. Another proof that coffee is indeed a drug.

Value of d36 Result

------------ ------

1 1

2 2

3 2

4 2

5 2

6 2

7 2

8 2

9 3

10 3

11 3

12 3

13 3

14 3

15 3

16 4

17 4

18 4

19 4

20 4

21 4

22 4

23 5

24 5

25 5

26 5

27 5

28 5

29 5

30 6

31 6

32 6

33 6

34 6

35 6

36 6

-----------------------------------------------------------

Éric "Space Monkey" Beaudoin

Founding Member of the Hidden-in-the-Trench Club

Release Monkey and Syntax Watchdog>> In space, no one can hear you sleep.

<mailto:beaudoer@...>

>> Camels to can climb trees (and sometime eat them).

- Éric Beaudoin wrote:

>At 17:28 2005.10.01, Devon Jones wrote:

Oh, heh :) It's a zip file. just rename it to .zip, and you can open it

>

>

>>>Also, if it was contributed by someone in the PCGen family, we should put out a license text for it and 1) recognize the contribution 2) give it a license that is compatible with the jep license if it is based on the jep source code. Do we have the source for djet BTW?

>>>

>>>

>>>

>>>

>>>

>>>

>>Yes, the source is *inside* the jar ;)

>>

>>Devon

>>

>>

>

>Let's pretend for a second that the only thing I know about the .jar file generation is that I have to type "ant clean build test" when I want to build the PCGen .jar files. How can I get the source out of a .jar that I do not compile myself?

>

>

>

with your favorite zip tool (or, if you use a command line program, you

don't even need to rename it to .zip for many of them).

Devon