Until now I have been assuming that plug-in Community_Basic.js is meant as sample a project to teach some of the basic mechanics of how plug-ins work and has the author listed as "RM CoreScript team".
This made sense to me because it showed how to hook in to functions instead of replace them and manipulate the ConfigManager to override the default for 'alwaysDash', but not for 'commandRemember', 'bgmVolume', 'bgsVolume', 'meVolume', 'seVolume' which I implemented myself (which is almost identical to 'alwaysDash').
Then I came to the horrible realization that all the other plug-ins are credited to different people (e.g. MadeWithMv.js is made by Dan "Liquidize" Deptula) so I don't know if I can treat the Community_Basic.js plug-in like the other /js/rpg_*.js code and incorporate some of it or if I should be treating it like 3rd-party code (i.e. use the plug-in, but don't incorporate it into my own code).
Bonus:
As long as I'm here, this is a piece of code that I couldn't find in any YouTube tutorials or anywhere online, but I found helped keep what remains of my sanity. I ended up having to read documentation to figure this one out!
Basically I found tutorials that mentioned the showDevTools() function, but not how to prevent it from stealing input focus. The code below prevents this because the callback function causes the original window to take back the focus. The callback is called after the console window is created so there is no race condition.
Yeah, it only saves a click, but when you want to focus your attention on testing the game and keep having to relaunch it adds up. If you do any sort of tutorials or videos then please, for the love of sanity, let others know about this!
This made sense to me because it showed how to hook in to functions instead of replace them and manipulate the ConfigManager to override the default for 'alwaysDash', but not for 'commandRemember', 'bgmVolume', 'bgsVolume', 'meVolume', 'seVolume' which I implemented myself (which is almost identical to 'alwaysDash').
Then I came to the horrible realization that all the other plug-ins are credited to different people (e.g. MadeWithMv.js is made by Dan "Liquidize" Deptula) so I don't know if I can treat the Community_Basic.js plug-in like the other /js/rpg_*.js code and incorporate some of it or if I should be treating it like 3rd-party code (i.e. use the plug-in, but don't incorporate it into my own code).
Bonus:
As long as I'm here, this is a piece of code that I couldn't find in any YouTube tutorials or anywhere online, but I found helped keep what remains of my sanity. I ended up having to read documentation to figure this one out!
Basically I found tutorials that mentioned the showDevTools() function, but not how to prevent it from stealing input focus. The code below prevents this because the callback function causes the original window to take back the focus. The callback is called after the console window is created so there is no race condition.
Yeah, it only saves a click, but when you want to focus your attention on testing the game and keep having to relaunch it adds up. If you do any sort of tutorials or videos then please, for the love of sanity, let others know about this!
Code:
let win = require('nw.gui').Window.get();
// Reference: http://docs.nwjs.io/en/latest/References/Window/#winshowdevtoolsiframe-callback
win.showDevTools(
'',
function() {
win.focus();
}
);