Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Oh, the line number I gave was for if you have it set to not allowing soft failures.

If you have soft failure chance the line is actually 6616.

-Ramza

(2 edits)

Thank you!! That worked. Since I added some lines of code, the number values didn't match up but I just stared by editing out all 4 of the instances of that for now, did a console.log('test') and it seems to be working for the main recipe. It doesn't run on a partial soft fail/success, which might be normal.

As for the fifth ingredient slot, I'm making decent progress but have 2 factors to resolve currently.

1. When I have 4 ingredients loaded into their slots, the 5th ingredient slot still acts as a 'Craft' button, but only when all 4 ingredients are present. 

2. Since I haven't been able to load a 5th ingredient, I can't tell if the partials are working properly. They are working with 3 and 4 ingredients but it seems to be giving the 'craft successfull' scene but taking the additional items, which I am not sure if that is normal. I'll have to check more after work today. Thanks again for all your help and for the amazing plugin. 

(+1)

You can call Ramza.CS.findRecipe(ingredientsquantity) from the console to test if it will find a recipe with any ingredients.

ingredients is an array of 2-4 (or 5 in your case) items, so [$dataItems[12], $dataItems[13], $dataItems[14], $dataItems[15]] would be an example of four ingredients being provided to the function. quantity is also an array, this is the for quantity of items given. So calling the above function with the below code is a good test to see if it's working, and in fact, was how I did testing on the recipe functions before I'd coded the interface for it:

var inglist = [$dataItems[12], $dataItems[13], $dataItems[14], $dataItems[15]]
var qtylist = [1,1,1,1]
Ramza.CS.findRecipe(inglist, qtylist)

That should return some stuff in the console if it found a match. It returns true, the result item (which is the first list in the recipe list plugin parameter), and then the recipe element of that result item. So if you have multiple recipes for one item, it'll tell you which recipe it found successfully. 

In the case of a partial match, the first value it returns will be false, but the other two will be the same thing. If no match at all is found, it only returns false.

Your other issue is probably because the function Scene_Crafting.prototype.onIngredientSlotOk is used both for clicking on an empty (or filled) ingredient slot as well as the craft button, because all of those are all items in the command list. I had to make it so it knew which one of those things you were clicking 'Ok' on, so it does an index check. Change the <= 3 to <= 4 and it should work from there.

-Ramza

(1 edit)

So I seem to have successfully added the fifth ingredient slot!

Thank you for pointing me to the onIngredientSlotOk function, I totally missed it, but it definitely worked!
Also, thank you for the code to check recipes in the console, that will make filling out the recipes a lot easier.

I'm really glad I got this plugin, I've been looking at it for a while now and I'm excited to put it into effect!

I am still debating whether or not to keep Yanfly's synthesis around for the basic synthesis aspect as I have put a lot of work into some custom synthesis effects.

I am wondering if there is a way to reference the price of the result item in the recipes on creation code block?

Also, are you familiar with a plugin by DreamX that uses Yanfly's Item Core to apply random prefix and suffix attributes to synthesized weapons and armors?

That would be a cool plugin to create compatibility with. If that's something you'd be open to, I'd be interested in talking further about a commission. 

I can't thank you enough for all your help.

(+1)

The codebox can actually reference the variable resultItem to get the properties of the item returned, so you could use resultItem.price to get the gold value of the base item. I think that value will be different than the actual value of the actual item given if you're using random affixes that end up changing the price of the result, though.

This probably won't entirely work as a replacement for the synthesis plugin, but you could use my recipe list extension in tandem with the default crafting plugin. Recipe list makes it so that the player can raft known recipes from a list, without having to put the individual ingredients into the slots every time, or having to keep mental notes of the ingredients involved in each recipe. You could set it up so that the player learns recipes through experimentation, and then can synthesis them more easily from the recipe list menu instead. Of course, if you used that, you'd also need to modify it to make use of the fifth ingredient slot you've added, so that might add some difficulty to it.

As for your custom synthesis things, I don't have a particularly good replacement for those. You can use an <on creation eval> note tag from item core on the items, and do all kinds of modifications to the result item if it was given to the player on the crafting scene, like attach augments, or use item upgrades on them, but without knowing exactly what you were doing with synthesis, suggestions for replacements will have to be vague like that.

You could also look into the 'Additive Ingredient Traits' I have in this plugin to add some stuff to your crafted gear from the ingredients used. Those aren't random, though.

I am aware of that plugin by DreamX, but I've never used it myself, and I'm not entirely sure there's a way to get it to work together with my system. I'd need to look more closely at how it works to see how it does what it does, and see if that can be taken into account.

-Ramza

(+1)

Awesome, I'll take a look at the extension shortly. And I guess I wouldn't worry about the DreamX plugin, as it makes more sense to let the player decide which stats to apply through attachments after the creation process. I think the additive traits will work just fine for me, especially having an additional slot. 

Thanks again!