Plugin Newbie here

Hello Guys,

I hope this isn't redundant but I couldn't find any information on this topic.

Question- What level of Java reading/coding skills do I need in order to properly debug plug ins and make them work?

Why- Because I have purchased some yanfly plugins and they immediately brick the game during battles, shops or other random events.

What I did to rectify the situation- I researched the plugins as much as I could. I learned that you must stack the plug ins properly in order for them to work. So I have the YEP_CoreEngine first on the list and then YEP_X_Skillcostitems below it. I am unsure if just visually having them below each other is what you're supposed to do as the website doesn't specify such. I downloaded the most recent MV four days ago and the plug ins yesterday so they are up to date.

That sort of leads me to my question of how to go in and modify the script after diagnosing the issue to have the plugin work with the game. Some of these plugins would really be cool to use. I know it is probably a ways off for me but at least getting an idea of the knowledge required to debug would be helpful.

I've moved this thread to Plugin Support. Thank you.

Hello Guys,

I hope this isn't redundant but I couldn't find any information on this topic.

Question- What level of Java reading/coding skills do I need in order to properly debug plug ins and make them work?

Why- Because I have purchased some yanfly plugins and they immediately brick the game during battles, shops or other random events.

What I did to rectify the situation- I researched the plugins as much as I could. I learned that you must stack the plug ins properly in order for them to work. So I have the YEP_CoreEngine first on the list and then YEP_X_Skillcostitems below it. I am unsure if just visually having them below each other is what you're supposed to do as the website doesn't specify such. I downloaded the most recent MV four days ago and the plug ins yesterday so they are up to date.

That sort of leads me to my question of how to go in and modify the script after diagnosing the issue to have the plugin work with the game. Some of these plugins would really be cool to use. I know it is probably a ways off for me but at least getting an idea of the knowledge required to debug would be helpful.
There is no one-size-fits-all answer to your question; the best I can give you is "the more you know about JavaScript and coding, the easier it will be for you to fix things yourself."

With regard to your current predicament, first of all note that the order in which the plugins are listed on Yanfly's site is the order you should have the plugins when installed. Secondly, you mention YEP_CoreEngine and YEP_X_Skillcostitems, but say nothing about the plugin that Skillcostitems is an extension for (any plugin with an _X_ in the title is an extension to a different plugin that you also need to install for things to work properly).
Just to add a few things to Trihan's reply:
Question- What level of Java reading/coding skills do I need in order to properly debug plug ins and make them work?
Trihan used the correct terminology in his reply, but I feel it's worth explicitly pointing out - MV and its plugins do not use Java. JavaScript is a different coding language.

I would say you need an intermediate level of knowledge to be able to start understanding code when you read it and be able to follow the various function calls.
Why- Because I have purchased some yanfly plugins and they immediately brick the game during battles, shops or other random events.
I feel pretty safe saying that you're doing something wrong. There's the occasional little bug in Yanfly's stuff, but that's in little details - for the grand part, everything should work correctly in your game if you install it correctly.
What I did to rectify the situation- I researched the plugins as much as I could. I learned that you must stack the plug ins properly in order for them to work. So I have the YEP_CoreEngine first on the list and then YEP_X_Skillcostitems below it. I am unsure if just visually having them below each other is what you're supposed to do
Correct. When you look at the Plugin Manager, the order of the plugins should be what's listed on the Yanfly Engine Web site. You can see this in just about every single one of the tutorial videos for each of the plugins.

Trihan already mentioned to make sure you have any dependencies, also make sure you actually click into each plugin! They all have plugin parameters for you to configure, and some of them won't work correctly if you don't do that.
That sort of leads me to my question of how to go in and modify the script after diagnosing the issue to have the plugin work with the game.
There is zero reason that should be necessary. All of the Yanfly plugins you purchased should work out of the box. As I said, there are some little glitches in them (which I rectify when I find them, in the link in my signature), but nothing that would make them not work immediately when installed in a project. What you're describing is not a fault in the plugin code.

