PC RNG Trials With Golden Crates

SteveisNoob

Pixel Pirate
Hi, everyone, here's SteveisNoob. In this thread you will find some good and varrying loot from Golden Crates. I had done total of 15 seperate openings, 10 of them with 15 crates each while 5 with 30 crates, a huge number. :p As you may noticed, there are total of 300 Golden Crates, all obtained by using TShock. So, let's come to the openings! Enjoy with the good loot!
1_15.png

Sundials and baits are good, but Mythril can be 2 more bars...

2_15.png

Some Titanium and Adamantite, even with more money

3_15.png

Wow, 84 Titanium Bars! Even with 38 Mythril!

4_15.png

If there're 12 Orichalcum Bars more, I would go for Frost Armor...

5_15.png

Go and come tomorrow, said the RNG :(

6_15.png

Whaaaaat?? This is getting worse and worse...

7_15.png

Probably the worst one

8_15.png

Finally, again we started to talk :)

9_15.png

That's pretty neat, that I like.

10_15.png

Wow, I couldn't managed to get full Orichalcum Armor! That's great!​
1_30.png

This amount of Adamantite with a few Titanium is really interesting

2_30.png

Why there has to be that many of turtle mounts?

3_30.png

On there, RNG tries to make balance...

4_30.png

Titanium, Adamantite, Orichalcum; Game of Armours!

5_30.png

The amount of mana potions... Pretty weird...​

I think the loot tells everything, but there's something interesting. Its no matter what amount you have tried, RNG always have the last word. So, if you managed to get something useful with a below-than-average or average effort you can tell you lucky. If you didn't, just accept that RNG doesn't like you.
And finally, here's loot obtained from just 11 Golden Crates, for the win!


Such a lucky moment!
 
-mega snip-

Not sure what exactly the point to be made here is. Random is Random is Random.

It picks items out of a list, then picks a random amount within the allowed amounts, and dumps them in, and if it's empty it re-rolls.

I've gone 90+ wooden crates (and wood chests in the world) with zero radars before (THAT was irritating as crap, couldn't finish my cell phone because I was hung up on a stupid radar of all things). I've gotten sundials out of 5-6 golden chests in a row. It's all random.
 
Also worth noting is that opening each crate is an individual unique event. It's a common fallacy to assume something is more likely based on previous events. E.g. if I flip a fair coin 4 times and the result is heads 3 times and tails once, what is the probability of the next flip being heads? It's still 50% of course, but some people will say heads is more likely (because it occurred more often) or tails is more likely (because statistics).

So you're not more likely to get a rare item on the 50th crate if the previous 49 didn't have one. The chance of the first crate having it was X%, the chance of the second was X%, ..., the 49th was X% and the 50th will be X%.
 
Also worth noting is that opening each crate is an individual unique event. It's a common fallacy to assume something is more likely based on previous events. E.g. if I flip a fair coin 4 times and the result is heads 3 times and tails once, what is the probability of the next flip being heads? It's still 50% of course, but some people will say heads is more likely (because it occurred more often) or tails is more likely (because statistics).

So you're not more likely to get a rare item on the 50th crate if the previous 49 didn't have one. The chance of the first crate having it was X%, the chance of the second was X%, ..., the 49th was X% and the 50th will be X%.
You explained this thread's purpose just perfectly. All my purpose of creating all this mess is just show "It's RNG, it does decide" thing. So, thanks so much for explanation.
 
You explained this thread's purpose just perfectly. All my purpose of creating all this mess is just show "It's RNG, it does decide" thing. So, thanks so much for explanation.

Are you trying to combat the common misconception that crate loot isn't random? Because as far as I know, that misconception isn't common at all.
 
Are you trying to combat the common misconception that crate loot isn't random? Because as far as I know, that misconception isn't common at all.
No, im just trying to explain the RNG's mechanic with crates, these're are easy way to explain the randomity of RNG. So, no offense to anyone or anything...
 
Are you trying to combat the common misconception that crate loot isn't random? Because as far as I know, that misconception isn't common at all.

I think he was trying to debunk the "If I get x+y crates, I'm y more likely to get z out of the next crate!" type deal where if someone opens 50 crates, they think that Crate #51 is more likely to give them the item than Crate #1 was.

We know the truth, but there's still some players out there who seem to think that.

Doesn't matter how many times you flip a coin, it is still always 50% chance of getting heads whether you flip it once, or your 1000th flip, it's still 50%.
 
