- Joined
- Oct 1, 2013
- Messages
- 434
- Reaction score
- 306
- First Language
- English
- Primarily Uses
- RMMV
Hi, everyone! I would like to talk about the "parameter curves" game mechanic today; specifically, I am curious what algorithm is used within the "Parameter Curves" sub-section of the "Classes" section of the database in order to "bend" a linear growth pattern by applying a single growth-rate parameter.
So, if you open the database and go to the "Classes" section and double-click on any of the graphs there-in the "Parameter Curves" sub-section it will open the window which uses the algorithm I want to discuss. I have looked for functions using this algorithm in the default scripts, but I did not have any success.
On the other hand, if you open the /data/Classes.json source file and scroll through the corresponding data, then you will find a two-dimensional array containing 100 elements for each parameter, where; element 0 represents the minimum value for that parameter, while the remaining 99 elements represent the value of the parameter at its corresponding level between 1 and 99. All right, so this leads me to believe that the algorithm is only utilized in the editor and never called upon at runtime.
This being the case, I am hoping that one of the more experienced developers here at the forums might be able to walk me through the mathematical side to this algorithm, because I think that having this knowledge may open a few doors for me and I would really like to figure it out.
I'll wrap this up with a little more information about the way rmmv incorporates this into the editor; so, applying any of the quick settings
[A, B, C, D, E] generates a linear growth pattern for that parameter, by which you can further individualize by clicking on the "Generate Curve" button and adjusting the growth-rate variable inside.
So, I think that when you press "Ok" the editor calls a function to generate a two-dimensional array that uses the algorithm to apply the parameter value to each level in the array and then updates the associated .json file before closing the window.
I am hoping that somebody is able to teach me the algorithm that actually generates the "curve" between levels 1-99 based on the growth-rate variable.
**p.s. the growth-rate starts in the center and can be adjusted either way, so I am thinking it represents a value between -1 and 1.
So, if you open the database and go to the "Classes" section and double-click on any of the graphs there-in the "Parameter Curves" sub-section it will open the window which uses the algorithm I want to discuss. I have looked for functions using this algorithm in the default scripts, but I did not have any success.
On the other hand, if you open the /data/Classes.json source file and scroll through the corresponding data, then you will find a two-dimensional array containing 100 elements for each parameter, where; element 0 represents the minimum value for that parameter, while the remaining 99 elements represent the value of the parameter at its corresponding level between 1 and 99. All right, so this leads me to believe that the algorithm is only utilized in the editor and never called upon at runtime.
This being the case, I am hoping that one of the more experienced developers here at the forums might be able to walk me through the mathematical side to this algorithm, because I think that having this knowledge may open a few doors for me and I would really like to figure it out.
I'll wrap this up with a little more information about the way rmmv incorporates this into the editor; so, applying any of the quick settings
[A, B, C, D, E] generates a linear growth pattern for that parameter, by which you can further individualize by clicking on the "Generate Curve" button and adjusting the growth-rate variable inside.
So, I think that when you press "Ok" the editor calls a function to generate a two-dimensional array that uses the algorithm to apply the parameter value to each level in the array and then updates the associated .json file before closing the window.
I am hoping that somebody is able to teach me the algorithm that actually generates the "curve" between levels 1-99 based on the growth-rate variable.
**p.s. the growth-rate starts in the center and can be adjusted either way, so I am thinking it represents a value between -1 and 1.