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

Status
Not open for further replies.

Galenmereth

Retired
Veteran
Joined
May 15, 2013
Messages
2,248
Reaction score
2,158
First Language
English
Primarily Uses
N/A
@R1PFake It would work exactly the same. You are overriding the class, you're just using super and class inheritance, which itself is syntactic sugar on top of the existing prototype inheritance. I've done this myself with multiple plugins extending the same class.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
678
Reaction score
590
First Language
German
Primarily Uses
RMMV
What I would really like as a plugin developer would be proper documentation about the MV/MZ source code. I don't understand how that is not a thing.

Another thing would be unifying the plugin making process. I know that plugin incompatibilities will never fully go away due to the nature of how they extend the engine. But I feel like a good amount of issues could be resolved if the maker would offer some kind of API, that we as plugin devs could use, instead of every dev having to code their own thing.

After all these years it's pretty clear how notetags are a thing and how they look like to extend any Maker. But every dev has to ship their own code to parse them. MV has this "meta" thing, which is a really basic way of dealing with notetags but nowhere near enough.

Also how many plugins hook into specific areas of the engine?
Like equipping/unequipping items, using a skill, entering battle, killing an enemy, ... It would be nice if the maker would provide hooks that we can use to execute code, instead of doing aliases.
 

R1PFake

Villager
Member
Joined
Jul 11, 2020
Messages
12
Reaction score
13
First Language
German
Primarily Uses
N/A
@R1PFake It would work exactly the same. You are overriding the class, you're just using super and class inheritance, which itself is syntactic sugar on top of the existing prototype inheritance. I've done this myself with multiple plugins extending the same class.
Ah right, I tried it again and it works, my JavaScript is a bit rusty because I mostly work with C#/C++ and I made a silly mistake in the previous try that's why it didn't work before.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,039
First Language
French
Primarily Uses
RMMV
This will not work if multiple plugins make their own battle class which extend the Scene_Battle and set their own battle.
In these cases it would be better to "override" the specific functions you want to change instead of setting a whole custom class.

With ES6 you can do this instead:

JavaScript:
class TDP_Example_Scene_Battle extends Scene_Battle {
    create() {
        console.log("This happens first");
        super.create(); // This is functionally equivalent to the old Original_Scene_Battle.prototype.create.call(this);
    }
}

Scene_Battle = TDP_Example_Scene_Battle; // This overwrites Scene_Battle with the new extended class, similar to the old way but far less verbose
You can do this in MV today already, since this is supported in the current nwjs implementation :)
wait doesn't it overwrite instead of aliasing?

but anyway if we was overwritting most people might just use the classic es5 alias.

Also having multiple custom class overriding the scene_Battle isn't never a good option especially if they are battle system. Normally you settle to one specific battle system.


Also for to answer the 'hook' it's literally impossible without making the coding overly complicated and disgusting to edit.
The points is to be : beginner friendly not beginner repellent.
I can tell you already the Pluginmanager.Register command Promise/ Lambda concept will already rise question on how to make plugincommands lol.
 

Galenmereth

Retired
Veteran
Joined
May 15, 2013
Messages
2,248
Reaction score
2,158
First Language
English
Primarily Uses
N/A
It was just a bad example using Scene_Battle because I'm working with that now, so it was more easily available.

Functionally what I did isn't different than "aliasing" because JS doesn't actually have a concept of aliasing; in both cases it overrides the original method, and super calls the extended class's method, similar to how with the prototype way you'd call a variable reference to the "old" function. Also, extending a class like this tends to be faster during runtime due to how the JS engine parses it, and causes less memory overhead than the "old" prototype way, as it can internally mark the classes as extending each other and parse them differently, from what I understand. Don't quote me on this though, it's been a while since I read up on that.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,039
First Language
French
Primarily Uses
RMMV
It was just a bad example using Scene_Battle because I'm working with that now, so it was more easily available.

Functionally what I did isn't different than "aliasing" because JS doesn't actually have a concept of aliasing; in both cases it overrides the original method, and super calls the extended class's method, similar to how with the prototype way you'd call a variable reference to the "old" function. Also, extending a class like this tends to be faster during runtime due to how the JS engine parses it, and causes less memory overhead than the "old" prototype way, as it can internally mark the classes as extending each other and parse them differently, from what I understand. Don't quote me on this though, it's been a while since I read up on that.
than I invite you to add this information to my tutorial thread!

so people can see another way of extendings the existing class!
also for some reason why does it look like 'reflections' from C# xD
 

LTN Games