There's also the common misbelief that e.g. "An item has a 1/100 chance of appearing in a crate. Therefore if I have 100 crates, I have a 100% chance of getting the item."
Which is also not true, because the chance is still per-crate (i.e. per event) and not the chance of success as a whole. Each event remains distinct and is not in any way linked to previous events, just like my coin example.
 
There's also the common misbelief that e.g. "An item has a 1/100 chance of appearing in a crate. Therefore if I have 100 crates, I have a 100% chance of getting the item."
Which is also not true, because the chance is still per-crate (i.e. per event) and not the chance of success as a whole. Each event remains distinct and is not in any way linked to previous events, just like my coin example.

Now, there IS a higher chance that by the time you expend all 100 crates you'll have the item, vs only opening 1 crate, but that is because you have multiple tries.

I forget the formula for that.
 
Now, there IS a higher chance that by the time you expend all 100 crates you'll have the item, vs only opening 1 crate, but that is because you have multiple tries.

I forget the formula for that.
Exactly!
I don't remember the formula either. But I'm fairly sure it's not 1% + 1% + 1% + ...; which is where the misconception comes in. (Still using the 1/100 example.)

The distinction is the two events:
If I open a single crate, what is the chance I get an item? -> The chance is 1%
If I open a second crate after that, what is the chance I get an item? -> The chance is still 1%
If I open two crates, what is the chance either crate has the item? -> Not 1%, but not 2% either. We need the formula. :)
If I open a hundred crates, what is the chance one or more of those crates have the item? -> The chance is not 1% + 1% + 1% + ...

The first two are distinct events. The latter two refer to multiple chances in a single event.

Just like:
If I flip a coin, what is the chance I get heads? -> The chance is 50%
If I flip a coin a hundred times, what is the chance at least one of those are heads?
 
Exactly!
I don't remember the formula either. But I'm fairly sure it's not 1% + 1% + 1% + ...; which is where the misconception comes in. (Still using the 1/100 example.)

The distinction is the two events:
If I open a single crate, what is the chance I get an item? -> The chance is 1%
If I open a second crate after that, what is the chance I get an item? -> The chance is still 1%
If I open two crates, what is the chance either crate has the item? -> Not 1%, but not 2% either. We need the formula. :)
If I open a hundred crates, what is the chance one or more of those crates have the item? -> The chance is not 1% + 1% + 1% + ...

The first two are distinct events. The latter two refer to multiple chances in a single event.

Just like:
If I flip a coin, what is the chance I get heads? -> The chance is 50%
If I flip a coin a hundred times, what is the chance at least one of those are heads?
Calculating the possibiliies or chances isn't my specialty, but when it comes to the games, the rule is simple: Always RNG does decide... I don't know what did i write this, but it seems that the hardest part about Terraria is understanding the RNG...
 
Exactly!
I don't remember the formula either. But I'm fairly sure it's not 1% + 1% + 1% + ...; which is where the misconception comes in. (Still using the 1/100 example.)

The distinction is the two events:
If I open a single crate, what is the chance I get an item? -> The chance is 1%
If I open a second crate after that, what is the chance I get an item? -> The chance is still 1%
If I open two crates, what is the chance either crate has the item? -> Not 1%, but not 2% either. We need the formula. :)
If I open a hundred crates, what is the chance one or more of those crates have the item? -> The chance is not 1% + 1% + 1% + ...

The first two are distinct events. The latter two refer to multiple chances in a single event.

Just like:
If I flip a coin, what is the chance I get heads? -> The chance is 50%
If I flip a coin a hundred times, what is the chance at least one of those are heads?

Well, let's use coin flips. If I flip a coin once, the chances that it might be heads is 50%.

If I flip a coin twice, the chances I will get heads is the first 50% + ... well, let's look at the probability chart:

TH
TT
HH
HT

3 out of the 4 have a heads in them, so it is actually 75%. Let's do it three times:

TTT
TTH
THT
HTT
HHH
HTH
HHT

7 Possibilities, all but 1 have a Heads in it, so 1 out of 7 which is ~86-87%.

So it looks like you are adding 50% of the previous to the new.

50% + 25% = 75%

75% + 12.5% = 87.5%
 
No, im just trying to explain the RNG's mechanic with crates, these're are easy way to explain the randomity of RNG. So, no offense to anyone or anything...

Then with all due respect, I think this thread is in fact counter-productive.

