I was building one of my thief’s passives the other day and realized that setting up common events that are triggered from regular autorun/parallel events for every map to perform prerequisite event setup functions is almost more of a pain to do than it is to say. So I wrote this.
On Map Load will allow you to write up to ten map load evals that will run on every map load of every map. Also, a simple notetag can be specified on a map’s notebox to specify loading eval code that you want to be more specific to the map. Sure, you could just write it in an parallel event, but if you did, you’d be executing entirely too much code too often and it would bog down your game with tons of extraneous processing that really only needs to happen in that one instance. The main point of this was originally to be able to process each map without having to duplicate events all over the place, but the obvious performance implications are a pretty awesome bonus.
I hope you get more from it than you’re expecting.
OML post on RM Forums (n/a)
This plugin gives you a simple notetag eval on your maps that will run when the map is loaded. Optionally, you can also setup up to ten evals that will run each time any map is loaded. Keep in mind that map loading happens many times for a given walk-through. Each time you open the menu, for instance, the map load will trigger again. This should not be used for doing something merely the first time you load a map, but more for things you need to do on each reload of the map (typically event settings).
Add load evals to your maps via the following notetag:
Map > Notebox > <ON LOAD>code</ON LOAD>
It’s as easy as that. Your eval code will now run every time that map is loaded. Also note that the “ON LOAD” can be replaced with “OML”, “MAP LOAD”, or “ON MAP LOAD” to your discretion.
Here are a couple of examples…
if (event.displayName == "Sneak Thief") event._opacity = 32;
if (v > 4)
In the first example, any events with the display name of “Sneak Thief” will take on a very transparent appearance. The second example runs a common event if a variable is greater than four.
Should this plugin not work for you for any reason, please notify me by creating a GitHub issue, emailing me at email@example.com, or message me in any social convention you happen to see me in.
Thanks, and happy loading!