Hey there, Waterguy! Thanks for the wonderful crafting plugin. A couple of the features found in yours that don't seem to be anywhere else are
exactly what I was looking for!
I did come across a couple of problems. I managed to poke at them until I fixed them, but I though I should let you know about them (Warning: Wall O Text ahead).
First: I kept running into a problem where crafting with one particular discipline would freeze the game- it acted a bit like an infinite loop. I had to close the test window with task manager.
It turned out to be the xp requirements. I had set it to have the same xp requirements per level. For some reason, if the xp requirements for each level are exactly the same, it freezes the game.
It took going back and changing that discipline's settings to default one by one to figure that one out.
Second: While I was troubleshooting the first problem, I loaded Yanfly's item core which I hadn't loaded up yet. I got an error stating something like 'requirement is undefined', and listed line 1340 as where the problem was. I went and had a look in the code, and found that line 1340 is part of an if else if that starts with a line reading:
if (result[0] === "item") {
Line 1340 itself read:
} else if (requirement[0] === "weapon") {
I changed requirement to result in line 1340 and line 1358, and that got rid of the problem.
I'll admit I'm not much of a programer, just an experienced game modder. I don't know if I may have broken something for myself down the line, but it was the only way to get past the error. It does look to me like result was supposed to be requirement or vice versa, since it wouldn't make much sense otherwise. Can you confirm that, and tell me which it's actually supposed to be?
Third: I created 11 crafting skills at one point, in order to test an idea. At that point, the plugin stopped working altogether. Nothing related to the plugin seemed to be working in any way, such as an event I had set up to test calling discipline xp and level crashing the game with 'getDisciplineLevel is not a function'.
It seems you can't have more than 8 disciplines. If you go to nine, the plugin doesn't load.
So, a couple issues you (and other users of this great plugin) should be aware of. For me personally, the only one I'm concerned about is two. I'm fine with 8 disciplines (I only need five), and don't really need a flat xp rate. I just like to experiment.
One other question, though, if you happen to know. I want to have recipes drop off monsters. Is there any way you know of to have an item add the recipe when picked up? Obviously, I can have the item call an event to add the recipe when used, but that would be a lot of common events.
Edit: Never mind, I figured out a method. For those that would like to do the same thing:
Create an item to act as your recipe and insert the following in the damage formula:
Code:
var myInterpreter = new Game_Interpreter(); myInterpreter.pluginCommand('CRAFT', ['LEARN', 'ITEM', 'replacewithItemID']); //to learn all recipes for an item
or
var myInterpreter = new Game_Interpreter(); myInterpreter.pluginCommand('CRAFT', ['LEARN', 'ITEM', 'replacewithItemID', 'replacewithRecipeIndex']); //to learn a specific recipe.
Substitute 'WEAPON' or 'ARMOR' in place of 'ITEM' when it's a recipe for weapon or armor.
You'll need to add something else for the item to do if you want it to actually work. I just added a generic common event to the Effects box that displays a message.
I can't figure out any way to run a conditional to determine if a recipe is already known, though. It would be nice to be able to tell the player they already know a recipe.