MV Making my first combat plugin

Hello everyone!

I'm new to RPG Maker (MV) and I'm trying to make my first game with it.
I want to go fully into it, so I'm trying to make my own sprites with my own story and I'd like to make my own battle system.

I've search on how to do a plugin but didn't find anything.
I already know Javascript so it won't be a problem, but I don't know :
- how to start a plugin? What do I need?
- how to try it on my RPG Maker game?

Thank you for reading!
The help file in MV has a section on plugin specifications.

But there are also plugins in the default folder of every new project, as well as a ton more in the dlc folder of your MV installation (not to mention the tons you can find on these forums and authors' Web sites). If you know JavaScript, it should be pretty easy to just open some up and see how they work.

But to try to answer your questions:
- how to start a plugin? What do I need?
I'm not sure what you mean to ask here. They're just code, so you need a text editor. I would suggest if you're new to MV, it doesn't make a lot of sense to immediately try to code plugins and mod the engine. I think you need to do tutorials on MV, make some practice games, and learn how the default engine works first.

Then, when you have a specific thing you want to change, read the code in the js folder to see how it works then change it in a plugin.

- how to try it on my RPG Maker game?
Just install the plugin. The button is next to the database icon on your menu bar. If you're not sure how to do it, there are YouTube guides.
Thank you!
I've just found the plugins folder, I'll take a look at some other plugins to see how they work as you said.

My question "what do I need?" was because I didn't know if I needed a specific base in my code to be recognize by RPG Maker as the combat system, but if I can look at other plugins, it will be easy to know where to start.

I'll look on Youtube if I find anything about the installation. Thank you again!
A battle plugin may not be what you want to start with because those are usually huge and complex. People usually start with small things, such as tweening battle parameters, loot tables, or changing window layouts.

Your plugin does not need a specific code to be recognized by the game's core code because the Plugin Manager does this job for you. However, there are some conventions:

- When you plan to make multiple plugins that will interact with each other, you probably want to check what other plugins (from you or even other plugin creators) are already in the game. We agreed to add our plugin name to a global variable called "Imported" at the top of every plugin, either with its version number or as a simple boolean.

Code:
var Imported = Imported || { };
Imported.Aerosys_Test_Plugin = true;
// or
Imported.Aerosys_Test_Plugin = 1.2;

- Prefer aliasing methods over overriding them. When you don't know that aliasing means, then google it 😉 The more you override methods, the more likely it is that your plugin becomes incompatible with plugins from other creators.

- Some people, especially beginners, wrap their whole plugin with an IIFE. While I also recommend that for beginners, you should learn what exactly it is and if it is still valid for your use case sooner or later. With the usage of IIFEs, many pros and cons are coming; hence any dev should deeply understand what it means to wrap his full plugin with an IIFE. I decided not to use it.

- Anything more that you need? Microsoft Visual Studio Code or Notepad++

- Some more tip but maybe you already know: When playtesting, you can press F12, go to "Sources," and use the debugger.

Original thread: https://forums.rpgmakerweb.com/threads/making-my-first-combat-plugin.154044/