Individual storage for every item

How about not summing storage capacity of all your clothes and bags? I find it a bit unrealistic when I can place my, say, sledge hammer with volume 10 in a pair of shorts, pair of pants and jacket, each with a couple of little pockets, individually undoubtedly not capable of holding it, but altogether they give you the desired volume 10.
Maybe we should add some sort of indicator next to every clothes and bags? Like “Leather jacket (x/y)”, where x is the current storage of this item, and y is the maximum storage. That way we can put aforementioned sledgehammer only in clothes or bags with storage >=10.
Maybe after picking up items there will be some menu with question “Put item where?” (the same like “Repair what?” or “Heat up what?”) and we must choose items with enough storage to put your pickings in.

There were at least two reworks of this kind proposed.

While it makes sense from a realism point of view, the actual effects on gameplay would be rather minor, while the effort to introduce the change rather great.

And the part about “put item where” would be heavily detrimental to gameplay. It would need to be selectable automatically in some sane way, like items going to the biggest storage that can hold them. And it would also require an automatic system for re-packing the entire inventory to squeeze a few extra points of volume.

And automatizing everything wouldn’t be all that easy. The discrete backpack problem is NP-hard (in layman terms - can easily get really slow to calculate).

So basically, it can be easily done badly (“badly” as in “much worse than what we have now”), but doing it well is not just a lot of work, but also hard.

IMO there’s no need in automatizing at all. An average survivor is carrying an average number of items on himself, so he can manage to manually put every item in appropriate storage slot.
I personally like to mess around with all that micromanagement - layering clothing, sewing them, repairing them, accurizing weapons etc. So putting items in containers like bags and clothing will be very nice addition to all the immersion I get from management, I think.

Maybe you don’t need it, but a lot of players would.

For example: grabbing 60 rags from a smashed bed while wearing 2 chest rigs (2*18), a half-full backpack (20) and a trenchcoat (14?). Asking the player for each rag separately is obviously out, so we’d be asking which container to fill with rags. Since no container can hold them all, we’d be asking at least 4 times here.
And it would get even worse if someone tried to grab different sized items in some order.

Without automation, it would be unbearably tedious in many cases and the gain from the “feature” would be negligible.

Ok. You are most likely right.
It’s a pity though. I would like to have “NEO Scavenger”-esque or “Jagged Alliance 1.13 mod” system of handling with storage, items weight and size in our game.

I’m not saying it’s not possible, just that it’s not as easy as it sounds.

I like old X-COM’s item usage cost depending on slot (faster from belt, slower from backpack etc.).

Just that in DDA, we have tons of items and non-automatic approach simply won’t cut it. Automatic approach could be simple, but it would have to be good enough not to force players to constantly re-pack the inventory at high load.

Any of the various backpack packing approximation algorithms would be good enough for this and it would allow us to doff our backpack to wade into battle.

You could also allow some over-packing of items in exchange for damage over time on them as their seams are being stretched.

That said, yeah, I would only want it so I can pack a backpack too full and then drop it to fight. Other than that it’s negative on gameplay.

I personally feel that this would be a welcome change though this would require rework of whole volume system to balance it out. If we ignore all the pop ups and what goes where we pretty much get easy way to stack volume items, drop those before fight and fight totally unencumbered. Only thing this would add to game would be pretty much unlimited volume for a ton of work.

I would also say that instead of going for biggest every item should go for SMALLEST storage it can fit. See? Now we have polar oppesite opinions, just try to make system that fits all :wink:

Having multiple different speed of inventories sounds very interesting though. I’d say that automation would be a big problem. Something like current auto-pickup system would have to be put in place, or even extend the current system.

The trouble is actually integrating into the mess that is the inventory menus, a reasonable backpack algorithm isn’t going to be too hard to implement.
The simplest autp-place would be placing the item in the smallest container it can fit in, which maximizes your chance of being able to place large items later.

Taking into account that it is unlikely to have more than 200-300 items in the inventory and over 10 containers, it should be reasonably fast to implement a manually activated auto-reorganizer thus:

  1. Assume all items are outside pockets & make a list of them sorted per volume. Also make a list of all containers sorted by their volume.
  2. Find the smallest empty container of the list.
  3. Find the largest item that container can fit & place it inside.
  4. If the container has free space left repeat (3) until the function does not find a valid item to place. Then delete that container from the list.
  5. Repeat steps 2-4 until the containers list is empty.

