View Single Post
Old 05-03-2002, 07:14 PM   #18
Molly
Senior Member
 
Join Date: Apr 2002
Location: Sweden
Home MUD: 4 Dimensions
Posts: 574
Molly will become famous soon enoughMolly will become famous soon enough
This may be a bit of a side-line, but it's an example of different ways in which ‘developing mobs’ can be put to use in a game. Both the examples below are up and running in our mud, although the second isn’t quite finished yet:

The first example is an abandoned spaceship, in our Future Dimension. It is drifting around helplessly in space, and at first when you enter, it seems pretty empty. But there is this Room - (I think it’s the Freezer) - with a large WARNING! sign on the door. If you open that door - (which no player can resist doing, because of the sign) - you let loose a swarm of giant mutant cockroaches (the initial number loading is related to your level). The minute they are released they start swarming out of the door and breeding like rabbits, and soon the entire ship is infested with them, unless they are disposed of.

They start out as pupae, and after a given time develop into mature cockroaches, which of course are much more powerful, and which in turn immediately start to breed more pupae. So getting rid of the pupae first makes things a bit easier. But to stop the bugs from breeding totally, you need to find and kill the Mother Queen.

It is all done with scripts, which also control the max number of cockroaches. This is important, because the bugs are confined to the spaceship, and if allowed to develop uncontrolled they would eventually crash the mud, when someone enters an overpopulated room. (This happened with a couple of early attempts at a similar concept).

It is all rather simple, the cockroaches do nothing but breed and fight, we haven't coded in any ecology, since it's not really needed for the purpose. But the second feature is quite a bit more advanced.

This is the possibility of breeding cattle, in the Old West Dimension. The cattle mate, give birth, mature, grow old and die in a set life cycle. When a bull and a cow meet, there is a set percentage chance of them mating and the cow becoming pregnant. When two bulls meet, they fight till death. Only mature animals can mate and conceive, of course. There are also some predators that attack the calves, to keep the population down. And if the cow is in the same room, she naturally defends her offspring. We have the same concept working for horses and sheep too.

There is also the option to fence your herd in, since the ranching is based on a grid zone. In this way you can control the population, make the animals breed faster and protect them from predators. The natural life cycle prevents overpopulation, and we are experimenting with having the animals die of starvation, if some lazy player confines his herd to a too small corral. This will be based on the sector type, the animals will be able to graze more times in a field room than in a mountain one, before they run out of food.

The animals can also be coded to roam about in search of food and water, moving more often when they are hungry and thirsty than not. (But I am still not sure if this is worth the effort, it would be a nice thing to have, but there is always the question whether it actually adds something to the Game, beside the satisfaction of having a working ecology. I think very few players will understand and appreciate the mechanics. And after all, it's for the players we create our stuff).

It’s done with a mixture of code and scripts. The basics are hardcoded; like the mating and the animals following each other so that they stick together in a herd. When one animal moves, the entire herd moves, (with the odd exception of a few strays, which also is coded in). The life cycle is done with simple scripts; after a given time each mob loads a new and older one, before purging itself, and at the last stage loads a corpse, which decays like any other corpse.

The main objective with this feature is for the players to breed the cattle, horses and sheep for their hides, wool, meat and milk, and they can also be herded to a cattle market and sold, with the aid of a shepherd dog. The shepherd dog is the only way to really control the herd, and it answers to some simple commands, like ‘herd <direction>’ ‘sit’, ‘stand’ ‘attack <mob-name>’ etc.

So far this is only up and running in our test Port, because we still have to add some handicraft skills, so the players can use the products they get from their ranching. (Tanning, carding, spinning, weaving, leather-making, tailoring etc.). The breeding part is all finished though, the cows hump to their heart’s delight and the population seems pretty stable.
Molly is offline   Reply With Quote