[1.0] - Animal Husbandry (SKHardcore and Vanilla)

Started by MightyGooga, August 08, 2017, 10:16:23 PM

Previous topic - Next topic

Ri0Rdian

#30
It might be a mod conflict, that's always a possibility (and I would dare to say: as long as you use multiple mods, the most likely cause), probably my case too since no one else reported such a thing.


So yeah, the pawns simply walk to the storage area and start taking pellets into their inventory. I have seen cases ranging from a single one to over 300! I expected the animal handlers to carry some, for obvious reason but any pawn will take and carry them around.
Though I have a feeling it might have something to do with the food, since I tend to Draft them whenever I see them grabbing pellets, send them a small distance away and Undraft. They always go back for the pellets, however, when I send them to my dining room where Food is stored and Undraft there they basically always go and pick up a meal instead and forget about the pellets. In this case they have a shorter route to walk for a Meal than back to Pellets. But this is a pure speculation on my part from the observation.
Is there such thing like a *flag* for items (meal in this case - something like "is_a_kibble") that it is animal food and they shouldn't consider it for their nutrition requirement under normal circumstances? (probably not since they will eat kibble if nothing else is available but I am trying to find a straw to hold to  ;D )


In any case, I checked my mod list and those are the most likely candidates for interference due to messing up with colonist hauling/carrying:
While You're Up (don't think so but mentioning just to be safe)
Stack Merger
Stack XXL (this one seems weird here, but maybe they would just pick up a small number normally but due to my setting they pick up a ton - either 10x or 20x whichever category Pellets falls into, probably the former)

Though I don't seem to have any problems with my mods (no errors of any kind in the console) and the only problem I saw was that colonists didn't pack all the Pemmican I needed for caravan which I found out was thanks to using Extended Storage mod (they did not pick everything I told them to up and moved on to form it... after deleting the container holding the Pemmican and using vanilla storage it worked flawlessly).

Edit:
Just witnessed the very same behaviour I described when Drafting colonists on 2 pawns at the same time. Send them to dining room, undrafted, they rushed in for Meals. I have a feeling it might not be a mod conflict after all. If you want I can record and upload it somewhere for you to witness.

Edit2:
Force fed a Protein Pellet to a hungry pawn without a food mood boost present. No bad mood from that (unlike kibble). This makes Protein Pellets the most nutrient efficient foodstuff available, though you get no mood boosts.  ::)

Edit3:
I am no modder (nor do I know much about Rimworld modding), Checked the vanilla stuff for Kibble and yours. You do miss the <tasteThought> part in the defs, which I noticed ingame already. The vanilla kibble also uses <preferability>RawBad, while yours has DesperateOnly, dunno what is the difference, might not be a problem. The <optimalityOffsetHumanlikes> seem to always be -30, not sure whether increasing this can be done or if it will have an effect. I might try changing some of the values myself to see if the behaviour changes, hopefully my PC won't catch fire or destroy my save.  ;D

Final Edit:
I think I solved it, everything looking OK after 3 hrs+ of play time. I changed the <preferability> to RawBad and added <tasteThought> same as Kibble (mostly for balance reasons, I hoped the first change might be enough to fix it) and behold! No one hoards that stuff anymore, I have seen two pawns with pellets in inventory, but both were animal handlers, I have seen them use it to train animals and they only carried (low) single digit amount.

Harry_Dicks

Good job, Ri0. It sounds like you've narrowed down your problem greatly.

To be honest, I hadn't actually played a game with this mod yet, so I never had a chance to experience what you are. If I had to guess, since the pellets are missing the negative mood buff modifiers, like regular kibble, is that like you said the colonists won't mind eating it. That, combined with the pellets high nutritional value, I would guess means that a pawn is more likely to grab the pellets if they are a lot closer than your highest tier meal available to them that isn't nearby.

So this issue might have actually been happening to anyone, just not everyone had gotten around to trying it out yet :)

Canute


MightyGooga

Hello! Im super thankfull for you guys helping out and testing this!

I just uplodade a fix to the git. Im having a real hard time understanding the purpose of the trhee following tags possible contents:
<Preferability>
<tastethough>
<optimalityoffset>

So what I did is to copy a few inputs from kibble. I added a tastetough, and changed preferability to DesperateOnlyForHumanlikes.

What I want is that no human will try to consume this unless they are really dieing from startvation. This is fermented meat and veggies afterall, and they taste like a shit took a dump.
Thank you.

Ri0Rdian

#34
Take this (at most) as a food for thought (very fitting considering this is about meals  ;D ), since I am most likely wrong:

I view <tasteThought> as a mood effect only, not something pawns would take into consideration (this is the part where I can be very wrong) when deciding what to eat. A simple add-on effect activated when certain condition is met (in this case effect = mood loss, condition = is eaten by pawn). Not like it couldn't affect pawn food choice but to me having 3 filters to go through seems like a waste, though it is still a possibility.

This is probably easy to check ingame by editing two meals to be exactly the same and having one with negative mood and then observing what the colonists will do. If they pick both to eat or at least the one with the negative mood this should more or less prove that  <tasteThought> has no effect on their choice. Otherwise I was wrong and it plays a role.

<optimalityoffset> MIGHT be a value that modifies the <Preferability> , which I think is internally a (numerical) value. Pure speculation ofc  :P Again, nothing to directly affect pawn choice, rather just adjust the main decision mechanism.