Indie Studio
Veteran
Joined
Jun 25, 2015
Messages
702
Reaction score
626
First Language
English
Primarily Uses
RMMV
Also for to answer the 'hook' it's literally impossible without making the coding overly complicated and disgusting to edit.
The points is to be : beginner friendly not beginner repellent.
I can tell you already the Pluginmanager.Register command Promise/ Lambda concept will already rise question on how to make plugincommands lol.
What? Hooks/ Event Emitters are a very common mechanic in game engines and would be very far from making things complicated, not sure where you get that idea from. As for registerCommand, If the devs were going to make it easy for anyone to make plugins then yea it may be an issue for begginers but if you're a programmer/plugin dev and are having complications understanding how to use registerCommand or use an Event Emitter then that person should probably go back to learning about programming in general.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,039
First Language
French
Primarily Uses
RMMV
lol you have to take in concept that MANY people here are not studying programming and that your sentences is actually anti 'noob' lol.

Even myself I didn't study programming I learned from trial and errors. I do happen to know more because I like just sitting and reading how you approach some programming concept. EVEN there sometime I don't know how some concept work because I am mainly an artist.

Please take that on consideration LTN it's not because YOU FIND this easy that it's not complicated to someone else. This is just plain arrogance.
 

LTN Games

Indie Studio
Veteran
Joined
Jun 25, 2015
Messages
702
Reaction score
626
First Language
English
Primarily Uses
RMMV
lol do you actually hear yourself? I'm out, I can't deal with that type of mindset at all. So, lets just make RM crappy for plugin devs because people can't take an hour out of there day to learn programming from trial and error or see when something is clearly better.

Just a side note, I learned all I learned by myself from trial and error as well but more importantly by recognizing what can be improved upon.
Saying things like
"Also for to answer the 'hook' it's literally impossible without making the coding overly complicated and disgusting to edit. "
That comes from a closed minded individual, because aliasing functions over and over is more complicated and disgusting than using an event emitter which is built into PixiJS :confused:

Ok, I'm unwatching this thread its full of silly comments.
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
552
Reaction score
789
First Language
English
Primarily Uses
RMMV
It was just a bad example using Scene_Battle because I'm working with that now, so it was more easily available.

Functionally what I did isn't different than "aliasing" because JS doesn't actually have a concept of aliasing; in both cases it overrides the original method, and super calls the extended class's method, similar to how with the prototype way you'd call a variable reference to the "old" function. Also, extending a class like this tends to be faster during runtime due to how the JS engine parses it, and causes less memory overhead than the "old" prototype way, as it can internally mark the classes as extending each other and parse them differently, from what I understand. Don't quote me on this though, it's been a while since I read up on that.
I'll use this for the future. Very useful alternative.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,039
First Language
French
Primarily Uses
RMMV
Lol because i dont accept you to go insult people who arent familiar with coding.

I might have passed as rude which i am sorry i took more personnal than expected but its not because i dont share your opinion doesnt mean i am closed minded.

If you want me to approve your point you have to actually share example as galenmereth did.
Dont go on me and say : LOL u should know this.

Anyway do as you whish @LTN Games if you want to be butt hurt because of that ups to you
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
678
Reaction score
590
First Language
German
Primarily Uses
RMMV
@nio kasgami
> The points is to be : beginner friendly not beginner repellent.

I don't see how the current process is beginner friendly. You can make so many mistakes when aliasing which will naturally cause issues with other plugins.

In my opinion working with all those aliases and overwrites of certain parts of the core engine without having any documentation is "overly complicated and disgusting [...]".

Let's say someone wants to make a plugin that executes code when an actor changes equipment. What is the current process?

You have to hunt down the core files and see if you can find the place where equipping items is handled and then you have to think about what place you need to alias and put your own code into. I have seen several beginners who 1.) struggle at navigating a large code base 2.) Understand the code so that they know where to place the alias.

How about this instead? A beginner would, after they watched some tutorials on how to program using JavaScript, open the documentation for Maker X and read about "Hooks" and that you can use them to execute code when something specific happens when the game is running. They would find out about the "actor-equip-item" hook.
JavaScript:
MakerX.on("actor-equip-item", function(actor, item, oldItem) {
    console.log("Actor with ID: " + actor.id + " equipped item: " + item.id);
});
Now they just read the documentation and how they can achieve what they wanted to do. They don't have to navigate 100 lines of code, learn about what an alias is, learn about how to call an alias, ... The pit they might fall into is that someone suggested that they need to alias the equip function. So they might google about "javascript how to alias". But they won't find anything useful.

