CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.34k stars 4.15k forks source link

Grand Item Spawn Rebalancing #21249

Closed 1skandar closed 7 years ago

1skandar commented 7 years ago

This has been brought up piecemeal before, but this really needs to be addressed holistically. A while back changes were made to the spawning code. While the new code makes a lot more sense, the fact is a lot of buildings balanced item spawns around the old code and are, thus, out of whack. This can be seen in garages that rarely have more than 1 or 2 items spawn and pawn shops that are now mostly empty, but the effects are a lot more widespread than that.

What needs to happen is each building needs to be compared between what they spawned before and what they spawn now and then adjustments need to be made. Now, I'm not saying spawning needs to be brought up to what it was before, but I am saying that with such a sweeping change to spawn code a rebalance pass needs to be done overall.

Now, I'm willing to tackle this, I just need permission and, well, general guidelines to work in. I've already started, to a degree, with pull request #21162 that both JSONifies garages but also rebalances loot spawn to something a bit more sane.

So, is this something that would be wanted? I've got the free time and I'd love to contribute to a game that has given me so much enjoyment already.

ZhilkinSerg commented 7 years ago

Continue moving mapgen code from cpp to json/lua - it will be much easier to fix item spawns later.

Mecares commented 7 years ago

I actually like the current spawn levels, being reliably lucky, just by entering the right building took away quite a lot of incremental upgrades to equipment one would have otherwise.

kevingranade commented 7 years ago

Now, I'm not saying spawning needs to be brought up to what it was before, but I am saying that with such a sweeping change to spawn code a rebalance pass needs to be done overall.

What you are saying is that you want to bade the new spawn rates on the old spawn rates, that's problematic because it's simply not the case that the old rates were correct.

general guidelines to work in

This is the real issue, we don't have these guidelines. The first step of a global rebalance like this needs to be identifying those guidelines.

DangerNoodle commented 7 years ago

What you are saying is that you want to bade the new spawn rates on the old spawn rates, that's problematic because it's simply not the case that the old rates were correct.

I would argue that having an understanding of the old numbers is still useful even if we establish a guideline with different numbers. Most likely some figures were too high, some were too low, and some were within an acceptable range. The desirable figures can be re-interpreted under the new system, and the undesirable ones can be altered.

The problems are in compiling the information, and additionally in deciding what numbers are correct. This is a game balance issue that would be subjective, and additionally relies strongly on the random number generator to produce loot.

While some variables (balancing percent chance versus number of repeats, and additionally item group weights) can affect how the RNG alters the end result, the same location still has potential to be barren one time, and bountiful the next. Guidelines will need to be established on the assumption that optimal or desired density of loot may not generate every single time, which may make a strict enough guideline pointless.

1skandar commented 7 years ago

What you are saying is that you want to bade the new spawn rates on the old spawn rates, that's problematic because it's simply not the case that the old rates were correct.

No, Well, sort of. Again, I'm fully aware the old spawn rates are not correct. But knowing what they were at least gives me something to work with. Again, take the garage I JSONified. Under the old system the counters ended up being pretty much 100% covered. That gave me the ability to see what should be spawning and then figure out what was a better balance. In this case it is about 4 or 5 items per garage looks to be a good balance, as you need that many to give a decent shot for one of the rarer drops to show up.

At any rate, a rebalance at this point is kinda critical and really should be a priority. Regardless of what the balance was previously, the recent code change radically altered item spawning. The renders all the item spawns based off the old code incorrect to one degree or another. Whatever balance existed before no longer applies and fixing that should really be part and parcel to any change to the item spawning code, yeah? And, really, at this point a review to the way loot is distributed is likely overdue anyway.

And yeah, I'm not asking for strict guidelines. Just critique anything I submit and answer any questions I may have and I'll take it from there. I'll be submitting this piecemeal, probably one building at a time at first. I should be able to get a good feel on what is needed quickly enough, I think.

CoroNaut commented 7 years ago

I like DangerNoodle's take on the whole idea. but I would like the ability to change the percentage error that decides if a bulding is barren or bountiful, preferably in the settings close to item spawn rate. Other than that, good job. :D

Coolthulhu commented 7 years ago

As for the spawn quantity: consider quality items (welders, toolboxes, intact V12s) vs. padding (8L metal tanks, jerrycans, intact V8s, low quality tools you should have but may not have) vs. trash that is common outside (frames, stereos).

