PC 7Days To Die in General, but Game Programming even more generally

On the original topic, RNG is a great way to increase replayability without actually doing a lot of work, which makes it ideal for games like this. If you don't have the same resources every time you play, and aren't guaranteed to have access to them, the theory goes that you'll change your playstyle to suit what you do get and thus have an entirely different experience each time. It's basically the theory roguelikes, roguelites, and story-generator games run on.

This can cause issues when it clashes with games where people are generally encouraged to specialize, because suddenly they don't have guaranteed access to the things they need to make the game fun for their specialty. 7D2D has a bit of that problem. You have to make irreversible (that being the key word) choices about what you're going to be doing and how you're going to do it before you have the information you need to make an informed decision about what that might be. If you spec into clubs and never find a baseball bat (in loot or in the trader, both are RNG-dependent) you're probably going to feel cheated, especially if you find other high-tier weapons. In some sense your progression relies on RNG giving you the thing you need to progress. The same goes regardless of what you spec into, if you never find the best version of it you're probably going to feel bad for picking it. 'Why did I take this when I could have taken that and used all those awesome things I found instead of the one thing I actually need?'

 
Three words - Baseball bat parts.
Can't make them. They only turn up in the Trader, airdrops, and in searchable containers based exclusively on RNG.

Believe me. The entire city of diersville looted… not one baseball bat part.

So yeah, it's locked behind RNG.

What I've always thought would work is some sort of "localized randomization." Using my case as an example - it's certain that there will be at least one set of baseball bat parts SOMEWHERE in Diersville. Which specific container is a function of random chance, possibly weighted by type (it's not reasonable in an oven, but it is reasonable in a storage box or trash can) but it's unreasonable for the RNG to NEVER have one in the ENTIRE city.

PS - What the heck IS the purpose of RNG, other than to shortcut in-depth thinking like this?

- - - Updated - - -

Intelligent RNG is a nice idea, but I don't know about weighting it. Meat stew shouldn't turn up in a "foul trash" pile just because it's adjusted chances moved it that way?
What level are you? What are your trade skills? I find em all the time as I level, and as weapons don't degrade you don't need many of em

- - - Updated - - -

Two - Let's not equate the Holy Grail to a baseball bat, shall we? The Bat is NOT the Holy Grail of melee weapons - it's not even the Holy Hand Grenade of Melee weapons. :) The Iron Sledge, which can be crafted almost immediately, outpaces the damage of the Bat.
It might do more damage but there is a lot more then raw damage with a weapon. The bat is faster, uses less stamina, power attacks have less recovery etc. So yes while it does less damage its also faster and better suited to dealing with multiple zombies at once.

- - - Updated - - -

No. Lets say for specific weapon crate you have base dropchances like:1% baseball bat

5% ak-47

10% pistol

