MVCommons - The community core plugin

RyanBram

Veteran
Veteran
Joined
May 13, 2012
Messages
238
Reaction score
272
First Language
Indonesian
Primarily Uses
RMMV
Is it possible to make this thread pinned?

That's way every script (plugin) maker are aware about this and can try to make their script compatible.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
That certainly would be awesome!!

I'm thinking about going through this and just expanding on the documentation of certain things, and giving examples on some things too.
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
I have one Question:

What does this mean?

Web browsers want to try to push away synchronous javascript calls. Synchronous is a big, fancy word that basically means 'wait for completion'. There is a function in the commons, ajaxLoadFile, which loads a file synchronously. This means that until the file is done downloading, the game will stop and wait for it to finish. The alternative, Asynchronous, is recommended for getting files, because while the file is downloading, the game will continue running. However, with this method, the game cannot use the content of the file until the download is complete. This means that the developer has to add a check to see if the file is downloaded first, before using the data, or errors will be throw.

This is just a warning saying that sometime in the future, synchronous calls in the game's main update function will be unsupported, forcing all files to be received via asynchronous calls. It will work this way for now, but in the future, it will not. 
 

Edelplastic

Villager
Member
Joined
Jun 21, 2015
Messages
19
Reaction score
5
First Language
German
Thank you. I have found the Trigger of this Message. It seems that the Plugin "External Text" from Zalerinian is the fault.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
Well 'fault' isnt really a fair statement, cause there was nothing technically 'wrong' - it was just a warning message. :)
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Thank you. I have found the Trigger of this Message. It seems that the Plugin "External Text" from Zalerinian is the fault.
That would be me, and yes, I know. I'm working on moving it over to asynchronous calls, but for now it's only synchronous. Please check back for updates soon!
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
The commons has been updated to version 1.3.0, now allowing game developers to rename their plugins without breaking the parameters for that plugin. Please make sure to read the documentation to ensure you don't run into any issues:

Developers can now insert a plugin ID into their plugin's description using the format <pluginID MyID> (case-insensitive), which will allow the plugin to still get its parameters if the game developer renames the plugin file.

Alternatively, game developers can include ",OriginalName" in the renamed file to allow the renamed plugin to get it's parameters.

If plugins are renamed, the ID in the description is checked first, followed by the file name check. If neither check returns a match, an empty JS object is returned.
 

EvilCat

Warper
Member
Joined
Nov 10, 2015
Messages
2
Reaction score
0
First Language
Russian
Object cloning in JavaScript is trickier than "result[p] = obj[p]" - you will lose procedural properties and inheritance that way. Consider using solutions from this article.

Also, be careful when extending common classes like Array and Number. I see you aim for maximum compability with older browsers, that's why you use self-executing anonymous functions instead of new let keyword; if so, you shouldn't extend standard classes, as you risk running into compability issues with future browsers that may have additional methods in standard classes. min() and max() function on Array seem useful - what if they will be added in future versions of Javascript? What if they will have different implementation details? What if other plugins will have their own additions to standard objects with different implementation details?
 

Ramiro

Now with an army of Mecha-Ralphs!
Veteran
Joined
Aug 5, 2015
Messages
858
Reaction score
364
First Language
Spanish
Also, be careful when extending common classes like Array and Number. 
Be aware, adding methods it's not extending.

Extending is:

class MyArray extends Array {}Wich isn't valid es5, but:

Array.prototype.newMethod = function () {};is.

let is an es6 keyword... wich is another different thing
 

DavidFoxfire

Veteran
Veteran
Joined
Feb 28, 2014
Messages
224
Reaction score
44
Primarily Uses
I have MV Commons updated to 1.4.0, and I'm getting these kinds of errors.  Assistance here is greatly appreciated.

2015-11-09 21_01_30-Greenshot capture form.png
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
Did you rename Yanfly's plugins? The parameters for the plugin could not be found, so MVCommons is warning you about that. Same thing for the Game Skip Title plugin. They're trying to get parameters, but they couldn't be found. Please read the OP for instructions on how to properly rename a plugin using MVCommons to still have parameters work fine.
 

EvilCat

Warper
Member
Joined
Nov 10, 2015
Messages
2
Reaction score
0
First Language
Russian
Be aware, adding methods it's not extending.
You're right, but many articles on the web call adding new methods to native prototypes "extending" - maybe because there was no "extends" keyword before ES6. Or maybe I'm just lucky to stumble upon this terminology %)

I know that "extends" and "let" are ES6 standard, which MV and modern browsers fortunately support. If you're not using it, this must be for compatibility reasons. If that is so, you shouldn't write to native objects' prototypes. See here for example.
 

Danito

Villager
Member
Joined
Dec 20, 2015
Messages
31
Reaction score
2
First Language
English
I am a bit confused... I get these errors in the debug tool 



anyone know why?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,716
First Language
Java's Crypt
Primarily Uses
RMMZ
The image didn't load here.

Usually when people have problems with MVC, it's because it was downloaded wrong. 

Try clicking here to download a valid copy of it.
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,513
Reaction score
3,212
First Language
Binary
Primarily Uses
RMMZ
Yea, image didn't show for me either.. :/

If you are using a valid downloaded copy ~ try uploading your image using a site such as postimage.org. :)
 

Danito

Villager
Member
Joined
Dec 20, 2015
Messages
31
Reaction score
2
First Language
English
Well it magically seems to work now XD, Btw it was a syntax error
 

Tarumes

Villager
Member
Joined
Mar 2, 2014
Messages
27
Reaction score
10
First Language
German
Primarily Uses
RPG-Maker MV new installed (there was no RPG-MakerMV folder before in C:\Program Files (x86)\Steam\steamapps\common)

New Project created

Plugins:

only MVCommons.js

 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

"You can thank my later", "But you haven't done anything", "Well, that's why ..."
Are we allowed to post about non-RPG Maker games?
I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

Forum statistics

Threads
105,884
Messages
1,017,242
Members
137,609
Latest member
shododdydoddy
Top