Issues with Farming Event + Yanfly Engine?

Hello! So i recently got RPGmaker mv and started my first project about 3 days ago! I am completely new to rpg maker so sorry if theres an easy solution to this. i currently have a vague understanding of switches and variables but am not 100% up to date with them.


I implemented Driftwood Gamings farming system into my game. 3 simple plots on the same map where my character spawns. (4 seed and crop types) It worked perfectly! i could farm and my items would correctly be added to my inventory. 


DG mentioned yanfly and their plugins being great so i decided to take a look at it and put a bunch of plug ins into the game and afterwards after choosing to "plant a seed" i would get an error message: Type Error "cannot read property 'iconIndex' of undefined


All of my other events are still working properly from what i can see and the onlly problem is my item inventory. if i pick up an item (like 1 fish) my inventory says i have 3 instead of one but if i use it once its gone. i don't know if theres a way to fix that text,,


i attached some images, first of my error page (the box you can vaguely see on the bottom right isn't what my choices are supposed to look like, i'm not sure whats wrong), then of the event page i'm having trouble with. if i test anything that isn't those first two lines it works. otherwise it gives me an error that says: Type Error "cannot read property 'code' of undefined


the last picture is of the plugins i added


if anyone knows any fixes to this i'd be super grateful


thanks guys!

error.png

error2.png

error3.png
1) Yanfly's plugins need to be in the order that is given on the website - you have them in the wrong order and that won't work (for example, your core engine plugin is at the bottom instead of at the top)


2) when installing plugins, you always need to launch a new game - loading old savefiles usually gets you this problem as well
1) Yanfly's plugins need to be in the order that is given on the website - you have them in the wrong order and that won't work (for example, your core engine plugin is at the bottom instead of at the top)


2) when installing plugins, you always need to launch a new game - loading old savefiles usually gets you this problem as well



Hello! Thanks for the help but i have actually just fixed my own problem! (i always start a new game instead of loading since i've encountered that not all changes get loaded) 


But the problem lied in the actual coding in some of the text windows where i would refer to \ii[0019]. I learned that for the item index to work you can't put in the zeros, so instead of \ii[0019] i should have been adding \ii[19] . Due to not having the itemcore plugin before, the game took \ii[0019] as simple text and it didn't cause any problems but once itemcore was put in it would struggle because \ii[0019] doesn't exist and basically broke it


funny enough i thought cancel branching was the problem because i would delete \ii[0019] and put in "carrot" and then change branching to disallow and it worked so i though "IT WAS THE BRANCHING ALL ALONG" so i changed it on all 3 plots and the one where i put "carrot" worked but the other two didn't because they still contained \ii[0019]. So i struggled for quite a while because i couldn't put 2 and 2 together


but i don't know that yanflys engines have to be in the right order? i have all of them like this and everything is running proprely. i haven't come across any issues. is the importance of the order confirmed?
but i don't know that yanflys engines have to be in the right order? i have all of them like this and everything is running proprely. i haven't come across any issues. is the importance of the order confirmed?



Read the red line near top of the page


http://yanfly.moe/yep/


It isn't neccessary in all cases but some plugins need to be lower than others, and the order given is the only way to guarantee that for all cases. You might get away with a different order if you accidentally have all required sequences correct, but simply adding more plugins below will have a high chance of breaking the requirements for one case or another.


And you should never use leading zeroes in script commands, no matter what you do - because in some script languages, leading zeros are the command to read the following number as octal instead of decimal - which means your IDs will be wrong as soon as you go above ID 7 (0010 octal is 8 decimal)
Read the red line near top of the page


http://yanfly.moe/yep/


It isn't neccessary in all cases but some plugins need to be lower than others, and the order given is the only way to guarantee that for all cases. You might get away with a different order if you accidentally have all required sequences correct, but simply adding more plugins below will have a high chance of breaking the requirements for one case or another.


And you should never use leading zeroes in script commands, no matter what you do - because in some script languages, leading zeros are the command to read the following number as octal instead of decimal - which means your IDs will be wrong as soon as you go above ID 7 (0010 octal is 8 deicmal)



- Fair enough! i went to the plugins individually through a separate page and didn't think to go to the main page,,, (if i delete and re add all the scripts it won't mess up my project will it?)


-and i did not know that! i don't know a lick about coding other than your basic html which doesn't work here 😛 thats super helpful to know though! I'll be sure to keep that in mind! Thank you for the info! <3
do not delete or add any plugin - simply reorder them by drag'n drop on the list, same way you reorder maps etc.


And there is no need to quote entire posts when you answer

Original thread: https://forums.rpgmakerweb.com/threads/issues-with-farming-event-yanfly-engine.68669/