
This is a simple script for Double Cross 3rd edition, which automatically calculates output of rolls for " achievement number(達成値)". Command format (regular expression) is from the Double Cross TRPG script of Zetetic L. (which has the same core functionality) but internal implementation is almost fully re-written. Here are improvements from Zetetic L's script: This script uses sendChat API for dice rolling (thus, dice rollings are done with QuantumRoll ) which provides better random results. Fixed crash when command input does not match the format. Show roll result as a table Source code (gist) : <a href="https://gist.github.com/ERT-Kim/35a36e43c8f13bbaa5daaa6371842c6d" rel="nofollow">https://gist.github.com/ERT-Kim/35a36e43c8f13bbaa5daaa6371842c6d</a> About achievement number in DX3rd Achievement numbers are used for skill check in DX3rd. It is basically same with exploding dice, and 'critical value' will be the exploding point. One big difference is that achievement number only adds one maximum value for each roll, rather than adding up all the roll results. Also, if reroll occurs, maximum value of previous roll is treated as 10. e.g.) You roll 5d10 of critical value 7, and get 8,7,5,4,1. You add 10 to your achievement number and rerolls 2d10. Command !sr (number of dice)dx(ciritical value)(1st +/- adjustment 1)(2nd +/- adjustment) 1st and 2nd adjustments are optional. If critical value is omitted, it will be automatically set to 10. Here are some examples of input. !sr 5dx
!sr 7dx7
!sr 7dx+5
!sr 10dx-1+6 Result Table Result of the roll is shown as table, like below image: Each row shows result for each roll sorted as descending order.
(In the example, there were 4 rolls; 10d10, 6d10, 3d10, 1d10)
Last two rows are adjustment values(if exists) and the final result of the roll. If you don't like this, you can choose text output format (like that in Zetetic L.'s script) by modifying this part of the code: // you can select either tableStr or fullStr here var reply = tableStr;
sendChat(msg.who, reply);