View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002520SphereServerexecutable - genericpublic21-06-15 14:4327-06-15 12:45
ReporterShinaa 
Assigned ToXuN 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformWindowsOSWin7OS Version
Product Version 
Target VersionFixed in Version0.56c Nightly 
Summary0002520: AttackSpeed not affected by DEX but by STAM
DescriptionSetting DEX to 1 or 1000 does not affect attackspeed the slightest, while changing STAM will increase or decrease attackspeed the way DEX should.
Steps To ReproduceSet 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.
Additional InformationScript 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
TagsNo tags attached.
Nightly VersionAutomated (specify build number)
Experimental FlagsScript_Profiler, Size_Optimise, DamageTools
Option FlagsFileCommands, NoHouseMuteSpeech, NoPrefix
Internal Build Number2349
Attached Files

- Relationships

-  Notes
(0002848)
XuN (developer)
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 (reporter)
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 (reporter)
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 (developer)
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.


- Issue History
Date Modified Username Field Change
21-06-15 14:43 Shinaa New Issue
22-06-15 20:35 XuN Note Added: 0002848
23-06-15 16:35 Shinaa Note Added: 0002856
23-06-15 20:10 Rizz Note Added: 0002859
27-06-15 10:00 XuN Note Added: 0002874
27-06-15 10:04 XuN Note Edited: 0002874 View Revisions
27-06-15 12:45 XuN Status new => resolved
27-06-15 12:45 XuN Fixed in Version => 0.56c Nightly
27-06-15 12:45 XuN Resolution open => fixed
27-06-15 12:45 XuN Assigned To => XuN


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker