View Single Post
  #3  
Old 03-26-2002, 02:49 AM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

Woot. 2.6 was released today! :-)

Aside from accepting gifts from players, the above was trivial to implement. So now comes necessarily phase 1+, then 2.

In phase 1+ I need to:
1. Move the above instinct core code into 2.6
2. get that working
3. Move on to phase 2

Phase::2

Being hungry is only part of it. Animals fall into three different categories. You either eat meat, eat vegies, or eat both. Eating meat means you have a tendency to eat N/PCs. Eating vegies makes you hungry and docile. Maybe if item population in the zone (item droppings) work, then sprinkling vegies about the area to have NPCs go after them. (Smells like I'm cooking part 2) If you eat both, then you're moody, but are prone to eat the N/PC. Alright, so omnivore might be a bit more complicated to do right now, so we'll just deal with the core two: carni and herbi -vores.

I'm going to add in the animal instinct struct a member possible values (0,-1,1) that designates whether I am a carnivore (0), herbivore (-1), or omnivore (1). So (1) isn't going to be used for a bit, but it will be used so a bool won't work.

Carnivore:

When a NPC "eats" a PC, it calls NPC::Eat() and increments by the level of the PC. If it is another NPC, then perhaps the same.

Now what I find interesting is that I'm going to try to aggro against NPCs. Cannibalistic goblins. Oh yeah! Potential problem: what happens if zone aggros against one another and the entire place goes nuts? So maybe only eat your fellow if you are below, say -50.

I don't think the attack code currently allows for NPCs to attack one another. I might have to modify this.

Herbivore:

Sprinkling items about the zone, such as vegies, is necessary for this to work. Once that is possible, sprinkle the items about the zone and have the various NPCs path to their location. Nothing fancy here, just slowly move the NPC in the direction of the item. e.g., set NPC eventual destination == item location. They only need one, and no two NPCs should get the same item (prevention of another problem).

Omnivore:

Does both. Can't do this without the first two, so looks like I'll save this until later.

That's a good start for the game plan tonight (hoping), if not, then sometime this week. :)

--MV
Reply With Quote