Skip to main content

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

Hey Ramza!

I've tested this a couple of times with the most recent version where some traits like "CHANGE HP RECOVERY" will stack the last ingredient's trait of the same name over onto the next item cooked. Or at least last in ID, I'm not quite sure.

Specifically, I tried to make a salad with one item (lettuce: 5 HP) and another (tomato: 10 HP) with those tags and the result item will first have 15 HP restored. If I create more, the next one will be 25 HP, then 35 HP and so on, even though I used no extra ingredients and I was expecting all of them to restore 15 HP instead. Am I using that trait notetag incorrectly? It's almost as if it "remembers" one of the ingredients' additive traits and stacks it onto the next item. Please forgive me if this is user error.

Hmm.

I recall someone having a similar issue to this a long time ago that I'd thought I'd fixed. It revolved around the fact that his ingredient items weren't independent items (from the YEP_ItemCore), and a weird interaction with the way my plugin was adding traits together. It's possible the fix I implemented didn't take the second (or third or fourth) ingredients into account when doing whatever it was I made it do to fix the problem.

One question, though, are you using the YEP_ItemCore plugin to make your ingredients independent items? The problem I mentioned above was actually because the user wasn't using the ItemCore at all, and while that is okay, the additive traits were never intended to work in projects that didn't have that.

(1 edit)

Ooh, yes, sorry I did forget to mention that  I am using YEP_Item Core. I made sure to isolate the plugins in a clean project before proceeding.

I thought it was my project doing it since it I changed it to accept five ingredients, but when I tried it on a clean project with the unedited plugin, I produced the same results when using only two ingredients that aren't necessarily independent items either. Both the ingredients had the "Not Independent Item" notetag while the result did not, if that helps. Wait, should both the ingredients /and/ the result be independent? I was hoping to have stackable, non-independent ingredients and non-stackable, independent results, for example.

So, ideally the traits were only ever supposed to work on independent ingredients/result items. When I first made the system that was the plan, but an oversight caused them to work with non independent ingredients as well. What was originally supposed to happen was that in order for an item to be on the 'additive traits' list in game successfully, it had to be put there by the dev in the plugin params, and also be an independent item.

Somehow, I'd mucked that second part up, and for a long time, you were able to have ingredients that weren't independent, but did have additive traits on them. When the other user I was talking about earlier reported a very similar issue, I realized it was possible in the first place to have additive traits on non-independent ingredients, but rather than fix the problem by disabling those traits on non-independent items, I "fixed" the problem he reported. 

As it turns out, my fix likely only worked for ingredients in the first slot. During the function that combines all of the traits on all of the ingredients, the traits of the result item were being added to an ingredient, which would never have caused a problem if the ingredients were independent items. The item that would inherit all of those traits would normally be removed from the inventory after. However, if the ingredient was non-independent, all instances of that item would inherit the traits. The instances already in the player inventory, the instances in the shops, the instances in treasure boxes. If you then make the same recipe again, that ingredient has way more traits than intended, and adds them all back onto itself a second time, causing the bonus to increase again.

Worth noting, is that those traits aren't saved on the item, so if you saved the game and then reloaded a save and crafted the same recipe again, it would be normal again.

The fix I applied to solve the problem originally must've only been for the first ingredient, or the first slot, or both maybe. I'd have to look more closely at what I did originally, to solve this problem for you, or find a better way to more permanently solve it.

-Ramza

(+1)

Ah! My apologies then, Ramza. It was a total oversight on my part. That all makes perfect sense.

Coincidentally, I did notice that it wasn't saved like that, too. I did tinker around with your core script a bit to see what I could do to somehow "reset" it to no avail recently and that's when it hit me that them also being independent was exactly what I was missing, haha. Oops.

If you were to look more closely at this weird hybrid situation (albeit outside of your intentions), I would greatly appreciate it for so many reasons including organizational, but I understand if it's not exactly something you want to do. I would also like to say in general how much I appreciate you for providing a top quality plugin--I've been looking for AGES for something like this.

Thanks for saying so. When I first launched it, I wasn't even sure if people would want to use it over the yanfly synthesis one. This was the first plugin I'd made entirely for other people to use, and not for my own use as well. It feels good to get reaffirmation once in a while.

For now, I'd suggest making the ingredients independent items. I'll work on trying to fix it, but progress on that is going to be a little slow as I don't have a lot of time, and I've been using what little time I do have to work on a couple of extensions for this plugin.

(1 edit) (+1)

Totally understood. If it makes you feel even better, I'll show you a GIF of how I ended up using it before! The biggest reason I chose this over YEP Item Synth. The ability to brand items into families of sorts for multiple recipes to work is absolutely awesome! Being able to run code for the first time allowed me to create a recipe card item to spawn after every first meal prep so I can make it in bulk later, too.  Independence or not, this is pretty powerful tool because it encourages the player to experiment much like they could if I tried to go somewhere like Breath of the Wild.

Sorry. I just wanted to gush about it for a moment since I think plugin authors need more good feedback more often, ya? Again, thanks so much! This screen alone breathed so much life into the early game experience. Very cozy! Good luck with your future endeavors! 

Yikes. You've made so many aesthetic changes to it that if I'd seen this anywhere else I'd never have been able to tell it was my plugin at all.

I absolutely love it! :)