PenUltima Online

It is currently Sun Sep 07, 2008 4:01 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Syshook: AttackDelay
PostPosted: Sun Mar 02, 2008 5:25 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 218
I know mobile.delay_mod exists.

As far as I'm concerned, during combat, if mobile has an opponent, core calculates time to actually do the hit: this delay is based on mobile.delay_mod, weapon's speed, dexterity, at least. What I'm suggesting, is AttackDelayHook, which, if exists, is called every time core is about to do the above calculation. Needed parameters would be attacker and defender. Needless to say, should the script exist, it's return value would be used as delay before the swing (making the core's calculation unnecessary).

Having hook like this would make it easier to create more dynamic combat situations and strategies, like: if you don't move between hits, your delay between hits will slowly decrease. Or, should this be affected by stamina? That could be easily done. Using mobile.delay_mod is possibility, but management of all instances that could affect it's value would soon become hard. What if attacker switched his/her weapon? Drank a dexterity potion? Died? -- Using hook the value would not be needed to be managed in scripts, as it would be re-evaluated every now and then.

This, I understand, would be somewhat CPU intensive hook, but being optional it should not harm no-one - and comparing to attack hook, this should have close to no impact in overall. Still, it would be nice if somehow (config setting?) this could be set to affect PCs only. NPCs would be nice to have but way less important, if so happens that this drains the last cycles out of my CPU.

Is there something wrong in the idea or did I overlook some very special thing? You tell me.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 06, 2008 7:03 am 
Offline

Joined: Sun Feb 05, 2006 4:35 pm
Posts: 160
Location: Poland
I'm waiting for that feature. Reducing Archery delay after moving character would me much easier. Anyway anybody know how to do it?

_________________
Shutdown();


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 11, 2008 2:26 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 8:08 am
Posts: 317
Location: Myrtle Beach, South Carolina
I highly doubt this would effect cpu usage. My attackhook is so damn ridiculously large I sometimes want to slit my wrists because I know I am going to have to eventually rewrite it. But it doesn't effect much cpu usage at all, if any.


Top
 Profile  
 
 Post subject: Re: Syshook: AttackDelay
PostPosted: Thu Aug 21, 2008 4:53 am 
Offline

Joined: Fri Aug 31, 2007 2:25 pm
Posts: 58
ncrsn was talking about his idea in the irc channel some days ago, very good one.

But don't need a syshook to that does it? just a function like => RoundDelay(delay_in_ms) <= is enough in my opinion.

This function could just set the "next swing delay".

But for me there isn't much difference between them, just think a function call would be simpler (for scripters at least) than an syshook.

Anyway, very good ideia, it could be implement.

:smile: :grin:

_________________
Hello from Brazil :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: Google [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl