Jump to content
Discussions

User talk:Pringlesfan2002

From Deltarune Wiki
< Back to page
Latest comment: 22 June 2025 by Pringlesfan2002 in topic Dess's page "Kris Dreemurr"

Pringlesfan2002

aka Pringlesfan2002trusted user
Malius's Page Apprentice
Avatar of Pringlesfan2002.
  • 707 edits
  • 15 posts

floor(random(20))

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)Reply

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 the random(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)Reply

Dess's page "Kris Dreemurr"

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)Reply

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)Reply