RPG Maker MZ, Preview #3: Character Generator, Plugin Manager, Event: Plugin Command!

Status
Not open for further replies.

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
14,923
Reaction score
15,143
First Language
Filipino
Primarily Uses
VNM
There is also one thing, that bothering Russian community so much: Why minimum system requirement of MZ does have 8 GB of RAM?
It's not problem of mine (i have 16 GB several years), but... So many Russian RPG makers are scared very badly (along with need of Windows 10).
It's because RPG Maker moved a GPU based maker since MV which require a lot of good specs. A lot of computer reports we got didn't even support OpenGL 2.1 which was the system requirement.
 

cji3bp62000

Tsukimi
Veteran
Joined
Oct 25, 2017
Messages
75
Reaction score
202
First Language
Japanese
Primarily Uses
RMMV
I wonder does it mean that when users play MZ-deployed game, there will also be a significant raise of memory usage(compare to MV)? or it's just the editor issue.
 

Mrs_Allykat

Failsauce
Veteran
Joined
Oct 13, 2017
Messages
523
Reaction score
2,111
First Language
English
Primarily Uses
RMMV
@cji3bp62000 I don't know for sure, but at least with MV it kind of depended on how much we threw in our projects. It doesn't look like it will have a significantly larger overhead anyway.
I'm certain if we loaded up a VXA project with too many parallel processes and oodles of custom graphics we could bog that down too! :p
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
503
Reaction score
220
First Language
English
Primarily Uses
RMMV
Speaking of the Character Generator, will it have the ability to add tabs for different body types?
Yeah, I was hoping for [USER DEFINED] tabs like they did with weapons, at minimum :<
It's a little tricky, but it's technically possible to get alternate bodies working in MV without making an entirely new generator folder (assuming the bodies are compatible, of course). You can additional bodies just the same as other parts. You can't select the alternate body in the character generator, but if you save the generator settings to a JSON file and edit that file to reference a different body, then when you load that settings file it will use the alternate body.

All that said, it would be much nicer if they just added a tab for body type, the same as other parts. I doubt it would even be hard to do? Though I have no idea what their code is like so maybe I'm wrong on that part.

It's literally what Software like Unreal does. They literally threw one software away each version (Unreal 4 , Unreal 5) yes their somewhat similar in interface but what's under the hood that change everything that required an whole new version.
Um... what? Throwing away the entire software for each version is probably the worst business decision someone could make. Unreal 4 is not a completely different engine from Unreal 3. UE4 is just an extension and refinement of UE3. Similarly, UE5 is not a completely different engine from UE4, but is instead based on it. In the same way, MZ is doubtless not a completely different engine from MV.

If you mean, can you use variables and switches as a selection option/drop down in plugin commands, then yes. Any type that was valid in MV will work.
@Kaliya I'm not sure if you can answer this, but have any new types been added? Or are there only the same types as in MV?
I cannot say. Not only because I am not sure If I would be allowed to say, but also because I am honestly not entirely sure I haven't messed around with it too much.
I'm curious about this too... the one big thing I missed in the MV plugin editor is a way to reference things from the Types tab of the database. For example, @type element is sadly not a thing that works.

The plugin list =/= plugin commands. They are two seperate things, the second one being new.
That aside, the search function in the plugin list that's currently used is a very clumsy implementation.
The ideal way would be a seperate text field that you can enter a match into, very much like in an explorer, with it autolisting the matches, not having you click through all matches.
I won't deny that MV's search functionality could be improved (I also wish it would wrap around). But it still exists.

Around the same post, I've actually given a code example.
Yes, I saw it, and I believe it to be incorrect. Kaliya's followup post on the topic later in the thread only cements my position.

It's pretty much irrelevant whether it's an object or an array or a variable imported via the plugin.
Both do the same thing, the contained things being passed onto the JS engine.What is passed on is operated on identically, the plugin command itself is merely a short binding element between the values imported from the plugins.js.
It's extremely relevant. If one method passes variables as an array and the other method passes it as an object (JSON-packed or otherwise), then you still have to parse the arguments in two different ways.

