Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New Stat Regen Doubt
Author Message
Lightsource
Apprentice
*

Posts: 9
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Dec 2013
Reputation: 0



Post: #1
Question 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
Find all posts by this user Like Post Quote this message in a reply
Lightsource
Apprentice
*

Posts: 9
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Dec 2013
Reputation: 0



Post: #2
RE: New Stat Regen Doubt
Changed the CCharact and CCharSkill files, recompiled and now it's fixed ^^

Thanks again.

OBS: In my opinion that change should be in the Revisions, cuz it isnt there explained and still is a big change for a lot of ppl.
(This post was last modified: 01-28-2017 04:54 AM by Lightsource.)
01-28-2017 04:50 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: #3
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
Find all posts by this user Like Post Quote this message in a reply
Lightsource
Apprentice
*

Posts: 9
Likes Given: 2
Likes Received: 1 in 1 posts
Joined: Dec 2013
Reputation: 0



Post: #4
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 Smile
01-28-2017 11:28 PM
Find all posts by this user Like Post Quote this message in a reply
Anarch Cassius
Master
**

Posts: 273
Likes Given: 19
Likes Received: 10 in 9 posts
Joined: Mar 2012
Reputation: 2



Post: #5
RE: New Stat Regen Doubt
Noted.

I guess I'll have to use a less lazy system for temp HP since I am too lazy to maintain by own line for such a small tweak.

Current Projects: Necromancy SCP overhaul. Custom Faction AI/System. Imbuing.
01-29-2017 06:29 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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