Anyway, i'm a little confused as to how the effects are working, or supposed to be working
Every turn that a planet has less food than it needs, it loses the difference in health. If health drops below 20, population starts to decrease. If there is sufficient food, health can increase again, towards its target value, over several turns.
While reporting "Famine struck %planet%." Population may grow for quite a few more turns.
Yes; if the health hasn't fallen below 20 yet, population will still grow, even if there is less food than required to maintain health.
For instance when current-health hasn't yet climbed up to target-health.
I assume this is a typo or mis-edit, or refers to the continued losses after food is restored.
Once famine lowers heath enough that population starts decreasing, and end of the food shortage doesn't necessarily stop starvation. It may take a lot of turns for heath to climb back up to 20 (i'm assuming that's the magic number)
Yes. Above 20 health, population grows. Below 20 health, population decreases.
I'm not sure the effects can do this, but i'd like to see food shortages produce a gradually increasing malus on health. But once food supplies are adequate that malus should totally disappear.
There are potential micro / balance issues with being able to avoid any population loss by having food supplied only once per several turns with instant health-recovery from any malus. However, there could be a modified rule for health meter growth, so that instead of always going +1 or -1 towards the target health, the health could instead instantly recover to the lesser of 20 (stable population) and target health, when the planet is fully fed. That way, having adequate food will instantly stop population loss due to temporary changes to health, but changes to target health can still force the population to decrease even if fully fed.
Edit: I modified the source code so that should happen now. It could probably have been done with effects, though.../Edit
We need one message for a food shortage without population decline. Something like: "%planet% doesn't have enough food."
Then another message for when people are actually dying. "Famine struck %planet%. Population dropped by X."
The bit of code that makes planes lose population doesn't know anything about why the health meter is below 20, so at best it could say "Famine struck %planet%! Health is decreasing!" and "Population decreasing on %planet% due to poor health" as two separate messages, which can appear independently or together.