You can't just operate on an array and an object identically.
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
Um... what? Throwing away the entire software for each version is probably the worst business decision someone could make. Unreal 4 is not a completely different engine from Unreal 3. UE4 is just an extension and refinement of UE3. Similarly, UE5 is not a completely different engine from UE4, but is instead based on it. In the same way, MZ is doubtless not a completely different engine from MV.
I just want to say that this likely isn't true, UE4 != UE3, UE4 began development in 2003, before UE3 was even released. For a long time however only the CEO of Epic was working on it. Now I wouldn't be surprised if they shared some code, but they are definitely different code bases. That being said UE5 is likely just an upgraded UE4 but the rendering pipeline had such substantial changes that they diverged it into its own engine. However, the more likely reason I feel is that they want to have a new engine just to follow the new generation of consoles. I haven't been given permission to comment on the MZ code base, so I won't go into specifics but I can assure you it has been significantly rewritten.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
503
Reaction score
220
First Language
English
Primarily Uses
RMMV
Now I wouldn't be surprised if they shared some code,
This is basically my point. They probably share quite a bit of code, though having never used UE3 I can't say that with any authority. Of course, there are also huge changes and no real compatibility between the engines, so yeah, UE3 and UE4 are definitely different engines; but it's not like Epic threw away UE3 and started over for UE4.
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
129
Reaction score
121
First Language
Russian
Primarily Uses
RMMV
Dear developers.
As a programmer, I am pleased with the innovations in RPG Maker MZ.
The ability to set dependencies and their order is just an excellent feature that will make life easier not only for users but for developers, and will also help reduce the number of errors in games.
But I had a few questions.

1. You can specify dependencies in the plugins and the program will check for their presence, but what if I added compatibility with a foreign plugin to my plugin and for it to work, it is necessary that the foreign plugin be higher? Can such moments be announced too?
As I see it:
Dependencies:
@requirement DKTools above - Dependence on DKTools plugin, place above

Compatibility:
@compatibility YEP_MessageCore above - Compatibility with the YEP_MessageCore plugin, place above. Moreover, if the YEP_MessageCore plugin is not installed, then there is no need to display an error. This is the only difference with dependencies.

2. You say that all parameter types will work in MZ, but will new types be added? For example, there is really not enough type for choosing a color. Something like @type color. And the player could select the color in the web format using the color selector.

3. Will a function be added to parse all plugin parameters?
If you do not plan to add such a function, then you can simply insert mine:
JavaScript:
PluginManager.getParameters = function(pluginName) {
    var parameters = this.parameters(pluginName);

    return Object.keys(parameters).reduce((acc, paramName) => {
         acc[paramName] = this._parse(parameters[paramName]);

         return acc;
    }, {});
};

PluginManager._parse = function(param) {
    try {
        if (typeof param === 'number' || typeof param === 'boolean') {
            return param;
        }

        return JSON.parse(param, (key, value) => {
            if (Array.isArray(value)) {
                return value.map(val => this._parse(val));
            } else {
                try {
                    return this._parse(value);
                } catch (e) {
                    return value;
                }
            }
        });
    } catch (e) {
        return param;
    }
};
I think all the developers will thank you very much, because parameter parsing is a headache.

4. I saw that you added 2 new fields to display the author and his site. Will a field be added to display the plugin version? I think this is also a very important field.
 
Last edited:

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
197
Reaction score
215
First Language
German
Primarily Uses
RMMV
I won't deny that MV's search functionality could be improved (I also wish it would wrap around). But it still exists.
For the plugin list. There's no search function for the plugin command depicted in the screenshot, it's a list. The two things are seperate things. Whether a search function to find plugins exists is entirely irrelevant to the question of whether plugins can can be string searched in the plugin command list.
Yes, I saw it, and I believe it to be incorrect. Kaliya's followup post on the topic later in the thread only cements my position.

It's extremely relevant. If one method passes variables as an array and the other method passes it as an object (JSON-packed or otherwise), then you still have to parse the arguments in two different ways.

You can't just operate on an array and an object identically.
Of course it's extremely relevant, because it determines what you parse. But it's entirely irrelevant whether you have myFunction(args[0], args[1], args[2]) to hand over the arguments to your function in the plugin interpreter or if you use myFunction(object.value1, object.value2) in the registered plugin command.

The functions do the same thing, the arguments they use to handle everything are identical.
Whether you first instance the object and pass on it's properties as arguments or you extract the arguments from a command's string and then pass them on to the function matters not.
It could be an object inside an array that's a property of another object, and all it would mean is that you need to assign the arguments accordingly.

The adjustment you have to make to calling that function is entirely minimal. If you get an object in the registered plugin command, you JSON.parse that object, then you have the object. Now you just use the same myFunction but you instead use object.property instead of the args array.

Whether it's the registered plugin command or the plugin interpreter, their entire job is to be called by a specific command, have values and call a function they pass those onto. If you have to use a variable in one as argument, and an object's property in the other, that's absolutely trivial to a coder.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,645
Reaction score
717
First Language
Chinese
Primarily Uses
N/A
3. Will a function be added to parse all plugin parameters?
Now on to how a plugin developer would create the code for such a plugin command. Unlike in MV you no longer have to alias a function, parse a string for your argument, and all that awful stuff. In MZ it is quite as simple as registering a function call with the name of your plugin, and the name of the plugin command you defined. Like so:

JavaScript:
PluginManager.registerCommand("TestPlugin", "PluginCommandFunctionName", args => {
    // Get Arguments
    const actorIds = JSON.parse(args.Actors);
    const stateId = args.State;

    // Use the arguments
    for (const actorId of actorIds) {
        const actor = $gameParty.members().find(member => member.actorId() === Number(actorId));
        if (actor) {
            actor.addState(stateId);
        }
    }
});
What you are doing is registering with the plugin manager that "TestPlugin" has a plugin command called "PluginCommandFunctionName" along with the actual function itself as a lambda. The plugin manager then passes the arguments to that function with the variable "args" as an object containing the values the user selected.
 

Goldschuss

A.K.A. Lye
Veteran
Joined
Dec 4, 2015
Messages
194
Reaction score
75
First Language
German
Primarily Uses
RMMV
See this post from touchfuzzy, and several other people, explaining why no company can keep on doing free updates for ever, but at some point has to generate sales in order to stay in existence.
Yes yes I know, it's not financially suitable. After all, RPG Maker MV is 5 years old already.

But hey, the new assets, music and rtp stuff in general should the worth the new maker at least I know it was in MV.
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
129
Reaction score
121
First Language
Russian
Primarily Uses
RMMV
These are completely different things. I asked not about the plugin commands, but about the parameters that the developer receives using the PluginManager.parameters function.

And more about the plugin commands.
It's funny that I have been using a similar function for a long time in my plugins.
For example, function to display animated damage from one of my plugin.
JavaScript:
DKTools.PluginCommandManager.set('ShowAnimatedDamage', function(args) {
    const x = Number(args[0]);
    const y = Number(args[1]);
   const damage = $gameVariables.value(Number(args[2]));
    const type = Number(args[3]) - 1;
   const scene = SceneManager._scene;

    if (scene instanceof Scene_Map) {
        scene.createAnimatedDamage({ x, y, damage, type });
    }
});

Users can also check if a specific plugin command is registered using DKTools.PluginCommandManager.has (pluginCommand)
This feature has long been in DKTools.
 

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
Whether it's the registered plugin command or the plugin interpreter, their entire job is to be called by a specific command, have values and call a function they pass those onto. If you have to use a variable in one as argument, and an object's property in the other, that's absolutely trivial to a coder.
That is not the intended way to use the new plugin command. The intended way is to have all your code for the command within the registered function the arguments are passed too. It is not to simply parse arguments and then pass them to an additional function. Unlike with the plugin command interpreter, it does not need to go through every plugin, and check for commands from them with the passed string, it directly calls the function you register with the arguments it needs to pass.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,645
Reaction score
717
First Language
Chinese
Primarily Uses
N/A
These are completely different things. I asked not about the plugin commands, but about the parameters that the developer receives using the PluginManager.parameters function.
I've to admit that I've misread what you wrote this time, as I just thought that the MZ plugin commands are implemented in a very similar way to how plugin utilizes the MV 1.5.0+ plugin manager features, thus jumping to the conclusion that the MZ plugin manager implementation will be very similar as well :)

That is not the intended way to use the new plugin command. The intended way is to have all your code for the command within the registered function the arguments are passed too. It is not to simply parse arguments and then pass them to an additional function. Unlike with the plugin command interpreter, it does not need to go through every plugin, and check for commands from them with the passed string, it directly calls the function you register with the arguments it needs to pass.
I think it depends on plugin developer preferences(and sometimes user preferences too).
For instance, for every plugin command in my plugin, I'll have a script call counterpart as well, as sometimes using script calls can be more handy than using plugin commands(like writing codes in notetags and making some additional side effects in the damage formula, assuming that the MZ ones work like the MV one).
So in my case, all my plugin commands are just another way to call the script call counterpart :D
 
Last edited:

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
197
Reaction score
215
First Language
German
Primarily Uses
RMMV
That is not the intended way to use the new plugin command. The intended way is to have all your code for the command within the registered function the arguments are passed too. It is not to simply parse arguments and then pass them to an additional function. Unlike with the plugin command interpreter, it does not need to go through every plugin, and check for commands from them with the passed string, it directly calls the function you register with the arguments it needs to pass.
It may not be the intended way, but it's what is basically guaranteed to happen.

