Coin-Flipper and Die-Roller (V 1.0)

Hosted on Dropbox: https://db.tt/ii8DSHC7

Version: 1.0

Synopsis:

Have you ever wanted to flip a coin or roll a die using ChoiceScript? Look no further!
With Coin-Flipper and Die-Roller, one can:

  • Monitor the ratio between the number of heads and the number of tails a computer flips a coin

  • Roll a user-defined, 3-faced to 8-faced die

To-Do List:

  • Add multipliers (flip multiple coins / roll multiple dice)
  • Rework Syntax (fewer lines, more concise)

Buglist:

  • Using the “Roll again with same parameters” function results in a not-authentically-random outcome

Version History:

  • 8/5/2016 - Version 1.0 released with base-program

Notes:

5 Likes

EDIT: OKAY, NEVERMIND. I totally see what this is for, now. Here’s a bug report for you!

Bug line 73 indent problem. It was after choosing a 6 face die side.

@ashestoashes018 @Lordirish

Thank you for the bug reports. Turns out I didn’t remove what I thought I did. (I was trying to figure out how to use *input_number instead of using *choice).

It should be fixed now.

1 Like

Ran through the six sided only, roughly a dozen or times with 4 new tries in all. The results do not very much at all. Some times I reroll 8 or 9 times with out a change in the result. Plus out 40 or so total rolls I have only recieved 3, 4, and 5, it acts as if it is counting as I never recieve a lower number, sorry does not feel very random.

1 Like

The code still needs a bit of work. “Roll again with same parameters” isn’t currently working.

I got a 1. :slight_smile:

2 Likes

Tried creating a dice roller long ago, while it worked well had to many complaints about using it in game. Of course CS has add a lot of code since those long forgotten days of your, so am excited to see you take this on and will be happy to test agian. But as it stand it is still a little cumbersome, only in my opinion of course, for in game use.

Edit lol good job @FairyGodfeather :upside_down:

1 Like

I found trying to make little tools like this a fun way to learn to code and test my skills. I did a clunky rock paper scissors ages ago.

And Dodge those Bullets Neo amused me. (I’m sad it’s down.) So I think part of the fun of creating this sort of thing is trying to iron out the code, make it more streamlined and workable, but also getting it to do stuff like rename the sides of the dice.

For me, the thing I’d like most is to be able to roll six sided dice, perhaps multiples thereof. To play a simple game with an opponent, where you both roll 2D6 and whomever rolls highest wins, that sort of thing. That’s more interesting to me than being able to rename the sides of a dice, because with a little dice contest I can see it having a purpose in a game.

Even if you’re fighting different opponents and each has a different set of criteria you need to beat them. Like for one you need to get doubles, and one you have to roll 7 exactly, or perhaps you’re looking for snake-eyes, or maybe it is just highest wins. And then I’d add stuff to keep track of how many times you try. And of course I’d have to work the code so you can’t cheat by back and forth-ing to the stat screen. Only maybe I’d add in a method where you could cheat in the game.

Heh even a heads or tails tournament!

BUT that’s just what I’d do. And what Eleckar wants to do is great, and I’m sure you’ll get there and iron out the difficulties.

Oh! I shouldn’t be allowed to rename all of the sides of the die the same thing.

2 Likes

I remember that one was rather fun.

1 Like

In my game, I actually created a system of Dices and Chance pretty similar to this one, but I adopted the system used in D&D

With Dices ranging from D2, D4, D6, D8, D10, and the ultimate used in many, the D20

They’re used to determine whether or not you fail or succeed an action… with 1 resulting in automatic critical fail, and a natural 20 resulting in an automatic badass win…

Here’s an example of a skill check roll
(rolling D20, rolled {d20}[/b] + Strength([b]{strengthmodifier}) + Luck([b]{luckmod}[/b]) | DC = {DCrange} or above)
(rolling D20, rolled 8 + Strength(2) + Luck(1) | DC = 10 or above)
They rolled a total of 11, and the DC is 10, which means they succeeded… barely…

Script: http://pastebin.com/4baWpKJL