MV Ramza's Plugin Suite Support topic MEGATHREAD

Ok, thank you, I look forward to any updates 🙂
Hi. I have a question regarding the plugin for the MZ - crafting system

I have a npc you talk to "unlock" a recipe to be able to craft a new item. When you go to the crafting station and put the required items, you can craft the item but doesn't let you know you are crafting it in the Result section. The recipe I have unlocked by default does not have this problem and shows as result.

1747412912475.png


1747412893523.png


How can I have the recipe that was unlocked show up in the result section so the player knows what they are making? And I have one last question, is there a way for me to have a thing that displays all learned/unlocked recipes the player knows how to craft and how to craft them?
Hi. I have a question regarding the plugin for the MZ - crafting system

I have a npc you talk to "unlock" a recipe to be able to craft a new item. When you go to the crafting station and put the required items, you can craft the item but doesn't let you know you are crafting it in the Result section. The recipe I have unlocked by default does not have this problem and shows as result.

View attachment 340508

View attachment 340507

How can I have the recipe that was unlocked show up in the result section so the player knows what they are making? And I have one last question, is there a way for me to have a thing that displays all learned/unlocked recipes the player knows how to craft and how to craft them?
Hello there.
Unlocking a recipe should enable it to be shown in the preview window. That's basically the only thing that unlocking it does, in fact, as without the recipe unlocked the play would still be capable of making the item, it would just show as above.

There could be a couple of things that happened here, so to figure out which, if the player makes the item once (as shown in your screenshot) and then gets the ingredients to make it again, does it then show in the preview window?

If the answer is no, there might be something wrong with the logic to show the items in the preview window, but what I think it more likely to have happened is that you accidentally unlocked the wrong recipe via the plugin command, and that it will show in the preview window after your craft it once. As I recall, you unlock recipes by referencing the list of result items in the plugin parameters, and the ID is actually 1 lower than the number it shows on the left side. Item 1 is actually 0, when you go to unlock the recipe, so it's possible you unlocked what you thought was the third item in the list, but actually unlocked the fourth.

As for your second question, there is an addon extension called Recipe List which adds another command to the menu to list all recipes for all crafting types known to the player. It also has the ability for the player to craft them right from that menu command, although that could be disabled if you set the plugin to 'informational mode' only.
Hello there.
Unlocking a recipe should enable it to be shown in the preview window. That's basically the only thing that unlocking it does, in fact, as without the recipe unlocked the play would still be capable of making the item, it would just show as above.

There could be a couple of things that happened here, so to figure out which, if the player makes the item once (as shown in your screenshot) and then gets the ingredients to make it again, does it then show in the preview window?

If the answer is no, there might be something wrong with the logic to show the items in the preview window, but what I think it more likely to have happened is that you accidentally unlocked the wrong recipe via the plugin command, and that it will show in the preview window after your craft it once. As I recall, you unlock recipes by referencing the list of result items in the plugin parameters, and the ID is actually 1 lower than the number it shows on the left side. Item 1 is actually 0, when you go to unlock the recipe, so it's possible you unlocked what you thought was the third item in the list, but actually unlocked the fourth.

As for your second question, there is an addon extension called Recipe List which adds another command to the menu to list all recipes for all crafting types known to the player. It also has the ability for the player to craft them right from that menu command, although that could be disabled if you set the plugin to 'informational mode' only.
Thanks so much! My problem was what you listed with the ID is 1 less than what it shows. Also thanks for the recipe extension. I have one last question, if it is possible, how do I disable a recipe from being able to be crafted if not unlocked yet (unknown recipe)? I might be blind but I don't see where I can do it if it is possible.
Thanks so much! My problem was what you listed with the ID is 1 less than what it shows. Also thanks for the recipe extension. I have one last question, if it is possible, how do I disable a recipe from being able to be crafted if not unlocked yet (unknown recipe)? I might be blind but I don't see where I can do it if it is possible.
I figured that'd be what it was. There wasn't a good way to handle that when I made it, as arrays start at 0, so unless I skipped element 0 on every array, the numbers wouldn't line up.

There is a plugin command to completely disable a recipe, and re-enable it. There are no plugin parameters to have recipes disabled by default, though, so you'd need to run a common event at game start to disable the recipes you don't want anyone crafting until they're unlocked later.

