RimWorld

RimWorld

Animals Can Forage
67 Comments
o7
themoistestwhale  [author] 11 Jun @ 12:35pm 
@SirArlen Thanks, if you do I'll try to see if I can resolve it.

Lemme add that (if I even find the time, this mod is super time consuming for me to work with due to skill issue) for 1.6 I am likely to refactor this entire mod due to all the changes with wildlife, terrain, new biomes, etc. If I do, I'll try to backport what I can back to 1.5 as well including a lot more much needed error handling which should help with mod conflicts like yours.
SirArlen 11 Jun @ 12:30pm 
thanks, that's the exact error. i have a ton of mods so im not sure which but i'll try to pinpoint the mod and update you if i managed to do so
themoistestwhale  [author] 11 Jun @ 8:08am 
@SirArlen Sorry that's happening, I'm going to assume the method it's pointing to is 0 calls with infinity MS? If so (and I would be surprised if it was a different case) the call failed and essentially the mod is spamming errors in the background. This is most likely due to a mod conflict and if so I'm unaware of what it'd be, but it's probably either one that is messing with terrain or food.

You can disable this mod in your save safely and re-enable it later down the line and see if that resolves it, though it might not depending on the conflict. I need to find more time to add more to the method to catch edge cases clearly :I
SirArlen 11 Jun @ 7:48am 
hi, there seem to be a problem of some sort with this mod because performance analyzer pointed to this mod's CompForageIfHungry being a massive tps killer
Head 2 May @ 6:29am 
This is a really cool mod. Great work!
Calel200 30 Mar @ 10:26am 
Yes all other animals are foraging fine, thanks I will be waiting for the update :krgenie:
themoistestwhale  [author] 29 Mar @ 1:28am 
@Calel200 I've been super busy IRL and I put up a hotfix on ducks foraging which disables ducks and only ducks from foraging if certain mods are in your modlist that can cause it to break. All other animals should forage just fine, though.

When I find the time I was going to revisit the issue and get a proper fix going for it, really sorry about that but I am a bit slower than other modders when working since I don't really have an optimal workflow and have to learn on the fly as a beginner, essentially doubling the amount of time it takes for me to fix shit lol
Calel200 28 Mar @ 3:04pm 
@themoistestwhale Hey man I need help the mod is working fine but it seems for me like the ducks are not foraging for fish there is some catch that I didint got? Like my ducks have water acess but when I was searching what they can eat there is no fish on theirs menu and I have the mod vanilla fishing
themoistestwhale  [author] 13 Mar @ 1:48pm 
@Normie Thots Thank you kindly for the log, I forgot to put it in the description but this is a rare known issue with the mod that I've figured out (thanks to previous reports). I'm yet to find the time to fix it, though I'm hoping that should be soon; just been bogged down with IRL work is all.

If you are curious, the issue is pretty much that the function of this mod cannot find something it's supposed to forage for due to a mod conflict (most likely). It may clear for some if you reload your save or progress a bit in time, depends on what is causing the conflict. Regardless, you can safely remove this mod from a save at any time if it persists and this error will not cause damage to a save whatsoever.
Normie Thots 13 Mar @ 1:34pm 
I'm having a strange issue with VAE Alligators, occasionally they will spam the console with a tick error referencing the ForageIfHungry method. The only thing I noticed was the alligator eating a dead gorilla, but I haven't had this issue before so I'm not sure what else to include. I have a log here, it's towards the bottom: https://gist.github.com/HugsLibRecordKeeper/ae9e71cb11f353977e11b633228daca2
themoistestwhale  [author] 2 Mar @ 3:53pm 
@Poor Little Meow Meow Thanks for the log, I'll take a look when I get time though it'll be a minute since I've been super busy with life shit for the past month.

