07-17-2020, 04:50 PM
So this has been bothering me for a long time now.. so much so, that I’m calling out to you guys for any help or insight.
For my project I’m wanting to add two stats that work just like SP, namely STM and MP.
I found out adding the first (STM) was quite easy, I just replaced the names with “SP” in the script with “STM”, also since I am not interested in a stat called “SP”.
With it I added a nice green STM-bar as a visual indicator which I’ve found a code for.
Now for the MP stat it seems a lot harder.
I had to make a whole new stat that does not exist in the database.
However this seems at least partly possible. With help of Kitsune's Extra Statistics I managed to add MP, but here comes the problem: I cannot figure out how to define a minimal and maximum amount for MP to make it work like SP.
I now have a MP stat that works more like a fixed stat such as STR or INT.
My best guess is the code below has to be modified somehow?
Does anyone know how to make it work with a bar and that can be used up using skills, just like SP?
I’m very much a Rubyscript noob so after trying different things I am clueless
For my project I’m wanting to add two stats that work just like SP, namely STM and MP.
I found out adding the first (STM) was quite easy, I just replaced the names with “SP” in the script with “STM”, also since I am not interested in a stat called “SP”.
With it I added a nice green STM-bar as a visual indicator which I’ve found a code for.
Now for the MP stat it seems a lot harder.
I had to make a whole new stat that does not exist in the database.
However this seems at least partly possible. With help of Kitsune's Extra Statistics I managed to add MP, but here comes the problem: I cannot figure out how to define a minimal and maximum amount for MP to make it work like SP.
I now have a MP stat that works more like a fixed stat such as STR or INT.
My best guess is the code below has to be modified somehow?
Code:
def maxmp
n = [[base_maxmp + @mp_plus, 1].max, 999].min
for i in @states
n *= XTRA_STATS_RATE[i][0] / 100.0
end
n = [[Integer(n), 1].max, 999].min
return n
end
Does anyone know how to make it work with a bar and that can be used up using skills, just like SP?
I’m very much a Rubyscript noob so after trying different things I am clueless