It looks like you're new here. If you want to get involved, click one of these buttons!

According to the creator Torben Mogesen, Troll's predecessor Roll has been used by White Wolf to calculate probabilities for several alternative dice-roll mechanisms during the development of the new version of the RPG World of Darkness.

(Regardless of that) I've found Troll to be very useful when assessing dice-rolling mechanisms. Has anyone of you used it?

Troll's homepages

My blog post on Troll (describes the features of Troll)

BTW, to use Troll you'll need to have Moscow ML. You can get it here.

## Comments

I haven't looked at Troll.

Let me know if you need help writing dice programs.

The syntax isn't impossible but it would help if the language made collections and singletons more distinguishable.

`function compare(a,b) = if (max a)>(max b) then 1 else (if (max a)<(max b) then -1 else call compare(least ((count a)-1) a, least ((count b)-1) b))`

x := I D N; y := J D N; call compare(x,y)

convention : 1 is the result if player 1 wins, -1 is when player 2 wins.

disclaimer: some parenthesis may be unnecessary but I don't care to learn Troll operators precedences.

When I run the case player 1 has a 5d10 pool and player 2 has 4d10 I type the following command :

troll -3 filename.txt I=5 J=4 N=10

notice the -3 parameter in the command, it limits how many recursive calls to the compare function. It means I consider that the two players won't have more than two ties among their highest dice.

Here are the result I get in this case :

Value % = % >=

-1 : 42.4252657 100.0

1 : 57.5747343 57.5747343

Average = 0.151494686 Spread = 0.988458072006 Mean deviation = 0.97704936011

I read the manual again, the little

detailsabout normalized probabilities and avoiding function calls. So I came with a better strategy (same conventions) :`x:= largest 3 (I D N); y:= largest 3 (J D N); if (max x) > (max y) then 1 else if (max x) < (max y) then -1 else if (max(least 2 x))>(max(least 2 y)) then 1 else if (max(least 2 x))<(max(least 2 y)) then -1 else if (min x) > (min y) then 1 else if (min x) < (min y) then -1 else 0`

`I=8 J=4 N=20`

Value % = % >=

-1 : 30.2352864731 100.0

0 : 0.159749216272 69.7647135269

1 : 69.6049643106 69.6049643106

I=8 J=4 N=10

Value % = % >=

-1 : 26.8730521887 100.0

0 : 1.0238713456 73.1269478113

1 : 72.1030764657 72.1030764657

I=8 J=4 N=4

Value % = % >=

-1 : 17.2243475914 100.0

0 : 8.6407661438 82.7756524086

1 : 74.1348862648 74.1348862648

74.1% chance of victory against the challenger when using d4 against 69.6% when using d20. It's not a tremendous difference though.

In Sorcerer, the degree of success is determined by counting how many of the winner's dice has bigger results than the loser's. Is there any means of taking the degree of success into the equation other than a series of if-then-else clauses?