SphereServer BugTracker - SphereServer
View Issue Details
0002520SphereServerexecutable - genericpublic21-06-15 14:4327-06-15 12:45
Shinaa 
XuN 
normalmajoralways
resolvedfixed 
WindowsWin7
 
0.56c Nightly 
Automated (specify build number)
Script_Profiler, Size_Optimise, DamageTools
FileCommands, NoHouseMuteSpeech, NoPrefix
2349
0002520: AttackSpeed not affected by DEX but by STAM
Setting DEX to 1 or 1000 does not affect attackspeed the slightest, while changing STAM will increase or decrease attackspeed the way DEX should.
Set Dex to 1000, set Stam to 20 -> Slow attack
Set Dex to 1, set Stam to 100 -> Fast attack
MaxStam does not matter, just your current Stam, exactly the way DEX should.
Script used to measure delay between hits:
ON=@HIT
    IF (<TAG0.MyHit>)
        SAY Speed: <FVAL <SERV.TIME>-<TAG0.MyHit>>
        TAG.MyHit=<SERV.TIME>
    ELSE
        TAG.MyHit=<SERV.TIME>
    ENDIF
No tags attached.
Issue History
21-06-15 14:43ShinaaNew Issue
22-06-15 20:35XuNNote Added: 0002848
23-06-15 16:35ShinaaNote Added: 0002856
23-06-15 20:10RizzNote Added: 0002859
27-06-15 10:00XuNNote Added: 0002874
27-06-15 10:04XuNNote Edited: 0002874bug_revision_view_page.php?bugnote_id=0002874#r876
27-06-15 12:45XuNStatusnew => resolved
27-06-15 12:45XuNFixed in Version => 0.56c Nightly
27-06-15 12:45XuNResolutionopen => fixed
27-06-15 12:45XuNAssigned To => XuN

Notes
(0002848)
XuN   
22-06-15 20:35   
http://uo.stratics.com/content/arms-armor/combat.php [^]

Speed should be based on STAM and not in DEX, if you want anything related to combat changed just tweak it in sphere_combat.scp
(0002856)
Shinaa   
23-06-15 16:35   
Well pretty sure sphere always had it on DEX and the formula for it on wiki says DEX and nowhere in the revions does it state it was changed to STAM, nor does it state anywhere what the actual formula is, but looking at the linked table the values don't match sphere values anyway.
(0002859)
Rizz   
23-06-15 20:10   
I think would be nice add a new option in sphere.ini to decide if use STAM over DEX.
Something like:

swingbasedon=1 or 2 (1 dex, 2 stam)
(0002874)
XuN   
27-06-15 10:00   
(edited on: 27-06-15 10:04)
It was changed in rev 2270, May 10th, i'll update wiki too.

Here is the formula so you can change it and mod without a problem :)

if (<brain> == BRAIN_GUARD)
    argn1=1
    return 0
endif
local.iBaseSpeed = 50 //Wrestling speed
local.iSwingSpeedIncrease = <INCREASESWINGSPEED>
if ( <weapon> )
    local.iBaseSpeed = <weapon.tag0.OVERRIDE.SPEED>
    if ( local.iBaseSpeed <= 0)
        local.iBaseSpeed = <weapon.speed>
    endif
endif
// ML formula (doesn't use m_iSpeedScaleFactor and it's only compatible with ML speed format eg. 0.25 ~ 5.00 instead 0 ~ 50)
// NOTE: This formula is not being used.
// local.iSwingSpeed = ((<local.iBaseSpeed> * 4) - (<stam> / 30)) * (100 / (100 + <local.iSwingSpeedIncrease>))
// if ( <local.iSwingSpeed> < 5 )
    // local.iSwingSpeed = 5
// local.iSwingSpeed = (local.iSwingSpeed * 10) / 4
// argn1 = <local.iSwingSpeed>
// return 0

// SE formula (default m_iSpeedScaleFactor = 80000)
local.iSwingSpeed = maximum(1, <local.iBaseSpeed> * (100 + <local.iSwingSpeedIncrease>) / 100)
local.iSwingSpeed = (<serv.SpeedScaleFactor> / ((<stam> + 100) * <local.iSwingSpeed>)) - 2
if ( <local.iSwingSpeed> < 5 )
    <local.iSwingSpeed> = 5
local.iSwingSpeed = (<local.iSwingSpeed> * 10) / 4
argn1 <local.iSwingSpeed>
return 0


*I just converted it from source to script, it may have some missing brackets or not working 100%, but the code and formulas are these.