<Preferability>  to me looks like the main thing that governs what the pawn will or will not eat and/or when. I have found several of them that are used in game (I might have possibly missed some!). I ordered them in what I believe is least desirable food to most desirable food.

DesperateOnlyForHumanlikes = (humans won't eat this, aka Hay if I understood it right)
desperateOnly   
RawBad
MealAwful
RawTasty
MealSimple
MealFine
MealLavish


I think the way you sorted this out is fine, as long as it works. Knowing why it works that way is of secondary priority. It is quite likely that only the devs know the internal workings of the values we use and are allowed to change (with the possible exception of a hardcore mod maker who spent a lot of time experimenting but might not see your question, ever, so can't answer it ;D ).
As for what you want, your setting now might not allow colonists to eat the pellets at all, since it uses what Hay does and you can't eat Hay, right? (which you don't want) This needs checking in game. I might do it myself tomorrow if someone else isn't faster.

desperateOnly  might be the best bet with added negative thought (if you don't want to mod in another one you will have to make use of the existing ones ofc, though from the way you worded it, it sounds like that stuff would taste quite a bit worse than kibble  ;D), if it works the way I believe ofc  :P

Ri0Rdian

#35
<tasteThought> DOES play a role in whether a colonists pick certain food or not after all. Just tested this. I was wrong, can't say I am surprised though.  :P

I used Simple Meal and Fine Meal, removed Fine meal bonus mood, in all other aspects they are the same. Locked a colonist in a room with both. He would choose either of them, almost always the one that was closer to him.

When I added AteKibble as a thought to Fine meal things changed. He would no longer pick Fine meal even when standing right next to it and having Simple Meal on the other side of the room. The only way to force him to eat it was to forbid Simple Meal.

Conclusion: Colonists take mood effect of Meal into consideration when deciding whether to eat something. This likely happens for any other item too (like a clothing piece, exactly the same in stats, quality and state but one from corpse from example).

This means there is more room to fiddle with food priorities if one wants to, which is almost certainly a good thing, though it makes balancing quite a bit more complicated.  ;)

I am not gonna bother testing <optimalityoffset> since that seems like too much work and I would prefer to play the game now  :P


Edit:
One last thing. Currently you can use the Animal Ration Protein or either Pellets when crafting Fine / Lavish Meal. This is probably OP and also illogical. It would be best to either disallow their use for making human Meals or at least set the default recipe setting to off (currently it's on). No idea how to do any of those two though xD

MightyGooga

Hi Rio!

Thanks  for the effort of looking into this. I did it myself and came to the exact same conclusions. Except i didnt know that you could use it as ingredient for fine meals. One thing i have to test is if we can use kibble as an ingredient as well.

I dont really know how to avoid this, so Ill have to research it. As soon as i get some results Ill update the mod. For now Im just glad its working on vanilla.

Exende

is your link to the vanilla animal husbandry updated?  Because with no mods:

Could not resolve cross-reference to Verse.ThingDef named RawPotato
Verse.Log:Error(String)
Verse.DirectXmlCrossRefLoader:TryResolveDef(String, FailMode)
Verse.WantedRefForList`1:TryResolve(FailMode)
Verse.DirectXmlCrossRefLoader:ResolveAllWantedCrossReferences(FailMode)
Verse.PlayDataLoader:DoPlayLoad()
Verse.PlayDataLoader:LoadAllPlayData(Boolean)
Verse.Root:<Start>m__1()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()

Ri0Rdian

#38
I am pretty sure it's because it should be RawPotatoes NOT RawPotato. There was apparently some renaming of internal names lately it seems (last 1 or 2 version of game).

Edit:
You can try to see if you can fix it yourself by checking Defs/RecipeDefs/Recipes_AnimalH.xml for any occurence of RawPotato and changing it to RawPotatoes. It should fix it.

MightyGooga

Hey Rio, git version has been fixed. Thanks again for the feedback.

Miguelcb

The ration tank can work without power (when it isn't connected to the power net), and at the same speed I think.
Thx for making this simple, useful and awesome mod!!!

Canute

I have an addition request.
Maybe a second tank to process Ration straight from corpes.
You put in x amount of nutri and geting out ration.
It is important that it is nutri since corpses got different values based on size and missing parts.
With a fixed corpse count it would be easy doable with Universal fermenter.
This will free the cook's and could be done all by haulers.

MightyGooga

Hey thats a great idea. Im not sure we can use corpses as ingredients with universal fermenter. I have to check that. I also dont want to make this overpowered. The idea behind all the work to make rations and then pellets is that aa animal need way less pellets to fill his hunguer bar than kibble for example. This in turn makes raising animals mora balanced, becouse you can stock up on pellets before starting a huge herd. Also, with one tile you can stock up to 600 pellets, making the feeding more simple and efficient.
I want to think about this idea, becouse what i dont want is a processor machine that you put corpses and get powerfull rations. Maybe we could output kibble or something. But even then... we would have to put something to dry the whole thing.

Canute

The drawback would be the time.
Which you can use a pawn and work at the butchery table to craft alot of ration in a pretty short time.
The fermentor would take less crafter work (but still hauler) and take days until you are geting products.

nrish666

#44
My pawns with 'ascetic' trait keep picking up stacks of the pellets. any thoughts on what I could change to stop this?

changed Animal Rations
         <thingCategories>
            <li>FoodRaw</li>
         </thingCategories>

to

         <thingCategories>
            <li>Foods</li>
         </thingCategories>

it stopped them being usable in creating meals.