Can anyone point me to how I can add a skilltype to the requirement? I looked into the code and i'm kinda stumped on how I can make the ID 1 skill type a part of the requirement for dualcast http://www.yanfly.moe/wiki/Dualcast_(MV_Plugin_Tips_&_Tricks)
Slightly Altering Yanfly's dualcast code
Learning Javascripti guess the ignore means that it isn't possible. which is fine i guess.
You waited only two hours, in the Learning JS forum of all places, before giving up? Might do well to remember these boards are international (timezones) and all assistance is provided by volunteers who have their own schedules etc. (Also, I believe you're supposed to wait a minimum of 72 hours before a bump.) 😅
On top of that, your question is slightly vague. I think what you're asking is how to add "is action of skill type 1" to the action validity checks, right? In that case, here's the edit I'd try (untested):
Since this is in Learning JS, a brief explanation of how to get to that answer: the skill variable is a reference to the database object, thus has all the properties found in Skills.json, including stypeId ("skill type ID"). You can also cross-reference that with the code, e.g.
On top of that, your question is slightly vague. I think what you're asking is how to add "is action of skill type 1" to the action validity checks, right? In that case, here's the edit I'd try (untested):
Code:
if (user.canPaySkillCost(skill) && skill.stypeId === 1) {
Since this is in Learning JS, a brief explanation of how to get to that answer: the skill variable is a reference to the database object, thus has all the properties found in Skills.json, including stypeId ("skill type ID"). You can also cross-reference that with the code, e.g.
Code:
Game_Action.prototype.isMagicSkill = function() {
if (this.isSkill()) {
return $dataSystem.magicSkills.contains(this.item().stypeId);
} else {
return false;
}
};
@Mega Man Volnutt , please do not bump your topic unless it has been 24 hours later since your last post. You can review our forum rules here. Thank you.
Original thread: https://forums.rpgmakerweb.com/threads/slightly-altering-yanflys-dualcast-code.112919/