Difference between revisions of "Talk:FStatsHealthLevelMult"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Inbredmonkey
imported>DragoonWraith
(the problem wasn't the formula, it was the use of C++ to display the formula)
Line 2: Line 2:




DragoonWraith: Your formula is wrong and misleading. (Health is not retroactive.)
:DragoonWraith: Your formula is wrong and misleading. (Health is not retroactive.)


I used C++ cause I wanted to make sure my formulas were correct and didn't want this troublesome mess of a formula to be my first attempt at scripting. The only thing c++ about it are the assignments, data type declarations, and possibly the % operator.
:I used C++ cause I wanted to make sure my formulas were correct and didn't want this troublesome mess of a formula to be my first attempt at scripting. The only thing c++ about it are the assignments, data type declarations, and possibly the % operator.


>>"makes it difficult to find the desired information"
>>"makes it difficult to find the desired information"
huh?
:huh?


Explaination of my formula, with modulus removed.
:Explaination of my formula, with modulus removed.
You can do it all in one formula, but it gets really confusing.
:You can do it all in one formula, but it gets really confusing.




First we calculate how many levels we need to get the highest possible multiplier
:First we calculate how many levels we need to get the highest possible multiplier
this should be rounded down to the nearest integer
this should be rounded down to the nearest integer




max_levels = (current_endurance - starting_endurance) / iLevelUp10Mult
:max_levels = (current_endurance - starting_endurance) / iLevelUp10Mult




Next we calculate the attibute gain that is left over (one more level where we gain less than the highest multiplier)
:Next we calculate the attibute gain that is left over (one more level where we gain less than the highest multiplier)




partial_level_amt = (current_endurance - starting_endurance) - iLevelUp10Mult * max_levels
:partial_level_amt = (current_endurance - starting_endurance) - iLevelUp10Mult * max_levels




We also need to find out how many levels we aren't getting the highest multiplier.
:We also need to find out how many levels we aren't getting the highest multiplier.




remaining_levels = current_level - 1 - max_levels
:remaining_levels = current_level - 1 - max_levels




This is how much health we would have if we got the highest endurance multipliers every level untill reaching the current endurance.
:This is how much health we would have if we got the highest endurance multipliers every level untill reaching the current endurance.




max_max_health = (current_endurance * 2) + (FStatsHealthLevelMult *
:max_max_health = (current_endurance * 2) + (FStatsHealthLevelMult *
(((current_level - 1) * starting_endurance) +
(((current_level - 1) * starting_endurance) +
(iLevelUp10Mult * (max_levels + 1) * max_levels / 2) +
(iLevelUp10Mult * (max_levels + 1) * max_levels / 2) +
Line 41: Line 41:




And a breakdown of the components:
:And a breakdown of the components:




the retroactive part: (current_endurance * 2)
:the retroactive part: (current_endurance * 2)


This part is self explanatory, but the rest needs to be un-factored into 3 parts to be explained.
:This part is self explanatory, but the rest needs to be un-factored into 3 parts to be explained.




This is the per-level health gain from your starting endurance:
:This is the per-level health gain from your starting endurance:




FStatsHealthLevelMult * (((current_level - 1) * starting_endurance)
:FStatsHealthLevelMult * (((current_level - 1) * starting_endurance)




This is the health gained from levels while maxing endurance. For those of you who know how to sum series, you should see it is the summation of FStatsHealthLevelMult * iLevelUp10Mult * i where i goes from 1 to max_levels.
:This is the health gained from levels while maxing endurance. For those of you who know how to sum series, you should see it is the summation of FStatsHealthLevelMult * iLevelUp10Mult * i where i goes from 1 to max_levels.




FStatsHealthLevelMult * (iLevelUp10Mult * (max_levels + 1) * max_levels / 2)
:FStatsHealthLevelMult * (iLevelUp10Mult * (max_levels + 1) * max_levels / 2)




This is the per-level health gain from the difference between your starting and current endurance over the levels where you should have it makes:
:This is the per-level health gain from the difference between your starting and current endurance over the levels where you should have it makes:




FStatsHealthLevelMult * ((current_endurance - starting_endurance)*remaining_levels))
:FStatsHealthLevelMult * ((current_endurance - starting_endurance)*remaining_levels))




Another thing to consider is how much health we would have if we waited as long as possible before raising endurance.
:Another thing to consider is how much health we would have if we waited as long as possible before raising endurance.




min_max_health = (current_endurance * 2) + (FStatsHealthLevelMult *
:min_max_health = (current_endurance * 2) + (FStatsHealthLevelMult *
(((current_level - 1) * starting_endurance) +
(((current_level - 1) * starting_endurance) +
(iLevelUp10Mult * (max_levels + 1) * max_levels / 2) +
(iLevelUp10Mult * (max_levels + 1) * max_levels / 2) +
Line 76: Line 76:




I am not going to fully explain the terms, but basically, now you assume the levels where you weren't raising your endurance happened all at your starting endurance instead of your max endurance.
:I am not going to fully explain the terms, but basically, now you assume the levels where you weren't raising your endurance happened all at your starting endurance instead of your max endurance.




I really wanted to make a retroactive health mod, but there is no elegant way to do it, mostly due to the fact that there is no easy way to get the player's starting endurance, also it is hard to get the health to update only when it is supposed to.
:I really wanted to make a retroactive health mod, but there is no elegant way to do it, mostly due to the fact that there is no easy way to get the player's starting endurance, also it is hard to get the health to update only when it is supposed to.




Use my formula or don't use my formula, I don't care, just don't leave your incorrect formula on this site.
:Use my formula or don't use my formula, I don't care, just don't leave your incorrect formula on this site. --[[User:InbredMonkey|InbredMonkey]]
 
::Not "my" formula, I just put it back to whatever it was before. If that is wrong, it needs fixing. My issue was not in the formula (as I don't know the formula), but with the presentation. A C++ (or any other) program is not desired, because it is more difficult to read than ordinary math, and we would not want one to have to run the code through a compiler and run it. This sort of thing should not be in ObliviScript, C++, or anything else, it should be in math. The goal is for people who come here to understand exactly how FStatsHealthLevelMult is used by the game - simply laying out the formula is what needs to be done. I'll go through what you've posted here, and update the article as necessary, when I get the chance.
 
::You are, of course, welcome to do so yourself if you wish to. --[[User:DragoonWraith|DragoonWraith]] 10:26, 24 May 2006 (EDT)

Revision as of 09:26, 24 May 2006

INBREDMONKEY: Formulae are provided so that we can figure out how these variables are used, not to calculate them. Why would we want a C++ program for this? That's irrelevent and makes it difficult to find the desired information. Furthermore, distributing programs to the unknowing masses (assuming they manage to compile it) could be very dangerous - I haven't read your code, though I assume it was clean, but it could easily have been malicious. Therefore, no programs ought to be distributed this way through the Wiki.--DragoonWraith 01:45, 16 May 2006 (EDT)


DragoonWraith: Your formula is wrong and misleading. (Health is not retroactive.)
I used C++ cause I wanted to make sure my formulas were correct and didn't want this troublesome mess of a formula to be my first attempt at scripting. The only thing c++ about it are the assignments, data type declarations, and possibly the % operator.

>>"makes it difficult to find the desired information"

huh?
Explaination of my formula, with modulus removed.
You can do it all in one formula, but it gets really confusing.


First we calculate how many levels we need to get the highest possible multiplier

this should be rounded down to the nearest integer


max_levels = (current_endurance - starting_endurance) / iLevelUp10Mult


Next we calculate the attibute gain that is left over (one more level where we gain less than the highest multiplier)


partial_level_amt = (current_endurance - starting_endurance) - iLevelUp10Mult * max_levels


We also need to find out how many levels we aren't getting the highest multiplier.


remaining_levels = current_level - 1 - max_levels


This is how much health we would have if we got the highest endurance multipliers every level untill reaching the current endurance.


max_max_health = (current_endurance * 2) + (FStatsHealthLevelMult *

(((current_level - 1) * starting_endurance) + (iLevelUp10Mult * (max_levels + 1) * max_levels / 2) + ((current_endurance - starting_endurance) * remaining_levels)))


And a breakdown of the components:


the retroactive part: (current_endurance * 2)
This part is self explanatory, but the rest needs to be un-factored into 3 parts to be explained.


This is the per-level health gain from your starting endurance:


FStatsHealthLevelMult * (((current_level - 1) * starting_endurance)


This is the health gained from levels while maxing endurance. For those of you who know how to sum series, you should see it is the summation of FStatsHealthLevelMult * iLevelUp10Mult * i where i goes from 1 to max_levels.


FStatsHealthLevelMult * (iLevelUp10Mult * (max_levels + 1) * max_levels / 2)


This is the per-level health gain from the difference between your starting and current endurance over the levels where you should have it makes:


FStatsHealthLevelMult * ((current_endurance - starting_endurance)*remaining_levels))


Another thing to consider is how much health we would have if we waited as long as possible before raising endurance.


min_max_health = (current_endurance * 2) + (FStatsHealthLevelMult *

(((current_level - 1) * starting_endurance) + (iLevelUp10Mult * (max_levels + 1) * max_levels / 2) + (partial_level_amt * (max_levels + 1))))


I am not going to fully explain the terms, but basically, now you assume the levels where you weren't raising your endurance happened all at your starting endurance instead of your max endurance.


I really wanted to make a retroactive health mod, but there is no elegant way to do it, mostly due to the fact that there is no easy way to get the player's starting endurance, also it is hard to get the health to update only when it is supposed to.


Use my formula or don't use my formula, I don't care, just don't leave your incorrect formula on this site. --InbredMonkey
Not "my" formula, I just put it back to whatever it was before. If that is wrong, it needs fixing. My issue was not in the formula (as I don't know the formula), but with the presentation. A C++ (or any other) program is not desired, because it is more difficult to read than ordinary math, and we would not want one to have to run the code through a compiler and run it. This sort of thing should not be in ObliviScript, C++, or anything else, it should be in math. The goal is for people who come here to understand exactly how FStatsHealthLevelMult is used by the game - simply laying out the formula is what needs to be done. I'll go through what you've posted here, and update the article as necessary, when I get the chance.
You are, of course, welcome to do so yourself if you wish to. --DragoonWraith 10:26, 24 May 2006 (EDT)