Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to tune down/up monster drops #28919

Closed
Warlander opened this issue Mar 22, 2019 · 31 comments · Fixed by #34615
Closed

Ability to tune down/up monster drops #28919

Warlander opened this issue Mar 22, 2019 · 31 comments · Fixed by #34615
Labels
<Enhancement / Feature> New features, or enhancements on existing Items / Item Actions / Item Qualities Items and how they work and interact Spawn Creatures, items, vehicles, locations appearing on map <Suggestion / Discussion> Talk it out before implementing

Comments

@Warlander
Copy link

Is your feature request related to a problem? Please describe.
Currently, you can only modify item spawn rates for items spawning in buildings, and there is no similar setting for monster drops. When playing with lowered item spawn rate settings, amount of loot dropped by monsters is unbalanced.

Describe the solution you'd like
Additional setting for tuning monster drops up or down, similar to "Item spawn scaling factor".

Describe alternatives you've considered
Having "Item spawn scaling factor" influence both building and monster drops. That's one possible solution, but gives less freedom for players who would like to have separate ratios for them.

@ghost
Copy link

ghost commented Mar 22, 2019

It feels like zombie drops are much more generous than they used to be a year ago or so, especially in regards to batteries and electronic stuff in general.
This might have been intended though, I'm not sure. An option would definitely be nice to have, anyway.

@Warlander
Copy link
Author

Warlander commented Mar 23, 2019

Yes, loot from zombies seem to be much higher indeed - currently single day raid to the mall is enough to get you thousands on batteries, enough to last for the entire game until you power everything with UPS or bionic power.

(and also hundreds of ammunition)

@Night-Pryanik
Copy link
Contributor

That's the problem of our universal batteries system.

@ghost
Copy link

ghost commented Mar 24, 2019

Also agree. Have played only 0.4 item spawn for a long time now. As of recent builds, much more loot from monsters, especially phone/smartphones. If you manage to find a crashed copter, you can easily* kill some zombie soldiers and get OP weapons (damaged).

The phones I understand, but yes much more loot from monsters, very unbalanced.

@Night-Pryanik
Copy link
Contributor

much more loot from monsters, very unbalanced.

We could tune it down. Please describe what loot in particular you encounter too much and want it to be lower.

@Warlander
Copy link
Author

much more loot from monsters, very unbalanced.

We could tune it down. Please describe what loot in particular you encounter too much and want it to be lower.

Ideal solution is just having option to regulate loot from monsters, but if that's not possible or easy - there are way too many electronics, and they often drop with lots of batteries in them (especially 120/120 cellphones are common). Permanent markers, lighters, refillable lighters and matchboxes drop in overabundance, too. Ammo drops a lot as well, but that's IMHO a good thing with how hard it is to craft - gun drops could be tuned down a bit, through.

@ghost
Copy link

ghost commented Mar 25, 2019

Another thing I've noticed, is that battery count is only randomized for particular items, and never for others. Every single talking doll I've found has 20 out of 100 batteries in it, for example. It's not a huge problem by itself, but probably not intended either.

@Night-Pryanik
Copy link
Contributor

there are way too many electronics, and they often drop with lots of batteries in them (especially 120/120 cellphones are common)

Don't you see people carry lots of electronic devices IRL today?

lighters, refillable lighters and matchboxes drop in overabundance, too.

Don't you see lots of smokers on the streets IRL today?

Another thing I've noticed, is that battery count is only randomized for particular items, and never for others. Every single talking doll I've found has 20 out of 100 batteries in it, for example.

That's just because charges in some items are randomized, and in others they ain't.

@ghost
Copy link

ghost commented Mar 25, 2019

That's just because charges in some items are randomized, and in others they ain't.

Is this intended though? Seems like an oversight to me.

@Night-Pryanik
Copy link
Contributor

Is this intended though? Seems like an oversight to me.

Of course it's not intended, nor it's an oversight. It's just "I'll give it 20 charges, and I'm done with it".

@ghost
Copy link

ghost commented Mar 25, 2019

Heh. Fair enough.

@Warlander
Copy link
Author

Don't you see people carry lots of electronic devices IRL today?

Yes, I doubt you can just extract batteries from them like in CDDA, through. Maybe instead of working devices you could often get random part(s) you would get from their disassembly?

Don't you see lots of smokers on the streets IRL today?

Can't argue with that, amount of working lighters and packs you get is insane, through. Maybe at least getting rid of packs to reduce inventory micromanagement could be a good idea? (the same way we don't have antibiotics etc. in packs even through they are IRL).

