Determine numerical value of a skill and display it

Basically what I have are healing skills or damage skills that show the value of the formula used to determine their effects in a common event which runs parallel to the game.  While useful, I've noticed is that there is a growing lag issue even with mog's anti lag script.  I'd like to cut out the running parallel event and put this into a script.

All I have in the formula is stat multiplication which gives a positive integer and some have a variance of a smaller positive integer to account towards adding on.  

I have a variable for each skill used in this fashion. (I needed to account for when a new item is equipped, a stat boost is used or a level up is gained which will change the stat in the calculation, so I felt a parallel process was best to use at first).

If this can be done with a script call attached to a skill to determine the value at the time of it's selection in the menu, in and out of battle, and display it in that variable I'd like to implement that instead.  I want the player to know the ballpark number of healing or damage they will be getting rather than a vague description of little, medium, big.  

I am under no time constraint as this is an earnest question.  If a template can be provided I can do the work myself for each skill\variable in the script.
1) Anti-Lag scripts usually work by reducing the processing time for map-events, they never reduce the processing time for parallel common events.


2) what is the exact purpose of having this data in variables and in a parallel common event? The damage formula and the display in the battlelog are the usual places for that (and those won't cause lag)


3) provide a screenshot of the parallel common event in question, then we can check how to reduce the lag caused by it.


Usually it's enough to place a wait(10) or so at the end of the common event, as that will tell the engine not to process that event for the next 10 frames (and there are 60 frames per second without lag, no player data needs to be processed sixty times per second).
Screen shot is under the cut.  Understood, I will add that.

I wanted the player to see what the near exact value of the formula would be when they look at the description of the skill.  I thought the only way to display that number in the description of a skill was a variable.

Spoiler
ZUv3znK.jpg


VZFlpVV.jpg
you can do it that way, but why do you calculate it in a parallel process?


The way you have things set up, the game calculates the variables sixty times per second, and I really doubt that those values change that often...


At the end of the common event, place a command wait(120).


That will calculate the amount to be displayed in the skill description once every other second - that should be enough even if the MAT-Value is changing often.


If it doesn't change that often, you might want to call it only once per map (use a self-erasing autorun map event in that case instead of the common event), and copy that autorun to every map...
I didn't have any other intuitive way to process the information.  The only other RPG maker I've used was on play station that didn't have this level of control.  Is it possible to do a formula directly in the skill description itself and display that to the player through script call?  Is there another way to calculate this outside of a parallel run event that will give an accurate number when the skill is selected?

I'll try both options and see how it goes in play testing.  No the MAT doesn't change that often.  I think I over complicated what I was trying to do.

Thank you for your help and insight.
Just as a follow-up, the variance is a +- % value applied to the calculated skill formula - your best option, if you want to display an approximate value for the player to see, is just to display 250 + a.mat (from the example you gave) as that's the average ^^.

Also, it might be easier in future to store the repeated value (in this case Willard's MAT stat) in a variable and apply it to the values, either in scriptlets or in variable addition. Of course, if you're using scriptlets then you can also just do something like $game_variables[display_var_id] = base_value + $game_actors[willard's_id].mat * mat_multiplier. XD

Original thread: https://forums.rpgmakerweb.com/threads/determine-numerical-value-of-a-skill-and-display-it.24264/