is there something obvious I'm missing, or?... I know it's probably possible to make a script that does this, but I can't code, and since we're selecting the winner in a livestream it'd be better if it was a more 'official solution'
pic related is what I mean, except its hundreds of people, not 10
I've looked for over an hour, these are the only kinds of programs I've been able to find >coin flip >random name selector (it's alway 1/N people, not what I'm looking for) >random number generator >random cards >random name/username generator >random YouTube comment selector
haven't been able to find a single thing that lets me choose the percentage for each option
>Something obvious i am missing. Basic math skill? Basic logical deduction? Basic coding skill? Are there no coders on your team? Why are u asking g
Hudson Rogers
thank you user! trying it out now
lmao why are you guys so sour and joyless? >Basic math skill? yep >Basic logical deduction? yep >Basic coding skill? already said I can't, now who lacks deductive skills? >Are there no coders on your team? yes but they're preoccupied with other work, the giveaway is mine to deal with apparently
Liam Anderson
Have you ever heard of an "if statement"?
Hudson Richardson
>indie game cool what game :3
Lincoln Evans
You are retarded. Just divide one by another, what the fuck, user?
Jayden Kelly
Is this thread a stealth satire of indie devs' poor skills?
Gavin Rodriguez
I guess I didn't communicate clearly enough...
I understand that dividing an individual's points by the total points, gives me the percentage >eg: 50/1000 = 1 in 20 aka 5% chance of winning and I know that this could easily be put into a script,
but we don't WANT to use some cobbled together script to select the winner our team wants it to be more 'official' looking, like how youtubers select random comments for giveaways, eg: >commentpicker.com/ >youtube.com/watch?v=rkwAKkGKOBU&feature=youtu.be&t=85 we want it to be like this ^
How the fuck are you developing a game? Irregardless, I suggest you use Last Measure. It's a pretty broadly focused calculator/measurement converter/randomness tool. It works just right for many people.
Camden Barnes
There mifht be simpler solution but whatever: Construct a binary three where leafs are items and parent node holds sum of weights of children nodes. Root node thus has value of SUM of all item values. Roll in [0, SUM] If roll is smaller than the value of left node, proceed there. If roll is higher or equal than the value of left node, subtract it from roll and proceed to right subtree. Recursively get to the leaf to pick.
Carter Gonzalez
Let me guess, you've recently "upgraded" from FizzBuzz to parsing binary trees.
Anthony Lewis
Why not just do a system where 1 point = 1 entry into your contest? So if Jim has 200 points and sherry has 15 points, Jim has 200 entries and sherry 15
Eli Clark
Ok just an array could be simpler and there are no advantages for bintree.
Put all valuea into array, get sum of all values. Roll in [0, SUM] From i in o..len: If roll < value[i], pick it Else roll -= value[i] and continue in loop
Addition of item: just appens it Change of value: also trivial Deletion of item: could be O(n) but you can set it to 0 in O(1)
Everything is O(log n) on bintree
Jaxon King
If there is 6000 points then give a name to all the numbers between 1 and 6000 then. And just choose a random number between 1 and 6000.
Joseph Rodriguez
>using this as an example >being unable to do this without asking Jow Forums OP are you female? go to /sqt/
James Phillips
So you want a random wighted picker or a tool to scan comments for specific phrases? you are confusing.
Dominic Morales
Poo n Loo
Angel Gomez
Exactly how i (not OP) would do it
Christian Williams
over complicating things friends
from random import randint pairs = [("Alice", 20), ("Bob", 100), ("Charlie", 30), ("Dean", 40), ("Emma", 80), \ ("Fred", 150), ("Gary", 30), ("Harriet", 60), ("Isabelle", 40), ("Jack", 80)] winrar = randint(0, 640) count = 0 for name, points in pairs: count += points if winrar
Asher Young
it's the same thing except you add to count instead of subtracting from winrar technically with subtracting you have 1 variable less, thus it's simpler