Various utility methods are presented here to assist you in your development of notetag evals, event script commands, or even plugins. Here they are, and a couple of examples of their use. Please note that the method prefixes ("NeMV" and "nemv") are interchangeable for your typing convenience.
Not everything in this plugin is documented. Some methods have yet to get write-ups, so don't be afraid to dig in and see what everything does. I will be updating this and its documentation as often as I am able, but this will more than likely grow in function faster than I can write entries for it. As such it will probably remain in an alpha-state (doesn't mean "scary", just not "feature-complete") for quite some time.
[Array] object itself. It allows you to easily pick a value out of a set without having to worry about the
[Math]. The optional
skipOne parameter is a convenience for you to easily skip the zeroth index (useful for looking at
$data[Type] arrays) from RMMV's database.
$dataSkills.random(true) // returns a random skill
["Hey!","Hello!","Hi!"].random() // returns a random greeting
Simply an easy access to random chance. Calling the method with a string (text) will attempt to turn it into a ratio check (e.g. "1:15", "2/30", "3 out of 45", and "4 in 60" will all return the same), and will compare the result of that ratio against a random number, returning success or failure.
nemv.chance(20) // returns true 20% of the time
nemv.chance("37 out of 42") // returns true ~88% of the time
Should this plugin not work for you for any reason, please notify me by creating a GitHub issue, emailing me at [email protected], or message me in any social convention you happen to see me in.
Thanks, and happy scripting!