Closed HippoKingKoL closed 2 years ago
I think it should be fixed rather than deleted. for accounts lacking in iotms and and perms farming food in HC can become necessary. Although that function does need a lot of improvements
I am thinking we could also add a simple user setting to allow disabling the farming of food. pretty simple to do, and will at least let us know of our food farming function is even helping or not by runs with and without it.
then fix the function to make it smarter. although rather than going through a tiny list of foods. why not do a simulate on the function that picks what to eat next, and then check how acceptable the result is? compare the result item it wants to eat next to goat cheese.
OK, so, moving forward, I can add the setting to disable it and PR that. Am I right in saying this is just adding a line to the settings/any.dat
, set a default in the code and then use it?
I've no idea how to do a simulation on the consumption function.
/BUILD/assemble.sh
and then commit the modified release/data/
files it creates.auto_settings.ash
and look at how other defaults are setreturn;
for void functions and return false;
for boolean function if the setting is configured to skip itas for simulation. look at this function
boolean auto_autoConsumeOne(string type, boolean simulate)
it currently has an option to simulate consuming a single food item by using
auto_autoConsumeOne("eat", true);
however that is a boolean function, you need to look how it simulates to call on it to give you the item of the preferred food item. then compare said food item to farming cheese at goatlet
Context
Expected/Desired Behavior
The script visits the Goatlet once as part of the level 8 quest.
Current Behavior
As well as the L8 quest function, the script currently also visits the Goatlet to farm for goat cheese in hardcore. It is very enthusiastic about doing this - basically making it it's first choice if the goatlet is unlocked while there is less than 2 of either goat cheese+bubblin' crude in inventory. The biggest issue this causes is that it uses olfaction/banishers when it decides it needs another 2 turns in the goatlet.
This is done by the function
LX_hardcoreFoodFarm()
, which I think is a problem.I've tested with changing the possible meals calculation to this:
This achieves the goal of basically never feeling it needs to farm cheese for food, but frankly the reason this is an Issue rather than a PR is that I think the superior option is probably just deleting that function entirely. I don't think most players want it farming food in HC, and if they do it probably needs a more substantial rewrite than mine above.
If you're happy with either of the above options (straight-up delete, or just making it consider more foods before falling back), let me know and I can do a PR.