cataclysmbnteam / Cataclysm-BN

Cataclysm: Bright Nights, A fork/variant of Cataclysm:DDA by CleverRaven.
https://docs.cataclysmbn.org
Other
703 stars 273 forks source link

Container affinity: Pockets BN Style #476

Closed vorpalhex closed 2 years ago

vorpalhex commented 3 years ago

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

BN split from DDA right before pockets - and for good reasons. Pockets as implemented in DDA require a lot of management, it made the base game not very fun and the addition of item "length" broke a lot of typical patterns like keeping a pipe on your person.

However, pockets do allow things like medical kits to behave as one expects (being a container with items as opposed to an item that's activated and transforms), and it has the potential to actually ease gameplay by letting items "stick" to containers.

Describe the solution you'd like

Instead of following DDA's pattern, we should implement "container affinity". Items prefer to follow a container they have an affinity for (eg aspirin has an affinity to it's medical kit). If an Item has no affinity, it'll do it's best to stay on the character until storage no longer allows it to do so at which point it will drop to the floor.

Edit for clarity on 4/19

Affinity here is something that typically the player assigns to an item. The player would go into their inventory, highlight the crowbar and say "This particular crowbar has an affinity for my duffel bag". The affinity would apply only to that specific crowbar, and only to that specific duffel bag. Other crowbars would behave normally.

There are cases where an initially assigned affinity makes sense, like aspirin having an affinity to it's medical kit or items on a corpse having an affinity to a bag on a corpse. Items should have only one affinity, and it should be possible to clear it.

End Edit

This differs from DDA in a few important ways:

  1. No length. It just doesn't even play a role. We should still allow length to be in json for portability, but just ignore it.
  2. Allow an item to exceed the storage capacity of any given container. If you have 30m of volume from 5 different garments, and want to pick up a 30m item that's fine. Even though realistically it doesn't "fit", it can still be assigned affinity and behave like normal, it just won't be able to actually follow any given container and will drop on the floor as soon as your storage volume drops below 30m.
  3. No "subpockets". In DDA, a single item can have several pockets and this makes things super frustrating. We should just allow items to have a single capacity value and things either fit in it or don't.

This allows several playstyle improvements:

Describe alternatives you've considered

  1. Implement DDA style pockets: The team has been clear they don't want this and it doesn't align with BN's goal of being fun above all
  2. A closer hybrid: eg still keep length or allow multiple pockets. The issue is that I think these features add in more management overhead and make this from an "opt-in" feature like zone planning to a required feature you have to interact with for the game to behave as expected.

Goals

I think the goal here is to have an optional system that benefits advanced players but doesn't require interaction from newer players. It should be lightweight and easy, and overall a low touch system. Keeping overhead on JSON authors minimal is something that we should keep in mind.

Coolthulhu commented 3 years ago

I have a different solution in mind, although your idea might help with some auto-selection.

I want to have items assigned to containers without being explicit contents. This would only be used for dropping, zombie equipment and the like. Basically:

Your idea could help with auto-selecting items for drops. For example, if you drop a tool belt, it could prefer to drop items of tool type with it. Autoselection of items to drop is still a complex question. Ideally, we'd have some way of keeping certain amounts of item at hand, for example 10 aspirins, while the rest goes into backpack, which is dropped.

RaynaWasTaken commented 3 years ago

Just to chip in, this sounds kinda similar to an idea about the topic i had I'll just copy it over:

"so you'd essentially have, lets say 2 backpacks with 20l space each giving you 40l of "free storage" as in, same inventory usage as you already do it now and you basically assign your needed day to day items to one of them, which take up 10l

those 10L are blocked off, but you still got 30L of unassigned storage space that is basically your kitchen sink "everything lands here" big pocket"

This would essentially give you full freedom about whether you want to interact with that system to begin with or not. It'd also likely save you from having to implement overly complicated mechanics to reference items and such.

Anyways, just wanted to throw that out too, i'd appreciate a system like that, as long as its either optional, or unobstrusive enough so you dont have to deal with additional micromanagement, unless you really want to.

vorpalhex commented 3 years ago

This would essentially give you full freedom about whether you want to interact with that system to begin with or not

I think this is a really important goal for whatever we solution here. The zone management feature is a great example of something being an opt-in kind of gameplay feature, and it helps reduce burden on new players while giving advanced players more toys.

those 10L are blocked off, but you still got 30L of unassigned storage

I think earmarking of space is potentially complicated. If you pick up a bag off a corpse and it has assigned items, you hit the issue of "why does this bag have less space than it should?" as a new player. It becomes non-obvious.

One of the benefits of the proposed affinity system is that total storage space behaves as items do now even when assigned items are in the mix.

@Coolthulhu I think we're on the same page basically. I'm calling:

Items dropped this way retain some sort of reference to the bag

that "affinity", and affinity is an (under the hood) item property. Potentially items on a corpse might have an affinity to a bag on a corpse, such that when you pick up a backpack it has a few items in it already. I think that's immersive and fun and not annoying as a player.

Your idea could help with auto-selecting items for drops.

So I'll edit the original post to make this more clear but in my vision affinity is a player assigned property. Literally the player would highlight an item and say "this crowbar has an affinity to my raiding backpack".

Unrepentant-Atheist commented 3 years ago

Pockets seems to be to CDDA, what tables are to RimWorld...

Melodeiro commented 2 years ago

Just have an easy to implement idea meanwhile: what if just skip items marked as favorite, when chosing items to drop with backpack? Marking items as favorite is already pays off a lot, when you want to fast drop some items from a certain category to your warehouse for example.

This will improve melee-based gameplay by a lot, if you do not want to drop certain items like medicine tools or other important stuff

Coolthulhu commented 2 years ago

Planned in some way. I have a few designs in mind. Discord may be a better place to discuss this, since it requires constant dialogue (quickly shooting down unviable ideas, mostly).

Will take a while to implement and the issue is stale, so I'm closing it. Issues for "distant future plans" aren't very useful.