The Mud Connector

Author Topic: RNG and Building  (Read 555 times)

SteppinRazor

  • New to TMC
  • *
  • Posts: 17
    • View Profile
RNG and Building
« on: August 23, 2017, 3:50 PM »
A simple idea concerning RNG-based mechanics.

I've forgotten the math, but basically RNG is somewhat deceptive. A 10% chance doesn't mean you will get it 1 in 10 tries. It represents an average that can be wildly different, and may not even represent an average of 10% when you define "if roll =< 10".

Some of you may have played an old-school MMO, where camping could often revolve around a timed unique spawn with horrendous odds of dropping an item, so you will know that camping can turn bad when RNG is involved. What good is spending off time doing nothing but waiting, when you could be doing something else?

Builders should be aware that if you set a difficult task before someone, and it's RNG based, you're going to have some unhappy people who otherwise shouldn't be. The difficulty should not be derived from something beyond anyone's control. Now rarity... is a different beast. It's a flip side of the same coin. Certain things should be impossible, with odds so improbable that when it miraculously does land that invisible die, it can be celebrated for the miracle that it is. Try not to clog up that pool of items with trash, ie things that are not of that caliber in whatever terms, or it cheapens the idea represented. At the same time, you should actively encourage people NOT to require these things, not to try and farm them. WoW's mounts are a good example... some people have spent more hours farming mounts than I have actively worked in any given week, and they're motivated by rewards and tracked progress to waste their time. Sure, some people like to do it, and I don't fault them for it, but driving "difficulty" as a randomly generated number is an insult to them. It might be generous, with a 3% drop, but it's still deceptive because you may run that content 33 times and have nothing. You might run it 99 times, and have nothing.

So, what's the answer?

A safety net. Make that average a legitimate, defined amount.

This is how an average 1/10 or 10%  RNG calculation will look at its most basic.
Code: [Select]
randomnumber = 1 100
if randomnumber >= 90
giverarestufffs!
else
toobadsosad
endif

Now if you take it a step further... you can throw in a safety net counter.
Code: [Select]
if blockerset == 1
randomnumber = 100
blockerset = 0
else
randomnumber = 1 100
endif
if randomnumber >= 90
rngnet = 0
giverarestufffs!
else
rngnet + 1
if rngnet == 10
blockerset = 1
call thisexactscriptagain
break
endif
toobadsosad
endif

This results in someone getting a reward either by pure chance in the stated 1/10, or at the very last point where 1/10 still stands as a defined guarantee.

There are a few ways to twist around an RNG chance, too. You can throw in other modifiers to influence base chance, like a luck stat. The below assumes that luck has a possible score of 1-10.

Code: [Select]
randomnumber = 1 100
modifier = charactersluck
modifier * 10
modifier / 4
randomnumber + modifier
if randomnumber >= 90
giverarestufffs!
else
toobadsosad
endif

This is still not a guarantee of 1/10, but it does raise the odds somewhat which most players desire when having to spend time chasing a rare whatever.
Like a steppin' razor, better watch my sides.

MGrunbaum

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: RNG and Building
« Reply #1 on: August 29, 2017, 2:19 PM »
Just as a little tidbit for those interested in why: RNG-based mechanics are usually independent events, meaning the chance for an event to trigger (say 10%) is not affected by whether the event triggered in the past, at all. Like the flip of a coin -> If you flip the coin and you get heads, you're no more, or less likely, to get heads on the next flip. Believing you are more likely to get heads (or tails) is called the gambler's fallacy. A pretty easy-to-follow description can be found here.

Add to that, that a random number between X to Y is not guaranteed to produce an 'average' balanced number of each of the numbers when you just generate a few of them; something being random precisely means that it follows no discernable pattern, and good random number generators are built to be pseudo-random and produce an average spread over a very large number of samples.
« Last Edit: August 29, 2017, 2:25 PM by MGrunbaum »