CleverRaven / CleverRaven/Cataclysm-DDA

(Camp) husbandry

Open
#80,972 3 comments 4 reactions 0 assignees View on GitHub
(P5 - Long-term) <Suggestion / Discussion>
Dominant language
C++
Stars
13.1k
Forks
4.6k
Avg merge
1d 23h
Merged PRs (30d)
186

Description

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

I would like to see companions to be useful for husbandry chores in a number of ways:
Direct orders:
- Order companions to feed/milk/(cull...) a specific animal.
- Order companions to feed all animals within new animal feeding zones.
- Order companions to milk all animals within new animal milking zones.
- Order companions to collect eggs/excrement within new egg/excrement collection zones.

Camp orders:
- Order companions to feed all animals within animal feeding zones.
- Order companions to milk all animals within animal milking zones.
- Order companions to collect eggs/excrement within egg/excrement collection zones.

Camp background activities:
- The camp orders above, but on a daily basis, performed by companions stationed at the camp.
- Camp processing activities of the products from the above as further daily activities.

Advanced camp orders:
- Allow camp orders to deliver products to their respective zones, rather than dumped at the current dumping site. Note that the dumping site is needed as a fallback in case no zones are set up or they're full.
- Stringing camp orders together is sequences (something currently not supported). This would probably be some kind of general new capability. This should allow things like:
- Feed all animals, then milk them, and then process the raw milk, and then process the milk into butter, cream, and/or cheese.
- Collect all the excrement and then process it into various products.

### Solution you would like.

It's a lot of stuff that's asked for, and there are many things that would have to be implemented to support it.
- Use the current sorting zones to also act as targets for liquids. This would mean furniture containers within such zones would be valid targets for liquids, and optionally that item containers within such zones would be as well. The purpose of this would be to act as targets for camp crafting of liquids (e.g. milk from raw milk), as well as targets for milking activities (camp ordered and companion zone ordered. A companion ordered to milk a specific animal should probably result in the milk ending up in a container carried by the companion (typically a bucket wielded by the companion)).
- In order to be able to order a companion to milk an animal, the code would have to be updated to not be hard coded to assume it's the PC performing the action.
- You don't strictly need egg/excrement collection zones for companion direct orders, as unsorted zones would work (with the side effect of sorting other stuff as well, and loot sorting also triggering egg/excrement collection). However, I believe they're needed for camp orders, and so ought to be taken advantage for companion orders when available.
- Companion orders to feed/milk animals would probably require adaptive pathing, i.e. the companion would adjust the path every turn in order to track the animals down, rather that walk to the location the animal was at when walking begun. I suspect fighting contains that kind of logic, so it might be possible to make use of that logic.
- Camp animal feeding and milking should ideally extract the resources at the end of the task rather than the current method of doing it at the beginning (logging, for instance, immediately logs the area and places the results in the companion's inventory for delivery at the end). This would require the calculation of a time at the beginning (as is done currently), collect animal feed at the beginning (remove from storage). Animals within the zone would then be milked/fed up to the capacity calculated at the beginning. Ideally, this would mean milking would be performed for the time calculated, but also for the time from the calculated end to the recall from the bulletin board (calculated to take 1 hour, but the PC recalled the companion after two hours, so up to two hours of milking would be performed, assuming there was enough animals for that), and feeding would feed animals for the same time until the feed reserved at the beginning ran out. Ideally, the companion would then complement with additional feed from the store to feed the remainder, and any leftover feed would be restored to either the dumping site, or the appropriate zone. Logging could then be updated to use the same model. Also note that if the activities are actually performed at the end, you can stop milking when the raw milk (or liquids or...) zone(s) run out of storage capacity so you wouldn't need to dump the excess milk into the void (leaving unmilked animals available for milking once the storage bottleneck had been cleared).
- Camp activity pathing to animals could probably use a guesstimated time per animal, but would ideally calculate paths and travel times. However, given that we're dealing with product teleportation here anyway (feed and milk), being realistic in this aspect is probably not important.
- I would like to see a bucket, or at least an open container as a tool for milking, as I don't think plastic bottles and the like are practical (I don't have any first hand experience of milking, though). However, if that's the case said tool should also be a valid target for the milk, and I don't know if that's possible. If not, it would still make sense as a tool for zone milking (where the milk itself would be teleported into storage).

### Describe alternatives you have considered.

I don't know what word would be the best to describe the various kinds of excrement we're dealing with. We could use "manure" as it probably has a less negative association than excrement, but bird droppings aren't really manure (guano withstanding), and we also have dogs and pigs doing their business, producing potentially valuable resources.

I guess a "shit zone" would be mildly amusing for a while, but the novelty is likely to wear out fairly quickly.

### Additional context

I think the camp orders are the easiest to implement, as you wouldn't have to deal with dynamic pathing and the convoluted multi stage processing you're dealing with when direct orders are involved. You don't want to chase down a cow to feed it, evaluate it to see that it needs cattle fodder, go to the store and fetch one unit of cattle fodder, path back to the cow, drop the fodder at the feet of the cow, path to the next animal, evaluate it, ... (that's the silly dance performed on companion construction, although each construction item is teleported instead of carried, but the companion still moves back to the construction zone to evaluate what item to fetch next before walking back to teleport it, possibly from the same tile as the previous item).

I don't have any immediate intention to implement the above, and certainly not all of it, but I'm not ruling out attempt to tackle some of it in the medium term.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. The request spans companion orders, camp activities, animal zones, pathing, storage, and processing; first narrow it to one camp-order capability, then trace the existing companion and camp activity systems. Done should be defined as a small, testable subset with explicit behavior and acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.