a few problems with standardmobbrain

Discussions on various DOL development features

Moderator: Support Team

a few problems with standardmobbrain

Postby ontheDOL » Sun Mar 05, 2017 7:19 pm

a few problems i see with the brain which have big impact is how easy it is to exploit a mob at their maxdistance.

doing tests, you can pull mob to what his maxdistance range is. On next think cycle, he will see he is max distance from spawn and turn around to go home. Then you can attack him again, he turn to chase you. then next think cycle he see he is max distance from spawn and turn around to go home.
So you can sit there( easy as caster) and nuke/kill the mob as he comes back and forth confused.

Tether range also appears to do nothing. Mob will always chase you to what his max distance is. tether set to 1000, max distance 3000, mob chase you to 3000. Even if you sprint after first hit, and mob is out of attack range. this is the code
Code: Select all
if (Body.IsOutOfTetherRange && !Body.InCombat) { Body.WalkToSpawn(); return; }
Something is wrong here in Body.InCombat, where mob will always think its in combat even if its last attack on you was 20seconds ago.

I think a mobs MaxDistance should be, the max distance it will chase you on that attack cycle. For example, mob max range is 2000, you attack/aggro mob, it will chase you for 2000 units before giving up, if you reaggro mob on his way home, he will chase you for another 2000 before deciding to go home. I remember this was similar to how it was on Live servers.
Epic mobs can ofcourse just override this too prevent kiting them somewhere.

anyway just some thoughts. I will be trying to modify this a bit to make it more desirable, instead of killing mobs without risk of death :)
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: a few problems with standardmobbrain

Postby PlanarChaosRvrtwo » Sun Mar 05, 2017 8:29 pm

If you remove range from the mobs they work like its meant to be
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: a few problems with standardmobbrain

Postby ontheDOL » Sun Mar 05, 2017 8:32 pm

range as in maxdistance? if mob has 0 as maxdistance, he will chase you forever and not turn around, that is not livelike
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: a few problems with standardmobbrain

Postby PlanarChaosRvrtwo » Sun Mar 05, 2017 8:50 pm

He only chase you forever if you dont escape his melee range and wait 20 seconds (if they not changed the code^^)
and yes meant distance not range.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: a few problems with standardmobbrain

Postby ontheDOL » Sun Mar 05, 2017 8:57 pm

you clearly have not tested this, test then come back and tell me im wrong :)
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: a few problems with standardmobbrain

Postby PlanarChaosRvrtwo » Sun Mar 05, 2017 10:00 pm

i tested it but it were a few revisions before so i need retest^^
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: a few problems with standardmobbrain

Postby ontheDOL » Sun Mar 05, 2017 10:08 pm

here is a short video i made showing the two problems
sorry for quality, filmed on phone because laptop is too slow to run capture software.

The first minute is me on Storm RvR on a lvl 1 cabby exploiting a red con puny skeleton with a maxdistance set

the rest of video is on my server, making a mob with tether set to 500, maxdistance set to 0. Show mob chasing me into oblivion without it ever hitting me for over a minute.
https://youtu.be/BdCx-fZq4iM again, sorry for quality but you can see whats happening

not sure what revision you talking about becuz i dont think SMB has been changed for years
if it was on a shard, then they probably edited the brain.
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: a few problems with standardmobbrain

Postby PlanarChaosRvrtwo » Sun Mar 05, 2017 11:04 pm

correct tested it it dont work anymore but i gonna ask an old admin friend to share his script with me soon as i see him again if he share i upload it
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: a few problems with standardmobbrain

Postby ontheDOL » Mon Mar 06, 2017 9:38 pm

so i did some looking and there is this code in GameNPC.cs which looks like what you were talking about, but for some reason is not working.
Code: Select all
if (this.Brain is StandardMobBrain) { StandardMobBrain brain = this.Brain as StandardMobBrain; //if the npc hasn't hit or been hit in a while, stop following and return home if (!(Brain is IControlledBrain)) { if (AttackState && brain != null && followLiving != null) { long seconds = 20 + ((brain.GetAggroAmountForLiving(followLiving) / (MaxHealth + 1)) * 100); long lastattacked = LastAttackTick; long lasthit = LastAttackedByEnemyTick; if (CurrentRegion.Time - lastattacked > seconds * 1000 && CurrentRegion.Time - lasthit > seconds * 1000) { //StopFollow(); Notify(GameNPCEvent.FollowLostTarget, this, new FollowLostTargetEventArgs(followTarget)); //brain.ClearAggroList(); this.WalkToSpawn(); return 0; } } }
I will play around with the maths here and see if it can work
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: a few problems with standardmobbrain

Postby PlanarChaosRvrtwo » Mon Mar 06, 2017 10:53 pm

one line wonder me a bit:
long seconds = 20 + ((brain.GetAggroAmountForLiving(followLiving) / (MaxHealth + 1)) *

is it possile that the +1 is outdated?
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: a few problems with standardmobbrain

Postby ontheDOL » Tue Mar 07, 2017 1:26 am

i think you are right something here is odd. I tried putting a flat value here ( basically it is just seconds) If i put a value under 10( i tried 5 and 9). The mob turned around after 5 seconds of not attack. after 9 seconds on the 9 test. If I put a value of 10 or more, mob will just chase you forever no matter how long out of combat.... not sure why more than 10 seconds breaks the code it seems.
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: a few problems with standardmobbrain

Postby PlanarChaosRvrtwo » Tue Mar 07, 2017 2:18 am

If more then 10 seconds is an issue i think its couse of bugged region time:
if (CurrentRegion.Time - lastattacked > seconds * 1000 && CurrentRegion.Time - lasthit >
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: a few problems with standardmobbrain

Postby ontheDOL » Tue Mar 07, 2017 6:31 am

it looks like it should be an easy fix , but i cant figure it out why more that 10 causes problem. pretty much the same values are called in the /quit command to get the time to quit time after combat, but no issues there.

it also seems odd to me that we have a separate timer in the code for pvp combat and pve combat. i thought that most timers, as far as using an ability (MCL for example) all use a combat timer, which is the same pvp and pve. So to me we only need one timer but i could be wrong
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: a few problems with standardmobbrain

Postby PlanarChaosRvrtwo » Tue Mar 07, 2017 6:35 am

pve quit ld log timer is only reason reason for diffrence.
but ofc its maybe bugged region timer couse i got 21 issues on my server all based to region timer
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: a few problems with standardmobbrain

Postby ontheDOL » Tue Mar 07, 2017 6:47 am

oh pve and pvp quit timer is different? ok i didnt know that.
Looking at the code it seems kinda confusing with these different combat timers, but im a noob so that doesnt help,

also with the tether code, removing the "!body.incombat" check sends the mob home at the set tether distance. So it does seem there is problem with combat timers and mob maybe being permanently "incombat"
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest