CleverRaven / Cataclysm-DDA

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

Support for multiple speeds for monsters depending on their state #68524

Closed Karol1223 closed 8 months ago

Karol1223 commented 11 months ago

Is your feature request related to a problem? Please describe.

In #68516 I audited rabbit speed. Which was fun - except I assumed their max speed. An animal should not be constantly running at it's maximum possible speed - this is stupid. But... monsters only have one speed, unless affected by outside effects or interference.

Solution you would like.

  1. First option would be to allow us to manually define "run speed" for the monsters in their JSON, which would be different from regular speed. This allows for more flexibility but relies on manual labor of contributors adding this field to every monster - it's not gonna be widely used, likely
  2. Second option would be to dynamically calculate the run speed from normal speed, by multiplying it. This will allow for more automation but slightly less flexibility (which dare I say I wouldn't expect anyone to make use of anyway)

Ideally, "run speed" should come into effect when the monster is either Hostile or Fleeing - i.e. either it's attacking something or something activated it's fear trigger/response/whatever we call it

Describe alternatives you have considered.

A flag that disables run speed from monsters altogether? I imagine some monsters like snails would probably not have much of a speed difference

Additional context

No response

Zireael07 commented 11 months ago

I'd halve the rabbit's speed for now (I see you already did in #68523) and allow some monsters to run, indeed. (Whether to use a multiplier or a set speed is up to devs imho)

ADekema commented 11 months ago

Instead of making a flag that disables run speed for monsters I would make a flag that enables running for monsters. There are a lot of monsters in game that logically shouldn´t be able to run. Mainly the undead becease they are zombies and as undead they lack the coordination and balance to run without tripping.

You also need to carefully consider the balance of adding run speed. The last thing you want is destroying the balance by making creatures who are already as fast as they are supposed to be an effective speed boost. You also need to consider the fact that ranged weapons work on range compression. You don´t want a creature able to close the distance of a handgun within 1 turn.

Karol1223 commented 11 months ago

Instead of making a flag that disables run speed for monsters al together I would make a flag that enables running for animals. There are a lot of monsters in game that logically shouldn´t be able to run. Mainly the undead becease they are zombies and as undead they lack the coordination and balance to run without tripping.

I agree with the idea of a flag-enabled running, but I do disagree that all undead shouldn't be able to run. We have the lines of zombie predators, whose entire gimmick is they become faster and more agile

Venera3 commented 11 months ago

The easiest solution for hostile mobs would be to allow effects to modify movement costs - self-buff attack adds an effect decreasing move speed would work well enough for them.

Fleeing mobs would be more complicated to hook uplike that, since you need to include some form of fleeing state check and most skittish mobs are perma-terrified.

ADekema commented 11 months ago

I agree with the idea of a flag-enabled running, but I do disagree that all undead shouldn't be able to run. We have the lines of zombie predators, whose entire gimmick is they become faster and more agile

Probably all the normal animals should be able to run. I do think the vast majority of undead (not counting ferals) should not be able to run. Excluding the predator lines and maybe the masters and amalgamations. I also don´t think that giant insects should be able to run. They are a few orders of magnitude larger and even with extreme mutations there should be some reprocutions on mobility.

If you make undead and other enemies able to run you should also review their speed as it is effectively a speed buff and would affect the balance greatly. Espescially if the player can´t outrun a lot of enemies anymore and would be forced to effectively engage them the majority of the time.

Would it also be possible to make running only work for a certain number of turns while also severely nerf the base speed of animals and other monsters. This would allow us (and zombies) the option of persistence hunting and means that we could give monsters a sort of stamina limiting how long they can chase you.

PatrikLundell commented 11 months ago

Undead should not be able to "run" in the sense that they should not have a mode that kicks them into a higher speed mode. Runner zombies run tirelessly as their base (and only) mode of locomotion. The fact that their base movement actually is running doesn't mean they should be given a mechanical running mode: they have one gear, and theirs is a running one. Mechanically, a running mode should be a higher speed move that can be engaged by the critter and that should default to tiring the critter such that it should not be able to keep it up indefinitely (and ideally subject them to the same slowdown degradation PC suffer from when tiring, so critters would catch up to the PC only if the PC is tiring faster when their nominal running speed is the same, although I'd expect the PC to tire faster most of the time as critters don't tend to be loaded down with carried stuff). Since most critter speed seems to currently be set to the running one, introduction of a running speed would probably necessitate an audit of each critter individually, where the standard speed is adjusted downwards at the same time as a running speed is introduced (ideally together with some stamina measurement).

fairyarmadillo commented 11 months ago

I think the net result of a change like OP proposes is that the game would not be substantially improved, but it would become a lot more confusing both for players and contributors. The player is already often stuck trying to gauge the movement speed of groups of 20+ diverse enemies, making that act an order of magnitude more complex is not going to win a lot of friends among the playerbase, nor would it really make a positive difference in a player's experience with the game.

Karol1223 commented 11 months ago

I think the net result of a change like OP proposes is that the game would not be substantially improved, but it would become a lot more confusing both for players and contributors. The player is already often stuck trying to gauge the movement speed of groups of 20+ diverse enemies, making that act an order of magnitude more complex is not going to win a lot of friends among the playerbase, nor would it really make a positive difference in a player's experience with the game.

There is a thin line between making sure the game is enjoyable, and handicapping yourself to cater to the players. Refusing to use multiple speeds for monsters because players might not like it is very much the latter.

I am a firm believer in that the player should NOT have an unfair advantage over the AI, where the AI should realistically have the same tools at its disposal. Sprinting is one of those tools. If the player can sprint, then at the very least other unmutated fauna that should realistically be able to sprint should too - this excludes zombies and mutant arthropods, but includes mammals, mutant mammals (spideer, tusked moose) and, which would be the most impactful, ferals.

I can see sprinting being given by a flag, as opposed to removed by it and given by default, since in this solution you'd end up with more monsters to blacklist than to whitelist. Another genuine concern that's been brought up is gun ranges, as since they're lower than irl this would make for weird scenarios if not handled properly.

I also will forever consider player opinion as the least important factor. Why? Because the playerbase has shown very clearly its tendency to make problems out of non-issues and create imaginary problems. Take for example the outrage about skill rust, or the comment on #67677 which you yourself responded to. It's on the developers to spot and solve ACTUAL problems while filtering out the pointless noise.

fairyarmadillo commented 10 months ago

I also will forever consider player opinion as the least important factor. Why? Because the playerbase has shown very clearly its tendency to make problems out of non-issues and create imaginary problems. Take for example the outrage about skill rust, or the comment on #67677 which you yourself responded to. It's on the developers to spot and solve ACTUAL problems while filtering out the pointless noise.

This is taking a needlessly adversarial stance and exacerbating the issue. Players read responses like these and come to believe that contributors and developers do not care about the player experience. They react in the way that they do, and devs/contributors then take offense and respond poorly, sometimes to the detriment of the game. It is up to us to be better behaved than the subreddit.

Politics aside, I think your proposal in the above comment (enabling sprint via flags) is about as painless of an implementation as it could be, so my only argument wrt the actual mechanic is that it is going to be confusing. Would it be possible to stick a status icon on the enemy sprite, like we do when the player is sprinting?

It may also behoove us to consider movement modes other than sprinting. Crawling and temporarily flying come to mind as things a monster might want (or be forced) to do. Limiting the big bugs to temporary flights would make them a lot more believable. Shooting a zombie's kneecap and making it into a crawler would be cool.

Zireael07 commented 10 months ago

Agreed. There's no problem implementing this and I can totally see status icons on sprites helping (though we have the "Fleeing!" note in V menu... so I can't see the problem?)

fairyarmadillo commented 10 months ago

Fleeing isn't life-or-death important information. Fewer graphical elements are always gonna be better, but this may be a case (as with hostile) where forefrounding that information is necessary to prevent micromanaging with x or V.

Karol1223 commented 10 months ago

Politics aside, I think your proposal in the above comment (enabling sprint via flags) is about as painless of an implementation as it could be, so my only argument wrt the actual mechanic is that it is going to be confusing. Would it be possible to stick a status icon on the enemy sprite, like we do when the player is sprinting?

I think that a graphical representation (or at least support for such, since I think these elements are handled tileset-side, not code-side) would be good, but including it might clutter the screen a whole lot. In practice, it depends on how that side of it is designed. It could either be a neat visualization or an eyesore, but that's unfortunately pretty subjective.

It may also behoove us to consider movement modes other than sprinting. Crawling and temporarily flying come to mind as things a monster might want (or be forced) to do. Limiting the big bugs to temporary flights would make them a lot more believable. Shooting a zombie's kneecap and making it into a crawler would be cool.

I briefly considered how/why we'd want stuff like crawling or "crouching" for monsters but I feel like it'd be significantly less straightforward to implement than running/sprinting. How do we determine when a monster starts crawling or crouching/sneaking/whatever we want to call it? Weakpoints like you mentioned are one way to (at least temporarily) potentially forcefully switch a monster's movement mode, but I think that taking it beyond weakpoint-induced forced switches is borderline impossible.

When it comes to flying - I 100% agree that flying monsters should not be flying all the time. It's simply stupid. Having said that, I am not sure just how much harder it'd be to implement flight proper. Until recently monsters couldn't even navigate Z levels down, although now that this obstacle is out the way perhaps implementing non-permanent flight would be possible? At the end of the day, I cannot comment on how this could look from the code side, because it's all C++ and I am C++ illiterate.

github-actions[bot] commented 9 months ago

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. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.