Hi thank you guys for getting back to me so soon! I got busy working on other parts of the game outside of combat and Ive been looking at good options to help me learn Javascript more, so I didnt have time to test either of your suggestions recently but just got going today!!!
Yanfly's
skill rewards plugin has a thing for that
Ive been using this extensively, thats actually how I have Crits set up to gain MP back, among other things!! Very good plugin and Im glad more people are using it
🙂 Unfortunately so far it seems that the skill rewards plugin seems to only apply effects to the user, not the target themselves. Although I may not be using it to it's fullest or have something wrong so you may be right. Will look more into this. The plugin's "Rolling Criticals" effect is the closest thing to what Im hoping for, although for some reason, at best it's only guaranteeing the NEXT attack that hits an enemy's weakness is a Critical. Might just be a me problem tho LOL
Firstly, please take these with a grain of salt, as I am a novice. -_-'
I think if you're going the auto-passive states route, you could do
something like this (requires the YEP Buff/States Core) but just edit the coloured values to match your game's own values:
Spoiler: Script
<Custom React Effect>
var elementId = this.item().damage.elementId;
if (elementId < 0) {
var elements = this.subject().attackElements();
}
else {
var elements = [elementId];
}
for (var i = 0; i < elements.length; i++) {
var elementId = elements;
if (elementId > 0 && target.elementRate(elementId) >= 2.0) {
value *= 3.0;
target.result().critical = true;
}
}
</Custom React Effect>
Full disclosure: this code was adapted from one of the example skills in the Fallen Angel Olivia's OctoPack Battler Sample Project.
Essentially you're checking an incoming attack to see if it contains any elements which matches your weakness rate (the element weakness rate above is set to 200%), and if there is a match, it would then multiply the DMG by your critical multiplier (in the above example, it is set to 300%).
BUT I believe there might (?) be some issues if you have multiple elements interacting with one another, so you might have to adjust for that.
Alternatively if you don't have that many elemental skills, you could also just use YEP Critical Control formula, and put the following notetags in ALL (the main downside of this approach) your elemental skills while adjusting the coloured text accordingly:
Spoiler: Notetag
<Critical Rate Formula>
if ( target.elementRate(elementId) >= 2.0 ) {
rate = 1.00;
}
</Critical Rate Formula>
This will check the specified elemental rate of the target, and adjust the critical rate accordingly.
Novice or not this definitely helped a lot!! I'm pretty god awful at Javascript right now so even getting closer to the solution and seeing how things interact more helps and you definitely seem to get this more than me :') Although neither of these approaches seemed to work right for me it definitely got me thinking and on a train of thought that Im gonna be following up on.
I successfully implemented a state a while ago that forces any damage the target takes to deal Critical damage (think it was copied from the "Critical Vulnerability" state that Yanfly had up on their Tips & Tricks page??? Been a while since i even looked at the state since it works with no problem tbh), so I think I need to cannibalize that and play around with the Custom React Effect script you built for me and see if those two things can play well together. Id actually been thinking about checking the OctoBattler stuff since i bought a number of Fallen Angel Olivia's plugins a while ago and there's definitely a lot going on to use there. Unfortunately I am, again, quite bad at scripting and have 3 separate Physical-type elements and 9 Elemental-type elements in play with a number of skills being multi-element skills, so that might be contributing to the calculations being kinda uh... messy LOL
But anyways thank you so much! Getting closer at all is great ahhh