Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Life Mana Stam Regen *solved*
Author Message
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #11
RE: Changing Life Regen
OK, I got a little more info on this regen stuff. It'S all messed up, so I will probably do some changes to it in the source

Right now, sphere.ini states that:
// Time in seconds for hitpoint regeneration
Regen0=40

Well that's not really in seconds, it's in tenths of seconds so 40 here is 4 seconds.

Now, for TAG.OVERRIDE.REGEN_0 in this case IT IS in SECONDS but it's not a total override like most people thought it was, it's a modifier to the default ini setting.
So if TAG.OVERRIDE.REGEN_0 = 3 in this case, you take the ini setting of 4 seconds, minus the 3 seconds of the override and your rate is down to 1 sec.
There are also other modifiers to take into account though, like Dex will affect STR regen and food level will affect all regens.
As for TAG.OVERRIDE.REGENVAL_0, this is in fact an override and the value set is the amount of the stat that will regen when it's time to regen.

As for setting it to 100, well, it can't go faster then 1 second. Smile

Is this more clear now?

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
09-14-2013 08:20 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Ben's post
AmpereJoule
Journeyman
*

Posts: 59
Likes Given: 7
Likes Received: 0 in 0 posts
Joined: Dec 2012
Reputation: 0



Post: #12
RE: Changing Life Regen
(09-14-2013 08:20 AM)Ben Wrote:  OK, I got a little more info on this regen stuff. It'S all messed up, so I will probably do some changes to it in the source

Right now, sphere.ini states that:
// Time in seconds for hitpoint regeneration
Regen0=40

Well that's not really in seconds, it's in tenths of seconds so 40 here is 4 seconds.

Now, for TAG.OVERRIDE.REGEN_0 in this case IT IS in SECONDS but it's not a total override like most people thought it was, it's a modifier to the default ini setting.
So if TAG.OVERRIDE.REGEN_0 = 3 in this case, you take the ini setting of 4 seconds, minus the 3 seconds of the override and your rate is down to 1 sec.
There are also other modifiers to take into account though, like Dex will affect STR regen and food level will affect all regens.
As for TAG.OVERRIDE.REGENVAL_0, this is in fact an override and the value set is the amount of the stat that will regen when it's time to regen.

As for setting it to 100, well, it can't go faster then 1 second. Smile

Is this more clear now?


WOW, thank you very much!

But I'm a noob about programming here, so, please explain me how do I do something like:
PHP Code:
[EVENTS E_REGEN]
on=@SkillChange
     TAG
.OVERRIDE.REGEN_0 healing///so, if healing = 100, it will be 20, lets remember that my sphere.ini is "Regen0=210", so 21 - 20 = 1, right?
     
TAG.OVERRIDE.REGENVAL_0 str/100 //when the player gets str=50 will he rocover 1,5 of health?
on=@StatChange
     TAG
.OVERRIDE.REGEN_0 healing///so, if healing = 100, it will be 20, lets remember that my sphere.ini is "Regen0=210", so 21 - 20 = 1, right?
     
TAG.OVERRIDE.REGENVAL_0 str/100 //when the player gets str=50 will he rocover 1,5 of health? 

