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

Item volume in tile should slow movement #73459

Closed
RanikOrtega opened this issue May 2, 2024 · 18 comments
Closed

Item volume in tile should slow movement #73459

RanikOrtega opened this issue May 2, 2024 · 18 comments
Labels
stale Closed for lack of activity, but still valid. <Suggestion / Discussion> Talk it out before implementing

Comments

@RanikOrtega
Copy link
Contributor

RanikOrtega commented May 2, 2024

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

At the moment, terrain and furniture can slow down movement. However even if you had 200 liters of items in a tile you would not be slowed down at all. Similarly, monster movement is also not slowed down by item volume in tiles. So it is more effective to move a table into a hallway to slow enemy movement than it is to move large items or large volumes of items.

Solution you would like.

Item volume in a tile should have an additional effect on movement speed for players, NPC's and monsters that compounds with furniture / terrain movement effects.

If moving a chair into a hallway slows a movement down. Why shouldn't 100L of junk on and around the chair?

Movement into tiles should have an additional calculation that makes movement into tiles with item volumes of 20L or more begin to have a movement cost penalty. There may need to be a floor and a ceiling to the volume and movement speed penalties to not make tiles magically unpassable by dumping insane amounts of dirt but if you have 100L of spinach leaves let alone anything else it should slow you down by either having to go over it, maneuver carefully through it or around it. Unless it is a mutation or monster that can ignore certain terrain effects by barreling through it.

Example settings:

Tile volume of 10L: Movement speed cost increased by 1% Tile Volume of 100L+ movement speed cost increased by 20%.

Describe alternatives you have considered.

No response

Additional context

vbenc55gmobile-1215780678
Example is a 55 gallon aquarium which is around 208 liters. That volume in loose items should slow down movement similarly to existing furniture. Now a single tile in CDDA may be up to 3m if I remember correctly so it won't be as dramatic as an aquarium in a 1 cubic meter space but it should have some effect.
No response

@RanikOrtega RanikOrtega added the <Suggestion / Discussion> Talk it out before implementing label May 2, 2024
@DSeyka
Copy link
Contributor

DSeyka commented May 2, 2024

That's one juicy can of worms waiting to be opened! Especially considering sorting zones or menial tasked NPCs, oh boy.
Not disagreeing with the issue or anything, there's already something like that for vehicle seats. Just mentioning that it's not straightforward.

@I-am-Erk
Copy link
Member

I-am-Erk commented May 2, 2024

I agree this is a good idea, and we'd also want sufficient items to be able to eventually block a tile. I just brought this up in discord in fact, as a factor in mining operations. Loose rock produced by digging should eventually block up your tunnels until removed.

One option might be to check the volume of items in an open terrain tile, and place a pseudo-furniture if there is more than some threshold value, first slowing and then blocking movement. The pseudo furniture check would update any time you interact with the items. We might even give it a visible sprite similar to rubble, to show the piling up, so long as it didn't obscure the item sprite.

@DSeyka
Copy link
Contributor

DSeyka commented May 2, 2024

I'm just not sure if the effort is worth it. Still won't penalize players for dumping everything into a big pile or several, they just have to make sure it's not in the way. And if it is, they can probably ignore it, because it's in their base and movecost doesn't matter as much since it's their downtime anyway.

@IdleSol
Copy link
Contributor

IdleSol commented May 2, 2024

I'm just not sure if the effort is worth it.

Corpses are things, too. 10 corpses, that's about 800 liters. +200..400 to movement cost. 12 corpses will probably block the tiles. (based on a volume of 1,000 liters.)

And that's going to have a big impact. Everywhere you kill enemies, corpses will appear. Labs? A narrow corridor where you fight monsters. A natural barricade that slows enemies down. Or prevents you from running away from them.

UPD. And you can also add the UNSTABLE flag

@DSeyka
Copy link
Contributor

DSeyka commented May 2, 2024

Indeed, that too is a factor. Might be even an interesting one from gameplay perspective, but if this is to be done then considering all the implications is paramount. In vehicles there's usually some leeway, in 1-tile wide corridors there might be not.

Or it might be exploitable.

@worm-girl
Copy link
Contributor

This will probably result in people finding the most high-volume low-weight item they can carry it around and dropping it in front of themselves to use as a zombie slowdown tool when combat begins. The game is also quite bad at conveying how much volume of stuff is in a space, as well, which might be bad for playability.

@I-am-Erk
Copy link
Member

I-am-Erk commented May 3, 2024

A tile holds 2000L. We'd probably expect movement penalties to start in the hundreds of litres range. I struggle to imagine what items are worth carrying around that are that large and still easier than just tossing down caltrops or some other trap.

If we went with a pseudo furniture option, we'd have a clear visual for 'how many items in tile' at the point where it matters, because you'd start seeing a 'heaps of items' icon below the items when they became dense enough to matter.

@NetSysFire
Copy link
Member