From the help file:
* Disable Recipe
* -Disables the selected recipes, preventing them from being crafted
* -The arguments for this command are a list of numbers. The numbers
* correspond to the result item list in the plugin parameters. Recipe 0 is
* the first item on this list, despite the list starting at index 1 for some
* reason.
* -A disabled recipe will return a total failure, unless the recipe also
* contains a partial match inside of it that is met by the ingredients
* provided.
*
* Enable Recipe
* -Enables a recipe, allowing it to be crafted. This is the reverse of
* disabling it.
* -Use these two commands to prevent players from crafting important
* items before they should be able to, by having previous knowledge
* of the ingredients.
Hi Ramza, for Dual-Wield, is there a way to disable mainhand or offhand via conditional checks? For example, if I am using a melee weapon in the mainhand and a range weapon in the offhand, if I target someone that is out of range for the melee weapon, I should only strike with my offhand. For me to set this up where actors are only using 1 weapon, I have no issues, as I use YEP's plugins to set it up, but for dual-wielding actors, I have no idea how. In other words, I am asking if there is a lunatic mode for the skill notetags of <Mainhand Skill>, <Offhand Skill>, or <Dualwield Skill>?
Hi Ramza, for Dual-Wield, is there a way to disable mainhand or offhand via conditional checks? For example, if I am using a melee weapon in the mainhand and a range weapon in the offhand, if I target someone that is out of range for the melee weapon, I should only strike with my offhand. For me to set this up where actors are only using 1 weapon, I have no issues, as I use YEP's plugins to set it up, but for dual-wielding actors, I have no idea how. In other words, I am asking if there is a lunatic mode for the skill notetags of <Mainhand Skill>, <Offhand Skill>, or <Dualwield Skill>?
There isn't anything that complex available for that plugin, unfortunately.

Using <offhand skill> would make it so that the skill only used the offhand, which in your example would be the ranged weapon, but if the player swapped his ranged and melee weapon hands, it'd have to change to <mainhand skill> to lock it to the ranged weapon in his main hand.

You can see in the dual wield plugin the section of code where it reads the mainhand and offhand only skill notetags and modifies the skills action sequence starting at line 613. Because that change happens during notetag parsing, at database load, there's no way to conditionally change it during runtime.

However, the group of action sequence changes the note tag reading function is doing for those skills is worth looking at for you:
Code:
mainhandAdd = []
mainhandAdd[0] = ['eval', ['user._numAttacks = 0']]
mainhandAdd[1] = ['eval', ['user._mainHandLocked = true']]
mainhandAdd[2] = ['eval', ['user._mainHandLocked = false']]
mainhandAdd[3] = ['eval', ['user._numAttacks = undefined']]
obj.setupActions.unshift(mainhandAdd[0], mainhandAdd[1])
obj.finishActions.unshift(mainhandAdd[2])
obj.finishActions.push(mainhandAdd[3])

That code is shifting and pushing evals into the skills action sequence, which makes it lock the skill to main hand (in this case), the next note does it for offhand. There's nothing stopping someone from removing those lines from the action sequence using shift() (which shifts everything in an array to the left, deleting whatever's in element 0, and pop(), which removes the last element from an array, and then doing what the above did to swap the skill between being a main or offhand skill based on something happening.
Hi Ramza, thanks for the reply. I am not sure if I can make sense of it, but will try to see what I can do.
I can try to explain it a little bit better.

All skills (using the YEP Battle Core anyway) have a default action sequence, whether you've set one or not. It consists of all of the action sequence phases, <setup>, <whole>, <target>, <follow>, and <finish>. In the default sequence, most of them are blank. The setup sequence does default things, like show the name of the skill, and do the charge animation. The whole sequence is blank. The target sequence causes the damage, shows the animation, shows the attack motion, and causes any additional effects. The follow sequence runs any common events on the skill. The finish sequence resets the camera, clears the text from the combat log, and resets the battler positions.

All action sequence commands exist in an array on each skill, which is read during battle, and the executed in the order that it's read in.

When you tag a skill as main hand or offhand, my plugin adds a couple of things to the action sequence of the skill. The above commands were from the mainhand tag, but it's mostly the same for the offhand one as well. It adds a couple of eval commands to the beginning of the setup sequence using the unshift() function, and then it adds one command to the beginning of the finish sequence using the same unshift() function, and one to the end of the finish sequence using push().

The eval commands in the setup sequence are what locks the skill into doing damage with only the one weapon. The eval commands in the finish sequence are just reverting the commands from the setup sequence, so unlocking the hand. If you left the setup sequence commands, but removed the finish sequence commands, the actors weapon swings could be messed up, although more likely, you'd only notice it if you accidentally locked the off hand and then did a normal attack, which would make the offhand swing first. If you used another main or offhand skill instead, the action sequence would reset itself in the setup sequence, anyway.

But I digress. While you can't change the note tags in real time, you can change the action sequence of a skill at runtime. So if you had some way for the project to know that you've got a ranged weapon in your main hand before the action sequence started, you could add your own changes to the action sequence to lock it to the main hand, as I did in the note tag section I copy-pasted above, and then remove them after the fact using the opposites of the functions I named, unshift() becomes shift(), and push(), becomes pop(), which would revert the skill back to normal again.

Of course, after typing all of that out, it's probably much simpler to use two passive states, one which only becomes active on the actor if a ranged weapon is in the main hand, and the other when he's got a ranged weapon in his off hand. Check for the state during the setup action of the skill, then lock the main or offhand using the same eval commands I force into the action sequence in the post above.

Original thread: https://forums.rpgmakerweb.com/threads/ramzas-plugin-suite-support-topic-megathread.108140/