Also am not saying this the best solution ever and that's how the maker should work. It was just one example on how the engine could make an effort to make plugin dev easier. Instead of just throwing a big code base at us and having to override everything.

EDIT: Because if you think about it, what we are doing at the moment is just hacking the game. We are straight up ripping out code and overriding it. This is just natural to cause issues...
 
Last edited:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,039
First Language
French
Primarily Uses
RMMV
@nio kasgami
> The points is to be : beginner friendly not beginner repellent.

I don't see how the current process is beginner friendly. You can make so many mistakes when aliasing which will naturally cause issues with other plugins.

In my opinion working with all those aliases and overwrites of certain parts of the core engine without having any documentation is "overly complicated and disgusting [...]".

Let's say someone wants to make a plugin that executes code when an actor changes equipment. What is the current process?

You have to hunt down the core files and see if you can find the place where equipping items is handled and then you have to think about what place you need to alias and put your own code into. I have seen several beginners who 1.) struggle at navigating a large code base 2.) Understand the code so that they know where to place the alias.

How about this instead? A beginner would, after they watched some tutorials on how to program using JavaScript, open the documentation for Maker X and read about "Hooks" and that you can use them to execute code when something specific happens when the game is running. They would find out about the "actor-equip-item" hook.
JavaScript:
MakerX.on("actor-equip-item", function(actor, item, oldItem) {
    console.log("Actor with ID: " + actor.id + " equipped item: " + item.id);
});
Now they just read the documentation and how they can achieve what they wanted to do. They don't have to navigate 100 lines of code, learn about what an alias is, learn about how to call an alias, ... The pit they might into is that someone suggested that they need to alias the equip function. So they might google about "javascript how to alias". But they won't find anything useful.

Also am not saying this the best solution ever and that's how the maker should work. It was just one example on how the engine could make an effort to make plugin dev easier. Instead of just throwing a big code base at us and having to override everything.
You see now? It does make more senses to me when an example is showed now i can make senses in what you mean.

Not going on my face and saying : you should return study programming.

I see your point and as a fair adult i can understand my mistake. I am mainly a developper from rm (not javacript main dev)
I switched to unity who may have hooks (if they do i dont remember their specific names) so yes my knowledge of js is way more rusty than before. so i am sorry if it passed as rude and do admit i am only human and dont know everything

@LTN Games again sorry i got upset and went a little to harsh in my word
 

Galenmereth

Retired
Veteran
Joined
May 15, 2013
Messages
2,248
Reaction score
2,158
First Language
English
Primarily Uses
N/A
The problem with event emitters is that you might be unable to guarantee or know which order event listeners are executed in. This is particularly an issue if the event emitter executes async code. There's also the issue of scoping and context. So in many cases, you'd still need to revert to extending the class, but now you've got two separate ways of doing things, and a reduction in consistency.

There are many very good uses of event emitters and handlers, but there's definitely more complexity involved as well.
 

waynee95

Inactive
Veteran
Joined
Jul 2, 2016
Messages
678
Reaction score
590
First Language
German
Primarily Uses
RMMV
@Galenmereth
It does not need to be EventEmitters. That was just one example.

But having nothing and requiring hacking the game is not a good solution in my opinion.

Even the current approach with documentation would improve the whole situation.
 

LTN Games

Indie Studio
Veteran
Joined
Jun 25, 2015
Messages
702
Reaction score
626
First Language
English
Primarily Uses
RMMV
so you tag me to get my attention after saying I'm un-watching for that reason lol. I'm not upset just annoyed by people who say one thing like
If you want me to approve your point you have to actually share example as galenmereth did.
Dont go on me and say : LOL u should know this.
But provide a opinion of
Also for to answer the 'hook' it's literally impossible without making the coding overly complicated and disgusting to edit.
without any code examples or knowledge about "hooks/event-emitters". So you are giving me advice without taking it for yourself.

I never "personally" attacked you and never told you to study programming I said
if you're a programmer/plugin dev and are having complications understanding how to use registerCommand or use an Event Emitter then that person should probably go back to learning about programming in general.
focus on "that person" which is EVERYONE not specifically YOU, so please stop making this all about you.

I'm far from angry or in a personal attack mood, I'm simply trying to show people that the statement was flawed and not to ignore it because one person is the loudest in the thread. And now(unfortunately) I'm only here to speak up about all the comments you made towards me which kind of ruins the whole point of this thread and de-rails it, so thanks for that I guess.

