The other day I was working on a game in Screentop, and decided that I wanted the dice I had in it to be spotty dice rather than the digit dice that are the default. All this requires is uploading an image which shows the required faces (this works for any custom faces). If my image has a transparent background, then you can set the fill colour for the die to be whatever you want and then use the same image for a range of different coloured dice.
I figured that nanDECK would be an effective way of constructing the image, and it didn't take long to make the script. I thought I would share my script here as a kinda worked example. I'll break the sections of the script down with discussion about what each section does.
So, here goes...
BORDER=RECTANGLE,#000000,0,MARKDOTPAGE=21,29.7,PORTRAIT,HV
DPI=200CARDSIZE=5,5
[DotColour]=#000000[CircleColour]=#999999[TransparencyColour]=#ffbbff
RECTANGLE=,0,0,100%,100%,[TransparencyColour],[TransparencyColour]
ELLIPSE="1,3,5",2,2,1,1,[CircleColour],[DotColour],0.02ELLIPSE="4,5,6",0.5,0.5,1,1,[CircleColour],[DotColour],0.02ELLIPSE="4,5,6",3.5,3.5,1,1,[CircleColour],[DotColour],0.02ELLIPSE="2,3,4,5,6",3.5,0.5,1,1,[CircleColour],[DotColour],0.02ELLIPSE="2,3,4,5,6",0.5,3.5,1,1,[CircleColour],[DotColour],0.02ELLIPSE="6",0.5,2,1,1,[CircleColour],[DotColour],0.02ELLIPSE="6",3.5,2,1,1,[CircleColour],[DotColour],0.02
DISPLAY="dottydice.png",1,6,3,,[TransparencyColour]
And that last line outputs the six faces to a single PNG image, three "cards" wide, converting the colour we specified earlier to transparency.
And here's the output:
Black on transparency. Feel free to take and use if it is of any use to you. CC0 v1.0 |
And, as an alternative, re-running the script with the white version of [CircleColour] gives:
White on transparency. Feel free to take and use if it is of any use to you. CC0 v1.0 |
I don't know if this sort of thing is helpful or interesting, but here it is anyway.
No comments:
Post a Comment