Those chances are somewhere created and stored in the game anyway. (Don't know where exactly but almost sure this is saved similar to this in one of the xml files)

Chance increases 1% per day (maybe capped at 50 to not make a drop for absolutely sure ever)

If you open the crate a dice (1-100) is rolled for every item that could drop in this box. If the roll is equal or less then the dropchance it will spawn. You do not need to do this for every item, but only for items you want to get with a higher chance as the game progresses. So lets say only for weapons.

On day 25 then you will have dropchance of:

26% baseball bat

30% ak-47

35% pistol

Now you open a crate and roll:

baseball 37 - no drop

ak-47 98 - no drop

pistol 22 - drop - resets pistol drop chance

On day 30 you have then dropchances of:

31% baseball bat

35% ak-47

15% pistol

Open the crate and roll:

baseball 30 - drop - resets baseball drop chance

ak-47 99 - no drop

pistol 65 - no drop.

On day 50 you have then dropchances of:

21% baseball bat

50% ak-47 (gets capped)

35% pistol

and so on.

The iteration happens every time you open such a chest. I just assumed in this example just openening such a chest on day 25, 30 and 50 (not a single one in between where a drop will reset chance) just to point out how the chances evolve.

If you open chests frequently and rng still misses the drop for days, the drop chance will increase and since you've got one it will reset, to make sure you will not find another one with a high chance already in the next crate.

Basically it doesn't matter if you base this on days, playerlevel, gamestage, days alive, or whatever. You can even increase it by number of crates opened. They just increase with different speeds. E.g. playerlevel would increase faster in early game but slower in later game, as you maybe gain 3 levelups within day 1 and around day 100 only get a level up every 5 days. On the other side basing it on the day it will increase linear, no matter if early or lategame. Gamestage would be something in between since the gamestage is just calculated out of playerlevel, deaths and capped by server day.
Part of the issue with that is that its not uncommon for loot lists to have dozens upon dozens of items that are possible to spawn. So your not really doing anything to make any individual item any more common when you raise the chances of 60+ items

I mean if a crate can spawn a pistol, ak, bat, and m60 for instance, if you raise the chance for each to spawn by 1% every time you open it you still have the exact same chance to find a bat.

The chest itself has to roll for loot, then it determines what drops. All those items increased by 1% so there is the same weight to spawning.

Aka 1% chance of 10 items or 10% chance on 10 different items is the exact same chance to find the item because everything is being raised equally.

 
Last edited by a moderator:
Honestly i hate that and so do many people. It defeats the entire purpose of RNG. Diablo 3 did it and people hated it. It results in no variety, and the only thing that changes from game to game is the order at which you find things.
There is nothing in the game that you need that is locked behind RNG atm. If you can't loot it then buy it, if you can't buy it then take the skill and make it yourself. That is how a game should be balanced.
I might be assuming stuff... but i feel like you do not know what "intelligent RNG" feels like.

Because "true RNG" doesnt feel random. Since humans are pattern seeking, every slight pattern, no matter how random starts to look suspicious.

I've given this example from history before so only a short summary:

Mp3 players back in the day had a "shuffle randomly" function, peopl from all over called customer service and told them that only ever a certain amount or a certain loop would play or even that one song would ALWAYS come back and that its not truely random.

They checked, all random. What they found out is what I said above. So they changed it to "intelligent randomization" where there is still random chance for everything, but it doesnt feel forced anymore.

And no it would not "be all the same". That is not what intelligent rng is all about. That would be like saying back in the day "i want to spawn everywhere, on hills i cant get down from, in huge lakes, in the wasteland with dogs next to me... because otherwise it will feel all the same!"

You still have insane variety. It just cuts off those insane edges that ruin games.

Getting food poisoning 3 times in the first week is not fun (with cooked meats and cans) getting it 7 times is downright cruel and not in any way fun, since you can not loot fast enough. I only want to iradicate the 7 times (same with not getting it at all feeling like vitamins are useless), not the 3 times. That is what intelligent rng does if its implemented correctly. It cuts out those scenarios that make it unfun to play, not those that make it varied or challenging.

Intelligent rng for loot would also mean that we could have less LVL 4 aks on day 1-7 but more lvl 6 on day 1000.

This is partially implemented, but not tweaked well enough for my taste.

 
This will just have to be a point of contention. I wouldn't call the Quality 5 iron club fully kitted out with mods "Caveman" and I would submit that anything beyond that level is luxury. If you are getting a fully modded blue iron club by the early game then that is a different balance issue altogether.
Actually, that's part of one of my other points. What, exactly, is the difference between a fully-upgraded Iron Club and an Aluminum Baseball bat? Only one requires parts, and it is utterly silly and arbitrary.

To your second point lets not equate sledge hammers and clubs-- they are different trees. I never claimed the baseball bat was better than a sledge but it is better than the primitive wooden club and the better than primitive iron club. If you are only wanting the most damaging of all melee weapons why go into clubs at all? Why even have angst over baseball bat parts to begin with?
Hey, I wasn't the one that called a baseball bat the holy grail of melee weapons. That category (melee weapons) invites the sledge to the party. :)

As to why the angst? Like I said before (and in other threads) - WHY? What is the sense in this? There's nothing that makes the bat WORTH the aggravation. Sledge does more damage, and the Iron Club is the same damn thing it just doesn't require parts.

And then of course, adding to the insanity is putting something like that wholly behind an RNG locker... for no reason?

Your mistake is labeling anything and everything below the very very best as "caveman". Sorry but there is a clear progression from wooden club to iron club and from Quality 1 to Quality 5 and from no mods to fully modded and in my opinion "caveman" level ends quite a bit sooner than you are representing it to be.
Fair enough. Apologies.

Luxury items by definition are non-essentials. Once you have a Blue Iron Club with full mods I submit that anything above that is non-essential. You can win the game with the club I've described.
While I agree with where you started, I disagree with where you ended. Luxury items are definitely non-essential. But I don't think it's actually possible to "win" an endless game. :)

