CleverRaven / Cataclysm-DDA

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

Unlimited hound replication #49645

Open GoLoT opened 3 years ago

GoLoT commented 3 years ago

Describe the bug

As discussed here, there is no limit as to how many times a hound can replicate. The thread showcases a specific scenario where a combination of multiple pillars and corners, a bunch of real hounds and very bad luck can result in infinitely replicating hounds.

It isn't strictly a bug but it's an unintended outcome of the special attack.

Steps To Reproduce

  1. Find a place with many corners. The research lab has many pillars and corners for hounds to teleport to.
  2. Spawn some real hounds.
  3. Let them teleport around until they start creating new real copies.
  4. Be surrounded by an endless mass of hounds.
  5. Optionally check the save file or use the debug menu to check that almost all of the hounds are real, not the fake kind.

Expected behavior

Hounds create illusions and maybe a few real hounds up to a limit that makes the encounter challenging without completely locking a character in place forever. Or until hunger/thirst kills you.

Screenshots

image

Versions and configuration

Current experimentals.

Additional context

There are two proposed fixes:

  1. Hard limiting the amount of hounds that can coexist.
  2. Instead of creating real hounds when the specific conditions are met, simply refresh the "disappear" cooldown for the fake hounds. Or create a new kind of afterimage hound that has the same stats as the real one but "poofs" like the fake ones only lasting 5 or 10 times longer.
  3. A mix of the two could work too. Spawn real ones up to the limit, create the badass fake ones when the limit is reached.
actual-nh commented 3 years ago

I'm guessing this also causes/can cause a performance problem (slowdown)?

GoLoT commented 3 years ago

Honestly, I didn't feel that much of a slowdown. Now that you mentioned it, I think it took a bit longer to recover stamina using the wait menu but I didn't even consider the slowdown until you asked.

For context, I'm running the game on an i7-8700K overclocked to 5.2GHz. I don't know if the performance impact might be much more noticeable on slower systems. If anyone wants to try I can dig through my backups and find the savegame.