Various Automation Things

I’d like to preface this huge wall of text by saying that I love this game and frequently use it as an example of why open source projects can be brilliant. I would love to help contribute to this project, but I first need to learn a bit more about programming. This is a list of my ideas just in case someone gets around to implementing them or putting them in a mod before I get around to it. Also, if you can direct me towards some resources about programming or how the code for this game is structured, I would appreciate it.

CDDA has a lot of content. It does not have a lot of ease-of-life things in it, or at least not as many as I would love for it to have. I think that allowing some boring tasks to be automated would make the game more fun, as the player could focus more of their time on explosions, fire, and general destruction.

[ITEM AUTOMATION]

Firstly, Auto-consumption.
One of my least favorite pastimes in CDDA is sifting through a 50+ item list for the chunk of cooked meat that I want to eat before it goes bad. Even worse is when I decide to trim that list a little by using up worthless food items, such as malted milk balls, only to end up hitting “E” one million times.
Auto-consumption would work on a set of player-defined rules, similarly to the existing auto-pickup. My cooked meat and malted milk balls could be assigned to auto pickup, either through the inventory screen (i > cooked meat > +auto consumption), or by creating a rule (ESC > auto consumption manager > a > cooked*) Then whenever my survivor was hungry, and auto consumption permitted food was either in his inventory, or on the ground next to him, he would eat automatically.
This could also be expanded to drinking.
An option such as “Auto Consumption Safe Mode” could be added to prevent eating a snack next to a zombie by accident.
This could be expanded to medicine with rules such as “IF PAIN > 15, CONSUME ASPIRIN”, or "IF BITE_WOUND, USE DISINFECTANT ON $Bitten_Limb"
This could also be expanded to let survivors craft/read uninterrupted by hunger, provided they have enough supplies.

Secondly, an Important Item system.
Specific items could be marked with varying flags. This would be done on a per item basis (You could flag one steak knife, but not any others).

KEEP ON HAND: Picked up whenever possible assuming the survivor has room. Game prioritizes keeping these in player inventory when dropping previously equipped storage items. (Good for crowbar, knife, spare weapon)
KEEP LOADED: Survivor loads this item whenever it is depleted and ammo is on hand. (Good for gun, tailors kit)
DO NOT ALTER: These items won’t be eligible for use as a crafting component, or for disassembly. (Good for the one soldering iron/flashlight that you actually use)
QUERY BEFORE USE: Game gives a “Are you sure you want to X your X? (Y/N)” prompt before the item can be used. (Good for explosives, fire-starters)

[b][CHORES][b]

Pressing a certain button would bring up a chore menu, which would interact with things in the [ENVIRONMENT AUTOMATION] section.
This menu would have several entries.

MANAGE ITEMS
DISASSEMBLE ITEMS
READ BOOKS
FARM
CONSTRUCT
PREFORM ALL

After making a selection, the player would select an amount of time to put towards the task.

WORK 30 MINUTES
WORK 1 HOUR
WORK 6 HOURS
WORK UNTIL DAWN
WORK UNTIL DUSK
COMPLETE ALL CHORES

The survivor would then work until the time allotted is used up, the chore/chores are completed, or they are interrupted by being hurt or being approached by a monster. (Same as waiting or reading)
The Auto Consumption mechanic could be integrated with this to allow longer uninterrupted periods of time, along with the auto sleep mechanic I will discuss in the next section.
Friendly NPC’s could be assigned chores.

[ENVIRONMENT AUTOMATION

The current zones manager accessed via “Y” isn’t used a whole lot, we should change that.
Here are a couple of ideas for new zones:

STOCKPILE
Would be set to take certain items from certain sources, such as player inventory or other stockpiles. It could also be assigned certain flags such as DISASSEMBLE CONTENTS, READ CONTENTS, or USE/DO NOT USE FOR CRAFTING.
Selecting MANAGE ITEMS from the chores menu would move items to/from/between stockpiles.
READ BOOKS would read books in stockpiles with READ CONTENTS set, until no skill could be gained.
DISSEMBLE ITEMS would Disassemble items in stockpiles with DISASSEMBLE ITEMS set. If items could be disassembled with more/better tools or cut up, the player will receive a prompt. items that can only be cut up will be cut up.

FARMING
An area could be designated by farming, and assigned a certain type of seed and whether or not to use fertilizer.
The FARM chore would automatically till soil (Taking longer if the survivor only has a shovel instead of a hoe), and plant seeds/fertilize plants. Stockpiles could also be designated to take the products from a farm.

Finally, some form of blueprint system could be made where the player could input “I want a line of walls here” and they would be constructed by the CONSTRUCT chore, but I don’t know if enough people do large scale construction for this to be worth it.

Does this look good? let me know what you think.

As for the auto consumption thing, even a simple ‘Auto eat oldest perishable food’ hotkey would be nice ala Dungeon Crawl Stone Soup if anyone has ever played that game. Or maybe an ‘eat until full’ hotkey similar to the craft as many as possible function.

I also think being able to designate a lightsource in your inventory for dark crafting would be nice (something like ‘auto use this flashlight/oil lamp/atomic lamp/whatever for dark crafting’).

Finally, when you are lying down to sleep, how about a ‘Lie down until you go to sleep’ option? Spamming the sleep hotkey accomplishes the same effect but this would do so in a lot less key strokes.

That’s my bit.

I’ve been playing Factorio for a few months straight, and the lack of late-game automation in this game is kind of a pain in the butt. That said, there are some limitations about what you’re proposing. I didn’t look into the code, but what you’re suggesting regarding player based chores sounds like it would require a lot of modifications to be added for not much benefit.

Perhaps some late game crafting item recipes like roombas or using robot controls that automate some of the BS chores (like farming, cleaning, and repairing windows/walls after an attack) I suppose it fits more in with the theme though to NOT have that. I don’t play with NPCs, but if it doesn’t exist, dedicating some NPC AI to things like that might be easier than creating something as a player action.

I don’t agree with auto applying rules. I kind of feel that’s playing the game for you. I do understand and definitely agree that the UI can be pretty tedious sometimes and needs some QOL add-ons, I just made a “small changes” reply for quickly fixing damaged items using the inventory action screen’s mend option instead of using the % menu or using a welder or sewing kit.

Adding a “auto eat oldest (non-spoiled) food” button doesn’t sound too hard, since the game already knows when things are going to turn. Sorting all food items in the 9 player squares into a list and picking the oldest sounds pretty simple.