(Live) Patch #630 - Pet command and AI changes

Official Server Announcement Forums, this forum is for Dawn of Light: Storm the official server related announcements. You may reply to topics created here.

Moderators: Project Admin, Support Team, Database Team, Website Team, Storm Team

(Live) Patch #630 - Pet command and AI changes

Postby Tolakram » Mon Feb 25, 2013 2:26 pm

Storm does not work with any client version past 1.109. You can download the 1.109 DLL here -> http://www.mediafire.com/?763i3ia6j4y3yot

Changes from Tolakram:

- Changed: I re-worked some of the controlled NPC commands to work logically, but I'm not 100% sure it is live like. There was code that prevented a pet from casting defensive spells when told to stay at a location. I removed this because it makes no sense to me. I also changed how a pet will check for spells based on aggression. If a pet is put in aggressive mode it will check for attack and offensive spells first. If no target is in range then the pet will check for defensive spells.

There were no comments in the code related to live like behavior. If any of these changes are inappropriate please let me know and I'll revert the modifications.

Changed code: http://sourceforge.net/p/dolserver/code ... 1f24a:3191
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: (Live) Patch #630 - pet command changes

Postby Tolakram » Mon Feb 25, 2013 4:14 pm

Thanks to help from Etaew and friend it looks like this is a good change, but still not enough.
so my friend used her healing pet on enchanter to test this for me
reports that the pet stops melee, and heals the caster even when in aggressive mode
Sounds like what we are missing is a way to differentiate if a pet is attacking vs being attacked. If just attacking but not being attacked heals should still be checked, but if under attack it is assumed the AI is smart enough not to try and heal.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: (Live) Patch #630 - Pet command and AI changes

Postby svartson » Tue Feb 26, 2013 6:22 pm

I can confirm this behaviour on enchanter.
Aurora Admin(R.I.P.), Argain GM
User avatar
svartson
DOL Novice
 
Posts: 71
Joined: Fri Aug 15, 2008 7:35 am
Location: RLP, Germany

Re: (Live) Patch #630 - Pet command and AI changes

Postby Tolakram » Tue Feb 26, 2013 7:21 pm

Thanks.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: (Live) Patch #630 - pet command changes

Postby Etaew » Thu Feb 28, 2013 10:35 am

Sounds like what we are missing is a way to differentiate if a pet is attacking vs being attacked. If just attacking but not being attacked heals should still be checked, but if under attack it is assumed the AI is smart enough not to try and heal.
GameLiving.LastAttackedByEnemyTick

This stores when the living was lacked attacked by an enemy.

The InCombat check is
Code: Select all
public virtual bool InCombatPvE { get { Region region = CurrentRegion; if (region == null) return false; if (LastCombatTickPvE == 0) return false; //if (LastCombatTickPvE + 10000 - region.Time > 0 && this is GameNPC && (this as GameNPC).Brain is IControlledBrain) // log.Debug(Name + " in combat " + (LastCombatTickPvE + 10000 - region.Time)); return LastCombatTickPvE + 10000 >= region.Time; } }
So we can have a new property for

IsUnderAttack which is
Code: Select all
public virtual bool IsUnderAttack { get { Region region = CurrentRegion; if (region == null) return false; if (LastAttackedByEnemyTick == 0) return false; return LastAttackedByEnemyTick + 3000 >= region.Time; } }
I chose + 3000 because 3 seconds seems like a good number... weapon swing or cast speed?

Code not tested, but could give you an idea of a property you could call in the AI.
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England


Return to “%s” Announcements

Who is online

Users browsing this forum: No registered users and 1 guest