Cats never hunt, caused by body size miscalculation

Started by XeoNovaDan, December 09, 2017, 10:28:44 AM

Previous topic - Next topic

XeoNovaDan

Circumstances:
The cat in question, Harvey, is restricted to a zone which only forbids him from entering the freezer to encourage eating raider corpses and hunting for himself. Other than a missing tail and malnutrition, he is perfectly healthy. There is a nearby wild squirrel on the map. The linked save file is currently at night time, but what is going to be mentioned naturally applies to daytime too otherwise this report wouldn't be made right now.

If this happens to have any link with the issue, the cat is also bonded to Kong with the shoddy alpaca wool cowboy hat.

Save file.

In terms of mods loaded, only HugsLib and ModSwitch are active other than Core, but these mods shouldn't have any effect on the nature of the bug.

Expected Outcome:
Harvey would hunt the nearby squirrel to sate his hunger, seeing as cats have a predator tag and can hunt animals up to 0.25 body size, with squirrels having a 0.15 body size.

Actual Outcome:
Harvey just wanders around, refusing to hunt said squirrel or any other nearby rodents. As a result, he starts to starve. Not sure if this is linked to this issue too, but he also may not react to allowed zone changes after a while (another thing I noticed which at least coincides with this issue).

Steps to Reproduce:
1) Spawn a cat
2) Spawn some suitable prey (e.g. squirrel)
3) Make the cat hungry
4) Observe no attempt to hunt

Mehni

Expected behaviour:

Pet and wild cats should hunt small rodents such as rats/squirrels/hares.

What actually happens:

Cats rather starve themselves to death rather than lift a paw. While this is typical cat behaviour if I were to believe Garfield, I do believe this is wrong.

How to verify:

Enable dev mode, Draw Prey Info.

What I believe to be the underlying issue:

// RimWorld.FoodUtility.IsAcceptablePreyFor directly checks for ageTracker.CurLifeStage.bodySizeFactor of predator and prey, rather than multiplies that against the body size.

viperwasp

#2
Since this Bug has not been fixed. And no Dev comments. I re-posted as a B19 Bug after confirming it's still a bug. See link below. I know it's easy for a bug to be missed. And low priority so I imagine it's not at the top of the list to resolve.
https://ludeon.com/forums/index.php?topic=43507.0



What the circumstances were.
Version 1.0 on Steam, no mods, new game.  Cat's won't hunt.

What happened.
Spawned many cats, and many rats, hares and squirrels. No animal zones, waited for cat to get hungry. Cat's still won't hunt. Possible bug left over from B18.

What you expected to happen.
I expect cats to at least hunt animals smaller than it. For example rats at least.

Steps we can follow to make the bug appear on our machine.
1. Start new game.
2. Spawn Cats.
3. Spawn Rats.
4. Fast forward time and observe cat behavior.

See these attached links for the same bug.
1. https://ludeon.com/forums/index.php?topic=36668.msg378273#msg378273
2. https://ludeon.com/forums/index.php?topic=39279.msg400132#msg400132

Thanks!
•  Lian Li Lancool II MESH RGB
•  Intel Core i7-12700K Alder Lake 12-Core
•  64 GB Corsair Vengeance LPX 3600Mhz
•  WD Black SN850 2TB GEN4
•  2x WD Black 8TB
•  Windows 10 OS
•  RTX 4080 GIGABYTE Gaming OC 16GB
•  Dark Rock Pro 4 (CPU Cooler)
•  TUF Gaming Z690-Plus- WIFI D4

Mihsan

Just tested it and I can confirm. Also somethig weird is happening: cats will not hunt even if starving, but they will all run for kill if prey is downed.

I remember that in previous versions they worked right and would hunt down all small prey in the area.
Pain, agony and mechanoids.

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

Tynan

Two threads on this merged.

Don't worry, we're here, we just leave bugs alone sometimes. We come back to it eventually.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

ison

It's simply because predators don't hunt animals with combat power greater than 85% * myCombatPower. And we've tweaked combat powers a bit. I think we can just change the threshold to 100%.

(bodySizeFactor should really be something like combatPowerFactor, but we don't have such thing so bodySizeFactor is used which is close enough)