The scripted famines aren't very complicated right now. I just set an event counter that is checked by building bonuses which leads to unrest and population shrinking. It's a pretty simple but effective way to keep the player on their toes (and I like having events pop up from time to time, it shows the player that he interacts with the world in non-trivial ways).