@Night-Pryanik Night-Pryanik added <Enhancement / Feature> New features, or enhancements on existing <Suggestion / Discussion> Talk it out before implementing Spawn Creatures, items, vehicles, locations appearing on map Items / Item Actions / Item Qualities Items and how they work and interact labels Mar 25, 2019
@ghost
Copy link

ghost commented Mar 25, 2019

Speaking of cigarettes. I should be able to reload / part reload my pack of cigarettes with the other loose cigarettes in my inventory.

@ghost
Copy link

ghost commented Mar 25, 2019

https://www.reddit.com/r/cataclysmdda/comments/ao8tc8/zombies_drop_too_much_loot/
Current world, I have all sorts of bracelets and rings and necklaces too...
Not sure (at all) how code is turned into a working game. But maybe some simple algebra?
Where monster drop chance x loot drop scale = actual drop chance

[
{
"id": "mon_zombie_soldier_death_drops",
"type": "item_group",
"subtype": "collection",
"magazine": 100,
"ammo": 60,
"entries": [
{ "distribution": [
{ "item": "LAW_Packed", "prob": 20X },
{ "item": "e_tool", "prob": 100X },
{ "item": "mask_gas", "prob": 100X, "damage-min": 1, "damage-max": 4 },
{ "item": "two_way_radio", "prob": 50X },
{ "item": "c4", "prob": 10X }

Where X = Loot drop scale (0.01 to 2 or 3)

TO NOTE, modern phones are not user serviceable, and the batteries cannot be unloaded. Consider phones to have lithium ion batteries instead of standard batteries. You can always modify a phone with battery mod to accept standard battery(s)

@kevingranade
Copy link
Member

Ideal solution is just having option to regulate loot from monsters

This is not ideal at all, in particular related to the comments:

loot from zombies seem to be much higher
much more loot from monsters

this impacts many players that want to play low-loot games, we want to fix it for everyone, not just people willing to tune their game.

@Warlander
Copy link
Author

Yes, more loot present in current versions impacts players who want to play low-loot games. Is there any other way to limit loot drops for them other than possibility to tune the game like in case of item spawn rate, through?

I think there is need for some balance changes in loot for everyone, but it wouldn't hurt to have an option to globally reduce them for extra challenge or slower-paced game.

@ghost
Copy link

ghost commented Mar 25, 2019

Grappler
Grappler Zombie with Abundant Loot

Bloated
Bloated Zombie with Abundant Loot
Or it carried a sling pack full of loot?

Perhaps with loot.
Spawning one item - 70% -> spawning another item 50% -> spawning another item 30% ->spawning another item 20%

Chance of spawning four items 2%

Or however smart coders write code so monsters are less likely to drop multiple loot items...
At this stage seems to be a chance to drop any item, or similar....

@kevingranade
Copy link
Member

it wouldn't hurt to have an option to globally reduce them for extra challenge or slower-paced game.

It would, because the more different options we have, the less able we are to test them all. More options means more bugs and less balance. Extending an existing option to do this would work fine though.

@Night-Pryanik
Copy link
Contributor

Grappler Zombie with Abundant Loot

A set of filthy clothes. Inhaler, permanent marker in one pocket, flyer, rolling paper and plastic bags in the other. Game watch on the wrist.

Bloated Zombie with Abundant Loot. Or it carried a sling pack full of loot?

Yes, it is.

What's so "abundant" with their loot? Is there something really out of sense?

@ghost
Copy link

ghost commented Mar 26, 2019

Well these are only a few examples. I have played, for a very long time with low item spawns. Sometime recently it has been changed, and now zombies drop much higher loot. With item spawn set at one, it seems like I am the only survivor, shops fully stocked, so I turn it down. Now every few zombies I am getting given free loot and ammo. Now, I can overpower basic enemies in the first few days, except Skeletal Juggernaut, but I am sure my C-4 or Granade will kill that thing..

I could spend all day giving examples, but those are the two that appeared easily for me. The plastic bag had rotten food, but that went away after reload (to do the screenshots).

If you can easily change loot drop rates, that would be great. Perhaps lower probability to drop multiple items, or probability of dropping items related to current item spawn setting.

Would be nice.

@Maddremor
Copy link
Contributor

RE: Batteries and electronics.
Given that the cataclysm started several (5?) days before the game start, devices that are not explicitly turned off might have run out of power, especially if they have been recieving alert messages from the government during the crisis. Additionally, zombies are not inclined to protect their devices from water and physical damage, so only some of them would be functional.

@Night-Pryanik
Copy link
Contributor

Given that the cataclysm started several (5?) days before the game start, devices that are not explicitly turned off might have run out of power

For ordinary zombies I made 90% chance to drop fully discharged phones, and only 10% of phones will spawn with 0..15 charges in them. Is this too much, you think?

@Maddremor
Copy link
Contributor

Maddremor commented Mar 26, 2019

I would probably assume that you can't extract batteries from a broken phone, and then apply the 0.1 chance to the intact ones. But then again, I'm better at esablishing qualitative factors than to assign them quantitative values.

@Inglonias
Copy link
Contributor

Inglonias commented Mar 27, 2019

The battery system in Cataclysm is a relic of an earlier age in the game's development. It's certainly a little bit abstract these days.

In a perfect world, the way I'd get batteries to work would be that they'd be sort of like magazines on weapons. Each electronic device could load one battery that had a capacity of 100 charges (larger devices such as electric forges can load more batteries) with a certain level of charge. The extra battery mod would do exactly what it says on the tin: Let you load more batteries into a device (say, twice the base amount). You'd also be able to build/scavenge a device for transferring charge between batteries.

@stale
Copy link

stale bot commented Aug 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Aug 6, 2019
@stale
Copy link

stale bot commented Sep 5, 2019

This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it

@stale stale bot closed this as completed Sep 5, 2019
@Davi-DeGanne
Copy link
Contributor

I'd like to fix this by rolling against each item and getting rid of it X% of the time, where
X = 1 - spawn rate scaling factor.

Cons:

  • In order to avoid adding a special case to the item generation engine, this solution would remove the items only after they are already created. It could be argued that this is wasting a few CPU cycles
  • Will sometimes result in zombies with no pants

Pros:

  • Easy to implement and maintain, since it utilizes the existing setting.
  • Solves issue for those who like to play on low item spawns
  • Will sometimes result in zombies with no pants

...Any thoughts/objections before I prepare a PR?

@Night-Pryanik Night-Pryanik reopened this Oct 8, 2019
@stale stale bot removed the stale Closed for lack of activity, but still valid. label Oct 8, 2019
@Night-Pryanik
Copy link
Contributor

We need to be absolutely sure that we don't get no "natural" monster drops (let's say, some robot not dropping its integral circuits) on its death after a while with your solution.

@Davi-DeGanne
Copy link
Contributor

We need to be absolutely sure that we don't get no "natural" monster drops (let's say, some robot not dropping its integral circuits) on its death after a while with your solution.

You mean like a skitterbot not dropping broken skitterbot? My solution doesn't touch revert_to_itype so that shouldn't be a problem.

Or did you mean something else?

@Night-Pryanik
Copy link
Contributor

I'm not at my PC now, so I can't tell for sure, but IIRC manhacks, for example, are dropping spikes on death.

Davi-DeGanne pushed a commit to Davi-DeGanne/Cataclysm-DDA that referenced this issue Oct 10, 2019
Previously, setting a low 'item spawn scaling factor' did not affect
drops from monsters, making a disproportionate amount of a player's
loot come from monster drops. This changes that so that monster drops
are reduced as well.
fixes CleverRaven#28919
@Davi-DeGanne
Copy link
Contributor

Well, manhacks always drop a single item (besides the broken manhack itself), chosen from a pretty large pool of options, including heavy batteries, plutonium cells, kevlar plates, etc. A spike will spawn exactly 8% of the time. Incidentally, none of these are required in the crafting recipe of the inactive manhack, and therefore make no sense from a realism standpoint (or a balance standpoint for that matter, since you could theoretically farm plutonium by repeatedly crafting, destroying, and disassembling manhacks).

All the realism-driven drops are already covered by disassembly of the broken robot itself, which again, my code doesn't touch.

kevingranade pushed a commit that referenced this issue Oct 12, 2019
* Apply ITEM_SPAWNRATE to monster drops
Previously, setting a low 'item spawn scaling factor' did not affect
drops from monsters, making a disproportionate amount of a player's
loot come from monster drops. This changes that so that monster drops
are reduced as well.
fixes #28919
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Enhancement / Feature> New features, or enhancements on existing Items / Item Actions / Item Qualities Items and how they work and interact Spawn Creatures, items, vehicles, locations appearing on map <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants