Site Tools


ds1-refmat:param:calccorrectgraph

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ds1-refmat:param:calccorrectgraph [2025/02/26 03:03] – created adminds1-refmat:param:calccorrectgraph [2025/02/27 16:06] (current) admin
Line 1: Line 1:
 ====== CalcCorrectGraph ====== ====== CalcCorrectGraph ======
 +Outputs a value based on input value run through calculations. Used for things like weapon stat scaling,
 +soul level cost, max HP, resistances, etc.
 +
 +Calculations can be simplified by using [[https://github.com/kingborehaha/CalcCorrectGraph-Calculation-Tool | CalcCorrectGraph Calculation Tool]]
 +
 +==== Example ====
 +
 +**Relevant values for example**
 +
 +calcCorrectGraph is being used for 200 strength scaling, 0 dexterity scaling weapon.
 +
 +Players strength stat (input) is 10
 +  * ''stageMaxVal0 = 0''
 +  * ''stageMaxVal1 = 20''
 +  * ''stageMaxGrowVal0 = 12''
 +  * ''stageMaxGrowVal1 = 50''
 +
 +Since the player's strength stat is 10, parameter fields for stage 0 to stage 1 will be used, as it lies between ''stageMaxVal0(0)'' and ''stageMaxVal1(20)''
 +
 +<code>output = stageMaxGrowVal0 + ((stageMaxGrowVal1 - stageMaxGrowVal0) * ((input - stageMaxVal0) / (stageMaxVal1 - stageMaxVal0)))</code>
 +
 +**Calculate ratio of input value and maximum output stage value**
 +
 +Max output stage value for stage 0 to 1: ''stageMaxVal1(20)''
 +
 +<code>Input = PlayerStrengthStat(10)</code>
 +
 +<code>(Input(10) - stageMaxVal0(0)) / (stageMaxVal1(20) - stageMaxVal0(0)) = .5, aka 50%</code>
 +
 +This means that the final output value will be 50% of the output value potential.
 +
 +(note: this part is affected by adjPt_maxGrowVal0-5 when present, which adds an additional calculation making ratio growth non-linear)
 +
 +**Calculate output value potential for stage 0 to 1**
 +
 +Min output stage value for stage 0 to 1: ''stageMaxGrowVal0(12)''
 +
 +Max output stage value for stage 0 to 1: ''stageMaxGrowVal1(50)''
 +
 +Output value potential for stage 0 to 1: ''stageMaxGrowVal1(50)-stageMaxGrowVal0(12) = 38''
 +
 +**Calculate Output**
 +
 +Calculate input value ratio (.5 aka 50%) with output value potential, then add output stage value minimum for final output value
 +
 +<code>OutputValuePotential(38) * InputRatio(.5) = 19 + MinimumOutputValue(12) = 31</code>
 +
 +The final output value is 31, which in the case of weapon stat calculations will be applied as a multiplier to stat scaling. Meaning the weapon will effectively use 31% of the maximum stat scaling. ''31% of StrengthStatScaling(200) = 62''
 +
 +
 ===== Fields ===== ===== Fields =====
 ^ Field ^ Type ^ Offset ^ Description ^ Notes ^ ^ Field ^ Type ^ Offset ^ Description ^ Notes ^
ds1-refmat/param/calccorrectgraph.1740539006.txt.gz · Last modified: by admin