I'm looking to use the Modulo/Mod operation in note tags for Yanfly plugins but I can't find anything on what you have to put in the notetag can anyone help me out?
Is it possible to use "Mod" operation in Notetags
RPG Maker MV SupportI'll assume you're talking about notetags that allow script calls.
JS has the
Or, for Control Variables -> Mod, you can use RMMV/Z's
The difference applies for negative inputs:
JS has the
% remainder operator, so you can do something like this:
JavaScript:
$gameVariables.value(1) % 10
Number#mod method:
JavaScript:
$gameVariables.value(1).mod(10)
% can return negative values if the input is negative, but mod works as in modular arithmetic. E.g.-22 % 10=>-2;(-22).mod(10)=>8.
That's it thank you. Had no idea % was used for Mod
Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-use-mod-operation-in-notetags.167086/