I would love to see a random node like this!
What do you think?
What is the currently the way to recreate this randomness?
I would love to see a random node like this!
What do you think?
What is the currently the way to recreate this randomness?
Nevermind, I found the card. It was under … AND and not … THEN
Anyways, this only allows for 2, 4, 8, 16, 32, … etc. outcomes. Unfortunate if you want to have exactly 12. Unless you do some fancy math.
“Fancy” math , still most of the time it is 50%, just not the first step where it should be 33% chance
But if you wanted to start to go this route, calculating a random number and checking what the value is might be getting easier and more expandable:
Calculation: {{ floor(random() * (max - min) + min) }}
(calculation in the image has a tiny mistake by adding an end bracket too many!)
Ok, I admit, it’s not too fancy. Still, I would prefer a “random” node
I think you could also use randomInt([1, 12]) istead of {{ floor(random() * (max - min) + min) }}
not with the default logic cards, it isn’t MathJS that they use there, then you should use the app “better logic library” to be able to do that.
But yes, a random node would be easier, feel free too ask Athom to add it via their support form, shouldn’t be too too hard to add something like that. (i think)
Not to be a smartass, but you can use “randomInt(1,12)” without the round()
No, I like improvements / simplifying Thanks for the hint!
are you sure? randomInt() definetly works on my homey. The threads found on this forum also point to the math.js reference page:
Back in 2019 it was not the case, several were added manually after i asked for them.