Now...that being said, I would personally make the baseball parts and Quality 1 and 2 baseball bats more common but make the schematic more rare. That would be more natural to be finding baseball bats around and scrapping them for parts and saving those parts for when you hopefully can get your hands on a schematic.
And that again raises the spectre of what the hell "baseball bat parts" really are... splinters??? What you need for a bat is a length of wood and either a ton of patience or a lathe. That's it. Then to hide those "parts" behind an RNG wall? It's just plain silly. Of course, this thread was intended to talk about RNG and its overuse, not the sensibility of baseball bat parts. :)

 
What level are you? What are your trade skills? I find em all the time as I level, and as weapons don't degrade you don't need many of em
So if you're more skilled, that means that the town has a higher chance of having a specific item? That's almost more silly, on it's face.

Part of the issue with that is that its not uncommon for loot lists to have dozens upon dozens of items that are possible to spawn. So your not really doing anything to make any individual item any more common when you raise the chances of 60+ items
True, and some of the items are redundant - adding atmosphere, but not much else. I can see how that would be a problem.

I mean if a crate can spawn a pistol, ak, bat, and m60 for instance, if you raise the chance for each to spawn by 1% every time you open it you still have the exact same chance to find a bat.
True again. Now, if that crate didn't have the ability to spawn paper, meat stew, and murky water, you'd make the crate make a lot more sense. :)

 
This can cause issues when it clashes with games where people are generally encouraged to specialize, because suddenly they don't have guaranteed access to the things they need to make the game fun for their specialty. 7D2D has a bit of that problem. You have to make irreversible (that being the key word) choices about what you're going to be doing and how you're going to do it before you have the information you need to make an informed decision about what that might be. If you spec into clubs and never find a baseball bat (in loot or in the trader, both are RNG-dependent) you're probably going to feel cheated, especially if you find other high-tier weapons. In some sense your progression relies on RNG giving you the thing you need to progress. The same goes regardless of what you spec into, if you never find the best version of it you're probably going to feel bad for picking it. 'Why did I take this when I could have taken that and used all those awesome things I found instead of the one thing I actually need?'
True, and well said.

Cue the inevitable "but you can get the Grandpa's Fergetin' Elixir so it's not irreversible" chorus.... Even though that too is more or less RNG dependent….

 
About that baseball bat:

One rule or principle of the current design is that the tier2 and tier3 weapons of any type of weapon depends on weapon parts you have to find. Since the baseball bat is the tier 3 club it needs parts. Now with most weapon that rule can be explained away without too much trouble, but not with the very basic clubs. Even iron-reinforced clubs have that problem. Still, that principle has to be true for game balance or TFP would need to handle the club weapons different than all the rest and probably get into balancing hell.

But why did they select the baseball bat for tier3 ?

Well, first of all, does anyone have a better idea what the tier3 club should be? One idea might be a club with rotating head and everyone would agree you need parts for that, but you would also need animation added. A morning star would work, but basically you could still question why parts are needed and additionally why are there morning stars in Nevada?

