Lightsource
Apprentice
Posts: 9
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Dec 2013
Reputation: 0
|
New Stat Regen Doubt
Hello!
I'm coming from using a build of Sphere 56b from 2012 to Sphere 56d Nightly and I'm having issues with this new Stats Regen thing.
Before when the player had HITS = 120 and MAXHITS = 100, it would go down one hitpoint per tick, I'm guessing from here at CCharact (56b):
Code:
{
EXC_SET(g_Stat_Name[i]);
m_Stat[i].m_regen += iTimeDiff; (...)
But now when the player goes Hits > Maxhits, at the next regen his HITS will go HITS = MAXHITS at once.
The thing is that in @RegenStat it says this:
Quote:Local.StatLimit: Stats over this value will go down in each tick until they reach their limit.
the word Until suggests that it will go down in a linear regression, not all at once. Am I mistaken?
If so, how can I make it go down slowly and not that fast?
The reason I'm asking this is because we have a potion called Life Boost that gives you a Boost in your HPs. I don't want to softcode the entire system cuz this item is widely used here and it would cost my server a lot of processing...
Thanks in advance
edit: I'm guessing this is the place where this happens that didn't existed before: CCharSkill
(This post was last modified: 01-27-2017 11:27 PM by Lightsource.)
|
|
01-27-2017 10:51 PM |
|
|
Coruja
Sphere Developer
Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7
Dimension Shard
|
RE: New Stat Regen Doubt
this is considered an bugfix rather than an "new change", as already documented on changelog:
Code:
17-06-2015, Coruja
...
Fixed: Properties like STR/ModSTR/MaxHits/etc making the char have current status value > max allowed value when the status got lowered.
the correct UO behavior is never allow the current status value be higher than its maximum value. Previously sphere was allowing values higher than max value, but on 56c it got fixed and now if the max value get decreased, sphere will decrease the current value too to prevent "CurrentValue > MaxValue"
anyway, this fix can be easily changed manually on source, just take a look on CCharSkill.cpp, functions CChar::Stat_AddMod(), CChar::Stat_SetMod(), CChar::Stat_SetMax() and CChar::Stat_SetBase()
PS: just don't forget to change the build type from "Nightly/Release" to "Local" on the compiler, because nightly/release builds are reserved for official builds and should not be used on non-official builds with custom changes. Instead, "Local" builds must be used for this purpose to clearly display to players that the server is running using an local (custom) source code
(This post was last modified: 01-28-2017 04:13 PM by Coruja.)
|
|
01-28-2017 04:04 PM |
|
|
Lightsource
Apprentice
Posts: 9
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Dec 2013
Reputation: 0
|
RE: New Stat Regen Doubt
(01-28-2017 04:04 PM)Coruja Wrote: this is considered an bugfix rather than an "new change", as already documented on changelog:
Code:
17-06-2015, Coruja
...
Fixed: Properties like STR/ModSTR/MaxHits/etc making the char have current status value > max allowed value when the status got lowered.
the correct UO behavior is never allow the current status value be higher than its maximum value. Previously sphere was allowing values higher than max value, but on 56c it got fixed and now if the max value get decreased, sphere will decrease the current value too to prevent "CurrentValue > MaxValue"
anyway, this fix can be easily changed manually on source, just take a look on CCharSkill.cpp, functions CChar::Stat_AddMod(), CChar::Stat_SetMod(), CChar::Stat_SetMax() and CChar::Stat_SetBase()
PS: just don't forget to change the build type from "Nightly/Release" to "Local" on the compiler, because nightly/release builds are reserved for official builds and should not be used on non-official builds with custom changes. Instead, "Local" builds must be used for this purpose to clearly display to players that the server is running using an local (custom) source code
I see, i would not be able to deduce from that line of the changelog that this bugfix meant that, talking in practical effects.
Thanks for your reply and enlightenment !! I Appreciate your time
|
|
01-28-2017 11:28 PM |
|
|