I like the general idea. Plus the items should not only slow movement but also risk breakage when stepped on, which can be mitigated by crouching and worsened by running. Searching through a big pile of items would also be slow. This would also make storage containers a lot more useful.

@PGR-14
Copy link

PGR-14 commented May 3, 2024

Plus the items should not only slow movement but also risk breakage when stepped on, which can be mitigated by crouching and worsened by running.

I think that may lead to a ton of frustration w/ players if we put this in. Running is ok? But only if it would make sense to be damaged. A shirt would have no effect, a smartphone might have, but a glass bowl would be effected, but only if you step on it, & we can assume that the character is looking where they're running.

@RanikOrtega
Copy link
Contributor Author

A tile holds 2000L. We'd probably expect movement penalties to start in the hundreds of litres range. I struggle to imagine what items are worth carrying around that are that large and still easier than just tossing down caltrops or some other trap.

If we went with a pseudo furniture option, we'd have a clear visual for 'how many items in tile' at the point where it matters, because you'd start seeing a 'heaps of items' icon below the items when they became dense enough to matter.

My numbers were comparatively low then haha. But yeah if 2000L is "Blocked" then 1800L would be close to effectively blocked or extremely slow to move through (basically prone movement speed). Things like 200L would be a few movement points difference compared to flat open terrain.

@IdleSol
Copy link
Contributor

IdleSol commented May 3, 2024

You can check if there is a roof. And if there is, and the volume is more than 500 liters, then prohibit movement by running. If it's close to 1000 liters, you can only move by crouching or lying down.

A tile holds 2000L

Can you clarify that? Where does the figure of 2000 come from? Is it based on the size of the tiles: 1x1 by 2 meters high? Because you can only put 1000 liters on one tile. And if you use furniture, 3500 liters (military base, warehouse shelf).

@I-am-Erk
Copy link
Member

I-am-Erk commented May 3, 2024

Is it 1000L? My bad. The point remains.

I wouldn't wait until the tile is totally full to block it, but it would need to be decently loaded up. If they're 1000L I'd have pass ability changes start around 300L and cap with blockage around maybe 600L. If you google a 600L tank you'll see that's an awful lot of volume to fill up a tile

@IdleSol
Copy link
Contributor

IdleSol commented May 3, 2024

I see. I thought the tile sizes and volumes were spelled out somewhere.

The idea is as follows. The height parameter is added for each tile. It's different and depends on the type of tile. In houses, it's 3 meters. In caves, it can be 2 meters (or less). In hangars and factories, it is 5 meters.

Thus, under the conditions of one z level, we get different heights. We take the volume and equate it to the height of things on the tiles. So, 1000 liters = 1 meter. 200 liters = 20 centimeters.

Given the mutations, the character's height varies, if I remember correctly, from 50...60 centimeters to 3 meters and 25 centimeters. This means that a mouse can safely run with almost any amount of garbage, adjusted for the increased movement cost. And someone with a dragon mutation, even without garbage has to walk half bent.

@I-am-Erk
Copy link
Member

I-am-Erk commented May 3, 2024

That's a pretty neat idea in general for determining passability of furniture, but it should really be its own issue post as it would affect a lot more than just item stacks.

@worm-girl
Copy link
Contributor

worm-girl commented May 3, 2024

I want to go on record saying I think this is a bad idea for terrain tiles, but if you're interested in seeing how one style of implementation works and you haven't played in a bit, I did add this for vehicle tiles in #70184 and its followup PRs. That PR is kind of huge, but you can just load the game up, spawn a car, and pile crap into a seat until your character no longer fits there to see how it works in practice. In my opinion it's a bit unintuitive but servicable enough for vehicles, but if every tile in the game worked that way it might feel kind of obnoxious. There's room for improvement over my method in any event.

The check is relative to creature size and there's a bonus if the tile or one adjacent to it is unroofed. Fliers ignore the whole system in unroofed tiles, and a few traits confer a bonus for characters who are contortionists or slimy.

The cramped space debuff probably isn't appropriate for general use (maybe tiles with low ceilings could be flagged or something? It causes pain so it implies that you're practically crushed by the items in the space, which doesn't make sense if it's just a house with a bunch of corpses on the floor that you have to pick your way past) but the rest of it is probably a worthwhile jumping off point.

@Void-Seeker
Copy link
Contributor

As zombies can't attack items on the floor, wouldn't that cause an exploit where players can create immovable walls out of random junk (probably corpses)?

@RanikOrtega
Copy link
Contributor Author

RanikOrtega commented May 7, 2024

As zombies can't attack items on the floor, wouldn't that cause an exploit where players can create immovable walls out of random junk (probably corpses)?

That is a reasonable concern, perhaps for this to work, zombies would additionally need the ability to attack "Piles" that impeded them.

Soft blocks would be piles of items and Hard blocks would be actual wall terrain. Even normal zombies could attack soft blocks. and destroy or more likely damage and move items to a nearby tile.

Copy link
Contributor

github-actions bot commented Jun 6, 2024

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.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Jun 6, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Closed for lack of activity, but still valid. <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

8 participants