Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

There sure is.

The last version of the Core plugin actually fixed an issue with this previously undocumented feature, which made it cause a crash when used. $gameParty.changeCraftExperience(cat, value) can add or remove experience from a crafting category, and will cause it to level up (but not level down). For cat you'd use the category name in the form of a string ie: "cooking", "alchemy". The value is any number, positive or negative, and will be added to the total craft experience for that category. 

So, if you use the 'script' command, you can run the following script:

$gameParty.changeCraftExperience("alchemy", 12)

and it will add 12 experience to the alchemy level. If this makes the alchemy experience high enough to level up, the level will increase as well, but there will not be a message generated by the plugin, you'll have to handle that via whatever common event you're running to give the experience.

$gameParty.getCraftLevel(cat) can be used to check the current crafting level at a specific time. You could store the value it returns in a variable via the 'script' operand, grant the experience, and then check it again and compare the two to see if a level up occurred as a result of your experience gain, then show a message after gathering is completed.

~Ramza

(3 edits)

Thank you for your reply. The command works but it does not check if it levelled.
 But it shows 180/90 with the exp bar going out of its gauge. Without levelling up. My call is: $gameParty.changeCraftExperience("alchemy", 90) and I used it twice.

I do have a level up system for all my gathering jobs using a simple check on level, exp and next exp variables. In there I don't use $gameParty.getCraftLevel(cat) but it is working. What I use to store the level and exp into my variables is:
$gameParty._craftLevels.alchemy;
$gameParty._getCraftExperience.alchemy;

(I could not send a picture for some reason)

Edit: Btw! I had to download the core now which is new to me. But I use yanfly plugins. What order do you recommend your core plugin to be?

The only requirement for core is that it is loaded before the maker specific plugin in the load order (ie: the Ramza_CraftingSystem plugin). You should also update that plugin as well, if you haven't already, if the version you were previously using was old enough that it didn't require the core plugin, you're working with a version that had several bugs in it that have been fixed, at the very least. There had been an apparently long standing bug where the function I described above simply caused a crash.

With that being said, I loaded up my test project after some hilarious cloud based backup shenanigans on my new laptop, and managed to confirm that using the function above does grant experience to the specific crafting category, and caused it to level up, and reset the rollover experience as I expected it would, in both MV and MZ versions.

I would definitely recommend updating the crafting system plugin for sure, since you weren't previously using the core plugin, your older version is likely woefully out of date, and that function not doing what it's supposed to is likely the least of your problems.

~Ramza

Thank you for your time, Ramza.
Unfortunately, I could not fix this.
I updated the 3 plugins (Core, Crafting System and Crafting Experience Display) again and the problem remains. 
I than downloaded your Demo for the crafting system and tried using the same code line on there. The problem also remained there in the exact same way. 
I am using MV but as you mentioned, it works for you so now I am confused. 

Okay, I just typed up a giant response and then accidentally hit a keyboard shortcut that refreshed the page and lost the whole thing... so bear with me.

I created a brand new MV project, with only the latest versions of all three plugins:

CS_Core (1.11)

CraftingSystem (1.31)

CraftingLevelsScene (1.01)

In this test project, I left all plugin params as default with two exceptions:

I made an alchemy recipe for item 1, which needs one item 1 and one item 2 to craft.

I set 'Hide Unused Categories' to false in the levelscene plugin.

On the default map, I added one NPC who says a chat and then uses the function I gave you in a script call to add 51 experience to alchemy. 

$gameParty.changeCraftExperience('alchemy', 51)

Opening the menu before talking to the npc correctly shows craft experience for Alchemy as 0/100 level 1. Talking to her once shows it as 51/100 level 1. Talking to her again shows it at 0/200 level 2.

This function is not doing anything fancy, and it has a pretty unique name, so it's unlikely another plugin is causing this compatibility problem. The best was to troubleshoot this further is to open the console from the test run (f8 or f12) click the console tab at the top, and then type the following:

$gameParty.changeCraftExperience

Without providing the ()s, or the params, instead of running the function, the console will output the code for the function, like below:

ƒ (category, add){     $gameParty._craftExperience[category] = $gameParty._craftExperience[category] + add     var level = $gameParty._craftLevels[category]     var requiredexp = eval(Ramza.CSParams.Experien…

if you click on this blurb in the console, it will take you to the sources tab and show you the whole thing, including the name of the js file it's coming from at the top, which should be CS_Core.

My version control isn't the best in the world, downright crappy, actually, so I can't tell exactly at what point I spun this function out of the original plugin and moved it to the core, but at least on version 1.15 of the base crafting system plugin, the function was there, and identical to the one in the CS_Core plugin. If your sources tab is showing a different plugin name than CS_Core at the top, then something is overwriting the function. The only thing that could be doing that is probably the craftingsystem plugin, but if you're using the newest version, that shouldn't be possible.

The only other thing I can suggest is maybe trying with a new save? The experience and levels, and maybe even the level curve could be stored in the save file, and might not be updating properly.

(5 edits)

You must have gotten frustrated writing that...
It is very weird, but everything shows correctly as you explained. However... It is still doing it.

You mention version CS_Core (1.11)?
The one in the itch download is 1.10. (I just checked). I mean... that should not be the problem, right? The rest is up to date.
(Found out I had to put my picture in paint to be able to send it.)
I tried moving your plugins around, like at the bottom of all yanfly plugins but that did not fix it. This is how I have it now.

Anyway, I got the code for giving exp, if I do find the problem later, I'll let you know what the issue was.
Meanwhile could you give me the code for current exp. The one I use currently is now giving me this error:

Edit: I found the code: $gameParty.getCraftExperience("alchemy");

Thank you very much for your time and help. <3

I wish that were the problem.

I'm not sure what's going on here now, tbh. The version I have on my PC is 1.11, and I ran it through diffchecker with the version up for download and they're exactly the same except my version has notes in the patchnotes section that says it fixed an issue with that function. The actual function is exactly the same in both versions though.

It's like I'd started to fix a problem with that function, and wrote the patch notes first (which I honestly never do), and then... stopped making the fix and forgot about it? I don't know what crash problem I allegedly fixed with the function if the function is exactly the same between versions, either.

In any case, your load order is correct. It works for me in a completely clean test project, and my own test project. The only thing I could think of that might be causing problems if if you changed the experience curve, and the changeCraftExperience function can't get a usable value out of it to check against, but if that were the case, none of your crafts would ever level up, not just this one you're gaining experience with using the function. And also if that were the case, I think it'd probably cause a crash rather than just not work, since I used 'eval' instead of 'try', if there was some unforeseen problem with the formula the function would end up comparing a number to NaN, and not like that.