This is a specific dice roller to include.
It would be nice to implement a pluggable architecture (look at the NICE architecture of jirc project http://jirc.hick.org/jirc/index.prl ) Use of groovy would be nice in the roll module too...
Here i paste the pseudo-code
1. r = Roll(1d10)
2. if r == 0 return "Possible Botch"
3. else if r != 1 return r
5. pot = 0
5. while r == 1
7. r = Roll(1d10)
8. end while
9. end if
10. return 2^pot * r
4, result = 4
0, result = "possible botch"
1,1,3 = 12
1,8 = 16
1,1,1,1,1,7= 2^5*7 a lot !
Note: I can provide the java source code for this. Thanks.
Giliath will have a better explanation, but he's sick today, so I'll make a first pass response :)
The tricky part is the design. A couple design questions that would need to be addressed:
- How do you add a new module
- Is the module attached to the tool, or the campaign (if you play multiple campaigns at a time, you might only be interested in a module for one of the campaigns)
- Are modules automatically shared to clients (does that pose a security/privacy risk) ?
- What facilities are provided for debugging/editing modules, if any
- What is the user interface for interacting with the modules
I like the idea of making the module interface modular to allow different engines to be included.
We have actually already started to introduce scripting in the tool via the command panel (eg /goto tokenname). Presumably at some point a lot of the tool will be run by internal scripts, which can be extended.
Log in to post a comment.