Documentation
Quick InfoVersion: Alpha R2
Made for RPG Maker MZ 1.10.0
REQUIRED: All [CGMZ] Plugins require [CGMZ] Core placed above them in the Plugin Manager.
Map OptimizationsSelf Switches
By default, self switch changes refresh the entire map, which causes all events to check their page to see if any changes are needed. This can get expensive quick if you are constantly changing self switches. This plugin allows you to skip checking every event and only check if the event that had it's self switch changed needs to be updated. If you manually update other events' self switches via script call or other means, this would break that functionality and you would need to manually refresh the map with script call $gameMap.requestRefresh(); in that case.
Switches & Variables
Switches and variables, like self switches, refresh the entire map when a value is changed. This is usually a good thing as multiple events can pay attention to switches or variables in their page conditions, however may not always be needed. This plugin allows you to disable map refreshes for specific switches or variables by id. For example, if you have a constantly changing variable that is not used by map events, you could remove this specific variable from causing a map refresh every time its value changes.
Pathfinding
Pathfinding can be quite an intensive process, especially if your game uses pathfinding for events and other characters than just the player. This plugin allows you to change the default search limit which can reduce lag if you have a lot of things pathfinding at the same time. You can set the plugin parameter to 0 to totally skip any changes for pathfinding, for compatibility reasons.
Event OptimizationsEnable Skip Update
When this is turned ON, you can enter in a note tag to any event to cause it to completely skip its update function. The notetag is <SkipUpdate> by default, but can be changed in the plugin parameters. Note that it is case sensitive, so if you type <skipupdate> it will not work.
Note that skipping the update process will have consequences! By default, event movement is handled in its update process as well as parallel/autorun triggers. If your event has to move, or is parallel / autorun you should not use this note tag as it will break your event. Other plugins may also hook into the update function, in which case any functionality added by the plugin to the update process would also no longer work for that event. Events without this note tag will function as normal. If you do not have Enable Skip Update turned ON, all events will function as normal even if using the note tag, this is provided for maximum compatibility.
Parallel Common Event Waits
Common events are a common source of lag in RPG Maker games because many people forget to add a wait command to the end of their common events, causing them to run 60 times per second. It is unlikely that you need your events to run that frequently. This plugin can automatically add a wait event command at the end of your parallel common events for you, with the frame count to wait set up in the plugin parameters (default 1). Note that if you do need your common events to run 60 times per second, you will want to turn this feature off. Also note that there are diminishing returns on performance the more wait frames you add. Adding a 1 frame wait will make the event run 30 times per second, a 2 frame wait will be 20 times per second, a 3 frame wait will be 15 times per second, a 4 frame wait will be 12 times per second, and so on.
Note TagsThis plugin includes a <SkipUpdate> note tag for events. If enabled in plugin parameters, this note tag will prevent an event from updating. Note that this will also break movement and autorun or parallel process triggers for that event. Events without this note tag function as normal. The actual note tag text is configurable in the plugin parameters, if for some reason you want it to be something besides <SkipUpdate>.
Plugin CommandsThis plugin supports the following Plugin Commands:
Change Event Update
Turns a specific event's update function ON or OFF. Note that this is NOT saved data and is only meant for temporary changes to event updates.
Saved GamesThis plugin is fully compatible with saved games. This means you can:
✓ Add this plugin to a saved game and it will work as expected.
✓ Change any plugin params and changes will be reflected in saved games.
✓ Remove the plugin with no issue to save data.
Filename
The filename for this plugin MUST remain CGMZ_AntiLag.js. This is what it comes as when downloaded. The filename is used to load parameters and execute plugin commands. If you change it, things will begin behaving incorrectly and your game will probably crash. Please do not rename the js file.
Known Issues
This plugin currently has no known issues that need to be fixed. If you believe you have encountered a bug, please report it to Casper Gaming.
Compatibility
This plugin currently has no known compatibility issues with other RMMZ plugins. If you believe you have encountered a conflict, please report it to Casper Gaming.
Version HistoryVersion AlphaR2
- Added comment to skip event update
- Added plugin command to manually turn on/off event update