This is Google's cache of http://portal.dolserver.net/viewtopic.php?f=13&t=5195. It is a snapshot of the page as it appeared on Apr 5, 2011 19:25:44 GMT. The current page could have changed in the meantime. Learn more

Text-only version
These search terms are highlighted: daoc mobs give up chase  
Dawn of Light • View topic - Return to Spawn Time

Return to Spawn Time

Come here for all of your programming and scripting ideas. If you have a question, use the support forum. This is the place of all developments that do not fit in the DoL project, including tools.

Return to Spawn Time

Postby Etaew » Wed Aug 02, 2006 2:05 pm

I am working on calculate the return to spawn time for a NPC that has been following a target.

My place holder is being added into DOL shortly and will take it's place in GameNPC.cs FollowTimerCallback method.

Code: Select all
         //if the npc hasn't hit or been hit in a while, stop following and return home
         StandardMobBrain brain = this.Brain as StandardMobBrain;
         if (AttackState && brain != null)
         {
            int seconds = 10 + ((brain.GetAggroAmountForLiving(followTarget) / MaxHealth + 1) * 100);
            int lastattacked = m_lastAttackTick;
            int lasthit = m_lastAttackedByEnemyTick;
            if (CurrentRegion.Time - lastattacked > seconds * 1000 && CurrentRegion.Time - lasthit > seconds * 1000)
            {
               StopFollow();
               Notify(GameNPCEvent.FollowLostTarget, this, new FollowLostTargetEventArgs(followTarget));
               this.WalkToSpawn();
               return 0;
            }
         }


Any thoughts about this formula?

if a mob has 100 health, all damages can be converted into %

doing 10% damage of the max health will make it give up after 19 seconds of not being able to hit you

doing 50% damage of the max health will make it give up after 59 seconds

doing 90% damageof the max health will make it give up after 99 seconds
I do web things
User avatar
Etaew
Website Team Leader
 
Posts: 6187
Joined: Mon Oct 13, 2003 5:04 pm
Location: England

Postby Tolakram » Wed Aug 02, 2006 4:31 pm

Howdy,

If 50% plus damage is done and you run mobs usually follow briefly, then turns around and runs away. Once their health gets above 50% and if you're withing a certain distance they will chase you down.

I'm not sure on the exact times for chasing, but I do know that mobs that were never hit by you but aggroed will give up sooner.

As for your numbers, I think most mobs give up after 20 or so seconds, so if the goal is to duplicate DAOC then 60 - 90 seconds seems way way too long. It seems to me 60 seconds is a long long time in game.
User avatar
Tolakram
Developer
 
Posts: 5941
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Postby Etaew » Wed Aug 02, 2006 4:57 pm

From my experience the more you hurt the mob and closer it was to death the less chance it would get bored and run back home.

But I had none of these features and my memories are years old, but I think it's a feature needed at this time.
I do web things
User avatar
Etaew
Website Team Leader
 
Posts: 6187
Joined: Mon Oct 13, 2003 5:04 pm
Location: England

Postby opik » Wed Aug 02, 2006 7:12 pm

tolakram wrote:Howdy,

If 50% plus damage is done and you run mobs usually follow briefly, then turns around and runs away. Once their health gets above 50% and if you're withing a certain distance they will chase you down.

I'm not sure on the exact times for chasing, but I do know that mobs that were never hit by you but aggroed will give up sooner.

As for your numbers, I think most mobs give up after 20 or so seconds, so if the goal is to duplicate DAOC then 60 - 90 seconds seems way way too long. It seems to me 60 seconds is a long long time in game.

this is right - perhaps I have next week enough time to test amd proof it :)
opik
DOL Novice
 
Posts: 57
Joined: Sat Jul 29, 2006 5:20 pm
Location: Germany

Postby Etaew » Wed Aug 02, 2006 7:15 pm

That was my hope in posting here, I've just added a placeholder so we don't ignore this feature and was hoping someone could assist me in creating proper behavior :-)
I do web things
User avatar
Etaew
Website Team Leader
 
Posts: 6187
Joined: Mon Oct 13, 2003 5:04 pm
Location: England

Postby rej » Thu Aug 03, 2006 6:21 am

I dont think that the mob will follow you if it has below 30% life. on Live it even tries to get out of battle when you nuke/shoot the mob and it is below 40%, so i would say, the FollowPlayer function shouldnt raise, but instead fall.
۩๑۩۞۩๑۩ http://www.rejzee.net ۩๑۩۞۩๑۩
User avatar
rej
DOL Experienced
 
Posts: 171
Joined: Tue Jan 18, 2005 10:34 am

Postby Etaew » Thu Aug 03, 2006 10:18 am

I stopped playing live before NPC's started to run away from targets so I've never seen it in action.
I do web things
User avatar
Etaew
Website Team Leader
 
Posts: 6187
Joined: Mon Oct 13, 2003 5:04 pm
Location: England

Postby rej » Thu Aug 03, 2006 1:04 pm

You should give it a try.

But also include these into your calculations:

mob level <> player level
mob health <> player health

The higher the mob level <> to the player's level, the longer it is running after the player.
The lesser mobs health <> player's health, the shorter it is running after him.
۩๑۩۞۩๑۩ http://www.rejzee.net ۩๑۩۞۩๑۩
User avatar
rej
DOL Experienced
 
Posts: 171
Joined: Tue Jan 18, 2005 10:34 am

Postby opik » Thu Aug 03, 2006 3:13 pm

yellow mob:

no damage pull:
23 sec, 33 sec, 33sec, 33sec (see Log! It's true!)

my bold missed:
32 sec

62 % mob:
32 sec

34% mob:
12 sec

If the mob is under 40 % (i couldn't proof that exactly, but it should be pretty near reality) and you make your damage from distance:
the mob walks to its spawn point.
If you then walk very close to it, the mob attacks you short after it regged some life (after the "healtick" - here it was from 34 % to ~ 44%).

Otherwise the mob attacks you when it gets 100% life and you are in "range"
(this time the range is a lot bigger - you can't see the mob)

I hope you understood what I want to say :oops:
You do not have the required permissions to view the files attached to this post.
opik
DOL Novice
 
Posts: 57
Joined: Sat Jul 29, 2006 5:20 pm
Location: Germany

Postby opik » Thu Aug 03, 2006 3:26 pm

orange mob - no damage:
32 sec

At 61 % the orange mob came back ;) But after 61 % they regg very fast.
So when they hit you they have 100%.

I think that should be enough.
opik
DOL Novice
 
Posts: 57
Joined: Sat Jul 29, 2006 5:20 pm
Location: Germany


Return to Programming, Scripting and 3rd party Tools

Who is online

Users browsing this forum: -Shawn-, Google [Bot], Graveen and 0 guests