If you take a look at stuff like Moghunter's Weather systems and similar stuff, you're not gonna have all the actions inside a single function for complex stuff. (It's also incredibly unhandy)
In fact, the JS code itself actually executes another function:
JavaScript:
actor.addState(stateId);
The above discussion was about how complicated it would be for a plugin developer to have both a plugin interpreter command & a new plugin command. (Yes, there is no interpreter anymore, but that's exactly what some people like me take an issue with, given that we no longer have it as backup alternative)

JavaScript:
PluginManager.registerCommand("TestPlugin", "PluginCommandFunctionName", args => {
    // Get Arguments
    const actorIds = JSON.parse(args.Actors);
    const stateId = args.State;

    myFunction(actorIds, stateId);
});

var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
    _Game_Interpreter_pluginCommand.call(this, command, args);
    if (command === 'PluginCommandName') {
        var stateId = args[0];
        var actorIds = {};
        for (i = 1; i < args.length; i++) {        //this is just an example. If you need to get the const ids directly, then this is obviously where you have to use the args[1]+ to fetch them.
            actorIds.push(args[i]));
        }
    myFunction(actorIds, stateId)
    }
};

myFunction = function(actorIds, stateId) {
    // Use the arguments
    for (const actorId of actorIds) {
        const actor = $gameParty.members().find(member => member.actorId() === Number(actorId));
        if (actor) {
            actor.addState(stateId);
        }
    }
}
Do forgive the old standard, I'm not at ES6 yet. :p
 
Last edited:

RK DracoRoy

Fire Emblem RPG Gamer
Veteran
Joined
Jun 29, 2017
Messages
167
Reaction score
22
First Language
English
Primarily Uses
RMMV
So I was reading the system requirements by graphics and was curious as to which compatible OpenGL MZ requires.

My OpenGL is 4.6 but my laptop has 128 Mb VRAM. But the way the graphic requirement is worded with a "/" has me thinking like if my OpenGL is compatible, I shouldn't worry about it when running MZ.
 

Attachments

Kaliya

// Caffeine Overload
Developer
Joined
Nov 1, 2015
Messages
506
Reaction score
566
First Language
English
Primarily Uses
RMMV
It may not be the intended way, but it's what is basically guaranteed to happen.

If you take a look at stuff like Moghunter's Weather systems and similar stuff, you're not gonna have all the actions inside a single function for complex stuff. (It's also incredibly unhandy)
In fact, the JS code itself actually executes another function
You wouldn't have one function, you would have multiple plugin commands registered. Maybe the example I gave wasn't good enough to illustrate? I'll make another later after I get some sleep.
 

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
197
Reaction score
215
First Language
German
Primarily Uses
RMMV
You wouldn't have one function, you would have multiple plugin commands registered. Maybe the example I gave wasn't good enough to illustrate? I'll make another later after I get some sleep.
Yeah, of course you'd have multiple plugin commands that you register, one for each command you want to give that can be assigned via the event plugin command, right?

But if you want to use that plugin command to do a complex sequence of tasks, especially if they're tasks you have to do in various different commands (such as using a variable to call an object or array, such as a variable actor where it depends on the variable which one is called) you wouldn't bloat the plugin command by copypasting the same repetitive tasks again and again. You'd just instance them in a single function and then call that function from the registered plugin commands that you need.

Say you have a command "Check Actor" which will, on the map, summon a menu that draws a window, displays name, stats, faceset & a bust portrait, you wouldn't do all of those things inside the registered plugin command?
You'd do something like this, right?

JavaScript:
PluginManager.registerCommand("ActorMapMenu", "CheckActor", args => {

    // Get Arguments
    var actorId = args.ActorVariable;

    // Execute the function
    displayActorInfo(actorId);
});


displayActorInfo = function(actorId) {
    drawActorWindow(200, 400, 20, 15);
    displayActorName(actorId);
    displayActorStats(actorId);
    displayActorFace(actorId);
    displayActorPortrait(actorId);
}

//and then you have each of those functions do the actual work so everything is sorted neat and tidy
That way you can reuse functions like the window function in other commands (e.g. displaying a monster of a NPC's info page).
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

How do you cure sleep problem? It has been 7 months and it's 3 AM now..
Darn you, Seals! Why do you gotta be so cute when on land?:kaoluv:
So dragonbones getting laggy xD
I even removed the fingers armatures.

Have to remake this guy after crashing ( corrupted file).
:rtear:

Although limited to only this shop for room decorations, I like this aspect for previewing items.

Forum statistics

Threads
100,837
Messages
980,130
Members
132,487
Latest member
AnthonyDewitt
Top