Page 1 of 1

The cattlemen and the sheepherders

Posted: Wed Sep 21, 2011 9:47 am
by chuxton
This is not a technical problem- its a curious question. A couple of weeks ago, Ajax rounded up a lot of cows and sheep and turned them loose in the box canyon where he farms. Now the place is still overrun with cows, but not a sheep to be seen. In fact, Ajax went hunting for wool in the Britain farmland and could not find a sheep anywhere.
I remember that Laephis said something about putting a mortality on the sheep, which is logical. My question is whether someone is keeping an eye on the sheep population to make sure that the epidemic is not leading to extinction.
Since the disease does not seem to effect cattle, one must ponder whether our administrators may have sold out the Brittania Cattlemen's Association over us poor sheepherders. *sniff* Do I smell cahoots?

Re: The cattlemen and the sheepherders

Posted: Wed Sep 21, 2011 2:48 pm
by Agata
Sheep have a chance to die if there is at least one other sheep within a 9x9 square centered on them. This chance is 0 for single sheep, 1 in 500 for two sheep, 6 in 500 for three sheep, etc.

Code: Select all

function CheckSheepAmount()
	var DeathChance := -4;
	Foreach npc in ListMobilesNearLocation(me.x, me.y, me.z, 4)
		if (npc.npctemplate["sheep"])
			deathchance := deathchance + 5;
		endif
	endforeach

	if (RandomInt (500) < DeathChance)
		KillMe ();		
	endif
endfunction
The chance is slim, but it's likely that all sheep just died out of back luck... they should spawn after a while. There is currently no one watching over the sheep population.

Re: The cattlemen and the sheepherders

Posted: Wed Sep 21, 2011 5:27 pm
by chuxton
That's cuter even than I thought. It's an over-grazing simulation, of sorts. How frequent is the check?

Re: The cattlemen and the sheepherders

Posted: Wed Sep 21, 2011 8:54 pm
by Agata
The check is made once every 30 to 35 minutes interval (base 30 minutes plus random number of additional seconds between 0 and 299).

I was thinking about the code, and even without other sheep in the vicinity, they have an 1 in 500 chance to die, since the ListMobilesNearLocation function lists all mobiles within the specified square, including the sheep currently doing the check. So it's 6 in 500 for two sheep, 11 in 500 for three sheep, and so on.

Re: The cattlemen and the sheepherders

Posted: Thu Sep 22, 2011 7:53 am
by chuxton
So do you have a way to answer my original question? Is the sheep population shrinking?

Re: The cattlemen and the sheepherders

Posted: Thu Sep 22, 2011 7:42 pm
by Agata
I'm not sure about that. I haven't seen many sheep myself either.

Re: The cattlemen and the sheepherders

Posted: Thu Sep 22, 2011 10:34 pm
by Edison
If only sheep blow up and are then replaced by random-farmanimal , then I suppose it would make sense that the sheep population would tend to decline over time.

Assuming players don't periodically rampage through an area killing everything.

Re: The cattlemen and the sheepherders

Posted: Fri Sep 23, 2011 12:12 am
by gemini
ahh the fun of running through and chainlighting everything the good ole days..

Re: The cattlemen and the sheepherders

Posted: Fri Sep 23, 2011 1:21 am
by Zoram
Image

Re: The cattlemen and the sheepherders

Posted: Sat Sep 24, 2011 2:13 am
by chuxton
I think I see a recovery in the sheep population. I may have been looking at a local/temporary phenom.