How to create a "script"?

I've been fiddling around with the base scripts, and have implemented something that I would like to create a script for, in case there's anyone else who would be interested in what I've done.


However, while playing around with the base scripts is something I can do easily, I haven't the slightest clue of where to start making a new script. I've heard stuff about "overwriting" or "aliasing" that I have no clue how to do properly. I don't know how to ensure that my script doesn't have incompatibilities with other popular scripts. Glancing through other scripts I've used isn't helping me to understand how it works.


So is there any guides to making a script? Or just basic things I should know? The more thorough, the better. (Less for me to blame on myself when I inevitably mess up. X3)
What do you mean by playing around with the base scripts?


Can you provide an example? Cause that's pretty much making scripts.
Well, all I've done is just add things into the scripts that are already part of a new project, like Game_Battler and etc. I don't know how to make a script as you would find for download, where it is one file that is inserted in the "Materials" section.
Tell us about the script you want to make, and we'll see if we can point you towards some that would be good to look at.


Basically, if you want to change or add to the behaviour of any of the default classes/methods, if you alias the method, it means you're calling the original method from your own, and just adding the extra stuff you want to do.  This makes your script more compatible with others.  If you overwrite the method instead, it means you are replacing the original method, and there's a greater risk that your script won't be compatible with others if they also overwrite or alias the same method.  


If your script overwrites a method and someone else's script aliases it, they could still work together as long as your script is placed higher in the list (their method will be called first, and it will call your method).


However, even if you alias a method and someone else's script aliases it as well, there could be some conflicts still, depending on what you each do.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-create-a-script.55620/