Improve variable and switch functionality.
Its main purpose is to reduce the load in parallel processing.
Download
VariablePlus.js Ver.1.0.0
MIT License
How to Use
"Optimization" and "No-Refresh Variables" are primarily intended to reduce the load on parallel processing.
Whenever a value is assigned using an event command or the setValue function, the map will be refreshed and all conditions will be re-verified.
When used in conjunction with parallel processing this is done every frame, which is inefficient.
Optimization:
Reduce the refresh frequency.
If the current and new values are the same, do not refresh the map.
For example, if you created a parallel processing event that constantly retrieves a region ID, previously it would be refreshed even if the retrieved region ID did not change, but by using this function it will no longer be refreshed unless the region ID changes.
I think it is also suitable for managing character XY coordinates.
No-Refresh Variables:
Not refreshing at all.
This is ideal for variables that are not used for conditions at all, but are used only for conditional branching or numerical calculations.
Initial Variables:
You can manage the initial values all at once.
This is usually done at events, but if you absolutely need it, go ahead.
This is also useful when performing a battle test when using v[n] in the damage calculation formula.
The value function corrects the initial value of undefined to 0 before returning it, but v[n] returns the contents of the variable directly, so undefined will not be corrected to 0.
Since undefined is not a number, the calculation formula will be incorrect.
By using this function to enter correct values beforehand, you can perform a battle test with a minimum number of events.
Specifications
I think it would be better to place this plugin lower in the plugin list.
本贴来自国际rpgmaker官方论坛作者:Awayamatana处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/variableplus-improved-performance-of-variables-and-switches.179419/