Thread Title.
MV Why do plugin developers make 'Core Scripts'?
Learning JavascriptBecause they r lazy
Or because they think they are this special they deserve it.
Or because they think they are this special they deserve it.
So my plugin list can be two plugins from a lot of different people... One useful one, and one core script. 
Joking aside (kind of), it's just to avoid having to keep producing the same base code for lots of different plugins. Which I mean for people with a large number of plugins makes pretty good sense. Obviously if you've got only a few plugins it's kind of silly. But hey if you're going to go the distance and make 10+ plugins, I could see having a core script to avoid retreading the same code.

Joking aside (kind of), it's just to avoid having to keep producing the same base code for lots of different plugins. Which I mean for people with a large number of plugins makes pretty good sense. Obviously if you've got only a few plugins it's kind of silly. But hey if you're going to go the distance and make 10+ plugins, I could see having a core script to avoid retreading the same code.
There are many tools that are not built into JavaScript, that a scripter makes for themselves. Making Core scripts also helps keep track of aliases and altogether cuts down on the need for global stuff in a lot of situations.
This is especially useful for updating the aforementioned tools, as if they're all in one core script, you only have to update the core, whereas otherwise you may have to update every plugin you've released that uses an instance of that tool
This is especially useful for updating the aforementioned tools, as if they're all in one core script, you only have to update the core, whereas otherwise you may have to update every plugin you've released that uses an instance of that tool
The "core scripts" are code that is made to be used in other plugins instead of putting the same code in multiple files...
Hi @Synrec
As a plugin maker I do have a "core script" But I not call him as a core because some people think that Core plugin means they are changing(overwriting) some of the default code of the Rpg Maker(At least is the answer I get when I ask about that).
But mostly, I think, is to avoid repeat unnecessary code. This helps us make the other plugins smaller and easier to find and solve bugs and also, smaller in file sizes, since it does not repeat the same code on every plugin.
As a plugin maker I do have a "core script" But I not call him as a core because some people think that Core plugin means they are changing(overwriting) some of the default code of the Rpg Maker(At least is the answer I get when I ask about that).
But mostly, I think, is to avoid repeat unnecessary code. This helps us make the other plugins smaller and easier to find and solve bugs and also, smaller in file sizes, since it does not repeat the same code on every plugin.
Huh, basically for those folks who wanna write a massive amount of scripts.
Thanks everyone
Thanks everyone
I can understand why some scripters create core scripts/plugins, but it can be tedious if you're already using a core script/plugin, and have to use another from other scripter just for one additional feature.
I use core script only for 1 reason: To follow "Do not repeat your self" policy.
This helps me to have common functions and variables on one place instead of declaring them all over again in all of my 10 plugins... Also plugin size is smaller per plugin 😉
This helps me to have common functions and variables on one place instead of declaring them all over again in all of my 10 plugins... Also plugin size is smaller per plugin 😉
In VXA and MV, I didn't write any core scripts/plugins, as I didn't care much about code quality back then(but not all not writing core scripts/plugins are due to this reason though), even though I wanted to care and that was because I didn't know better.
But in MZ, I've written a core plugin that aren't supposed to break any other plugins not written with my plugin in mind, and the main role of that core plugin isn't to implement any feature on the user level directly.
Instead, it's to help me write other plugins with high code quality, but still in an effective and efficient manner(normally high quality codes cost more to write but less to maintain), by doing as many low level imperative works needed by many other plugins as I can, so I can write plugins actually delivering functionality to the user in a declarative style, thus boosting my plugin development speed and lowers the chance to produce bugs and the chance of having them gone unnoticed(declarative codes are more difficult to write but easier to debug in general).
In short, it's to improve my plugin development environment, which ultimately leads to me having more plugins written, and more of those being higher quality on both the user and implementation level, by being slow in the short term but fast in the long term(this also helps solving compatiiblity issues and fellow plugin developers working with my plugins).
But in MZ, I've written a core plugin that aren't supposed to break any other plugins not written with my plugin in mind, and the main role of that core plugin isn't to implement any feature on the user level directly.
Instead, it's to help me write other plugins with high code quality, but still in an effective and efficient manner(normally high quality codes cost more to write but less to maintain), by doing as many low level imperative works needed by many other plugins as I can, so I can write plugins actually delivering functionality to the user in a declarative style, thus boosting my plugin development speed and lowers the chance to produce bugs and the chance of having them gone unnoticed(declarative codes are more difficult to write but easier to debug in general).
In short, it's to improve my plugin development environment, which ultimately leads to me having more plugins written, and more of those being higher quality on both the user and implementation level, by being slow in the short term but fast in the long term(this also helps solving compatiiblity issues and fellow plugin developers working with my plugins).
I write Core plugins since otherwise I would need to include the same code in a lot of different plugins.
For example, I have a function which takes a string as input and a width of a window, and will split the string into an array of lines that all fit within the width of the window without needing to have the font downsized. This allows a user of my changelog plugin to simply type a change without needing to worry about whether the change will fit on one line or not. Once I get around to porting my achievement/encyclopedia/other plugins with user inputted descriptions in them, they will simply be able to call this function rather than putting the same duplicated code in all of these plugins.
As an added benefit, if any bug is discovered in this function, then I only need to update it in the one core plugin instead of all 5-10 plugins that may use it as well, and the user also only needs to update 1 plugin (the core) instead of all 5-10 plugins that use that function as well.
For example, I have a function which takes a string as input and a width of a window, and will split the string into an array of lines that all fit within the width of the window without needing to have the font downsized. This allows a user of my changelog plugin to simply type a change without needing to worry about whether the change will fit on one line or not. Once I get around to porting my achievement/encyclopedia/other plugins with user inputted descriptions in them, they will simply be able to call this function rather than putting the same duplicated code in all of these plugins.
As an added benefit, if any bug is discovered in this function, then I only need to update it in the one core plugin instead of all 5-10 plugins that may use it as well, and the user also only needs to update 1 plugin (the core) instead of all 5-10 plugins that use that function as well.
To echo pretty much what others said, it's because certain things are pain in the ass to have to copy over and over each time you want to make a plugin, such as note tag parsing functions. Now I've gotten around this by having my core library exist in every plugin with a version control system that ensures an older plugin with an older version of it doesn't screw with another plugin with a newer version, but it's a pain in the ass and takes up unnecessary space in each plugin file.
Now the plugin I have that's called "Core" isn't required by any of the others, and is more of a QoL plugin, so it probably doesn't even count. Hell, it probably shouldn't even have Core in the name since it's mostly for giving more control over things like initial settings, master volume, retaining the last-used window/fullscreen settings, etc. Stuff like that, and any other minor tweaks that are just too small to put into a plugin of their own.
Now the plugin I have that's called "Core" isn't required by any of the others, and is more of a QoL plugin, so it probably doesn't even count. Hell, it probably shouldn't even have Core in the name since it's mostly for giving more control over things like initial settings, master volume, retaining the last-used window/fullscreen settings, etc. Stuff like that, and any other minor tweaks that are just too small to put into a plugin of their own.
I can see that being a little annoying, but there shouldnt really be an issue unless one of the programmers changes things about the engine. A core plugin should always be core functionality that you use within multiple plugins (contained within some sort of class or module)
^ Pretty much sums it up for me. 😀
TLDR:
- I have a function here in the core plugin
- I use that function across many different plugins
- I don't need to write that all over again
- If I found a flaw, I fix the core, I fix them all.
Personally, I kinda hate dependencies. But I fully understand why most of the plugin dev do it.
- I have a function here in the core plugin
- I use that function across many different plugins
- I don't need to write that all over again
- If I found a flaw, I fix the core, I fix them all.
Personally, I kinda hate dependencies. But I fully understand why most of the plugin dev do it.
You're so lazy you didn't even take the time to spell out "are."