You might have heard that computers can't do random, which is in fact true. But at any rate, computers are infinitely better at random than humans are. Humans just can't. Ask a group of people a number ranging from 0 to 10 and you'll get very little 0s or 10s (because by mentioning those in the range, humans now have those in their short term memory, and will intentionally omit them because they are no longer considered a random outcome). People intentionally try to give an outcome they think is random, in the process no longer making the choice random.

On the scale of the universe, nothing is random: everything is caused by something. However, most of these are too complicated for humans to understand and/or predict. Any such pattern is what we call a random pattern (for instance Gaussian Blur, which is perfectly mathematical, but the result appears random). The images you have provided too are examples of randomness.

Notice the paradox? 'An example of randomness'? Or in other words, an example of something unpredictable from which we are to derive an understanding of a concept. You could very well have just put up the picture of a goat up there.

But here comes the coup de grâce: multiple pictures. If you have multiple instances of a random outcome, then people are instinctually going to try and find a pattern between them, even though there is none (which is the entire point you've been trying to make). For instance, in your 15 crates tests, you got a lot more Sundials than you statistically should have. Probability wise, there is nothing wrong with this outcome, but for some people it's just going to reinforce the idea that RNG is either broken or that it can be influenced (for instance that maybe Sundials drop more in crates that are opened at night).

Random isn't a mathematical construct (in fact it's the most a-mathematical construct in existence), it's psychological. Attempting to illustrate how it work builds understanding of an un-understandable concept. Be very careful with that.
 
For instance, in your 15 crates tests, you got a lot more Sundials than you statistically should have. Probability wise, there is nothing wrong with this outcome, but for some people it's just going to reinforce the idea that RNG is either broken

There ARE cases when RNG can be programmed poorly and people start going "Uh, what's up with this game's RNG?"

This happened in Warframe. Not saying it happens here, but it does happen in Warframe, and it was awhile later, but a developer managed to discover that the game's RNG was terrible and apologized profusely (because Warframe is a very RNG-heavy game, most of the game's loot is determined by RNG, and for the RNG to be broken in the way it was, made for a very unrewarding game).

https://forums.warframe.com/topic/128402-rng-algorithm-bugschanges/

Contains the details if you're interested.
 
It's counterintuitive, but you need to do the 'opposite formula' to get what you're looking for. Don't try to calculate the chance of getting say heads in three flips, calculate the chance of NOT getting heads at all and then subtract that from 100% (or 1.00 probability). So for any one flip the chance of heads is 50%, so the chance of Not_Heads (tails) is 100%-50%=50%. So in two flips, to not get any heads you need the first flip no heads (50%) and then the 2nd flip no heads (50% again) so the probability of no heads in two flips is 0.5 * 0.5 = 0.25, the "one in four" of the iterated-out example (TT from {HH, HT, TH, TT}). For three flips it's 0.5 * 0.5 * 0.5 = 0.125, or the "one in eight" of the iterated-out example (TTT from {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}). So "the formula" that you get at least one of something in a series of trials is [1.00 - (probability_not)^n], where n is the number of flips or trials or whatever and probability_not is (1 - probability) of the event. So you could also write it as [1.00 - (1 - probability)^n]. You can see that as the number of trials gets larger, the chance of never getting something approaches but never equals zero, so you can get no heads in say 1000000 flips of a fair coin, but it's really unlikely. Note also that "the formula" works for unfair and also non-binary (three or more possible outcomes) events. Remember probability is in the range [0.00, 1.00] with 1.00 being 100% or absolute probability. Think I got that right, no?
 
Last edited:
This is actually really interesting, so I'll add my own thoughts to the fray.

-Thinking that, because you've been unlucky for a while, your luck will suddenly change is a fallacy (at least in Terraria). Sorry, all ye hopefuls. RNG in most situations is always a case-by-case basis. Although I've heard of generators that account for previous outcomes, they're much less common than your standard RNG algorithms because, understandably, they're harder to program.
-In reality, 1/100 or 2/5 or whatever is a misleading term. Because only the most detailed algorithm can account perfectly for probability, as discussed above, it's not really gonna mean anything at all. It's not your chances in particular, nor is it an average. It can be loosely described as an estimate placed by the game because of how these systems work.

As an example of this - Amarok has a 1 in 80 chance to drop from any given enemy killed in the Snow Biome in Hardmode. Because RNG will use an algorithm to pick the number, and algorithms must always start with some set number, whatever variable influences the Terraria RNG engine will influence your chances. I don't know what variable or variables the algorithm uses, but perhaps someone could fill me in.