Edit: Sorry If I sound harsh, if this thread shows anyone anything at all, its how compassionate programmers/plugin devs are. Sometimes our compassion for our opinions sound like attacks but I promise I have no hard feelings from anyone and I can see that we are just expressing our compassion in a uniique way like programmers tend to do. In the end, we will all end up helping each other out in one way or another with our personal feelings set aside.
 
Last edited:

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
228
Reaction score
311
First Language
German
Primarily Uses
RMMV
At the end of the day, it's the same way as with so many things:

Everything has advantages and disadvantages.
Hooks can get you to parse code to the game easier, because you don't have to find a place to "inject" your code into.
On the other hand, regardless of how adept you are at JS, you'll still have to read the actual section of the game engine anyway, to figure out how RMV/Z handles & manages the scene or whatever function you're trying to affect. (Cause RM has always found unique ways to handle things. xD)

I am and remain a proponent of the one thing RPG Maker is utterly unwilling to do:
- provide coders the ability to create plugins and expansions for the editor itself.

Then it wouldn't be a problem for a few coders to get together, outfit the engine with hooks at the right points, maybe even provide a priority system that allows plugin creators to decide whether their plugin is high priority or low priority (needs to be loaded later because it may actually modify another plugin's changes).

The things I can come up with on the spot that RM would universally benefit from, from folder structure asset management, string search, to the ability to create custom prefab events that can be placed via right-click "prefab event" selection like quick events...

That's the one thing I was hoping for the most. That finally, *finally* after recognizing how most advanced and useful functionality has been provided by the community itself, they realize that the best way is to let the community handle the improvements they can't fund/justify themselves and end-users can decide which improvements to pick up.

But I've buried that hope now. ;_;
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,039
First Language
French
Primarily Uses
RMMV
@Galenmereth
It does not need to be EventEmitters. That was just one example.

But having nothing and requiring hacking the game is not a good solution in my opinion.
Thats the problem with rm it come with a code base that is kinda already written its not like unity that theres an engine written then you override with monobehaviour.

So finding a good way of way to "inject" code in the existing function which both balance "ease to use" and being optimal is slightly more complicated.

I am not against the learning curve even unity had some crazy learning curve.

I am just wondering how can we make something more efficient for us plugin dev while not "scaring" away potential beginner that want to learn to do plugins?
 

ssunlimited

Veteran
Veteran
Joined
Oct 3, 2015
Messages
242
Reaction score
24
First Language
Russian
Primarily Uses
RMMV
Can I tell you guys what I think of all this new RPG Maker? I honestly think of this iteration of RM (RPG Maker) to be more of a "patch" than a full RM game engine too. I don't think this deserves to be called it's own RM but more like RM MV Ace. It certainly doesn't deserve the $70-80 price tag for this whole standalone game engine.

I would have honestly wanted for them to create a full 3D RM game engine. But ok. If it was still the same kind of 2D game engine here are the things I would want:

  • Maybe being able to edit the editor and add your own variables (like new "stat" variables)
  • Maybe make smarter enemies (such as they can only heal a wounded ally
  • Maybe make more troop event conditions
  • Maybe make more potentials for events on the "world map"
  • Make animated enemies- I care about this one a lot
  • Make support for other languages, such as C#. So when you build it, you tell it's language and you can create plugins in that language
  • Maybe make native support for various battle systems (or just include well-programmed plugins for battle systems like tactical. action and Conditional Turn Battle)
I would need at least 2 "major" ones here in order for me to purchase MZ. These major ones include support for other languages, other well-programmed battle systems and animated enemies.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Ami
--- Surprise Part 2 ---

F.Healer: Look,i'm the Cute White Ghost!
F.Mage: And,im the Scary Witch!
M.Archer: I'm The Handsome Vampire!
M.Fighter: AWOOOOOOO!!!
(Suddenly,The Electricity Is Turned Off. Then Turned On 10 Seconds Later)
Hero: (With Scream Mask & Bloody Knife) Hey,how about my Costume?
Entire Party: (Screaming Until Faint)

230 paths... roughly 250 light sources on the screen... One serious lag fiesta... But I finally got it all the screen at once. I guess I could have also just made an event to spawn each one in exactly the location I needed, but that's sooo much less fun. :LZSwink:
A wee radio thing I made months and months and months ago. 2020 has felt like such a long year. Maybe made this before 2020.IDK anymore.

Made this one much more recently.

Forum statistics

Threads
104,498
Messages
1,006,740
Members
136,003
Latest member
anitashah
Top