[CGMZ] Self Variables (Patreon)
Downloads
Content
Adds self variables that you can access via plugin command or standard game variables, including event page conditions.
! SEE BOTTOM OF POST FOR UPDATES !
Hi all,
This is a "self variables" plugin. It allows you to use any amount of self variables for events on the map by using a variable ID, event ID, and map ID to make unique variables per event. You can access these self variables and set them via plugin command.
Happy RPG Making :)
Alpha Update 3/7/2023: Hi all, today this plugin has been updated to allow you to use the self variable in the event conditions part of the event page. You can now use the variable id set up in the plugin parameters to access that event's self variable.
This update drastically increases compatibility with other plugins as it no longer overrides the check for if the event page meets its conditions. This means that the parameter to turn off the ability to use Self Variables in event pages was removed, as it should no longer be a compatibility risk. Further, this means you no longer have to place this plugin above [CGMZ] Unlimited Event Conditions for compatibility with that plugin.
The code was also optimized slightly.
This version should greatly simplify how this plugin is used. Now, you set as many self variables as you want by adding them to the plugin Variables parameter or marking the variable name with a tag. When one of these self variables is accessed, the plugin will automatically know which one to use.
You no longer need to manipulate the self variable via plugin commands or through a manual process, you only need to use the normal event commands to edit variables. The plugin commands have been repurposed to allow you to get a different event's self variable value (or set it) if desired.
Unfortunately, this will most likely break any existing self variables you have set up except the single variable set up via the plugin parameters. You will also need to set up your plugin commands again, as the arguments have changed since the old arguments were no longer relevant.
This version added self switches, so you can turn global switches into self switches. This will allow you to use as many self switches as you want, in case you need more than one per event. Note that these self switches take over a previously global switch, so you will no longer be able to use the switch you set either via notetag or parameter as a global switch.
Plugin commands and other functionality were also added for self switches. Any way you were previously using self variables should apply to how you can use the new self switch feature.
This version adds map variables and switches. These are a new type of switch and variable, which are a halfway step between global switches or variables and self switches or variables. Events on the same map will be able to read the same map variable or switch, but events on other map ids will have their own copies of these variables or switches.
This could be useful if you have dungeon maps that require a switch to be ON to open the final boss door, your switch can be a Map Switch and then your switch event can turn the map switch ON and your door can check the map switch, and these can be re-used throughout all of your dungeons instead of needing separate switches for each dungeon.