Sun Dec 10 00:12:29 2017 by Razorfire |

Torben Hello, I am running a local instance of troll and am trying run the numbers for a D20 based roll and keep mechanic. Basic mechanic, roll a dicepool of D20s, 5 is average. Two of Dice are unique for generating wild results. Take the 2 highest than rolled less than a TN, 10 is default, add them up to get your action total. If none base action total is 0. If unique dice pair are a match, and the number matched is less than your 1-20, 10 average, attribute. You add that to your base action total. Then I want to take the least 1 of the remaining dice in the pool that is less than or equal to skill level 1-20ish as the result number. However, I am running into out of memory issues getting the remaining dice in the pool to evaluate for the least one. There are a lot of variables so I don't know if that is an issue. Appreciate any help you can provide. |

Mon Dec 11 09:42:51 2017 by Torben |

The number of variables in itself is not an issue, but a large number of large dice can, indeed, make Troll choke. Here is a trick that you can use to reduce the memory usage: Since numbers greater than TN are not counted, you can replace all numbers over TN by 0, i.e, replace each d20 by `choose {1..TN, (20-TN)#0}` .If you also use the same dice to compare to the skill level, you might want to use `max {TN, skill}` instead of `TN` in the above.This trick will not help if TN or skill are close to 20, but if they are close to 10, it can make a substantial difference. |