Better PluginManager

Would you like this feature?

  • Yes

    Votes: 0 0.0%
  • No

    Votes: 1 100.0%
  • Yes but not important

    Votes: 0 0.0%

  • Total voters
    1
Status
Not open for further replies.

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Introduction
For beginning I DO know this wouldn't be introduce for the current maker. Since it's destructive for all the current plugin Making. ALTHOUGH it could be introduce for the next rpg maker.
It's mainly targeted for the ease of use for the programmer making plugins. It's shortend their code and it's make it easy to use.
It's also a lots inspirate with how Node modules works with the export and import feature

Description of the Feature:
  • Greatly simplify the making of pluginParams.
  • Work like a json structure.
  • easy to parse
  • less code cluther.
  • reductions of code.
  • Easy to use.
  • LESS global variables.
  • native support of arrays.
  • Simplified use for the requireAsset options

Code for Implementation:
Code:
'use strict';

var namespace = namespace || {};
namespace.params = {
    name: "PluginExample",
    author : "Nio Kasgami",
    version : "1.0.0",
    parameters: {
        positionAxis : {
            paramName: "Position Axis",
            paramDesc: "Array who hold a point value",
            default: [1,0]
        },
        spriteExample : {
            paramName: "Sprite",
            paramDesc: "A sprite who aren't delete from the compilation",
            default: "ASpriteName",
            required : true // Will not erase on the cropping.
        }
    }
};

PluginManager.export(namespace.params);

/**
 * Fetch the  value of the pluginManager emit and transform it into a simple to use parameters.
 * example your object would look like this internally.
 * namespace.import = { positionAxis: [10,2]};
 * so you would call it like this :
 * namespace.import.positionAxis[0];
 */
namespace.import = PluginManager.import('PluginExample');


/**
 * Export the data to the pluginManager Json file making it editable in the editor.
 */
PluginManager.export = function(plugin){
    var exist = false;
    for(var i = 0; i < $plugins.length; i++){
        if($plugins[i].name === plugin.name){
            exists = true;
            break;              
        }
    }    
    if(!exist){

        /// Convert the "json" structure to a string Unsure of the aproach.
        // It's would simply convert the whole thing as a string for being compatible with the pluginManager....even if
        // the pluginManager should work the same than a JSON.
        var newPlugin = JSON.stringify(plugin); // Does not do a whole stringifications of the actual value likes numbers.
        $plugins.add(newPlugin);
    } else {
        console.log("This plugin is already exported. Ignoring the whole exporting.");
        // for updating the plugin the Reload Options would just reload the whole plugin and update their content.
    }
};

/**
 * Import the data from the pluginManager from a Json string to a js object making usable.
 * the structure is simplistic kinda a little like the default $plugin object just not in string.
 */
PluginManager.import = function(plugin){
    var data
    for(var i = 0; i< $plugins.length; i++){
        if($plugins[i].name === plugin){
            data = JSON.parse($plugins[i]);
            break;
        }
    }
    return data;
};

Mockups:
I honestly don't have any idea how it's would change the PluginManager Layout I think honestly it's would keep almost the same it's just how you create the plugins who will change.

Why is this feature good?
This feature is great because of the following:
  • Simplifications of coding
  • Remove the 10k size of comments
  • Can make concatenation of plugins done.

Possible issues with this feature?
Issues that might arise from this feature:
  • User friendliness
  • Drastic change on the plugin making.
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
I am voting no, I really can't tell you why right now, but I have my reasons. I will however comment on the below, cause I found it silly.

Why is this feature good?
This feature is great because of the following:
  • Remove the 10k size of comments
A huge portion of the comments in "good" plugins, are the plugin's "How-To" and telling the user what the parameters are for, what changing them will do, as well as note tag usage, etc. Due to this reason, I don't think it is a reason to say it is what would make this improvement "good".

- Liquidize
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
@Liquidize yeah i found the flaw of my system a couple of day before when i spoke with quasi on skype and i was like : oh welp i cant erase it now lol

I honestly would personally like more the thread to be erased than being continue or voted lol
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
[mod]Closed at the request of the OP[/mod]
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,981
Members
137,563
Latest member
cexojow
Top