Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

40k scatter die

Does anyone have an api script for the 40k scatter die?  I want a way to randomly assign a direction in a campaign and I think that will do nicely
1449583769
Ziechael
Forum Champion
Sheet Author
API Scripter
A quick and common way to determine direction is to use the 3d dice and a d8 with the direction being the top point of the resulting number. Alternatively you could create a rollable table with all of the available directions in it with equal weighting and roll on that?
1449590276
Lithl
Pro
Sheet Author
API Scripter
A 3d d8 on its own isn't enough, since you can't accurately represent rolling "on-target" with that. You should probably roll 1d8 and 1d6, assigning something like the 1 and 6 on the d6 as the "on target" results for the scatter die, and the 3d d8 as the direction otherwise.
1449611155
The Aaron
Pro
API Scripter
You could use a 3D d6 and just declare the upper right corner as the arrow, then use the number as the success/distance. 
1449667806
DK Heinrich
Marketplace Creator
Sheet Author
Could this  script be altered (and simplified since its only one dice) to represent a scatter die? 
1449668907
The Aaron
Pro
API Scripter
That script is mainly necessary for doing special grouping of images. If you really want a script that does this, it's probably better to step back and design one from scratch. Let's chat through how you'd like to use it and see what we can come up with. I've not played 40k, but I used to play Warhammer. Here's what I would likely do, based on what I remember: 0. On startup, if it doesn't exist already, the script creates a character named Cannon Dice (or similar) in all player's journals abs controlled by all players. It also creates a token and asks the GM to assign it to that character. (The API can't set default tokens yet).  1.  When deviation is needed, a player drags that character in and places it's token at the target spot. Then clicks the Roll Deviation token action.  2. Various animations could be done here, but at a minimum, the token could be changed to point the direction and show the distance.  Advanced versions might draw the measurement out, or prompt for the radius and draw that as well.  
1449681437
DK Heinrich
Marketplace Creator
Sheet Author
yeah, I have not played 40k in a long time but that seems like it could do the trick for him - as for the other script I saw pictures of dice and extrapolated it to being able to be pictures of arrows pointing in the directions that the scatter die points. 
1449686465

Edited 1449686542
The Aaron
Pro
API Scripter
Yeah, in that regard, it doesn't do any more than a rollable table could do, though the formatting is possibly nicer in some regards.  You could make a rollable table with about 360 arrow images pointing in every imaginable direction (though really, you could likely get by with fewer). Additionally, you could use TokenMod to spin a pointer: !token-mod --set rotation|[[1d360-1]] For that matter, you could even have it roll the distance: !token-mod --set rotation|[[1d360-1]] statusmarkers|red:[[(1d6-1)*2]] --ids <the id of the graphic> You'd have to treat the 9 as a 10 (status markers only go up to 9), and no number means dead on hit.  You could alternatively set the name to the distance and just know that a 0 is a hit. Here I'm putting the id in and running the script so I don't have the marker selected, but you could create a character and use this as a token action on it.  That would let players drag it into any page and roll it.  Just put it in their journals/control.  Also solves the problem of moving between pages.
1449688094
The Aaron
Pro
API Scripter
With a rollable table, you can get really fancy: TokenMod Command (note the single quotes around the rollable table: !token-mod --set rotation|[[1d360-1]] name|'[[1t[Scatter-Dice] ]]' --ids -K56z-83u7WepOsYP3hv TableExport Loading for the table I setup: !import-table --Scatter-Dice --show !import-table-item --Scatter-Dice --Direct Hit!!! --1 -- !import-table-item --Scatter-Dice --2" Off --1 -- !import-table-item --Scatter-Dice --4" Off --1 -- !import-table-item --Scatter-Dice --6" Off --1 -- !import-table-item --Scatter-Dice --8" Off --1 -- !import-table-item --Scatter-Dice --10" Off --1 --
1449753943
DK Heinrich
Marketplace Creator
Sheet Author
that is what I was envisioning for Tyler, your mad skills work once again
1449758459
The Aaron
Pro
API Scripter
Yeah, not to pat myself too much on the back, but I am continually pleased with the general use cases that can be met with TokenMod alone.  I should strive to make all my other scripts as useful. =D
1449759089
Ziechael
Forum Champion
Sheet Author
API Scripter
What... like CharMod? *cough cough*
Thank you for all the ideas.  If I had any programming knowledge I would have done the script myself.  I do not however.  I am using this for blind characters in a pathfinder game who fail their perception check.  I what to use a random generation method because there are a couple magic fields that will be moving around the map too and I don't really feel right about intentionally leading the characters into those fields so I'm even using a grid system to decide which squares the field occupies once the fight begins.
You don't need any scripts then... you can just roll 1d8 and number the squares around the characters. 1 up, 2 up-right, 3 right, 4 right-down, etc.