Adding experience via script goes like this:
So, following the pattern of the other entries in the parameters of the Skill Rewards plugin, I'm guessing this sort of thing will do what you're after (untested):
JavaScript:
} else if (data.match(/([\+\-]\d+)[ ]EXP/i)) {
// "+X EXP" - add fixed amount of experience
if (user.isActor()) {
value = parseInt(RegExp.$1);
user.gainExp(value);
animation = animation || miscAnimation;
} else skip = true;
} else if (data.match(/([\+\-])V\[(\d+)\][ ]EXP/i)) {
// "+V[X] EXP" - add experience equal to current value of game variable X
if (user.isActor()) {
value = v[parseInt(RegExp.$2)] || 0;
if (RegExp.$1 === "-") value *= -1;
user.gainExp(value);
animation = animation || miscAnimation;
} else skip = true;
Try adding that to the
Effect Code parameter in the Plugin Manager (just above the "Add new effects above this line" part), stick something like a <Defeat Reward: +100 EXP> notetag into your skill's notebox, save your project (to apply the Plugin Manager changes) and test~
😮💨
For reference, the "match" parts of the code are regular expressions; technical details here:
Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the exec() and test() methods of RegExp, and with the match(), matchAll(), replace(), replaceAll(), search(), and split() methods of...
developer.mozilla.org