I also think the bat is a humorous reference to the tv series "The Walking Dead" where a baseball bat did prominently feature as a most fearful weapon.

 
So if you're more skilled, that means that the town has a higher chance of having a specific item? That's almost more silly, on it's face.


True, and some of the items are redundant - adding atmosphere, but not much else. I can see how that would be a problem.

True again. Now, if that crate didn't have the ability to spawn paper, meat stew, and murky water, you'd make the crate make a lot more sense. :)
Loot attached to level and skills isnt that silly and adds the progression annealing to the PRNG

Loot containers are specified to what loot group they can spawn.

But i made the point earlier about realism vs gameplay and if you had more concentrated loot containers you would only search certain containers.

Lootcrates make a neat mechanic to be able distribute items across the world, that is the system the devs have gone with i can't see any other way you would achieve this result.

You cant remove PRNG without making it a predictable progression model that will make people get bored real quick.

Part of your OP was to find evidence (sourcecode or proof of concept) of a system that doesn't use PRNG but provides s variety in gameplay.

How do you get variety without entropy ?

How do you get a table of items in the first place that is not always the same without randomness ?

If you find such a system it would also need to be efficent performance wise.

The current system is still being worked on and there seems plenty of headroom for finetuning.

Its all about the weights (prob) and being a suvival game the odds will be stacked against you unless you have a little bit of luck.

 
Actually, that's part of one of my other points. What, exactly, is the difference between a fully-upgraded Iron Club and an Aluminum Baseball bat? Only one requires parts, and it is utterly silly and arbitrary.
Thematically yes. I can't disagree. They want the Tier 3 weapons to be only craftable by finding a schematic and then also having a component that cannot be crafted. Maybe the better thematic option would be to make the stun baton be the T3 of the clubs as there could be believable components for that and have the baseball bat be the Tier 2 metal club. Then rethink a different melee weapon for intelligence-- a riot shield maybe? You could use it to push zombies around...put them into the path of the junk turret perhaps.

Hey, I wasn't the one that called a baseball bat the holy grail of melee weapons. That category (melee weapons) invites the sledge to the party. :)
Fair enough. Apologies. ;)

While I agree with where you started, I disagree with where you ended. Luxury items are definitely non-essential. But I don't think it's actually possible to "win" an endless game. :)
Just think anti-Matthew Broderick... The only way to win is to play the game.

 
Aka 1% chance of 10 items or 10% chance on 10 different items is the exact same chance to find the item because everything is being raised equally.
Wrong. 10 Items with 1% chance is ten times 1% chance, not 10% for all. It's then 10 dice rolls with each 1% chance, not one dice roll with 10% chance.

If a chest can spawn 100 items with each 2% chance, there is no 200% chance for whatever.

But i don't want to start another primary school discussion about how percentage calculation works.

 
Wrong. 10 Items with 1% chance is ten times 1% chance, not 10% for all. It's then 10 dice rolls with each 1% chance, not one dice roll with 10% chance.
If a chest can spawn 100 items with each 2% chance, there is no 200% chance for whatever.

But i don't want to start another primary school discussion about how percentage calculation works.
0.99^10 = 0,9043

so 10 x 1% = 9.57% So still ~10%.

Don't be nitpicky. What he said still holds true. Well... I didn't get his point, but I didn't follow the discussion :D

Just saying 10x1% ≈ 10%

 
Last edited by a moderator:
Just saying 10x1% ≈ 10%
No. It doesn't add up because it's 10 different items. 10 dice rolls with 1% each, not one dice roll with 10%. If you do 10 rolls for only one item, THEN it would add up.

What you are calculating is, you set on red in roulette and loose, so the next round has to be red guaranted, because 2x50% chance is 100%. But it doesn't work that way.

To get one item with 10% is a much higher chance for this SINGLE item. With 100 items at 1% you get by statistics 1 of the 100 items and 99 not. And that doesn't even mean you get 1 guaranteed. You most probably will get even nothing.

