Jump to content

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


ShadesOfKnight

Recommended Posts

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. :)

Link to comment
Share on other sites

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….

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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%

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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. ;)

Link to comment
Share on other sites

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%

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 don't know dota2 but had a look at the system information from the wiki page not the gamefiles.

 

From a quick look you have different characters with different abilitys.

 

Different characters have different attacks and different effects.

 

There is not a lot of these to keep track of in a mutable table in memory when you separate these into individual character/player groups.

 

If you look at 7dtd then the book items alone would be more than all of the events listed on the Dota2 wiki.

 

Like i said before you have to keep track of these for all players and guess this would be an accessor and mutator nightmare.

 

The item probabilities do scale in 7DTD you just have to keep playing the game and maybe they could do with fine tuning.

 

Saying that the values will more than likely be adjusted next alpha so it a step back for the fine tuning stage.

 

-------------------

 

Answer to the debate about probability being attached to player level it would be set at the highest of the party.

Link to comment
Share on other sites

[...]

 

Guess this time I have to be the one apologizing... I was probably still on edge from the last discussion I've had :D

And when you set that dice example, I overread that you somehow (still haven't quite figured out what oyu wanted to say by that) meant that only on the first roll it's supposed to be 166%...

Don't get it, but then again, didn't follow the argument.

Have your honor back and ignore me from here on :D

 

Obviously if you have 10 DIFFERENT weapons , the chance for EACH is still 1%. But to get at least one, its 9.55%.

Sorry for the confusing butt-in.

Link to comment
Share on other sites

Now, wait... I thought it was like that on purpose, so we'd eventually wind up trying out every build and playing in different ways! I laid this game aside for over a year until a18 dropped and when I picked it up this time, I was determined to play experimental and do it properly. That meant I wiped everything and started over with each build. I played pregen 3 for several months over several restarts and loved the fact that I was always somewhere new, with the RNG blessing me with little or nothing I was hoping for and/or expecting. It made me really think about how the game is played and the perks I needed to use and really increased my enjoyment of the game. I had gotten bored to tears before, which was why I laid the game down for so long, but now... now I look forward to reaching that point of boredom because I know something new is around the corner when I start again. Y'all just need to look at it a different way, that's all.

 

I'd rather it stay as it is. This way, I can curse the RNG gods when I don't get my pistol or zero ammo drops or I've wound up in (blech) heavy armor or in the desert with no duster. Keeps me on my toes and boredom at bay.

Link to comment
Share on other sites

Weird tangents again.. oh well. The idea of "increasing the drop chance and reducing the chance for items that actually drop" was challenged as not working because there's "too many items, so they'll have essentially the same chance to drop anyway"

 

That can be made to work, reminds me of the plethora of different DKP systems; there's plenty of ways to a "fair distribution".

 

Simplest version: each item starts at a drop chance of 1, and any dropped item is reduced to 0 chance. That way, you'll get a straight up "round robin", everything will drop 1:1 for the first round, just in random order. This would have the slight drawback of getting stuck at 0 chance for everything after the first round.

 

To fix that, you can just "manually" reset everything to 1. That would start another round.

 

Would that be a good system? Not in my opinion. The point is to show that it would Work, at an edge.

 

Adjusting it into something smoother, like splitting the chance of the dropped item evenly among everything else, would still keep some of the round robin nature (the one thing that never drops would be siphoning a lot of little increases over couple "rounds", eventually becoming highly likely..). Just needs "more rounds" to happen.

 

For this game, I'm biased by the history.. to avoid the "can't find a baseball bat" issue, I'd rather see something akin to "Tier 3 melee weapon parts", so you can scrap all those machetes and spears to make a bat if you need one. Would it make any sense? Not much less than the current one... :)

Link to comment
Share on other sites

Simplest version: each item starts at a drop chance of 1, and any dropped item is reduced to 0 chance. That way, you'll get a straight up "round robin", everything will drop 1:1 for the first round, just in random order. This would have the slight drawback of getting stuck at 0 chance for everything after the first round.

That is basically what i wrote a page ago, just not starting from 1 for each item but a base chance, since you still want to have different drop chances for different items.

 

 

For this game, I'm biased by the history.. to avoid the "can't find a baseball bat" issue, I'd rather see something akin to "Tier 3 melee weapon parts", so you can scrap all those machetes and spears to make a bat if you need one.

Wouldn't help as it still needs the baseball bat parts to craft it. And he hasen't found any baseball bat to scrap it into parts or parts themselfs. So even if he could craft it by a skill, he still lakes the items needed to craft it.

 

- - - Updated - - -

 

The answer doesn’t matter as long as you can articulate what you were thinking. :)

Or just read the question before putting of an answer. ;)

Link to comment
Share on other sites

That is basically what i wrote a page ago, just not starting from 1 for each item but a base chance, since you still want to have different drop chances for different items.

 

Yeah, I was just reducing that system to its core, to emphasize that it Works.

 

Wouldn't help as it still needs the baseball bat parts to craft it. And he hasen't found any baseball bat to scrap it into parts or parts themselfs. So even if he could craft it by a skill, he still lakes the items needed to craft it.

 

I was proposing "T3 parts", instead of "bat parts". As in, if you've seen plenty of T3 weapons, but not the one you want, you'd have a workaround. If you haven't seen a lot of T3 weapons, then you're not exactly expecting to have gotten a specific one yet.

 

Not that I'd design it like that, but it might be something applicable to the current direction of the game...

 

EDIT:

I recognize that's not intuitively good at all, mostly talking about the mechanics of the drops. The "most natural" easyish solution for the "plenty of the wrong T3 dropping" would be a weaponsmith NPC; "Bring me 3 other good weapons and I'll make you one of your choice" Or something along those lines.

Link to comment
Share on other sites

My debate against the idea wasn't there are too many items that there would all be the same it was there too many items causing a accessor and mutator nightmare.

 

Getting and setting all the items concurrently would be a real problem.

 

I dont't see a more efficent system than having items set into groups and having static probabilities assigned to them while having additional scaling probabilities summed together with multiple factors including gamestage and skillset.

Link to comment
Share on other sites

My debate against the idea wasn't there are too many items that there would all be the same it was there too many items causing a accessor and mutator nightmare.

I think it was Brian9824's point.. someone who then ended up getting quoted and I couldn't be bothered to find the original snippet... :)

 

For your point of update nightmare; eh, it's a loot table. At a normal worst, you'd have to update it once a second when people are running from loot box to loot box.

 

Now, looking at the crafting inventory lag issues, I'm not making a claim about the feasibility for this particular game, but it's not exactly a lot of math even in its straightforward form. There's also easy ways to lazy it down, for example, just do the reductions instantly (one change per looted item), and do the increases over time, whenever you have time (not much change in the gameplay of the table instantly, only as the aggregate..)

Link to comment
Share on other sites

I might be wrong about my assumptions listed as i said above i have only basic programming knowledge but i think it's good to debate these things.

 

Routine update at timed interval doesn't sound as good as updating vital data instantly and scheduling the rest of the processes after.

 

Still needs an attribute entry for every item and i assume this is stored in xml format in memory.

 

Not alot of math but a lot of executions of the parser.

 

This could have a big impact on marshalling and unmarshalling the data.

 

Could get really confusing with item's changing all the time and bulk pickups.

 

Like was said above and i skipped over maybe the system works for another game but 7dtd it doesn't seem suitable.

 

I like the idea of a weaponsmith npc, maybe the npc could travel round the different traders offering a quest and maybe parts in small numbers.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...