Cataclysm-dda: Eat from this stack until full

Created on 11 Mar 2018  路  6Comments  路  Source: CleverRaven/Cataclysm-DDA

In the "Consume item" menu it would be nice to have a feature like Shift+F to eat/drink from a given stack of same food items until the stack is depleted or your character can no longer eat/drink anymore (excluding things that might have side effects like medicine and alcohol).

Edit I think it would make more sense to eat of the same item type instead of stack... >.>

<Enhancement / Feature> <Suggestion / Discussion> Info / User Interface

Most helpful comment

Or simply let the UI allow queuing up multiple item to be eaten like the "D" drop menu and eat them in one setting. Query to stop if full.

All 6 comments

excluding things that might have side effects like medicine and alcohol

Unless your character has some addiction traits 馃拤 馃嵎 馃拪

I like this suggestion. Should be fairly simple to add?

I had some time to kill and too much caffeine, so there are a lot of words here.

I don't really see the benefit here - even when I have a character that has to eat a lot, it going through the normal Eat interface is really not a hassle. If I ever really have to eat a ton of small nutrition/quench items, I just pick them up, rebind their inventory key to E, and Shift+e till I get the "continue eating?" prompt. If I can't pick them up for whatever reason, just move them to your current location (as the only item on that field) and do Shift+E then 0. Even then I rarely have to eat so much food at once that going through the consume menu as normal would be so much of a hassle that a new command and/or interface is required, but maybe that's just me.

I'm far more bothered by the fact that the confirmation message displayed when you are Full (or Sated if you have Gourmand trait) doesn't tell you whether or not you can continue to eat the item or are unable to finish it (i.e. you may have reached the Full/Sated threshold, but you can still eat some items without wasting them). While on the other hand, if you are Slacked/Hydrated, the message will only appear if you can't actually finish the item (i.e. if you are slacked but can still drink an entire portion of an item without reaching maximum quench).

As far as being simple to add, I don't think you could just copy-paste the regular consume code and simply modify it to keep eating the selected item until full/gone - it would have to be an interruptible process (like reading until you gain a level) and it also shouldn't prompt you for every single portion if it would otherwise do so (rotten food, etc.). That being said, the consume menu interface can probably be reused fairly easily and the rest may not be too much anyway, but I still feel like it's a little silly to go to the trouble to make a command that works for an infrequent use case which is already covered by the existing system - unless there is some use or scenario or play style that I'm not seeing here.

Of course, if we had the ability to make macros this would probably be a prime example of one. I know there is the in-game Lua console in the debug menu, but I'm pretty sure Lua is being dropped from the game and Lua mods are just going to be hard coded in. I do think keeping some limited Lua integration for macros would be cool though, but the upkeep for it would probably be more than just adding in would-be macros as actions anyway. So maybe in that case it _is_ worth adding an "eat stack/item type until full" action if you really want it.

There are some other things that need to be clarified if this suggestion is implemented

  • Should this be its own action that can be bound to a key or should it be part of an existing action/interface?

    • If it can be bound to a key, should it be done by default? I think shift+f already has a default binding (I think all the alpha-numeric keys have default bindings already, but I'm not sure since I tweaked it a bit)

  • Should you eat from a specified stack or item type? What about from a selected adjacent tile/container?

    • If it is part of an existing interface, is it an option on the regular consume menu and/or an action shown in the item description interface of the inventory?

  • If you specify an adjacent location to consume from, what items are consumed and in what order?

    • Should food barred by traits be ignored or eaten anyway?

  • If you eat from a specified item type:

    • How is the item type specified? Do you pick the type each time you perform the action, or do you set up a list like the auto-pickup or safe-mode managers?

    • If there are multiple stacks of the same item which stack is used first?

    • Should older stacks always be eaten before newer ones (assuming the item ages)?

    • Should stacks that are preserved against spoiling be eaten only if there are no aging stacks?



      • If you specify multiple item names using something like the auto-pickup list, should it follow the a strict order of priority between items (i.e. if "bread" is listed before "soup" then a portion of flatbread would always be consumed before any portions of vegetable soup) or should items that are close to spoiling be given priority, regardless of their order in the list?



    • Should smaller stacks be eaten before larger stacks?

    • Should only stacks in the inventory be considered, or can adjacent/nearby stacks be consumed as well?



      • If both inventory and nearby stacks are consumed, does it matter which is consumed first?



  • If you specify item names or a location, does the character eat until they are full AND slacked, do they eat until they are full OR slacked, or do they consume each item until there are no remaining items/only items that can't be finished remain.

    • Should characters with the Gourmand trait eat beyond full/slacked to sated/hydrated?

    • If characters eat until they are full OR slacked, does the player choose which target or does the character just eat until one is reached?

    • If the character is supposed to eat until they are both full and slacked, how is food chosen for consumption if there are multiple options? Devising a satisfying rationale for this can be difficult in the case that there is no strict order imposed by something like the auto-pickup list that could set a simple order defined by the player.

Personally I think the best implementation would be one where the command is a non-default keyboard bound action, can also be accessed as an action in the item's description menu in the inventory, and works one of two ways:
A) When the player presses the key bind they are presented with the regular consume menu. The player chooses an item from the menu and each portion is consumed until the player is unable to finish the portion or there are no more portions. If the player becomes full or slacked, but can still finish another portion, they are prompted if they want to continue.
B) The player specifies an auto-consume list using the same interface as the auto-pickup/safe-mode manager. When the player presses the auto consume key bind items are consumed based on the following process:

  1. Get a list of all food/food containing items adjacent to the player or in the player's inventory called the food list. The order of the items in the list does not matter.
  2. Create an empty list of items to be consumed, called the consume list. Items in this list are sorted ascending based on how long they have until spoiled at room temperature, with preserved food and non-aging food always appended to the end.
  3. For each item in food list that matches the first rule defined in the auto-consume manager, remove it from the food list and insert it into the proper place in the consume list
  4. Repeat step 3 for each rule defined in the auto-consume manager, preserving definition order.
  5. If the character is unable to finish a portion of the first item in consume list, then remove the item from the list. Otherwise, eat a portion of the first item in the list.
  6. Repeat step 5 until consume list is empty.

Alternatively, to preserve strict rule definition order, step 4 can be done after step 6. This can be an option that the player can toggle, i.e. always eat all of food from first rule before eating any from second rule or eat according to food age but eat foods of the same age according to rule order.

...

...

Well that's about it.

I skipped the long text.
Oftentimes I have stacks of food with +8 nutrition with 1 or more items. Or for example cracklings. I wish that the "Eat until full" fucntion exists every time then.
There could be a TRUE/FALSe option for it in the options menu to exclude drugs by default or offer a Y/N request for them.

You can wield stack and Activate it until full.

Or simply let the UI allow queuing up multiple item to be eaten like the "D" drop menu and eat them in one setting. Query to stop if full.

Was this page helpful?
0 / 5 - 0 ratings