The cattlemen and the sheepherders

Having a problem? Post it here.
Post Reply
chuxton
Admirable
Admirable
Posts: 131
Joined: Sun Jul 31, 2011 6:58 am

The cattlemen and the sheepherders

Post by chuxton » Wed Sep 21, 2011 9:47 am

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?

Agata
Developer
Posts: 715
Joined: Sun Sep 11, 2011 3:36 pm

Re: The cattlemen and the sheepherders

Post by Agata » Wed Sep 21, 2011 2:48 pm

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.
I'm familiar with the acacia. I know how immortality is achieved.

chuxton
Admirable
Admirable
Posts: 131
Joined: Sun Jul 31, 2011 6:58 am

Re: The cattlemen and the sheepherders

Post by chuxton » Wed Sep 21, 2011 5:27 pm

That's cuter even than I thought. It's an over-grazing simulation, of sorts. How frequent is the check?

Agata
Developer
Posts: 715
Joined: Sun Sep 11, 2011 3:36 pm

Re: The cattlemen and the sheepherders

Post by Agata » Wed Sep 21, 2011 8:54 pm

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.
I'm familiar with the acacia. I know how immortality is achieved.

chuxton
Admirable
Admirable
Posts: 131
Joined: Sun Jul 31, 2011 6:58 am

Re: The cattlemen and the sheepherders

Post by chuxton » Thu Sep 22, 2011 7:53 am

So do you have a way to answer my original question? Is the sheep population shrinking?

Agata
Developer
Posts: 715
Joined: Sun Sep 11, 2011 3:36 pm

Re: The cattlemen and the sheepherders

Post by Agata » Thu Sep 22, 2011 7:42 pm

I'm not sure about that. I haven't seen many sheep myself either.
I'm familiar with the acacia. I know how immortality is achieved.

Edison
Prominent
Prominent
Posts: 21
Joined: Sun Jul 17, 2011 1:10 am

Re: The cattlemen and the sheepherders

Post by Edison » Thu Sep 22, 2011 10:34 pm

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.

User avatar
gemini
Honorable
Honorable
Posts: 278
Joined: Tue Aug 09, 2011 1:00 am

Re: The cattlemen and the sheepherders

Post by gemini » Fri Sep 23, 2011 12:12 am

ahh the fun of running through and chainlighting everything the good ole days..
I am so taken and accepted among brothers and fellows.

User avatar
Zoram
Reputable
Reputable
Posts: 92
Joined: Wed Jul 13, 2011 9:34 pm

Re: The cattlemen and the sheepherders

Post by Zoram » Fri Sep 23, 2011 1:21 am

Image
Just because you grow older, doesn't mean you have to grow up ~ Bill
There are 10 types of people in the world; those that understand binary, and those that don't.
There is no place like 127.0.0.1, except for maybe ::1

chuxton
Admirable
Admirable
Posts: 131
Joined: Sun Jul 31, 2011 6:58 am

Re: The cattlemen and the sheepherders

Post by chuxton » Sat Sep 24, 2011 2:13 am

I think I see a recovery in the sheep population. I may have been looking at a local/temporary phenom.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest