Spell books

Well, umm...I've looked for such a plugin several times, but it looks like I've searched very badly
Hah! Well, I don't know what you did, but I Googled "RPG Maker MV use item javascript" and it came up. I'm honestly surprised it's not a functionality of Yanfly's Item Core or something, that library is pretty big on adding JS usage to just about everything else in the game.

It should be possible to make the item system refuse to apply the item to an actor who doesn't have the skill type.
Yeah, and I don't know if he's actually got any kind of class customizing abilities, but all of his examples have been using a specific actor learns a specific school of magic, so you could just hard code the item functionality to look at the actor ID.
Hah! Well, I don't know what you did, but I Googled "RPG Maker MV use item javascript" and it came up. I'm honestly surprised it's not a functionality of Yanfly's Item Core or something, that library is pretty big on adding JS usage to just about everything else in the game.

It's not quite like people do talking, but I tried...

1633457416897.png


Yeah, it is indeed simple:
JavaScript:
Window_ActorCommand.prototype.addSkillCommands = function() {
var skillTypes = this._actor.addedSkillTypes();
skillTypes.sort(function(a, b) {
return a - b;
});
var knownTypes = new Set();
this._actor.skills().forEach(function(skill) {
if(!this._actor.isOccasionOk(skill)) {
return;
}
knownTypes.add(skill.stypeId);
});
skillTypes = skillTypes.filter(knownTypes.has.bind(knownTypes));
skillTypes.forEach(function(stypeId) {
var name = $dataSystem.skillTypes[stypeId];
this.addCommand(name, 'skill', true, stypeId);
}, this);
};

Hey, you literally are ahead of me by a few minutes, because I already wanted to send you a PM about the plugin. Thanks for this one.

Well, thank you all guys. So, now I have two ways:
1)To do it with this plugin and do it through skill types. But in that case, if I'm not mistaken, the characters will have 3 options for magic types in the battle menu + Special type, which I didn't mention before, that every character has. And in my opinion that would be great to sort the spells if I haven't used the spell slots plugin, but I do, so I just don't know.
2)To do it with the individual code for each spellbook. It's perfect as I can write anything I want, with the custom script I can create an event just in the item notes, but wait...I don't know JS at all.

So for now I just need to think of it. I will try both plugins, but I prefer the second way for It's more suited to my game. Need to try to google how to code an events in JS. Basically, I need to just check what actor used a book, and tell that this actor can't use the book if it's a wrong actor, and ask a player if he wants to learn the spell or not, and learn it, and destroy the book later.
Ohh...I hope it's not that hard as I can imagine.
It's not quite like people do talking, but I tried...

View attachment 203149
No, you don't want to try to search using the same syntax you do to talk. I think the reason you did less well are your abbreviations. I always look for JavaScript, not js, because people don't typically just say js unless you're looking for a file name (looking for just the word "script" also often gets results). Also, I wouldn't expect the word "rpgm" to turn up good results as I've never really seen that anyplace.

Original thread: https://forums.rpgmakerweb.com/threads/spell-books.140914/