@Clock Out hey! thanks for your input. i will be upfront with you; i never took a formal programming class, so my plugins are a reflection of what i was able to teach myself through reading the default functionality. considering that, let me try to address some of your findings!
Some lines run really long. A programing text editor will have a way to set a vertical line on the right side to indicate when to return. A common length is 80 columns per line but use whatever makes you happy. The goal is consistency.
i use komodo edit as my JavaScript editor; when i first began writing plugins, i did try to conform to a certain number of characters per line, but nowadays i just ensure each line does not expend beyond the page; everything is good so long as i do not have to scroll. XD.
The Game_MutableItem() constructor function is split for no apparent reason. The methods of Game_MutableItem.prototype are defined in an IIFE (Immediately Invoked Function Expression) but don't appear to access local variables in the IIFE. They can all be moved outside. Same with DataManager.isMutableItem().
placing the constructors outside of the IIFE was something i saw done several times within some of Kadokawa's additional plugins and so i adapted it to my personal plugins because i did not see anything wrong with it; it is just a preference.
Where reasonable, define methods before they're used for easier reading. The initMembers() method calls 3 functions lower in the code. So I have to scroll down to read those, then scroll back up.
this is something i tend to struggle with from time to time, because i make an effort to follow a strict convention throughout all of my plugins, but it never works out the way i want it to universally, haha. most of the time i try to define functions directly below the function that referenced them, but there are other times i break this convention when i believe it promotes my vision of organization.
It's curious that 4 methods are defined to get the values of the "private" properties _stepCount, _successRate, _nextId, and _id but are never used. As an aside I think underscored names are ugly and useless.
i include access to private variables because i never know which project i may end up using this plugin for and where i might want to reference it from a separate plugin; as a general rule for myself, i include functions for providing access to those variables for this reason. as far as the underscore naming convention goes, that is another one of those things i see used often to help private instance variables stand out; just another practice that i adopted.
Use shorter variable names. Why can't _Game_Party_gainItem_gainMutableItem just be gainItem, originalGainItem, or oldGainItem?
those suggestions are very generic in my opinion, and to ensure maximum compatibility i try not to give my aliases a name that has a moderate chance of being duplicated by another plugin that aliases the same function.
Math.floor() and Math.ceil() are used but don't seem necessary. Math.ceil(0) will be 0 and Math.floor(100) will be 100. Math.floor(data.length) also seems unnecessary since the length property of strings and arrays are whole numbers.
i had to search online through mozilla's official JavaScript reference to find the method for generating a random number, and so i copied and pasted the practical example from there; i did not feel the need to shorthand it.
what do you think, bud?
😀