Why is the Food Advisor telling me the “Catnip supply is too low”

kittens-game

My food advisor randomly tells me my catnip supply is too low.

Food advisor: 'Your catnip supply is too low!'

At first I thought it was telling me that my production wasn't enough to feed my cats for the winter, but I see it appearing and disappearing on its own sometimes without me doing anything. Also I don't think it's strictly winter related, since it will sometimes appear after I purchase something but go away a short time later before winter starts, with no interference from me.

What exactly triggers this warning, and what is it supposed to mean?

For example:

I currently have 3720 catnip, 8 cats, and am gaining 3.10/sec. Despite running a surplus, my advisor is warning me my catnip supply is low.

Base 7.25

Season 0%

Demand -6.63

If I add one farmer, I jump to gaining 14.4/sec, and my food advisor goes away.

Base 7.25

Season 0%

Job Output +1.26

Demand -6.63

(I know these numbers don't add up, I'm sure there's modifiers affecting this somewhere)

It also went away on its own once I reached around 4800 catnip (this was summer day 89)

Best Answer

It's an estimate based off a "normal" winter (-75% catnip production). The script calculates the current catnip production and tells you if you will last winter with it. I say "estimate" because the math assumes winter just started.

The game operates in ticks. There are 10 ticks in one day, so it woild be 10 * catnipPerTick per one day, 0-100 days per winter.

For reference, here is the related source code:

updateAdvisors: function(){

    if (this.bld.get("field").val == 0){
        return;
    }

    var advDiv = dojo.byId("advisorsContainer");
    dojo.empty(advDiv);

    var winterDays = 100;
    if (this.calendar.season == "winter"){
        winterDays = 100 - this.calendar.day;
    }

    var catnipPerTick = this.getResourcePerTick("catnip", false, { modifiers:{
        "catnip" : 0.25
    }});    //calculate estimate winter per tick for catnip;

    if (this.resPool.get("catnip").value + ( winterDays * catnipPerTick * 10 ) <= 0 ){
        advDiv.innerHTML = "<span>Food advisor: 'Your catnip supply is too low!'<span>"
    }

}