Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #16  
Old 03-27-2002, 01:58 AM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

Added these commands:

#Hungry
#ForceFeed
#HungerThreshold
#CanYouEatMe
#voretype
#EatMe
#sicifhungry

#Hungry

Informs the user as to whether or not the selected target is hungry.

#ForceFeed

Feed the target x amount, where -100<=x<=100

#HungerThreshold

Returns the current hunger value as defined in the struct as Hunger (also -100<=x<=100)

#CanYouEatMe

Informs the client whether or not the target is capable of eating you.

#voretype

Informs the client whether or not the target is a carnivore, herbivore, or none of the above.

#EatMe

If hungry, the selected target will attack you. At death, consume you for your level worth of food.

#sicifhungry

If hungry, the selected target will go after the identified N/PC.
Reply With Quote
  #17  
Old 03-27-2002, 06:25 AM
Zio
Hill Giant
 
Join Date: Mar 2002
Posts: 179
Default

Very cool :p
__________________
death
Reply With Quote
  #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
  #19  
Old 03-27-2002, 12:28 PM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default

hmm if player got eaten corpse should change to dead skellie. after all bones usually dont get eaten.
__________________
Hmm...
Reply With Quote
  #20  
Old 03-27-2002, 12:59 PM
hogger
Sarnak
 
Join Date: Jan 2002
Posts: 52
Default

You know, this same principal could be applied to a social 'food chain'. For example an Orc Centurian offs a goblin whelp for his cash just because he's tougher and he's evil and no other goblins are around. It's sort of a Tolkien-ian idea.
Reply With Quote
  #21  
Old 03-27-2002, 01:25 PM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

Quote:
Originally Posted by hogger
You know, this same principal could be applied to a social 'food chain'. For example an Orc Centurian offs a goblin whelp for his cash just because he's tougher and he's evil and no other goblins are around. It's sort of a Tolkien-ian idea.
Quite correct. As a matter of fact, the principles I'm using to build this take into account the spirited aspect of life too -- the same power that influences hunger, also influences greed. I have in mind to create thieves that seek out the rich and plunder from them at some point down the road. So with luck we'll see exactly what you're talking about, and a little change on the side ;)

My larger goal is not to hard code the 'chain' at all. And based on my most recent results.. this appears to work. Still doing trials though, so it is still too early to say for sure.
Reply With Quote
  #22  
Old 03-28-2002, 10:44 AM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

Some lessons learned so far:

1. Corpse checking. This is important. See attached screenshots.
2. If you are the only client, then not having the npcs put you on their hunger list is also important.
3. See 1.
4. Social hierarchies form naturally through a simple 'is he stronger than me' check, which for those of equal level create small packs

Some things I've noted that need corrected:

1. NPC movement needs help
2. Bouncing NPCs need to remember the world needs gravity. Its their for a reason, use it.
3. The agro list needs a bounds check. I've seen it > 12000 (this morning, actually). Likely the design I have going, but still should be a check for people who mess it up (like mua). :)
4. NPCs do not need to be on their target's coordinates (so far as the client is concerned), just 'near' them.
5. NPCs have a tendency to group at certain 'hotspots' in the zone. I can think of a handful of reasons why, and mostly my fault too.
Reply With Quote
  #23  
Old 03-28-2002, 03:24 PM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default

text in ( ) is my comments

1. NPC movement needs help ( yeah it runs too slow, like overweight walking. )
2. Bouncing NPCs need to remember the world needs gravity. Its their for a reason, use it. ( its getting rare but there should be "fall and stay on floor" code. )
3. The agro list needs a bounds check. I've seen it > 12000 (this morning, actually). Likely the design I have going, but still should be a check for people who mess it up (like mua). ( no comment )
4. NPCs do not need to be on their target's coordinates (so far as the client is concerned), just 'near' them. ( yeah should add "near enough" code. pet has same problem )
5. NPCs have a tendency to group at certain 'hotspots' in the zone. I can think of a handful of reasons why, and mostly my fault too. ( no comment )
__________________
Hmm...
Reply With Quote
  #24  
Old 03-29-2002, 01:51 AM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

Bouncing NPCs seem to only be a problem in zones where they start off in high locations (e.g., kelethin) or when the agro limit reaches 200 or so. The h (z?) coordinate doesnt' seem to work server side, or if it does, it isn't updating the #loc command. E.g., an orc oracle chases an elf slave into the water, promptly kills it, then swims back to home -- only gets stuck. Putting the client next to the orc, it is h:-37.5, whereas the mob has a h(z) of -61.

This example actually goes onto something I wanted to speak about today, which are the test results of yesterday.

Test Results

Permafrost

Goblins run through the maze looking for anything they can eat. As do the wolves (which oddly enough travel together in a pack, maybe b/c of their relative zone entry point nearness?). As does vox. Vox, unfortunately, gets stuck in the small tunnels. I should have tried changing her size, now that I think about it. I made a few sacrifices for her, but the goblins would come running up and KS from her.

Crushbone

The orcs took over the zone. Literally. Dvinn was quickly surrounded and killed on the bridge, while the slavers and others chased the slaves around until they were dead. Spawning an elf on the bridge results in a bunch of hungry orcs coming in after it.

GreaterFaydark

There is a problem with hoppers in this zone. The zone is so large that it is really difficult to tell what is going on. However, spawning a highelf in kelethin prompts the nearest wood elf to come near and kill it. I don't know the result of the orc/elf war. I have a feeling the elves won (what with all the decaying orc corpse messages :)

