User talk:Pringlesfan2002
Hey, I wanted to mention that we talked with speedrunners about calculating the chance for when the game uses floor(random(x)) == 0 a while back on another occasion.
It turns out that the documentation is slightly wrong, while it's true that random(x) == x can happen, floor(random(x)) == x cannot. So the expected range of floor(random(20)) would be [0, 19], and therefore floor(random(x)) == 0 is a 1/20 chance. It's counter-intuitive, I guess, but I trust the speedrunners to have tested this extensively.
Cheers! KockaAdmiralac (talk) 23:02, 25 May 2025 (UTC)
- Yeah, I was confused about this, so earlier I made my own GameMaker project that did nothing but run the same
floor(random(20))function and display the resulting number with a button to reroll it, and I wasn't able to get a 20. - I guess it's that since the
floor()function is cutting off all the decimal points, and therandom(20)function generates floating points, the possibility of it actually generating the maximum value of 20.00 would at best be so astronomically solar-flare-affecting-mario-64-level low that it's not worth factoring into the odds, if it's even possible at all. - As a kind of irrelevant aside, it's kind of weird that the game consistently uses random functions wrapped in floor functions to get random integers instead of just using
irandom()to generate integers in the first place... Pringlesfan2002 (talk) 23:51, 25 May 2025 (UTC)
It does seem a bit unnecessary but I was just changing it to match other pages using "Asgore Dreemurr" in similar fashion. Do you think we should be changing those as well or is it all fine? Minecraftemery (talk) 00:09, 22 June 2025 (UTC)
- Honestly I just thought it seemed awkward within the phrasing of that one sentence where I changed it. I don't think there's a need to change everything to be first names either... (especially since obviously I don't know off the top of my head every single time a character is referred to by full name on the wiki) I think there's just some sentences where a full name reads more naturally and other sentences where it's better as just a first name. So I don't really have any conclusion for you. Pringlesfan2002 (talk) 00:34, 22 June 2025 (UTC)