Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2008, 11:40 PM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default npcs running away super fast

i just started a new server and was playing around with a few friends i have not changed nothing in the db about run speeds but when the npcs get low on like they run like they should but they run so freaking fast you cant even see where they go half the time.

i searched the forums but cant find anything on this so i figured i would post and see whats up is it something with my server or is it a known bug or anyone have this problem and fixed it?

i checked the run speeds and in the zones i have seen it in all the npcs run speeds are set to like 1.25 and so on..

any help/info wold be helpful.
Reply With Quote
  #2  
Old 06-09-2008, 11:50 PM
xxarthurxx
Hill Giant
 
Join Date: Jun 2006
Location: San Jo, Cali
Posts: 180
Default

I have this problem on my server as well, it seems like they take off ay lightning speed but it you hit them once they slow down to normal run speed. I have yet to fiddle with the run speed values to try and fix the problem but maybe its a fix that must be tampered with code side.
Reply With Quote
  #3  
Old 06-10-2008, 02:47 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Make sure you added these into your rule_values table:


Code:
insert into rule_values values (0, Combat:EnableFearPathing, true);
insert into rule_values values (0, Combat:FleeHPRatio, 20);
From testing, I have found that fear actually works really well. At least with the new maps. But fleeing still needs some work. With it set to 20 in the rules, it seemed to work ok mostly, but I tried setting it to 10 and mobs were warping all over and training like crazy. Until it is tuned a bit more, you probably want to disable it by setting fleeing to -1. That will solve your problems for now. You can still leave fear enabled though if you want it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 06-10-2008, 05:04 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

I'm at work, so can't test this, but the issue appears to be the logic in
fearpath.cpp Mob::GetFearSpeed().

There is a hardcoded constant in the source, FLEE_HP_MINSPEED, which is set to 10.
The purpose of this is to put a lower limit on the mob's flee speed, i.e. once the
Mobs HP gets down to 10%, it won't slow down any further.

Assuming an unsnared mob with a default runspeed of 1.25 and rule FleeHPRatio
set to 25, FearSpeed will return a flee speed of 0.25 at 25% health.

Because of the logic, as the mobs HP decreases from 25% down to 10%, it will actually
move faster, with a speed of 1.25 when it's HP is exactly 10%.
Below 10% it will run at 0.25 (again, assuming unsnared).

The following drop-in replacement will give you a linear speed decrease, starting at 0.25
at 25% health, down to 0.10 at 10% and below.

Code:
float Mob::GetFearSpeed() {
    if(flee_mode) {
        //we know ratio < FLEE_HP_RATIO
        float speed = GetRunspeed();
        float ratio = GetHPRatio();

        if(ratio < FLEE_HP_MINSPEED) 
                ratio = FLEE_HP_MINSPEED;

        speed = speed * 0.8 * ratio / 100;
 
        return(speed);
    }
    return(GetRunspeed());
}
If you want them to move faster or slower in relation to HP%, fiddle with the speed = speed * 0.8 * ratio / 100; statement.

As I said, I can't test it in-game right now, but it works as I described 'in simulation'.
Reply With Quote
  #5  
Old 06-10-2008, 01:47 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Derision: Your code fix is working fine - Now they run away the way they should.
Here are some other "flee features" I remember from live;
- if the players character was low on health ( I think was 25% or less?) then the NPC stayed and duked it out tell death.
- if there were more than on NPC in the brawl, only the last one standing would flee (2 NPCs would stay and fight).
Reply With Quote
  #6  
Old 06-10-2008, 02:48 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Angelox View Post
- if the players character was low on health ( I think was 25% or less?) then the NPC stayed and duked it out tell death.
- if there were more than on NPC in the brawl, only the last one standing would flee (2 NPCs would stay and fight).
There is code already in that checks if the health of the player at the top of the hatelist is <20%, in which case the mob won't run.

Regarding the second point, would it be a simple matter of checking if there was another mob who hated the player and not running if that was the case, or, does the the other mob need to be within aggro range.

E.g. if I pull two mobs, fear one away, get the remaining one down to flee speed. Should the dying mob flee if the feared mob is 'out of range'.

Also, do the mobs need to be on the same faction for this mechanic to kick in ?

Does Con come into it ? A post over at PEQ suggests it does:

http://www.projecteq.net/phpBB2/view...highlight=flee


I'm willing to have a stab at this if no-one else is working on it, and if we can agree the exact mechanics (and it's not too intensive to calculate ).
Reply With Quote
  #7  
Old 06-10-2008, 03:23 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I really didn't notice more details - but from experience ( i usually camped in dungeons, so everyone was on the same faction) - I would say it would it be a simple matter of checking if there was another mob who hated the player and not running and, the other feared mob did not need to be within aggro range for the other to not flee; this would be a good starting point anyway ( can always tweak it later).
Reply With Quote
  #8  
Old 06-10-2008, 05:29 PM
xxarthurxx
Hill Giant
 
Join Date: Jun 2006
Location: San Jo, Cali
Posts: 180
Default

how do i insert the code? im using navicat console and it keeps telling me i have a syntax error im lost :/
Reply With Quote
  #9  
Old 06-10-2008, 06:05 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you are referring to the new rule_values, then you can just scroll down to the last line in your table in Navicat and hit the + sign to add a line, or the down arrow to start a new line. Then paste in the following using CTRL+V:
Code:
0	Combat:EnableFearPathing	true
0	Combat:FleeHPRatio	20
The code that Derision posted is for the source and you can't add that in via Navicat. You have to add it to the source and then recompile it to use it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #10  
Old 06-10-2008, 06:06 PM
xxarthurxx
Hill Giant
 
Join Date: Jun 2006
Location: San Jo, Cali
Posts: 180
Default

ah ok, thanks trev doing that now
Reply With Quote
  #11  
Old 06-11-2008, 06:40 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Also, Undead never flee when dieng
Reply With Quote
  #12  
Old 06-11-2008, 08:50 AM
SourCelery
Fire Beetle
 
Join Date: May 2008
Location: soon to be Arizona
Posts: 7
Default

Not true about the undead part btw... ghouls are considered undead and they flee.

Now, as I remember it, if one of the two is feared, the mob will flee. The rule is: More than one currently in melee combat with you. Also, it does depend on the con for most mobs. Most mobs will run no matter how many there are if they're green to you. One of the exceptions to that rule that I remember from farming is rockhoppers. I'm don't think it matters if the mobs are different factions, but I can't say for sure on that one.
Reply With Quote
  #13  
Old 06-11-2008, 02:58 PM
xxarthurxx
Hill Giant
 
Join Date: Jun 2006
Location: San Jo, Cali
Posts: 180
Default

the reason undead don't flee is cause they have a "f" in their special attacks column. You can manually add this to all the mobs you don't want to flee, like maybe bosses ect. Rather than doing that however, I just added in the two lines Trev supplied, at least until they get the running working perfectly
Reply With Quote
  #14  
Old 06-11-2008, 03:48 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Angelox View Post
- if there were more than on NPC in the brawl, only the last one standing would flee (2 NPCs would stay and fight).
I got something working like this:

When the mob is deciding whether to flee, it looks at the person at the top of it's hate list.

If there are any mobs in that person's hate list which:

Do not con green
Are not feared or fleeing.
Are within aggro range of the player (this is in lieu of checking if they are in melee combat with him, which I don't see can be easily done).

Then the mob won't run. I think I need to add more checks, e.g. don't count mezzed mobs.

As has been mentioned, there is already a check to see if the mob is totally immune to fleeing.

I'll do some more tweaking/testing and add a rule to disable it and probably post it at the weekend.
Reply With Quote
  #15  
Old 06-11-2008, 05:17 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by Derision View Post
I got something working like this:

When the mob is deciding whether to flee, it looks at the person at the top of it's hate list.

If there are any mobs in that person's hate list which:

Do not con green
Are not feared or fleeing.
Are within aggro range of the player (this is in lieu of checking if they are in melee combat with him, which I don't see can be easily done).

Then the mob won't run. I think I need to add more checks, e.g. don't count mezzed mobs.

As has been mentioned, there is already a check to see if the mob is totally immune to fleeing.

I'll do some more tweaking/testing and add a rule to disable it and probably post it at the weekend.
This will work, and thanks - I'm not sure exactly what mobs flee or what mobs didn't, I'm pretty sure skeletons did not, but easy enough to fix - I forgot about the the special attacks option.
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 08:35 PM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3