east commons

Spawned six liches (Miguel (sp) in a circle. I put then inside a bunch of human druid spawns named 'sacrifice'. When the liches got hungry, it turned into a royal rumble at the tunnel entrance. I let it run all night -- the liches appeared to have held out, although a couple did die somehow. I didn't note any zone hopping here.

All in all, I'd have to say it works.

There are some things that do need changed. For instance, all the NPCs are hardcoded as meat eaters which has a -2 penalty. They are also all hardcoded as meat. I'd like to just swap this out and make it dynamic, but I might wait until 2.7 for that to happen (what with all the new db changes coming). I'd also like to add a series of other properties for the mob, that way a mob may ignore faction, corpse, race, level (which gets interesting), checks before consuming something.

Then there is the next step. I'm torn if I want to work on the thief code (does pickpocket work yet?) or add in the next layer for the ai. With the thief code, I could flag mobs to come track you down if you have x amount of money, and attempt to pickpocket it from you. 'course, if they track you down and you're KOS, then they'd kill you too. The next layer of ai, which I might do if pickpocket isn't working, involves a slight reordering of some things.

For example, with level checks, an implied social order is created. I want to build off this some more. Given X, with 2Y (imagine X as the top node, 2Y as 2 nodes below) I want 2Y to take the kill and give a % of that kill to X, which would be their master. Then, if 2Y has contributed ($a) amount, then X will act as a kind of guardian for them. If 2Y(me) is in trouble, then X will come over and help.

Doesn't seem to be that difficult and may actually be better to do this first because then I could put in guild-code for thieves. If you pick on a thief and they're popular in the guild ($a), then the guild comes after you. I see in the code that it is possible to zone npcs across, or suggests that it is, so this shouldn't be very difficult either.

--MV
Reply With Quote
  #25  
Old 03-29-2002, 03:21 AM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

If you've read the above, then you have a pretty reasonable idea as to what to expect from using these files (and what is in them). Therefore, I take and assume no responsibility for you using these and really screwing up your own hard work in your eq world.

--MV
Reply With Quote
  #26  
Old 03-29-2002, 03:27 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

You read my mind Male! I was hoping you would post your changes so I could try to compile it in! I'll give it a shot on my server, Wasted Earth and see how it looks..

update:Just recompiled with your changes.. Everything compiled with no problems. If anyone wants to check it out in action, log onto to The Wasted Earth and post your observations..

Now if I can just overcome my NAT logging in problems...
Reply With Quote
  #27  
Old 03-29-2002, 07:24 AM
Baltar
Hill Giant
 
Join Date: Jan 2002
Posts: 185
Default

Wow read the description and am still amazed. Great work Malevolent! Any chance of integrating this into the later releases?
Only downfall I see to this is on the low end servers this will cause severe cpu load if someone goes crazy on the mobs. But if you limit the ai to certain npcs, it can be controllable.
Reply With Quote
  #28  
Old 03-29-2002, 07:26 AM
Malevolent
Hill Giant
 
Join Date: Mar 2002
Posts: 171
Default

Reminds me of a couple small caveats to look out for.

1. It will not eat the client, no matter what you do. I disabled it. Having the entire zone come after you because it is hungry isn't much fun.

2. Zonefamine isn't implemented (on my todo list with zoneheal, zonedeath, etc.)

3. I don't remember what aspects I have commented out, but I do think that the code above (*points to the attached file in his former post*) igornes the faction and level check. Faction needs some work -- there needs to be a ::AmIAFriend faction method check that returns bool versus just using the factionid.

4. I increased the timer for span between decriments in the hunger threshold. So it will take longer for something to get hungry. However, once something is hungry and you want to know what it is going after, use #GetTarget (or #gettarget). If you're impatient, use the #ForceFeed command like so

#ForceFeed -100

--MV
Reply With Quote
  #29  
Old 03-29-2002, 10:51 AM
septimus
Fire Beetle
 
Join Date: Jan 2002
Posts: 11
Default

Wow! I have to say these ideas have gobsmacked me, Malevolent!

It's true genius in the ideas and implementations such as these that really give EQ that much needed push in the right direction. While Verant continue to bulk EQ out with new zones, new NPCs and new items (and the occasional - and seldom - bright idea), you've came up with something that really changes the way the world would work, and make the experience far more immersive.

Stuff like this could eventually fruit into true NPC interaction, animals could hunt in packs on their own dynamically generated territory, reproduce, be affected by weather and even seasons. There could be food chains that would be affected by environmental impacts, and PC interference. You could build social structures into towns and settlements of people to allow NPCs to have friends, enemies and favorite places. For instance, a group of guards who like to hang out after hours at a bar (Which then suggests social obligations like jobs - maybe the guards get payed for their duties to the town, and maybe one gets a pay rise and buys the rounds? And they get drunk, fool around and turn up late the following morning? Hehe ok maybe I'm getting ahead of myself here :P)

All these things are possible because of the much smaller scale of this project, and I look forward to seeing a better EQ experience that fruit from these first steps

I await further posts from you with baited breath
__________________
<------ ;/
Reply With Quote
  #30  
Old 03-29-2002, 04:56 PM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default

whooo nice! i cant see the result of changes once its done in west karana south karana etc.. what with all mobs there ( eleplant etc )
__________________
Hmm...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:05 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3