The ratio of quality to padding to trash should be somewhere around 20:60:20. Bumping overall spawns but not changing ratios kills scavenging part of the game.

1skandar commented 7 years ago

Ok, that is useful. That also means I am likely going to need to examine the item groups to see what is in them.

Eh, and I'm not exactly trying to bump item spawning up. What I'd like to do is find a balance. Some things will need adjusting upwards, but more than a few buildings are fine, or nearly so, and I imagine I'll even find some things that will need a slight nerfing.

Tell you what, can a dev please go take a look at my pull request for JSONifying garages (#21162) and take a look at what I did for item spawning therein? I think that falls more or less in line with what is needed overall but a bit of feedback would be appreciated. Thanks.

kevingranade commented 7 years ago

No, full stop, no. If you think balance was good before and is broken now, we should revert the change that broke it, not scramble to return to the status quo by tweaking all the spawn values.

If you want to actually balance spawns, you need to have a rationale for what you mean by balance and rules for what spawns where and why, I'm not interested in someone going through all the "looks good to me" existing spawn values and changing them to a different "Looks good to me" set of values.

Coolthulhu commented 7 years ago

I gave the rationale for why quality items should be limited. That's the opposite of just "looks good to me". It's pretty trivial logic from there: if every garage has all the welders and toolboxes one could ever need, "scavenging" for tools ends as soon as you break into a garage.

Though honestly the padding and trash parts could go because they only exist to make locations look less empty, ie "looks good to me" personified. No one breaks into garages to get spare frames, stereos, seatbelts and V6s.

I'm mostly talking about #21162 here, because that's the one that involves changing spawn rates.

1skandar commented 7 years ago

The thing is, the spawn logic before was broken and needed fixing. And I keep saying I'm NOT suggesting we return to where we were before the change was made. And I'm decidedly not saying balance was good before, by any means.

If you want to actually balance spawns, you need to have a rationale for what you mean by balance and rules forvwgat soawnscwhere and why

And that is exactly what I'm trying to get from you guys. What do you, as a dev want spawning to look like? Some sort of yardstick, whether strict or just a general guideline, that I can take to look through what we got and fix any discrepancies. What with all the movement from hadcoded mapgen to JSON buildings lately a balance and sanity check was likely overdue anyway. Since I've got the free time, and since it would involve little to no actual code work, I can fairly easily do so. However, to avoid "that looks good to me" like you said, I need input as to what things are officially intended to look like, that way I'm applying your vision of what the game should be, not mine.

CoroNaut commented 7 years ago

I'm voting against having some non-random element as large as setting up proper ratios for item spawns per building. The idea for loot was fine the way it was as I saw it, but needed just a few tweaks here and there per building. There just needs to be a clearly defined function for how the spawning works and how it manages to encompass all items equally. As I saw it, the way items spawned was perfectly fine to me and never rang any bells like "Oh my god that is tons of good loot" or "Wow... nothing here at all". Putting forced spawning rules on a system like this may not be the best idea. All the buildings always had their own stories to tell even between 5 garages, one would have tools, another would have wide variety of hardware, etc. No buildings should be forced to be similar, its a go with the flow kind of deal where each shop has its own story. Anyway, just my thoughts of how the spawning system should be, it was fine before in my opinion.

DangerNoodle commented 7 years ago

No, full stop, no. If you think balance was good before and is broken now, we should revert the change that broke it, not scramble to return to the stasus quo by tweaking all the spawn values.

If you want to actually balance spawns, you need to have a rationale for what you mean by balance and rules forvwgat soawnscwhere and why, I'm not interested in someone going through all the "looks good to me" existing spawn values and changing them to a different "Looks good to me" set of values.

We can not provide a rationale for what seems like adequate balance without developer feedback and suggestions. If everyone simply keeps saying "no, do not make the numbers X" without giving any suggestions then this entire situation is never going to be resolved.

If you will not contribute suggestions, then the only thing we even have to go on is the status quo. We are only advocating looking toward the status quo because we have almost no one providing useful numbers and suggestions, and no one seems to want to provide said numbers without anything existing to go on.

Right now I would reason that the ratio proposed by @Coolthulhu is more or less correct, but they need not be strictly enforced.

CoroNaut commented 7 years ago

What is meant by rationale is exactly how and why you think your numbers will fit logically into the game. If the developers wanted all their numbers to be in the game then they wouldn't even take contributors suggestions and they would've already had this planned out. They appreciate the feedback from contributors but want to be assured that you have a formal plan all laid out.

1skandar commented 7 years ago

@CoroNaut Yes, I get that. I'm not looking for strict guidelines, but a bit of guidance so what I do fits into the overall picture of what the devs want the game to become. I don't want to take time and effort in doing something if all that is going to happen is it gets rejected because it doesn't match that picture.

Ah well. At least the garage got fixed, so that is a start.

kevingranade commented 7 years ago

general guidelines to work in

This is the real issue, we don't have these guidelines. The first step of a global rebalance like this needs to be identifying those guidelines.

1skandar commented 7 years ago

Ah, oops, sorry I missed that.

And, honestly, I'm not too surprised. This game has been in development for, what, over a decade? With how many dozens of contributors? Hmm. And I'd also bet no one has stepped back and taken a look at loot balance as a whole. Still, despite that, it's working mostly ok. The problem is e word "mostly", as there are flaws in the system.

Alright, bigger problem than I originally thought. First up, can we agree a balance pass needs to be done? From my own standpoint I would say it is overdue, especially as it sounds like no one has done so before. And with the new JSON system it's fairly easy to do now. It's a lot of work, yes, but not very complex.

Ok, if the answer to the first question is yes, where do we start? This is where dev input is really needed. How hard should scavenging be? Should every building have some reward, even if it's small? Do you have any suggestions as to what constitutes "too little" or "too much" loot? Are there any items that should be considered essential and should turn up fairly frequently? Conversely, what needs to be rare and special?

This is going to be more art than science, I'd say. And probably a lot of back and forth discussion. Ok, tell you what, if we can at least agree that this needs attempted I'll get started. I'll grab a building, make the changes I think needs to be done, and present my reasoning behind that. Get dev input on the reasoning, make more changes and basically see if we can work up a set of guidelines as we go. I think this will be easier when you can point out concrete examples.

DangerNoodle commented 7 years ago

This is where dev input is really needed.

This is where an impasse has occurred, however. We cannot devise an overall plan without developer feedback, but developers cannot offer feedback without an plan presented to them.

General guidelines can be proposed beforehand, but thus far only half the available developers have offered useful information for what they what in an overall guideline, while the remaining feedback has simply been objections with no alternatives altered.

kevingranade commented 7 years ago

can we agree a balance pass needs to be done?

Not a, "balance pass", no. You're still going about this backwards, devise a rationale for what you even mean by balance first. If you can't do that you should just drop it.

This is where dev input is really needed.

This is an incredibly problematic statement at this point in the discussion. I've told you several times that what you're asking for does not exist, if you want it to happen you're going to have to figure it out yourself.

while the remaining feedback has simply been objections with no alternatives altered.

I don't owe you alternatives, I've clearly stated what needs to happen next for this to move forward, but I can't afford to drop what I'm doing to work on other people's issues.

Zireael07 commented 7 years ago

@kevingranade: If the next step is "identifying the guidelines", who does the identifying? Because I'm very confused at the moment....

DangerNoodle commented 7 years ago

If the next step is "identifying the guidelines", who does the identifying? Because I'm very confused at the moment....

The developers are. They are the ones that must approve, deny, or propose alternatives to proposed changes, therefore they are ultimately in charge of which direction balance goes in.

I don't owe you alternatives, I've clearly stated what needs to happen next for this to move forward, but I can't afford to drop what I'm doing to work on other people's issues.

You have only so far said that a general guideline needs to exist, and objected to most suggestions so far. See prior sentiment by @1skandar:

I don't want to take time and effort in doing something if all that is going to happen is it gets rejected because it doesn't match that picture.

This discussion is going nowhere because no parties, developer or contributor, are currently capable of acting. If this continues, the only available solution will be for contributors to resolve individual instances where they perceive a balance failure. It will be slow, tedious, and piecemeal, but at present no alternative is feasible.

kevingranade commented 7 years ago

This discussion is going nowhere

You're right.

1skandar commented 7 years ago

Ok, are you seriously telling me that there aren't existing guidelines in place, even general vague ones, to give some direction on loot generation? That one of the core mechanics of the game is "yeah, whatever feels right" with no direction at all?

Moreover, that a sweeping, albeit necessary, change to loot generation was done without any of the main devs thinking "hey, maybe we better check to make sure that didn't break something"?

Am I the only person that finds both of those points very, very concerning?

Listen, I'm willing to tackle the second issue, but I really think that if the first issue doesn't already have a solution in place, uh, it really shouldn't be on me to tackle it. That is way out of my scope, yeah?

DangerNoodle commented 7 years ago

You're right.

And you are not contributing positively to this problem.

Moreover, that a sweeping, albeit necessary, change to loot generation was done without any of the main devs thinking "hey, maybe we better check to make sure that didn't break something"?

As much as I would prefer not to be negative, a lack of forethought has occurred in past pull requests.

In the past it was so severe as to be the reason why @chaosvolt is no longer available to comment here, given their strong objections to how development has handled pull requests (comments to this effect can be seen in https://github.com/CleverRaven/Cataclysm-DDA/issues/19291).

AlecWhite commented 7 years ago

I'm not following much the whole loot spawn problem in hardcoded locations, and this issue seems to be turning into a mobius strip, so just a quick question, why did some hardcoded locations had a lack of loot spawn?

kevingranade commented 7 years ago

Ok, are you seriously telling me that there aren't existing guidelines in place, even general vague ones, to give some direction on loot generation?

Yes, and that's what I said in my first reply in this issue. Up to this point it has been feedback-driven, and it's worked fine. Some locations have been a little high and some a little low, and those got corrected as needed.

"hey, maybe we better check to make sure that didn't break something"?

We did check, and spawns were changed, but not grossly unreasonable.

This is the most recent discussion about item spawn rates https://github.com/CleverRaven/Cataclysm-DDA/issues/21145#issuecomment-305023680 Note that the consensus (consensus between a handful of people, so a larger group could disagree) was that item spawn rates and ratios were already broken at that point, and needed a total overhaul at an indeterminate point in the future.

That is way out of my scope, yeah?

Sounds like it. This has been my point from the beginning in this issue, if you don't feel like you're capable of coming up with an item balance system, you shouldn't be kicking off a "grand item spawn rebalance".

@DangerNoodle And you are not contributing positively to this problem.

No, I can't afford to step in and break every deadlock that occurs in the project, sometimes things just stall, and there's nothing wrong with that.

In the past it was so severe as to be the reason why @chaosvolt is no longer available to comment here,

Bullshit, the reason @chaosvolt is no longer welcome to post here is he posted abusively (repeatedly bringing up unrelated topics, shitposting, posting garbage PRs with no testing) and did not correct his behavior after repeated warnings.

DangerNoodle commented 7 years ago

No, I can't afford to step in and break every deadlock that occurs in the project, sometimes things just stall, and there's nothing wrong with that.

Unfortunate, but so be it.

Bullshit, the reason @chaosvolt is no longer welcome to post here is he posted abusively (repeatedly bringing up unrelated topics, shitposting, posting garbage PRs with no testing) and did not correct his behavior after repeated warnings.

I was referring to the incidents leading to their being blocked in this repository, not the much earlier incidents causing them to be barred from contributing, which I do have as much familiarity with, as I was only an infrequent observer of the project at the time, not actively involved in discussion.

With the former, one thing I saw cited in the pull request obsoleting Arcana and Magic Items ( https://github.com/CleverRaven/Cataclysm-DDA/pull/19470 ) was a mention of their being moderated in the issue discussion I mentioned previously, for being off topic.

What comments remain give a sentiment that I unfortunately find myself agreeing with, that the "development crisis" was in part due to inadequate testing of changes generating increased workload.

I cited this as part of why Chaosvolt was blocked because this sentiment being censored for being off topic (which I disagree with) was listed as one of their many offenses.

Regardless, that is not relevant to this problem. What is a problem is that we are at a deadlock here. If, as you stated, spawns were being problematic even before the pull request that is blamed for this, then insufficient testing is not the primary cause. In which case, my apologies for bringing this subject up.

kevingranade commented 7 years ago

Question answered. tl;dr a large-scale spawn rate overhaul will require a global rationale for spawn rate balancing, which currently does not exist.