Ah, like specifics? Probably a weighted list and a serious of random numbers based on this list. For instance, take your max head HP and your current head HP. Say you've got 70% head health remaining. Say your torso is 60% remaining. That averages to 65% remaining. Let's assume your total HP is 70%. Now let's assume that you have a hunger level of 100 (the "Very Hungry" display), and that 200 is your dropoff for hunger measurements. Therefor, you're at 50% hunger rating. HP could count for double, so you've got (70*2)+50 / 2 would give you a rating of 95. It would include other things as well, like factoring your thirst, pain, and power levels in similar weighted fashions, and then figure up a scale. Because all of this would be based on percentages, it would run the same no matter your level. After all, 4/4 power and 100/100 power are both 100% power, so your rating would be the same regardless of your actual stats.
Once it determined your rating, it would then plug your rating into a random number generator. It could invert your rating for rising chances, like "100-rating", might give you "5" as the output, and then put that into a rng. "one_in(inverse_rating)" to spawn a horde at all. In this example you'd have a 1 in 5 chance of triggering a horde, 20%. If you were doing better, like a 96 rating, then that would invert and give you a 1 in 4 chance, 25%. In this way, you're more likely to trigger an event if you've got a higher rating.
Once it's triggered a horde, then it spawns a random number of zombies. If you're doing poorly, say a 50% rating, then it might do a simple rng(0,rating) spawn, generating anywhere from 0 to 50 monsters. If you've got a higher rating, in might spawn 0-95 monsters at once. Well, probably a bit more balanced. Something like rng((rating/5),(rating/2) so that would give you 20%-50% of your rating. Rating of 50, it'd spawn 10-25 zombies. Rating of 95, it'd spawn 19-47.5 (rounded 48) zombies.
After that, it would determine how many special zombies (shriekers, brutes, necromancers, etc) would be among them, and how much, if any, of an HP/damage/speed buff the greens should get. It would likely do this based mainly on your skill, so if you've got 5 melee, 4 cutting, and 6 bashing, that'd average out to 5, and would scale zombie HP by, maybe, +10*skill, giving them a 50 HP bonus due to your skill levels. Maybe something like +5*skill or somesuch.
I haven't thought of the specifics yet, but it would work in about this way. Maybe once an hour while you're awake, or every 6 hours, it would run a horde check, so it wouldn't be checking rapidly and causing CPU drag, but would be functioning quickly enough that eventually it would happen. Overall though, it should quickly spawn a large horde when you've got good HP and nutrition, and should slowly spawn a small mob when you've already been beat up and starved. Hopefully, this idea would balance itself. If you fight a horde and get heavily injured, then it'll be a while until another horde arrives. It works to keep you just a little suppressed
All theory. I'd need to hash out some specific numbers if I were going to actually work on this, but you get the idea.