MV Need help debugging a plugin please!

im having issues with the plugin im making so i need help, im not great at code at all but im trying.
issues im having is the strength bar and accuracy bar seem to constantly oscillate which is good but they then do it so fast they start to pile up on each other creating weird instances. they are suppose to move left to right as if increasing.
Then the bottom numbers S: and A: are stacking on each other instead of clearing before next throw happens. Throw of the apple occurs when strength and accuracy are both confirmed. which reminds me that they also don't seem to lock in place after pressing ok on each one. the the apples left countdown is not decreasing properly. just remains at 5, as the game is suppose to end after 5 tries. then finally the apple is suppose to warp towards the can but it doesn't. then it would respawn back infront of player and cycle repeats till all tries are used up.

honestly been at it for a week and i keep having the same problems. code is attached below and pic is for reference on issues.


Screenshot 2025-06-27 205227.png
first, while the version is 1.8.3 fully polished, it means you didn't made it!
second, the filename of the plugin should be: CanKnockdownMiniGame

based on the parameters.

cost and halfVar aren't event used, so if you modified it without knowing
what it exactly does, what is the original link to the minigame?

where is it found?
first, while the version is 1.8.3 fully polished, it means you didn't made it!
second, the filename of the plugin should be: CanKnockdownMiniGame

based on the parameters.

cost and halfVar aren't event used, so if you modified it without knowing
what it exactly does, what is the original link to the minigame?

where is it found?
You won't find it anywhere. Like I said I made this. So it's an original plugin. I had assumed everything was fully polished till I tested. So yeah my naming is weird.
while its set in MV, you use MV too?

make sure the plugin has the correct name you used as the parameter,
if not, all params are being ignored (some or most code too if not equal).

I don't see a refresh mode either, and unsure why you use a setTimeout
inside a plugin command!

scene and setTimeOut aren't required, unless html is involved to set
a delay or for any other reason, so you can call the scene without checking.

as the scene doesn't exist or check if something is false, than open it
like !active, than start it.

so if you do have a small demo of it, I can mess around for you.
Didn't know all that, been learning from books, videos and apps so I still get overwhelmed and don't know much sigh.
Yes I use mv and mz, I had stopped making my projeyin mv for a while as I had got busy plus health issue.
But now I'm trying to pick back up and honestly I feel I forgot a lot

Should I create a standalone demo for it?
Oh and I'll rename the plugin and stuff and give the update version as I was working on it more.
I don't own MZ, so if you work in MV, than make a mini demo.
remove stuff not required, so the event setup, how it works can be nice.

and I learn on my own too, and there are lots of stuff I need to recheck
constantly to make sure it works the way I wanted too, so I debug it a lot
as well, but bugs/conflicts can always exist (and it is painful) so I know
how it is 🙂

health goes first, so take your time.
I don't own MZ, so if you work in MV, than make a mini demo.
remove stuff not required, so the event setup, how it works can be nice.

and I learn on my own too, and there are lots of stuff I need to recheck
constantly to make sure it works the way I wanted too, so I debug it a lot
as well, but bugs/conflicts can always exist (and it is painful) so I know
how it is 🙂

health goes first, so take your time.
i managed to work the out the bugs in the plugin. also found the weird lapping bars was my fault. i set the event to parallel which was calling the event infinitely lol go figure. I set it to autorun then self switch so its just called once and its nearly perfect. Im just going to try in figure out how to get player back to original map when mini game ends as using saved variable cordinates prior to transfer isn't working for me. i get taken to a black map. after that i should be good.
Will more than likely also make the plugin available for the community as well.
the next project will be an automatic resource trimmer that will remove/delete any files not used during packaging to an apk and stuff. this way it saves a ton of time having to manually check for them and delete them.
plugin commands needs just an action trigger, not parallel/autorun
as that repeat the plugin command over and over.

so keep that in mind as it could also crash if more than 1 is option.
specially stacking issues.
the next project will be an automatic resource trimmer that will remove/delete any files not used during packaging to an apk and stuff. this way it saves a ton of time having to manually check for them and delete them.
There already is a method for this, activated by the checkbox "delete unused files" on deployment.

The problem with that option is that very few plugin writers use the commands to register the resources their plugin needs, resulting in the engine not detecting them as "needed".
And I don't know if you could analyse every plugin for its resources without the help of the plugin programmer, but that would be neccessary for such a function to work correctly.
yes it actually will look carefully and then list the files that will be deleted and the individual will be able to unselect any that may accidentally get marked for deletion. Reason why im making it because ive had issue with the built in feature for packaging file
if you want to do the resources save, never use the
checkbox "delete unused files".

Instead, do it manually, as the way I do it, is remove all images, than add
files that I use 1 by 1 (tiles unused can be left alone or remove them if you like),
as I customise, so only tiles I use are on there, and added to the folder.

this way, all files will be used (same way I do with sounds, bgm, bgs, se, me).
as manually sorting is the best way.

there is a sample plugin to guard the files, which you can add, so it will be skipped.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-debugging-a-plugin-please.178590/