Since the algorithm tries to completely fill the smaller containers first, it should be able to find an optimal solution to the problem. (unless i missed something in my reasoning)

Also, if picking up new items and they are not able to fit into one of the carried containers, we can run that sequence again:
Add the new items to the inv list at step (1), then run the rest of the sequence to see if the algorithm can automatically fit them. Accept the solution if successful. Promt to manually choosing containers for each item picked if not.

But i got to say, i have my doubts about the general idea. It could be adding useless (as in un-fun) complexity to the game.

What you guys are trying to solve is a an np-complete problem called the multiple knapsack problem.

jcd, to begin with your algorithm doesn’t take into account weight making it more similar to this:

What I would be more interested in seeing is a way to partition items in a functional but unrealistic way. I would like to be able to stash tools and other more persistent items in a separate space (maybe just another category) so that random stuff I pick up doesn’t get mixed in with it.

In terms of trying to get realistic bag support why have a repacking algorithm at all, doesn’t that defeat the point?

A more useful purpose for a repacking algorithms seams like it would be shifting storage around between vehicles slots or moving items between a dragged vehicle and your inventory.

Just my 2 cents!

Robiks mod “Catatweaks” did this to an extent. Backpacks and messenger bags. Had to be done though advanced inventory manager, but it did add a lot (for me anyways). Having a bug out bag ready to go is pretty satisfying to have made and set aside when a horde follows you home.

[quote=“Pandromidal, post:11, topic:8994”]What you guys are trying to solve is a an np-complete problem called the multiple knapsack problem.

jcd, to begin with your algorithm doesn’t take into account weight making it more similar to this:
http://en.wikipedia.org/wiki/Bin_packing_problem[/quote]
Actually we’d be trying to solve the Bin problem here, since our system doesn’t need to care about weight or value. The only thing it needs to care about is the volume.

[quote=“Pandromidal, post:12, topic:8994”]What I would be more interested in seeing is a way to partition items in a functional but unrealistic way. I would like to be able to stash tools and other more persistent items in a separate space (maybe just another category) so that random stuff I pick up doesn’t get mixed in with it.

In terms of trying to get realistic bag support why have a repacking algorithm at all, doesn’t that defeat the point?

A more useful purpose for a repacking algorithms seams like it would be shifting storage around between vehicles slots or moving items between a dragged vehicle and your inventory.

Just my 2 cents![/quote]
The point of repacking is that without it it forces players to constantly micromanage their entire inventory to the utmost degree, resulting a ton of tedious work. Players should be able to pack things manually if need be, but we definitely need a system that would allow players to somewhat replicate the current inventory system with individual bags so that they only need to micromanage their inventory packing if they want to or if they want a specific bag to be their go-bag or something similar.

What you guys are trying to solve is a an np-complete problem called the multiple knapsack problem.

jcd, to begin with your algorithm doesn’t take into account weight making it more similar to this:
http://en.wikipedia.org/wiki/Bin_packing_problem[/quote]

  1. Agree with i2amroy, not the knapsack problem at all. We don’t care about the resource allocation part of the knapsack problem, that is left as an exercise for the player :wink: Analogous to bin packing. More complicated than bin packing though, as the volume of containers is not fixed.
  2. It’s only NP-hard if you insist on “perfect” packing. An algorithm that required manual reshuffling to get the last few items to fit would be perfectly acceptable. Alternately a “manual automatic” repacking operation that takes a lot of (in-game) time and uses decreasing-item-volume increasing-bin-volume first-fit instead of inserting items one at a time as they’re picked up would probably result in a much better packing.
  3. Again, it’s not the packing part that is holding up the feature, it’s the integration piece, which is much “easier”, but a lot more work.

Ok. You are right. There is no need for each bag to have a weight limit

This comment I made ignores the possibility that the extra realism could add value to the game. I’ll admit it, having separate bags would be more realistic and this could be cool. On the other hand I’m worried that micromanagement will rear it’s ugly head.

