Isn't that always the way? Just when you do something that feels like being "done" with something, a slew of changes crop up that are needed, or that you just feel like you want to add.
It happened when I first bumped the droll project to Release Candidate status. It has happened again, now that I pushed the project to gemcutter, thus publishing the droll gem for all the world to see and use.
I published the gem as a release candidate (already at a ridiculous sub-version of the 1.0.0 release candidate -- 1.0rc5.2.3, fercryinoutloud) only the day before yesterday, and today I found myself adding support for three more die types in my local development version. As things stand, I think I will have to reorganize things substantially to feel better about how this stuff is implemented before dumping the new features into the public gem, and I haven't even added documentation for the new features yet. I'll add documentation before pushing to Bitbucket; I'm not sure whether I will put off pushing to Bitbucket until I've reorganized everything.
I should probably just start using temporary branches for feature development in the future. Maybe it's not too late to do that now, for these features.
Part of the problem with the current implementation of these new features is that they're just adding to the cruft building up in a sort of god-method that does far too much stuff. I really need to break some of this stuff out into separate methods, not only to manage complexity for me as a developer, but also because there's no reasonable way to provide good test coverage for the functionality currently lumped together in the uber-method. Kids: don't try this at home.
I think I will keep working on droll stuff for a while before going back to other personal projects in any seriousness, unless someone reports a bug, or gives me some kind of feature request of dire urgency.
Somewhere along the way, I need to make a droll project site, too. My to-do list just keeps getting longer.
I've added three new die types (two of which are related). Since first writing this, I have reorganized the code, written some tests, and changed the syntax for those two related die types, so I decided to edit the following:
k
: The k
die type (e.g. 4k6.3
) is used to collect the highest N results from a series of dice, where N is expressed using the "dot-threshhold" syntax familiar to the x
and e
die types (for instance). Thus, the 4k6.3
die code example yields results equivalent to the familiar "roll 4d6, drop the lowest" system for generating an attribute in (Advanced) Dungeons and Dragons -- or, alternative, "keep the best three". If no dot-threshhold number is provided, it will simply produce the value of the single largest die result. Modifiers can be applied as usual (e.g. 4k6.3+2
), in which case the modifier will be applied after the result of the dice being rolled and totaled (minus dropped dice) is calculated. The k
stands for "keep".
K
: The K
die type (e.g. 4K6.3
) is effectively the same as the k
die type, but produces the total of the N lowest die results, rather than the N highest. I am not entirely sure where this would be useful; perhaps your GM wants to randomly generate a bunch of NPCs with odious personal habits, and get their Charismas to average pretty low. The K
also stands for "keep", but is capitalized to differentiate it from the (probably) more common "keep the highest dice" case.
n
: The n
die type (e.g. 5n10.6
) was added to cover the case of rolling for successes rather than totals. With this die type, the result produced is not what you get by adding together the results of all the dice rolled, but rather what you get by counting the number of dice rolled whose values exceed a particular target number. This die type feature was added with the realization that droll did not yet support traditional World of Darkness rules. The default threshhold number, as normal for most die types that make use of a dot-threshhold number, defaults to the highest value the die rolled can produce in a "natural" roll. The example 5n10.6
die code would simulate rolling 5d10 and counting up the number of them that produce a result of six or higher. The n
stands for "number", as in "Tell me the number of dice that meet or exceed the threshhold value."