Scripting help

So, I'm fairly new to RPG Maker MV and while I'm going through various tutorials and learning how to use it I noticed that the initial idea I had for a skill for one of my actors would be more complicated than I realized, and would require some scripting. No problem, I've been learning javascript for this very moment. Where the problem comes in, is I'm not certain how to go from scripting something in my IDE to putting it into the game to be used as a skill.

I would appreciate any help anyone could provide to this total novice.
You have to script according to the existing framework. In this case, that's RMMV's base code, found in your project's js folder: rpg_core.js, rpg_windows.js, etc.

Some context would help a lot: are you talking about damage formulae? Event-based script calls? Using existing plugins, e.g. notetag evals? Writing your own plugins? 😅

If you want a less vague response then you'll have to be less vague in the information you're providing. 😴
Check out Yanfly's battle plugins, like BuffStatesCore and SkillCore. One of them allows you to write javascript code in the skill's notes and run it when you use the skill
Thank you @caethyril! That was actually the answer I was looking for, this is my first project outside of a learning setting so finding the 'starting line' so to speak was my struggle and I was surprised to find I couldn't find the answer online anywhere.

@0zuma Thanks for the advice! I'll check it out, hopefully this'll do more of my work for me! ;D
Ah, I see! For reference: "plugins" in the context of RPG Maker MV are just additional .js files, loaded after the core scripts. That means they can override and/or extend existing methods, as well as define their own stuff. There's also a particular header format you can use in order to allow users to configure "plugin parameters" from the Plugin Manager built into the editor, without having to even look at the code. 😤

It's generally a good idea to confine code edits to plugins rather than alter the core scripts directly. This is mainly because plugins will not be overridden if/when a project's core scripts are updated. It's also helpful for situations where you may wish to isolate/disable/share/configure your code~

Happy scripting! 😂
If you want to create stuff that affects actors, enemies, and battle stuff, the one you'll most be intersted in is rpg_objects.js since that's where all that stuff is. I'd also be less concerned with the "starting line" and worry more about how you'd hook your own effects into the existing functions.

For example, you could try this as a sort of first-try plugin:

Code:
Game_BattlerBase.prototype.testDamage = function()
{
  return 100;
}

Then save it as whatever (like test.js) into the plugins folder and add it like any other plugin. Then, in a damage formula box for some skill add this:

a.testDamage()

And it should deal 100 damage (within the variance %)

Obviously that's an extremely basic and not very interesting plugin, but it should give you a basic idea of how your code will fit into the existing system. From there, just study other plugins to get a hang of things like function aliasing, which you'll definitely need if you want to make use of plugin commands or hook an extra effect into an existing function without rewriting it entirely.

Also pay attention to how other plugins handle plugin parameters, as the syntax for that takes a bit of getting used to, but is oh-so-useful for creating anything with any degree of depth to it.
Moved to: JS Plugin Requests

Original thread: https://forums.rpgmakerweb.com/threads/scripting-help.116485/