The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hit speed formula
Author Message
Aimed
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 4 in 3 posts
Joined: Apr 2015
Reputation: 0



Post: #1
Hit speed formula
Hi guys, I've been wondering how does the dex-based hit speed formula works inside the core for NPC's without any weapons.

Could you enlighten me, please?

Thanks in advance,

Aimed
05-14-2015 04:28 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Hit speed formula
The formula was changed recently in the last nightly build:
The old formula was like
SPEEDSCALEFACTOR / ( ( DEX + 100 ) * SPEED )

Where SPEEDSCALEFACTOR had a default value of 15000 (changeable in the sphere.ini) and SPEED was the weapon speed value (higher the number, faster the weapon). I don't remember the wrestling speed value :\
05-14-2015 06:17 AM
Find all posts by this user Like Post Quote this message in a reply
Aimed
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 4 in 3 posts
Joined: Apr 2015
Reputation: 0



Post: #3
RE: Hit speed formula
(05-14-2015 06:17 AM)darksun84 Wrote:  The formula was changed recently in the last nightly build:
The old formula was like
SPEEDSCALEFACTOR / ( ( DEX + 100 ) * SPEED )

Where SPEEDSCALEFACTOR had a default value of 15000 (changeable in the sphere.ini) and SPEED was the weapon speed value (higher the number, faster the weapon). I don't remember the wrestling speed value :\

Could you, please, check the wrestling speed value? Rolleyes
05-14-2015 06:28 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: Hit speed formula
It's 50
05-14-2015 07:46 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #5
RE: Hit speed formula
the old formula is pre-AOS and the new formula is SE, both are quite similar but the SE formula is more accurate and also support INCREASESWINGSPEED property

Code:
//Old pre-AOS formula (default SpeedScaleFactor = 15000)
LOCAL.BaseSpeed = <QVAL (<WEAPON>)? <WEAPON.SPEED> : 50>
LOCAL.SwingSpeed = <eval (<SERV.SpeedScaleFactor> * 10) / (<LOCAL.BaseSpeed> * (<STAM> + 100))>

//New SE formula (default SpeedScaleFactor = 80000)
LOCAL.BaseSpeed = <eval <QVAL (<WEAPON>)? <WEAPON.SPEED> : 50> * (<INCREASESWINGSPEED> + 100) / 100>
LOCAL.SwingSpeed = <eval (<SERV.SpeedScaleFactor> / ((<STAM> + 100) * <LOCAL.BaseSpeed>)) - 2>
IF (<LOCAL.SwingSpeed> < 5)
  LOCAL.SwingSpeed = 5
ENDIF
LOCAL.SwingSpeed = <eval (<LOCAL.SwingSpeed> * 10) / 4>

PS: it uses STAM and not DEX, and this will make the same char using the same weapon have different swing speed based on it's current stamina. So chars with high stamina will have default speed, and low stamina will result slow speeds
05-14-2015 03:40 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
Aimed
Apprentice
*

Posts: 20
Likes Given: 0
Likes Received: 4 in 3 posts
Joined: Apr 2015
Reputation: 0



Post: #6
RE: Hit speed formula
Thank you guys, I really appreciate it.Smile
05-15-2015 06:08 AM
Find all posts by this user Like Post Quote this message in a reply
Lazarus
Master
**

Posts: 352
Likes Given: 11
Likes Received: 7 in 6 posts
Joined: Jun 2012
Reputation: 1

Hybris Ultima Online

Post: #7
RE: Hit speed formula
(05-14-2015 03:40 PM)Coruja Wrote:  the old formula is pre-AOS and the new formula is SE, both are quite similar but the SE formula is more accurate and also support INCREASESWINGSPEED property

Code:
//Old pre-AOS formula (default SpeedScaleFactor = 15000)
LOCAL.BaseSpeed = <QVAL (<WEAPON>)? <WEAPON.SPEED> : 50>
LOCAL.SwingSpeed = <eval (<SERV.SpeedScaleFactor> * 10) / (<LOCAL.BaseSpeed> * (<STAM> + 100))>

//New SE formula (default SpeedScaleFactor = 80000)
LOCAL.BaseSpeed = <eval <QVAL (<WEAPON>)? <WEAPON.SPEED> : 50> * (<INCREASESWINGSPEED> + 100) / 100>
LOCAL.SwingSpeed = <eval (<SERV.SpeedScaleFactor> / ((<STAM> + 100) * <LOCAL.BaseSpeed>)) - 2>
IF (<LOCAL.SwingSpeed> < 5)
  LOCAL.SwingSpeed = 5
ENDIF
LOCAL.SwingSpeed = <eval (<LOCAL.SwingSpeed> * 10) / 4>

PS: it uses STAM and not DEX, and this will make the same char using the same weapon have different swing speed based on it's current stamina. So chars with high stamina will have default speed, and low stamina will result slow speeds

wait a second... it uses the current stamina and not the max stamina?

so

a char with 60/100 stam will hit faster than one with 20/100 stamina?

ex:
60 --> current stamina
100 --> cap stamina

[Image: 2hy9q0y.png]
05-22-2015 01:25 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #8
RE: Hit speed formula
It uses current STAM to calculate the speed
05-22-2015 05:23 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes XuN's post
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)