Test it yourself. Roll a 6-sided dice 10 times (for ten different items, each has 1/6 = 16% chance). From what you calculated there has to be at least one 6, because 1/6 * 10 = 166% chance. The first roll is for the baseball bat. Try it 100 times. How often do you get a 6 on the first roll? Will you get it at 166% of your FIRST roll of each batch containing 10 rolls?

 
Last edited by a moderator:
Loot attached to level and skills isnt that silly and adds the progression annealing to the PRNG
No, it is silly. If two guys are standing in a room looking at the same box, the box contents shouldn't change based on who opens it. That just creates a ridiculous application of Schrodinger's cat, where the cat being alive or dead depends on whether or not the box opener has a philosophy major.

You cant remove PRNG without making it a predictable progression model that will make people get bored real quick.
you can remove RNG from some elements. You can also map out the "dungeon" better. The game can remain fun without having an entire city lack something that should be there unless the RNG gods dictate unreality.

Part of your OP was to find evidence (sourcecode or proof of concept) of a system that doesn't use PRNG but provides s variety in gameplay.
Sort of. I really hope that someone smarter than I can come up with a way to simulate reality better - Its not a chaos-order dichotomy, its the two working together.

How do you get variety without entropy ?
You don't, but it's like the old saying goes: "You're unique, just like everyone else." Every snowflake is different because of entropy, but you can't have snowflakes that combust on impact, no matter how much entropy there is.

How do you get a table of items in the first place that is not always the same without randomness ?
Fair question. Mine is like it - How do you get randomness that avoids implausibility (or impossibility, depending on your point of view)?

If you find such a system it would also need to be efficent performance wise.
Agreed, no question. It's also possible that such a system isn't possible within the constraints of current technology - though I personally doubt that.

The current system is still being worked on and there seems plenty of headroom for finetuning.

Its all about the weights (prob) and being a suvival game the odds will be stacked against you unless you have a little bit of luck.

- - - Updated - - -

Thematically yes. I can't disagree. They want the Tier 3 weapons to be only craftable by finding a schematic and then also having a component that cannot be crafted. Maybe the better thematic option would be to make the stun baton be the T3 of the clubs as there could be believable components for that and have the baseball bat be the Tier 2 metal club. Then rethink a different melee weapon for intelligence-- a riot shield maybe? You could use it to push zombies around...put them into the path of the junk turret perhaps.
YES! See, this is the kind of thinking that allows one to not over-use the RNG. Well put, sir.

I can understand the devs intent - I just can't agree with their implementation. Using high-tech as the meter by which special parts are required makes sense and fits thematically - we saw that back in A15 (I think) with gun parts.

Just think anti-Matthew Broderick... The only way to win is to play the game.
Dammit, now I want to play chess. Not Nightmare chess, dammit. ;)

 
No. It doesn't add up because it's 10 different items. 10 dice rolls with 1% each, not one dice roll with 10%. If you do 10 rolls for only one item, THEN it would add up. What you are calculating is, you set on red in roulette and loose, so the next round has to be red guaranted, because 2x50% chance is 100%. But it doesn't work that way.

To get one item with 10% is a much higher chance for this SINGLE item. With 100 items at 1% you get by statistics 1 of the 100 items and 99 not. And that doesn't even mean you get 1 guaranteed. You most probably will get even nothing.

Test it yourself. Roll a 6-sided dice 10 times (for ten different items, each has 1/6 = 16% chance). From what you calculated there has to be at least one 6, because 1/6 * 10 = 166% chance. The first roll is for the baseball bat. Try it 100 times. How often do you get a 6 on the first roll? Will you get it at 166% of your FIRST roll of each batch containing 10 rolls?
Nobody else wants to take this, who was present when I explained this the last time? :D

Fine *eyeroll*

Given your example with the dice, this is how probability calculates:

To roll a 6, your chances are as followed:

1st roll:

1/6=16.7% or a 83.3% of failure. (this follows the equation 0.833 ^ n; with 'n' beeing the amount of rolls thrown; this calculates the chance of NOT rolling a 6 after 'n' throws. I put it in a calculator for you:

if you put 0.833 ^ 10 into the calculator, you get 0,161 which means there is a 83.85% chance of getting a 6 at least once in 10 dice rolls. Not 166%.

But there is also the chance of rolling it twice, thrice,... and even up to 10 times in a row. That is where your 166% come from. Not sure exactly how to put it into an easy formula tho... so you just have to google it. But here is a list of what the actual odds are to throw a six with 10 trows:

0/10 16.15%

1/10 32.30%

2/10 29.07%

3/10 15.50%

4/10 5.43%

5/10 1.30%

So to get it AT LEAST once it's 83.85%.

To get it AT LEAST twice it's 51.55%

To get it AT LEAST thrice it's 22.48%

To get it AT LEAST four times it's 6.98%

To get it AT LEAST five times its 1.55%

And if you add up all those percentages, guess what number/percentage you get? I give you a hint, it's what you originally said was ridicoulus.

it's 166%


I do not care what the original argument is. I'm just here to correct the math.

So if there are 10 different weapon with 1% chance of dropping EACH, the total probability of getting AT LEAST one is still ~10% (9.55%)and the chance of dropping two weapons is 0.42%

 
Last edited by a moderator:
I knew this party was inevitable and you KNOW it's a great party when you have a 16% chance of rolling a six by not even throwing the die!

/couldn't resist ;)
He said he wouldnt start it... but then still stated the wrong math.

And no :D You misunderstood again.

that is coincidental, but the 0 stood for the chance of getting the '6' zero times with 10 throws.

Sorry if that wasn't explained well enough, will edit it now.

 
Hey, everyone!
So I've been noticing an increasing trend - or perhaps I'm only noticing it more over time - of reliance on the RNG for damn near everything in gaming recently.

In 7D2D I first picked up on it with the scavenging for "parts" for so many things - especially going through an entire city and not finding even one "baseball bat parts" - and like the saying goes, once you see it you can't stop seeing it.

So is anyone else seeing this trend of over-reliance on RNG? Does anyone else have a problem with it? Does anyone have a solution to it?

That last question is actually not rhetorical - I'm not a great programmer, but I know enough to realize that computers suck at modeling statistical probabilities without using RNG... and I'm dying for someone smarter than me to come up with a better way so that we can have something better than luck driving what could otherwise be strategic gameplay.
I suggested it a while ago but the devs HATED it. It's pseudo random distribution used by DotA 2. Effectively what it does is it increases the probability of getting an item or an effect every time it misses its chance to activate. It has a "worst case scenario" limit which should be implemented in this game because it contains so much random book loot which I personally dislike.

As I said however the devs hate this idea.

 
I do not care what the original argument is. I'm just here to correct the math.
And that's why are talking about completely different stuff.

Your calculation is correct, but that calculation wasn't asked for. :rolleyes-new:

It's like asking what time the party is starting and you answer the party takes place in Washington. You're answer may be right, but it doesn't answer the question.

1 + 3 = 4 and you answer, "NO 5 + 6 = 11"

So if there are 10 different weapon with 1% chance of dropping EACH, the total probability of getting AT LEAST one is still ~10% (9.55%)and the chance of dropping two weapons is 0.42%
But the question was NOT what is the chance to get AT LEAST ONE weapon, but what is the chance to get the ONE SPECIFIC weapon you want to have, in this case a baseball bat. And THAT chance is still 1% and it will never change no matter if there are thousands of items to be dropped with whatever chance. IT DOES NOT CHANGE!

But some other user answered "if you raise the chance for other weapons, you implicitely decrease the chance for the baseball bat". And that is wrong. Somehow some people seem to think all dropchances summed up could not exceed 100%, because they add up somehow and you can not get more than 100%.

So don't answer, if you don't even want to read the question.

 
Last edited by a moderator:
Back
Top