Let's assume that the two variables determining the RNG outcome is... say, the number of monsters on-screen and the amount of health the player has. It might be set up to reward you for taking on large crowds or keeping yourself healthy. Thus, a player on low health and all alone might have a much lower chance - depending on the margin of error here.

As a general tip, when predicting grinding times, I will multiply the given probability by 1.5x and 0.5x to get my benchmark numbers. If I want a Medusa Head, the chance is 1/100. Knowing as I do that I get maybe 3 Medusas per minute, I'll probably have to kill between 50 and 150 Medusas to get my head. At worst, that'll be a good hour or so of grinding.

And that only accounts for the closest results. The outliers - 3 medusa, 330 medusa - aren't even included in there.

With any luck that wasn't too convoluted. It felt convoluted.
 
Let's assume that the two variables determining the RNG outcome is... say, the number of monsters on-screen and the amount of health the player has. It might be set up to reward you for taking on large crowds or keeping yourself healthy. Thus, a player on low health and all alone might have a much lower chance - depending on the margin of error here.

As a general tip, when predicting grinding times, I will multiply the given probability by 1.5x and 0.5x to get my benchmark numbers. If I want a Medusa Head, the chance is 1/100. Knowing as I do that I get maybe 3 Medusas per minute, I'll probably have to kill between 50 and 150 Medusas to get my head. At worst, that'll be a good hour or so of grinding.

Most seeds (the number you use to start the RNG algorithm) in many games is some function of time according to the computer's clock, because that is always changing (and it is almost impossible to manipulate on purpose). You get a pretty good random number spread if you use that, but it ain't perfect and there are ways to game the system, especially on consoles that don't use an internal clock that stays ticking while the unit is powered off (look up a lot of NES/SNES Speedruns and they will talk about Frames, Clocks, and RNG).

But a PC doesn't have that problem, a PC's clock is constantly updated through the internet (unless you disable that feature) and it is certainly kept track of while the unit is powered off (unless you're resetting CMOS every time you power the computer on, or the computer's CMOS battery is dead, which tends to be annoying because then CMOS will forget things like boot order and HDD location).

Now, if you had a PC with a dead CMOS battery, you could in theory game the RNG in many games (maybe including Terraria's?) but to do this requires Frame Precision. You'd have to turn the PC on, boot the OS up, load Steam (if you use that) and then load up Terraria and everything would have to be frame-perfect and then load up your character/world and then go do what you wanted to do to get a specific RNG like opening a crate or perhaps creating a world.

But again, this would require frame precision or greater, because Time-based seeds are usually based upon tenth-seconds (or hundredths of seconds) and not actual seconds.

And since computers don't always load stuff at the same speed, well... it's rather unlikely you'll be able to do this. But in theory, you could. In Theory.

EDIT: Some games might use "Space Noise" but that usually requires a connection to an outside server, and that's generally more complicated for very little benefit.
 
In reality, 1/100 or 2/5 or whatever is a misleading term. Because only the most detailed algorithm can account perfectly for probability, as discussed above, it's not really gonna mean anything at all. It's not your chances in particular, nor is it an average. It can be loosely described as an estimate placed by the game because of how these systems work.
That's correct, though I don't think Terraria uses a PRNG. We'd have noticed patterns by now if that were the case. (Final Fantasy III on DS had a PRNG - you can repeat the same actions and get the same results!) The .NET framework has two RNGs; one that is 'good enough randomness' and one that is intended for cryptographic purposes. Terraria probably uses the 'good enough' one. Even so, you are correct, it probably is possible to get a good seed or a bad seed.

For example, my seeds dictate that it should rain every day. :)

But a PC doesn't have that problem, a PC's clock is constantly updated through the internet (unless you disable that feature) and it is certainly kept track of while the unit is powered off (unless you're resetting CMOS every time you power the computer on, or the computer's CMOS battery is dead, which tends to be annoying because then CMOS will forget things like boot order and HDD location).
It's typically time elapsed since power on; sometimes with some other hardware constants. That would negate needing the system clock -- using a PC's internal clock would not be a good idea for RNG as it's something the user can modify. It'd still require millisecond (or greater) precision to replicate and get a pattern, as you mentioned.

There are some CPU-based RNGs (link). The source code of System.Random from .NET is also available online (link). I mention the .NET System.Random class because it's probably what Terraria / XNA uses. I don't think it'd use the cryptographic RandomNumberGenerator.
 
Back
Top Bottom