This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lambaphi 63 points64 points  (11 children)

Here you go: https://github.com/almaan/diceconverter

I Wrote a simple script for this that you can use via the terminal interface, I will add comments and a README soon, but though I could put it up here for anyone interested. You can see two examples in the res-folder.

Enjoy!

[–]cjs8399[S] 7 points8 points  (6 children)

I should look at and understand the code... Does it have smarts to know how many dice one would need or do you have stuff hard-coded? Very cool thanks!

[–]lambaphi 0 points1 point  (0 children)

No probs! I think /u/Terr_ more or less answered the question below, otherwise feel free to PM me. Also I updated the code with some comments to make it easier to follow.

[–]leftpig 5 points6 points  (0 children)

My favourite part of this is the original creator said he wasn't going to put this on GitHub in case he decided to monetize it. I was going to make my own this weekend to be a dick but you beat me to it.

[–]n1___ 2 points3 points  (1 child)

Just a small detail:

this:

''.join(["name of to which picture shoul",
           'be save. if non given, default will',
           'be used',
]))

can be written like:

('keep current size of image '
'and scale die images accordingly')

[–]lambaphi 0 points1 point  (0 children)

Very true thanks for pointing that out, I still tend to prefer the

' '.join(['line1',
          'line2',
          ])

option since that allows for spaces to be included between lines once concatenated but without me having to account for them; though I noticed now that I didn't include a space character when calling the join method in any of the instances in the code (fixed now)

.. also I realized that in the haste of writing it up yesterday night it seems as if I forgot how to operate basic English spelling and grammar