is it like this:
PHP Code:
[EVENTS E_REGEN]
ON=@SKILLCHANGE
TAG
.OVERRIDE.REGEN_0 <EVAL (<HEALING>/5)>
TAG.OVERRIDE.REGENVAL_0 <EVAL (1) + (<STR>/100)> 
ON=@STATCHANGE
TAG
.OVERRIDE.REGEN_0 <EVAL (<HEALING>/5)>
TAG.OVERRIDE.REGENVAL_0 <EVAL (1) + (<STR>/100)> 
[
eof
??

PS: "Dex will affect STR regen"? You mean, Dex will affect Hits Regen? (forget about the hungry/food)
(This post was last modified: 09-14-2013 08:40 AM by AmpereJoule.)
09-14-2013 08:35 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #13
RE: Changing Life Regen
@Portuguese
Cara, eu te mandei a parada do jeito que você queria, daí você pega e muda e pergunta se tá igual.
Não, não tá igual!

Max X,Y vai retornar o maior valor, logo, se você tem 200 de STR, vai retornar 2 ao invés de 1.
Se você tiver 80 de STR, vai retornar 1 porque 80/100 = 0 para o Sphere.

Não, DEX não afeta o Life Regen, e onde você tirou isso?

Outra coisa, se você quer o valor de algo tem que colocar <> exemplo <HEALING>
Se você quer fazer cálculos, tem que usar <EVAL >
Exemplo: <EVAL <HEALING>/50>
Se você tem operações matemáticas complexas tem que usar () pra dar preferência no quê deve ser calculado primeiro.

Bom, esse último código que você botou aí não tem NADA a ver com o que você quer... vai entender...

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-14-2013 10:05 AM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #14
RE: Changing Life Regen
PHP Code:
[EVENTS E_REGEN]
ON=@SKILLCHANGE
//This is what you need here (100 in skills is actually 1000)
//No need to set the other tag since it's not affected by the healing skill
TAG.OVERRIDE.REGEN_0 = <EVAL (<HEALING>/50)> //20 @100 healing

ON=@STATCHANGE
//This is what you need here if you want a set number to increase (no random gain is possible this way)
//No need to set the other tag since it's not affected by STR
TAG.OVERRIDE.REGENVAL_0 <EVAL + (<STR>/10)>// 11 @ 100 STR 

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
09-14-2013 10:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
AmpereJoule
Journeyman
*

Posts: 59
Likes Given: 7
Likes Received: 0 in 0 posts
Joined: Dec 2012
Reputation: 0



Post: #15
RE: Changing Life Regen
@Portuguese
ô doidcho! Agora que tu fala que é br doidcho! Vlw doidcho!

(09-14-2013 10:05 AM)Extreme Wrote:  @Portuguese
Cara, eu te mandei a parada do jeito que você queria, daí você pega e muda e pergunta se tá igual.
Não, não tá igual!

Max X,Y vai retornar o maior valor, logo, se você tem 200 de STR, vai retornar 2 ao invés de 1.
Se você tiver 80 de STR, vai retornar 1 porque 80/100 = 0 para o Sphere.
Pois é, seu código ficou confuso pra mim! Não saquei nada daqueles ARGV.

Não, DEX não afeta o Life Regen, e onde você tirou isso?
foi o cara que falou ali em cima doidcho.

Outra coisa, se você quer o valor de algo tem que colocar <> exemplo <HEALING>
Se você quer fazer cálculos, tem que usar <EVAL >
Exemplo: <EVAL <HEALING>/50>
Se você tem operações matemáticas complexas tem que usar () pra dar preferência no quê deve ser calculado primeiro.
OPA! VLW!! Mas pode me explicar aqueles IF com os ARGV? Pode ser por PM!

Bom, esse último código que você botou aí não tem NADA a ver com o que você quer... vai entender...
A sim, é que depois do que o Ben falou, eu percebi que seria mais simples colocar o Regen0 = 210, daí era só eu fazer o TAG.OVERRIDE.REGEN_0 ser 20 no maximo, que daí ficaria 21-20=1[segundo]

hey, it is not healing --', I am testing using my ADMIN Account.

My sphere.ini is:
PHP Code:
...
//Events related to all players
EventsPlayer=e_meu_regen
... 

My "spheretables.scp":
PHP Code:
...
scripts/sphere_events_human.scp
... 

And I added these lines ot my "sphere_events_human.scp":
PHP Code:
[EVENTS e_meu_regen]
ON=@SKILLCHANGE
TAG
.OVERRIDE.REGEN_0 <EVAL (<HEALING>/50)> //Regen0 = 210, formula eh Regen0/10 - OVERRIDE.REGEN_0 e as skills sao 1000, por isso o div por 50
ON=@STATCHANGE
TAG
.OVERRIDE.REGENVAL_0 <EVAL + (<STR>/10)> 

ps: my healing is 1000 and my str is 500
(This post was last modified: 09-14-2013 12:09 PM by AmpereJoule.)
09-14-2013 11:56 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #16
Re: RE: Changing Life Regen
(09-14-2013 11:56 AM)AmpereJoule Wrote:  @Portuguese
ô doidcho! Agora que tu fala que é br doidcho! Vlw doidcho!

(09-14-2013 10:05 AM)Extreme Wrote:  @Portuguese
Cara, eu te mandei a parada do jeito que você queria, daí você pega e muda e pergunta se tá igual.
Não, não tá igual!

Max X,Y vai retornar o maior valor, logo, se você tem 200 de STR, vai retornar 2 ao invés de 1.
Se você tiver 80 de STR, vai retornar 1 porque 80/100 = 0 para o Sphere.
Pois é, seu código ficou confuso pra mim! Não saquei nada daqueles ARGV.

Não, DEX não afeta o Life Regen, e onde você tirou isso?
foi o cara que falou ali em cima doidcho.

Outra coisa, se você quer o valor de algo tem que colocar <> exemplo <HEALING>
Se você quer fazer cálculos, tem que usar <EVAL >
Exemplo: <EVAL <HEALING>/50>
Se você tem operações matemáticas complexas tem que usar () pra dar preferência no quê deve ser calculado primeiro.
OPA! VLW!! Mas pode me explicar aqueles IF com os ARGV? Pode ser por PM!

Bom, esse último código que você botou aí não tem NADA a ver com o que você quer... vai entender...
A sim, é que depois do que o Ben falou, eu percebi que seria mais simples colocar o Regen0 = 210, daí era só eu fazer o TAG.OVERRIDE.REGEN_0 ser 20 no maximo, que daí ficaria 21-20=1[segundo]

hey, it is not healing --', I am testing using my ADMIN Account.

My sphere.ini is:
PHP Code:
...
//Events related to all players
EventsPlayer=e_meu_regen
... 

My "spheretables.scp":
PHP Code:
...
scripts/sphere_events_human.scp
... 

And I added these lines ot my "sphere_events_human.scp":
PHP Code:
[EVENTS e_meu_regen]
ON=@SKILLCHANGE
TAG
.OVERRIDE.REGEN_0 <EVAL (<HEALING>/50)> //Regen0 = 210, formula eh Regen0/10 - OVERRIDE.REGEN_0 e as skills sao 1000, por isso o div por 50
ON=@STATCHANGE
TAG
.OVERRIDE.REGENVAL_0 <EVAL + (<STR>/10)> 

ps: my healing is 1000 and my str is 500

Its right now,but you want to regen 6 hits per second?

Sent from my MB860 using Tapatalk 2

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-14-2013 02:17 PM
Find all posts by this user Like Post Quote this message in a reply
AmpereJoule
Journeyman
*

Posts: 59
Likes Given: 7
Likes Received: 0 in 0 posts
Joined: Dec 2012
Reputation: 0



Post: #17
RE: Changing Life Regen
(09-14-2013 02:17 PM)Extreme Wrote:  ...

Its right now,but you want to regen 6 hits per second?

Sent from my MB860 using Tapatalk 2


Actually I want to regen 6 per second, 7, 8,..., 50,...
Just for testing it.

And it is not regenerating.
(This post was last modified: 09-14-2013 02:49 PM by AmpereJoule.)
09-14-2013 02:49 PM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #18
RE: Changing Life Regen
You do realise that the override tags are only being set/changed when a stat or skill is changed with normal skill and stat gain.

Maybe you should originally set the tags under the @Login trigger first

ON=@Login
TAG.OVERRIDE.REGEN_0 <EVAL (<HEALING>/50)>
TAG.OVERRIDE.REGENVAL_0 <EVAL 1 + (<STR>/10)>

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
09-14-2013 10:38 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
AmpereJoule
Journeyman
*

Posts: 59
Likes Given: 7
Likes Received: 0 in 0 posts
Joined: Dec 2012
Reputation: 0



Post: #19
RE: Changing Life Regen
Final solution:

Knowing that the stats max is 800.


in "Sphere.ini" I put:
Code:
// Time in seconds for hitpoint regeneration
Regen0=21

// Time in seconds for mana regeneration
Regen1=21

// Time in seconds for stamina regeneration
Regen2=21


I created an event (in the end of "sphere_events_human.scp"):
Code:
[EVENTS e_meu_regen]
ON=@Login
TAG.OVERRIDE.REGEN_0 <EVAL (<HEALING>/50)> //Regen0 = 21, formula eh Regen0 - OVERRIDE.REGEN_0 e as skills sao 1000, por isso o div por 50
TAG.OVERRIDE.REGENVAL_0 <EVAL 1 + (<STR>/300)>
TAG.OVERRIDE.REGEN_1 <EVAL (<MEDITATION>/50)>
TAG.OVERRIDE.REGENVAL_1 <EVAL 1 + (<INT>/300)>
TAG.OVERRIDE.REGEN_2 <EVAL (<HIDING>/50)>
TAG.OVERRIDE.REGENVAL_2 <EVAL 1 + (<DEX>/300)>


ON=@SKILLCHANGE
TAG.OVERRIDE.REGEN_0 <EVAL (<HEALING>/50)>
TAG.OVERRIDE.REGEN_1 <EVAL (<MEDITATION>/50)>
TAG.OVERRIDE.REGEN_2 <EVAL (<HIDING>/50)>

ON=@STATCHANGE
TAG.OVERRIDE.REGENVAL_0 <EVAL 1 + (<STR>/300)>
TAG.OVERRIDE.REGENVAL_1 <EVAL 1 + (<INT>/300)>
TAG.OVERRIDE.REGENVAL_2 <EVAL 1 + (<DEX>/300)>


back to "Sphere.ini" I add:
Code:
//Events related to all players
EventsPlayer=e_meu_regen //and others events

Now the players can have 1 or 2 regen per second Smile

Thank you very much guys /o/
05-06-2015 11:09 PM
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: #20
RE: Changing Life Mana Stam Regen *solved*
FYI, this won't work in newest builds: tag.override.regen_x was changed to RegenHits/Stam/Mana and tag.override.regenval_x to RegenHitsVal,RegenManaVal and RegenStamVal.
05-07-2015 04:21 PM
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)