I don't mind if some scripts require a 'core script' to call back a function it makes a lot of sense to do so.
My one and only counter is once I learned how to code myself regarding ruby not javascript, and without naming any names, I've come across scripts that will throw an error message requiring you to use their 'core script' only to dig through what it wanted to call inside only find out all they did was not put an "include modulename" or just add ModuleName::function inside one of their classes which they used the same module name for the new functions which made me scratch my head when not having the core script and just doing one of those functions broke absolutely nothing on the other script and instead, forcing people to use a core script that could break the functions of another script because it 'required' it.
No, people shouldn't use 100+ or even 50+ scripts in a project. That's really excessive and all but also why add an unnecessary failure point because person a's core script clashes with person b's core script?
My one and only counter is once I learned how to code myself regarding ruby not javascript, and without naming any names, I've come across scripts that will throw an error message requiring you to use their 'core script' only to dig through what it wanted to call inside only find out all they did was not put an "include modulename" or just add ModuleName::function inside one of their classes which they used the same module name for the new functions which made me scratch my head when not having the core script and just doing one of those functions broke absolutely nothing on the other script and instead, forcing people to use a core script that could break the functions of another script because it 'required' it.
No, people shouldn't use 100+ or even 50+ scripts in a project. That's really excessive and all but also why add an unnecessary failure point because person a's core script clashes with person b's core script?
If done correctly, nobody's core functions should ever clash with anybody else's. All of my quasi-core functions are tied to the same global object all of my plugins reference, which bears my name.
So unless somebody else...
- Has the same name as me, decides to write plugins, and decides to use the same namespace (Aesica) as me, AND...
- Decides to use the same library name I did (Aesica.Toolkit)
Edit: Okay, usually not. I do have one function that could be vulnerable: Game_BattlerBase.prototype.getTag(). And technically, I could protect that one as well by attaching it to Aesica.Toolkit and invoking it via call.
I'm sure that holds up just fine in javascript and in the case of ruby as well and I know the function structure is different that of ruby's and thus was never talking about javascript since I don't know much about the language.
But it's true, good coding practices and principles should always be followed.
Hence why I said

Edit: Sorry I forgot to finish adding this paragraph in!
There were core scripts that would both reference the same thing and overwrite most of the default methods which some core scripts would not like because they would fight over priority on which method had priority. It just comes down to how and what they overwrote for their core script.
But I was mostly just talking about the fact that they were requiring an unnecessary extra script for a add-on that didn't need that.
@Synrec - I don't know code but I enjoyed reading this thread. Thanks for posting your question!
There are many kind of "Core Script", some are dependencies (like most developers do), and some are kind of fixes/improve for many problems in the engine itself (like Yanfly's)
Original thread: https://forums.rpgmakerweb.com/threads/why-do-plugin-developers-make-core-scripts.126025/