Make sure you have installed the plugins correctly, including their order, any dependencies, and configuring parameters. Then save your project and start a new playtest (you can't load a save file). If you get a crash, press F8, go to the Console tab, and take a screenshot of the error trace. Post it here.
Hey I really appreciate your response.

Good info about Java versus JavaScript. I assumed it was just a derivative of Java haha.

Just a question. To clarify your statement, "you can't load a save file". This might be my problem. I have imported the plugins midway project. Is there a way to input a plugin mid project?

Also here is the error that I run into.

1658273945092.png

Just to add a few things to Trihan's reply:

Trihan used the correct terminology in his reply, but I feel it's worth explicitly pointing out - MV and its plugins do not use Java. JavaScript is a different coding language.

I would say you need an intermediate level of knowledge to be able to start understanding code when you read it and be able to follow the various function calls.

I feel pretty safe saying that you're doing something wrong. There's the occasional little bug in Yanfly's stuff, but that's in little details - for the grand part, everything should work correctly in your game if you install it correctly.

Correct. When you look at the Plugin Manager, the order of the plugins should be what's listed on the Yanfly Engine Web site. You can see this in just about every single one of the tutorial videos for each of the plugins.

Trihan already mentioned to make sure you have any dependencies, also make sure you actually click into each plugin! They all have plugin parameters for you to configure, and some of them won't work correctly if you don't do that.

There is zero reason that should be necessary. All of the Yanfly plugins you purchased should work out of the box. As I said, there are some little glitches in them (which I rectify when I find them, in the link in my signature), but nothing that would make them not work immediately when installed in a project. What you're describing is not a fault in the plugin code.

Make sure you have installed the plugins correctly, including their order, any dependencies, and configuring parameters. Then save your project and start a new playtest (you can't load a save file). If you get a crash, press F8, go to the Console tab, and take a screenshot of the error trace. Post it here.
Hey I really appreciate your response.

Good info about Java versus JavaScript. I assumed it was just a derivative of Java haha.

Just a question. To clarify your statement, "you can't load a save file". This might be my problem. I have imported the plugins midway project. Is there a way to input a plugin mid project?

Also here is the error that I run into.

View attachment 235156
You can add a plugin mid project. The save file that he was talking about is your in-game save file (not your project's save file). In other words, after you click on "Playtest", then you need to choose "New Game" (rather than "Continue").

The screenshot you're showing is not the console. You've got it in the "Elements" tab, and you need to click over to the "Console" tab.
You can add a plugin mid project. The save file that he was talking about is your in-game save file (not your project's save file). In other words, after you click on "Playtest", then you need to choose "New Game" (rather than "Continue").

The screenshot you're showing is not the console. You've got it in the "Elements" tab, and you need to click over to the "Console" tab.
Oh sorry. Here it is

1658381460723.png
The issue is that you're using RPG Maker MZ, but YEP_CoreEngine is a MV plugin. At least, the project in your screenshot is definitely a MZ project. Though it's a little weird that both your post and your profile claim that you're using MV, and you went and bought a whole set of MV plugins. So I don't know if you're confused about which version of RPG Maker you're using, or if you're just trying to edit a MZ project from within MV.

Yanfly's plugins are for MV. There is a MZ version of most of his plugins, but they've been re-branded as VisuStella. So the MZ replacement for YEP_CoreEngine is VisuMZ_CoreEngine. And if you're trying to make skills cost items, I believe you can do that with VisuMZ_SkillsAndStatesCore. They're both free plugins.

If you're using MZ, and you already bought the entire set of Yanfly plugins, that's kind of a bummer, but it's not an entirely unsalvageable situation. Project FOSSIL allows you to use a lot of Yanfly's plugins in MZ.
The issue is that you're using RPG Maker MZ, but YEP_CoreEngine is a MV plugin. At least, the project in your screenshot is definitely a MZ project. Though it's a little weird that both your post and your profile claim that you're using MV, and you went and bought a whole set of MV plugins. So I don't know if you're confused about which version of RPG Maker you're using, or if you're just trying to edit a MZ project from within MV.

Yanfly's plugins are for MV. There is a MZ version of most of his plugins, but they've been re-branded as VisuStella. So the MZ replacement for YEP_CoreEngine is VisuMZ_CoreEngine. And if you're trying to make skills cost items, I believe you can do that with VisuMZ_SkillsAndStatesCore. They're both free plugins.

If you're using MZ, and you already bought the entire set of Yanfly plugins, that's kind of a bummer, but it's not an entirely unsalvageable situation. Project FOSSIL allows you to use a lot of Yanfly's plugins in MZ.
You solved it for sure. I got the wrong version of plug ins. This happened before when I also downloaded a plug in for MV and tried to run it through fossil. I didn't have luck doing that either. I suppose my next action is to see if I can get the MZ plugins to work as intended.

Thank you for pointing this out. Their name is so similar.
The issue is that you're using RPG Maker MZ, but YEP_CoreEngine is a MV plugin. At least, the project in your screenshot is definitely a MZ project. Though it's a little weird that both your post and your profile claim that you're using MV, and you went and bought a whole set of MV plugins. So I don't know if you're confused about which version of RPG Maker you're using, or if you're just trying to edit a MZ project from within MV.

Yanfly's plugins are for MV. There is a MZ version of most of his plugins, but they've been re-branded as VisuStella. So the MZ replacement for YEP_CoreEngine is VisuMZ_CoreEngine. And if you're trying to make skills cost items, I believe you can do that with VisuMZ_SkillsAndStatesCore. They're both free plugins.

If you're using MZ, and you already bought the entire set of Yanfly plugins, that's kind of a bummer, but it's not an entirely unsalvageable situation. Project FOSSIL allows you to use a lot of Yanfly's plugins in MZ.
If I may implore one more question.

I bought the Visu plugins. Now I am trying to input skill cost items with the main engine VisuMZ_CoreEngine on top of the VizuMZ_SkillsandStatesCore.

Trying to follow the instructions below.

-------------------------------
=== Skill Cost Notetags ===

The following are notetags that can be used to adjust skill costs. Some of
these notetags are added through the Plugin Parameter: Skill Cost Types and
can be altered there. This also means that some of these notetags can have
their functionality altered and/or removed.

---

<type Cost: x>
<type Cost: x%>

- Used for: Skill Notetags
- These notetags are used to designate costs of custom or already existing
types that cannot be made by the Database Editor.
- Replace 'type' with a resource type. Existing ones found in the Plugin
Parameters are 'HP', 'MP', 'TP', 'Gold', and 'Potion'. More can be added.
- Replace 'x' with a number value to determine the exact type cost value.
This lets you bypass the Database Editor's limit of 9,999 MP and 100 TP.
- The 'x%' version is replaced with a percentile value to determine a cost
equal to a % of the type's maximum quantity limit.
- Functionality for these notetags can be altered in the Plugin Parameters.

Examples:
<HP Cost: 500>
<MP Cost: 25%>
<Gold Cost: 3000>
<Potion Cost: 5>
------------------------


So I have altered the plugin parameter for arrows.

1658469118897.png


Now I have tried putting the command <arrows Cost:1> into the note section of the skill while having an item named arrows. It did not work so I figured I am putting the command in the wrong place or perhaps I am missing a skill parameter somewhere? Is it placed in a common event under the attack effect?

Also to activate the Cost calculation or Can pay cost, do I need to put a value or command between those forward slashes on the parameter?

Thanks for all your help
I haven't used this plugin, but I can see in your plugin parameter you typed Arrows. In your notetag you typed arrows. If the words don't match (you didn't capitalize the notetag), I wouldn't expect it to work.
I haven't used this plugin, but I can see in your plugin parameter you typed Arrows. In your notetag you typed arrows. If the words don't match (you didn't capitalize the notetag), I wouldn't expect it to work.
Makes sense. Am I on the right track with putting the parameter in the skill note section?
Yes. Did it work when you fixed the spelling?

Note that any time you change anything in your database (including notetags) you'll need to playtest and start a new game to test, you can't load a save game.
I've never messed with the feature before, but it looks like you're going to need to edit all of the JS parameters, to let them know which item to check, how to handle the payment, and how to read the note tags.

The easiest thing to do would be to copy all of the settings that they have for "Potion", and then edit the relevant parts. Obviously, the "Name" parameter would need to be changed to "Arrows", and you'd want to set the Icon to be your arrow icon. Then go into each of the "JS" parameters (for example, JS: Can Pay Cost?), and look for this line:
JavaScript:
const item = $dataItems[7];

Every time, you see that, change the 7 so that it is the ID of your arrow item. So if your arrow item's ID (the number to the left of the name in the database) is 33, then you'd change the line to:
JavaScript:
const item = $dataItems[33];
Check every parameter and make that change everywhere you see that line. It should be present in multiple of the "JS" parameters.

Also, check each JS parameter and replace any instances of the word "POTION" with the word "ARROW". For example, there will be a section that looks like this:
JavaScript:
if (note.match(/<POTION COST:[ ](\d+)>/i)) {
    cost += Number(RegExp.$1);
}
You would want to change it to this:
JavaScript:
if (note.match(/<ARROW COST:[ ](\d+)>/i)) {
    cost += Number(RegExp.$1);
}

There could be several instances of the word "POTION" in each JS Parameter. Make sure you replace them all.

Sorry, I don't know how to describe the process in a manner that doesn't sound kinda overwhelming, but it's actually not that hard once you try to do it.
I've never messed with the feature before, but it looks like you're going to need to edit all of the JS parameters, to let them know which item to check, how to handle the payment, and how to read the note tags.

The easiest thing to do would be to copy all of the settings that they have for "Potion", and then edit the relevant parts. Obviously, the "Name" parameter would need to be changed to "Arrows", and you'd want to set the Icon to be your arrow icon. Then go into each of the "JS" parameters (for example, JS: Can Pay Cost?), and look for this line:
JavaScript:
const item = $dataItems[7];

Every time, you see that, change the 7 so that it is the ID of your arrow item. So if your arrow item's ID (the number to the left of the name in the database) is 33, then you'd change the line to:
JavaScript:
const item = $dataItems[33];
Check every parameter and make that change everywhere you see that line. It should be present in multiple of the "JS" parameters.

Also, check each JS parameter and replace any instances of the word "POTION" with the word "ARROW". For example, there will be a section that looks like this:
JavaScript:
if (note.match(/<POTION COST:[ ](\d+)>/i)) {
    cost += Number(RegExp.$1);
}
You would want to change it to this:
JavaScript:
if (note.match(/<ARROW COST:[ ](\d+)>/i)) {
    cost += Number(RegExp.$1);
}

There could be several instances of the word "POTION" in each JS Parameter. Make sure you replace them all.

Sorry, I don't know how to describe the process in a manner that doesn't sound kinda overwhelming, but it's actually not that hard once you try to do it.
Thanks for this. What program do you use to find and replace the code. I use notepad an d CTRL + F to find the numbers and word Potion but after modifying the code, I cannot paste it back into the text line of the parameter. Are you using a Javascript program to break it down? Right now in notepad it is a massive jumble of characters and code.

Original thread: https://forums.rpgmakerweb.com/threads/plugin-newbie-here.149609/