Either way I see some edge cases:

[ul][li]Holding a long rope (10 vol) in a pairs of cargo shorts (7 vol) and a hoodie (9 vol) by tucking the end into the other item, actually makes sense.[/li]
[li]Some storage items are supposed to have multiple pockets not one big pocket; Players can add pockets to items also.[/li]
[li]In the proposed system a browning brl (12 vol) with the barrel extension mod (4 vol) should still fit in a messenger bag (20 vol) , for which it’s clearly too long to fit. [/li][/ul]

In the end my suggestion is not to regress in terms of micromanagement. I think my preference is still for the current unrealistic system. That said, how does this sound?

[ol][li]Only items at most the size of the players largest bag can be placed in their inventory (but ignore packing).[/li]
[li]Add flags to items that “fit easily” which ignore rule 1.[/li]
[li]Add an extra long item flag to some items and a fits extra long items tag for some bags. (Duffel bag should still fit in messenger bag so I think there needs to be two tags)[/li][/ol]

[quote=“Pandromidal, post:16, topic:8994”][ol][li]Only items at most the size of the players largest bag can be placed in their inventory (but ignore packing).[/li]
[li]Add flags to items that “fit easily” which ignore rule 1.[/li]
[li]Add an extra long item flag to some items and a fits extra long items tag for some bags. (Duffel bag should still fit in messenger bag so I think there needs to be two tags)[/li][/ol][/quote]

I like this suggestion much better. No sense in being able to fit something rigid & bigger than your largest pack.

Duffel should fit messenger bag if unloaded. Meaning that container’s volume should be affected by how full it is, just like waterskins.

It could stick out. Especially if the storage is not a pocket, but a backpack with straps and stuff.

That’s true, but currently not taken into account either. Should we simulate this too? (e.g. reworking the whole system so that all containers and items have 3d dimensions so we can easily determine what fits where? seems lots of json work for little gain)

I’ve been thinking about a simpler system based on a minimalist view of inventory.

Imagine if things were “tiny”, “small”, “medium”, “large” and “huge”.

Tiny things can accumulate in almost unlimited numbers - individual matches, sand, pills. Only their weight really is of importance. But finding individual items is almost impossible, so unless they’re fungible you could have a hard time finding what you want.

Huge things are practically impossible to fit in any pouch you could hold. You’d need to lift them wholesale or strap them to your body to move. Things like car frames, large jerry cans, very large weapons and so on. Regardless of weight it will be difficult to carry more than one of these things unless in a specialized containment device (like a sheath or strapped on) but you’ll be able to get it quickly.

In the middle, it’s in the middle.

So let’s say your average backpack would be one large pocket, one medium pocket and two small pockets.

One large pocket, like the main pocket of the backpack, could carry about four medium items comfortably, like a nail gun, a 2-liter bottle, a full size gun like a Deagle and a loaf of bread. Maybe you could stuff in one more mediumish thing, like a laptop and all that would happen is it’s a little slower to remove anything from the backpack because it’s “overstuffed”. You could fit a few small things, like a screwdriver, pocket knife and flashlight, but now everything’s getting a little harder to retrieve because its “disorganized”. You could also throw in some tiny stuff, really any number of tiny things, like matchbooks and pebbles but now those are really hard to find and might fall out when you’re getting other stuff out because the backpack is “littered” with stuff.

A medium pocket, like the secondary pocket on a backpack would be able to hold one medium thing, like a pair of sneakers, or about four small tools, like a hacksaw, wrench, and two bananas.

And so on and so forth. Duffel bags have multiple “huge” pockets. Purses can be worn and have a single “medium” pocket and maybe two “tiny” pockets. Putting away and using tools from these pockets cause modifiers to how long it takes to do something like light a fire. If my only firestarter is a tiny lighter in the large main pocket of my sack, littered with stuff, it’ll take me far longer than 6 seconds to pull it out and use it.

You could use small ropes to strap things like gallon jugs to a backpack. Add a carabiner as a quick disconnect to make it faster to detach and re-attach.

Could be cool and it could cut down on the number crunching of the current system. Or it could be a micromanagement pain in the ass hell.