View Single Post
  #18  
Old 03-27-2002, 10:37 AM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

Quote:
"They say the world is round. They say that men have been to the moon and back. They even say that men have conquered the mountains, the land, and the sea. Gnollfur! it just isn't fair. What about the dark alleys of Qeynos, anyone tried that yet? No? Great! Wait - Is it dangerous? Yes? Drat."
- Freeport Scout

Phase Three

Add something to do decay on the hate list (e.g, a decay timer). Right now, from what I've seen of the code, there isn't really a decay timer until something triggers it off. It's pretty important, like someone pointed out earlier, that mobs give up on the chase at some point. The only adverse side effect right now, which is pretty adverse, is that the mob might just give up attacking while another entity is attacking it. But, I believe the attack code has hate-adding code in it.

So, in effect, I'm thinking a timer that lasts for a minute or so before popping off the top hate for the npc is needed.

Speaking of timers, there is going to be a timer for deciding when the NPC should eat. After an elapsed time (t), an NPC will loose a hunger point if they eat either meat or vegie.

For now, I'm thinking the arrangement will be

Increase Hunger by:
Eats Meat: 2 points
Eats Vegies: 1 point

And if hunger is below the threshold (-50), then find something in the zone that you *can* eat and go after it (ob: this will evolve into pack code later).

Now that you can eat things, there is the team aspect. You wouldn't want to eat something that is on your team. By the same token, your team should go after its food sources together when under certain conditions (see ob: note earlier, might bump this until later). The important thing here is that we don't want to eat team members because we are team players.

So, we need to call this->GetFactionID and do some checks. Does faction id point to a relation of factions somewhere or does it point to only one? Tinkering with this will produce the desired "don't eat me, I'm on your side! result". Which will need to be in the same place the target selector check is.

I also need to find out what the status is on items dropped in the zone. That should just spawn a mob or entity (can entities be spawned?) into the zone. But then there's the matter of picking the item up, etc, etc. I might table this in favor of pack code.

--MV
Reply With Quote