MV I need help figuring out how to create plugins(SOLVED)

So I have code for a hunger system, I know plugins are javascript files but how do I turn my code into a javascript file? Im new
to coding and rpg maker. I know how to use plugins but I'm wanting to create my own just having issues doing so.

My first attempt I used a txt file from the default windows notepad and used a converter to turn it into a JSON file but thats not the same as a javascript file i guess? because the file image is different from the plugins.

Basically I just need to know a program that I can use to create plugins and how to do it. Would prefer if the program is free.

I'm also new to the forum so I apologize in advance if I'm going about this incorrectly or posting in the wrong thread. Thank you!
When using "Save as", instead of saving it as a .txt file, simply select "JavaScript (.js)". Or just change the extension on an existing file from ".txt" to ".js" by renaming it.

In general, it might be a good idea to do some basic JavaScript-focused tutorials first before doing anything RPG Maker specific, since most resources for plugin-making assume you already have basic JavaScript knowledge.
sometimes you se 2 options:
save as "txt" or "all files", you can use the method given by Mac15001900
or choose "all Files" and set the name + .js behind it to convert it JS file,
same can be done for php and other extension you need from it.
OK, here are a few added infos:

1) JSON are data files, NOT javascript files- As mentioned above, js is the extension for javascript and all plugins are simple text files with code and their extension changed to js

2) Your biggest problem will be learning the engine enough to know what functions to redirect.
You can add independent functions by simply programming them and calling them with a script command, but that can only create independent functions.
Any integration into the engine itself, and change to any existing game mechanic, will require you to know the exact function name used in the engine to redirect that function into your plugin.
Basically when the engine calls that function in ternally, you'll redirect it to your plugin instead of the original function.

Everything else is basic programming knowledge
You can use Notepad to save as *.js files, you just have to type it into the save dialogue.

Notepad++ is also free and has some more quality of life features for writing code.

But I strongly third what @Mac15001900 and @Andar said - don't dive into things with the intent of "I'm making this for RPG Maker."

That's advanced code and you will struggle in dire frustration. Do JavaScript tutorials, and once you're proficient enough you will be able to read and follow the code in RPG Maker.
When using "Save as", instead of saving it as a .txt file, simply select "JavaScript (.js)". Or just change the extension on an existing file from ".txt" to ".js" by renaming it.

In general, it might be a good idea to do some basic JavaScript-focused tutorials first before doing anything RPG Maker specific, since most resources for plugin-making assume you already have basic JavaScript knowledge.
Thank you so much! this worked. I really appricate you!

You can use Notepad to save as *.js files, you just have to type it into the save dialogue.

Notepad++ is also free and has some more quality of life features for writing code.

But I strongly third what @Mac15001900 and @Andar said - don't dive into things with the intent of "I'm making this for RPG Maker."

That's advanced code and you will struggle in dire frustration. Do JavaScript tutorials, and once you're proficient enough you will be able to read and follow the code in RPG Maker.
Thank you for the pointers I appricate it! got it working now!

OK, here are a few added infos:

1) JSON are data files, NOT javascript files- As mentioned above, js is the extension for javascript and all plugins are simple text files with code and their extension changed to js

2) Your biggest problem will be learning the engine enough to know what functions to redirect.
You can add independent functions by simply programming them and calling them with a script command, but that can only create independent functions.
Any integration into the engine itself, and change to any existing game mechanic, will require you to know the exact function name used in the engine to redirect that function into your plugin.
Basically when the engine calls that function in ternally, you'll redirect it to your plugin instead of the original function.

Everything else is basic programming knowledge
Thank you Andar, I appriciate the information! means a lot! got it working thanks to all of you guys help!

sometimes you se 2 options:
save as "txt" or "all files", you can use the method given by Mac15001900
or choose "all Files" and set the name + .js behind it to convert it JS file,
same can be done for php and other extension you need from it.
Yeah thats what threw me off! Thank you!

@rpgmakerDeavo, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.

Actually it was 4 posts here, but I've merged them for you. No worries! You can also quote multiple people per post by pressing Reply on multiple posts, or by using the +Quote button. 👋

Since you've put "Solved" in the title, I'll go ahead and close this~

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/i-need-help-figuring-out-how-to-create-plugins-solved.162728/