That is weird for sure as well, yeah. I'm pretty sure it'll be some weird mod conflict but I think I'll struggle to replicate this one. I'll still try :p
Poor Little Meow Meow 2 Mar @ 2:44pm 
Here's a log with the mod on and showing lag. Surprisingly, when I tried a slightly later save with the mod enabled, the lag wasn't present, even though I've had even more animals tamed. Weird.
https://gist.github.com/HugsLibRecordKeeper/99bf8d4d37daf837bb8aa009f41e503b
themoistestwhale  [author] 2 Mar @ 10:48am 
@Poor Little Meow Meow Never encountered or been reported that before, huh. It could be a mod conflict though there’s no way for me to know what it specifically is without a log unfortunately. If you could provide one I can look closer at the issue. Off the top of my head though I’m not sure what could be causing that.
Poor Little Meow Meow 1 Mar @ 6:38pm 
So I have a weird issue: this mod started lagging out my game like hell at some point after taming two elephants (used dubs analyzer and it's very clearly this mod eating up 90+% of the tick time. When uninstalled, tick returns to normal).
What could it be conflicting with to cause so much problems? Maybe it freaks out when in a modded biome (Alpha Biomes in this case)?
Netish 12 Feb @ 9:53am 
Well the xml file just showed the hours between forage settings so not sure if I was looking in the wrong place. Like I said, not a big problem since you have this setting, just a weird bug. Tried to take a video of the hilarity of when there is no hour between on - but vlc was fighting me about cutting something that was only a few seconds >(

Once again, thanks for all your answers/help/advice! Also, really love this mod =)
themoistestwhale  [author] 10 Feb @ 2:38am 
@Netish No worries, and if you have any questions I'm always available (at some point) to answer anymore. Just as an off mention you can also tweak the xPaths for the terrain patches if you don't want them to forage on a certain kind of terrain for any reason I guess as well. I try to make as much as possible exposed to either a mod setting or XML, because people combine mods with other mods and it ends up being the most random things needing to be tuned sometimes lol

Ducks and chickens have been the only thing giving trouble with this mod for April Fool's I should just make a mod that has a 1% chance of either of those things randomly exploding.
Netish 9 Feb @ 6:47am 
Thanks so much for the continued advice and responses! I didn't know I could tune the patch like that - I will try and see what happens. I have the option to disallow spawned forage on - so it always spawns 2 insect meat. I also have had a consistent amount of chickens so I have been curiously watching. I have many modded creatures and vanilla creatures, but only the chickens seem to be misbehaving XD. I will report back with results as soon as I am able!
themoistestwhale  [author] 7 Feb @ 7:15pm 
@Netish I mean as this mod does the chickens should be foraging and then eating said insect meat, so that's expected.

If it's that they're generating too much and some is being left over though I can tune down how much they forage, just let me know since I'm not sure if that's the case currently. If I take too long because of how busy I am you can also tune the patch with just Windows notepad in the mod files if you desire.
Netish 4 Feb @ 9:45am 
@themoistestwhale thanks so much for taking a peek at it - I started a new save without the self-sufficient chickens mod and I am still getting the random insect meat bits. Not sure why this is still happening, but with the interval set to six hours it doesn't seem to happen that often so not a huge problem. If you are still curious, (you have to tell me how to do it) I can send my logs. Thank you again for all your time!
themoistestwhale  [author] 1 Feb @ 6:56pm 
@Netish Just to add to below, if you have any further questions or feedback from all of this or just in general, you can throw that at me here or in my Discord linked in my mod collections- whichever method you prefer. Open to either!
themoistestwhale  [author] 1 Feb @ 6:56pm 
@Netish I've found some time and tested both the mods you've mentioned with this one and the TLDR is there aren't actually an issues here, so don't worry about the log, though you'll probably want to drop the Self-Sufficient Chickens mod. Also, RimPy doesn't make any difference.

Pretty much what's happening there is the chickens are foraging due to this mod- and then not eating any of the material due to them not needing to eat anymore. There's nothing really there for me to patch, it's just a conflicting mod with this one on how you want your chickens to be self sufficient. It's not hard incompatible as it doesn't break saves or anything weird, but I'd call it soft incompatible.

Cobras should be foraging rat meat and the Optimization: Meats mod doesn't really break this functionality, in my testing they behaved fine.
Netish 1 Feb @ 2:07am 
No worries! Thanks for the reply!

I use RimPy so would that make any difference too? Is it okay to send a log of a new game or should it be the original game that had the glitch? I was just reworking my mod list and was going to test what happens if I remove Self-Sufficient Chickens and only have Animals Forage.

Thanks again!
themoistestwhale  [author] 31 Jan @ 8:01pm 
@Netish Sorry for the late reply, been swamped with work this week so far. It most probably is some kind of mod conflict, especially with a massive mod list. The fact chickens aren't eating the spawned meat is probably due to the uh, bit where they don't need to eat anymore, and there isn't really much to patch there really.

I can take a look and the other issue though and HugsLib log would be helpful to see if I could patch that to some aspect, though I suspect I probably can't it's still worth a shot. A HugsLib log will include your full mod list and all the Harmony patches it conducts which helps a ton with this kinda thing.
Netish 29 Jan @ 5:01pm 
Now I do have a mod that might be interacting with the chickens, as I have Self-Sufficient Chickens (https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3038860113) . However, the cobras had no reason to be spawning meat. Side note - the reason they probably spawned general meat other than some specific meat is because I use the mod Optimization: Meats (https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2542931556) .

I have a rather extensive mod list, but I believe I have mentioned all the relevant ones that might be conflicting. If you think a list of my mods would help I would be happy to provide it.

(part 2)
Netish 29 Jan @ 5:01pm 
hello, first off thank you for this mod!

I seem to have run into a weird issue where when my chickens (or previously when I had cobras) forage they spawn a ton of meat (insect meat for chickens, regular meat for cobras). Initially I tried using the settings to change the interval for foraging to every 6 hours - but I still have random bits of meats spawning and not being eaten. When I did not have the 6 hour interval - the spawning was madness! xD

(part 1)
themoistestwhale  [author] 4 Jan @ 10:10am 
@dipshiddderek I can look into implementations but I wouldn’t really want to see it outside of some trained animals such as dogs personally. Still away for a week so it’ll be a bit before I get on that.
dipshiddderek 3 Jan @ 11:09am 
Anyway that foraging could be trained ? I Imagine that would be difficult, but figured I'd ask. pigs are an endless food hack lol
themoistestwhale  [author] 3 Jan @ 12:53am 
@J Thanks for trying to replicate the issue still despite the fact it didn’t come up- seems to be rather illusive lol

I’m confident with the current hotfix (1.0.4) issues with DBH should be settled for now. It’s certainly a subpar fix so I’ll take a look myself when I manage to get myself home. Hopefully I’ll find some luck in solving it >.<
J 2 Jan @ 10:37pm 
@themoistestwhale:

v1.0.3 and v1.0.2 both seem to be fine on my end. I forgot to mention that I was checking with the same mod list that I used when I first saw the issue with ducks—go figure.
themoistestwhale  [author] 2 Jan @ 9:27pm 
@J I’m currently away for about a week or so, but thankfully I do keep all my precious mod versions (except 1.0.4 of this mod because of lackluster time) in my Discord if you’d like to take a look at it. The invite is in my mod collection descriptions because Steam can be weird about non-Steam links in mod descriptions sometimes.

Don’t feel obligated to waste too much time on it though, I’ll go through it eventually when I can- though I also appreciate the effort!
J 2 Jan @ 7:53pm 
@themoistestwhale:

I couldn’t reproduce it—lots of ducks spawned in different ways, like events, work with no issues whatsoever. If you get me a download of v1.0.3, I can also check that. I might be starting a playthrough, will get back to you with a log if something bad happens.
themoistestwhale  [author] 21 Dec, 2024 @ 11:10am 
@J I was mainly just interested in the list of active Harmony patches a HugsLibs log provides, but I'll put up a temporary hotfix soon to disable ducks foraging behavior if Dubs Bad Hygiene is loaded when I get time until I find a permanent solution. I haven't been able to find a way to reproduce the issue despite my best efforts but I'm just trusting that it's there considering how many people have stated it exists.
J 20 Dec, 2024 @ 11:25pm 
I can confirm that it’s not an incompatibility with Bad Hygiene—I also had an issue with ducks killing TPS until I deleted them from the map some time ago, but I didn’t have Bad Hygiene in my mod list. There was nothing interesting in the HugsLib’s logs, so I kind of waved it away at the time.

Give me a week or two, I’ll bisect my mod list and try to figure out how to consistently reproduce the issue.
themoistestwhale  [author] 20 Dec, 2024 @ 3:24pm 
@Nebulous I’ll try looking into it again with that in mind, though a HugsLib log would be helpful so I can see some additional context the previous log I was provided with lacked as it was a regular game log- if you could provide one.
Nebulous 18 Dec, 2024 @ 12:51pm 
the duck in question was frozen after trying to get water, so maybe an incompatibility with dubs bad hygene?
Nebulous 18 Dec, 2024 @ 12:50pm 
I had the same issue with my ducks, it killed my tps until I deleted and respawned the ducks. they worked fine afterwards, but something else from this caused me some heavy tps drops, I couldnt figure out what it was other than the ducks
themoistestwhale  [author] 27 Nov, 2024 @ 12:52pm 
@hekmo The issue doesn't seem to the specific to ducks now that I've looked at it. I've unfortunately been swamped with work so I won't be able to push out a fix until this weekend, sorry.
themoistestwhale  [author] 24 Nov, 2024 @ 11:41pm 
@hekmo Thank you for the log! I'll look into it as soon as I get time now that I have something to work with and get back to you on that.
hekmo 24 Nov, 2024 @ 10:41pm 
I'm also having problems related to ducks. I've got a pen of ducks and chickens, chickens are fine, ducks are frozen in place. They're also showing up as starving but their hunger bars are frozen as well and they have no starvation hediff.

Getting a NullReferenceError in AnimalsCanForage.CompForageIfHungry.CompTick ()


Player log here (line 1083)
https://drive.google.com/file/d/1kJrQMbcld_J_V7-OzzSf0ABtxgo2-gyL/view?usp=sharing
themoistestwhale  [author] 25 Oct, 2024 @ 10:45am 
@_♣Caligula♣_ No, nor is it something I can replicate testing it myself spawning ducks in an otherwise vanilla game right now. Can’t do anything more without a HugsLib log if I can’t replicate the issue on my end.
_♣Caligula♣_ 25 Oct, 2024 @ 9:31am 
Ducks seems to cause huge issues/cause exception ticking error.
Spawned some for hunting and instantly error throwing.
Is that a known error?
themoistestwhale  [author] 24 Oct, 2024 @ 5:41pm 
@RustyRoy22 Fair yeah, I'll probably make it an additional comp later when I find time. I'm still a bit confused on some of the details on how to implement it when it comes to the technical bits but I worked out the basics at least sometime earlier. I'll revisit it later.
RustyRoy22 24 Oct, 2024 @ 5:12pm 
Sorry for the late response, but i think you should include the dead bodies into this mod. I still see it as a type of foraging
themoistestwhale  [author] 21 Oct, 2024 @ 11:59pm 
@BladeofSharpness pawns crossing the map to retrieve an item is normal in terms of vanilla behavior if the item is unforbidden, and this mod does not touch colonist behavior.

However, since that is annoying, by default this mod auto-forbids any spawned animal forage, so make sure that setting is still on for you.
BladeofSharpness 21 Oct, 2024 @ 11:45pm 
I had a pawn that crossed half the map to retrieve 3 insect meats, is that normal? I guess the animal got attacked before eating it.
themoistestwhale  [author] 18 Oct, 2024 @ 9:59pm 
@Ascythian Alpha Animals has their own in-built version of this custom to their animals if you take a look yourself, hence why it's not included in patches.

Also, reviewing and patching that absurd amount of animals it adds anyways is an absolute pain even if they didn't have their own, though I might still have subjected myself to that just to patch it lol
Ascythian 18 Oct, 2024 @ 5:31pm 
Surprised Alpha Animals isn't included in the compatibility.
RocketRacoon 17 Oct, 2024 @ 10:16am 
@themoistestwhale okay, thanks for checking!
themoistestwhale  [author] 16 Oct, 2024 @ 5:56pm 
@Daniel231154 Now I can't remove the image of a bear forging a sword in my head.

Real question is which kind of animal would be best at that kind of thing...?