Percentage of coders in the RPG Maker community

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,316
Reaction score
7,845
First Language
Indonesian
Primarily Uses
RMVXA
I wrote a tutorial about basic Ruby to start to code in RGSS3 in my local language once. It's kinda hard, and some of the people just refuse to know/learn the fundamental part and just want a tutorial "How to edit the menu window" kind of tutorial. They want a shortcut.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
668
Reaction score
381
First Language
English
Primarily Uses
RMMV
I think @Poryg mentioned having made a handful of tutorials and being a bit disappointed in how few people responded to them, but I agree that some kind of documentation around how each of the data structures interconnect would be super helpful.

Like I mentioned before, it's super unintuitive that so much logic of how an action is processed during a turn lives on the Window_BattleLog. I also don't think it's very obvious about how all the various update functions work - that logic isn't necessarily called in a synchronous order and instead there's just a function called every frame that checks a bunch of other functions that need to be called. The amount of methods that simply update a flag or set a String, then let the update function ultimately reference it is pretty high, so seeing how the pieces connect takes a lot of digging.

EDIT: Maybe some tutorials like, "What is Window_Selectable and what are the base methods on it?" Given how many custom menus are basically just extensions of Window_Selectable, a basic understanding of how it works would be great.

Another that I think would be really complicated, but super useful, would be, "Let's step through the various methods that are called from the start of a turn to the end of one in battle." Walk through how the BattleManager works, how it reads phases, how it sets up actionBattlers, what a Game_Action is, what Game_Battler, Game_Actor, and Game_Enemy are, how the SceneManager._scene._spriteset works and all the various Sprites work, what the Window_BattleLog is and how it processes actions, etc.
 
Last edited:

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,785
Reaction score
10,933
First Language
English
Primarily Uses
N/A
Gosh, this thread is just fantastic in my eyes, I'm finally understanding how a few things work that I didn't before. Like why compatibility is such a tricky thing and why script/plugin order matters. Before now I was pretty confused, wondering why this should be an issue at all. In my eyes, the base program was the same, and any new functionality added by a script or plugin should use unique variable names. I hadn't realized the base program could be a problem, not a benefit, in keeping things compatible and consistent. You guys have even more respect now.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,368
Reaction score
15,181
First Language
English
Primarily Uses
RMMV
That would be a good tutorial right there - "Why plugin order matters"

Something like that could also help to explain why compatibility in Ace and MV is so much easier than it was in XP (it's still not easy, but XP was a nightmare)
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
668
Reaction score
381
First Language
English
Primarily Uses
RMMV
In my eyes, the base program was the same, and any new functionality added by a script or plugin should use unique variable names.

Funny enough, it's not even variable names that are an issue. Most Plugin writers "namespace" their Plugins to reduce the risk of conflicting variables. It's why, if you open up Plugins, you'll see things like:
Code:
var YEP_BEC = Imported.Yanfly.BattleEngineCore = {};
YEP_BEC.variableOne = someValue;
YEP_BEC.variableTwo = someOtherValue;
Yanfly could now store all variables as properties on the YEP_BEC object, since JavaScript understands that "YEP_BEC.variableOne" and "Zevia.variableOne" are different values.

If you'll indulge me a little here, the real issue is when two different Plugins modify the same function. As an example, let's say the default engine has a method that looks like this:
Code:
SampleManager.sampleMethod = function() {
  console.log($gameParty.members().length);
};
It will log the number of members in the party when you call it.

Well, let's suppose Sharm wants to modify it to also log the number of Enemies in the current troop. You could do this:
Code:
SampleManager.sampleMethod = function() {
  console.log($gameParty.members().length);
  console.log($gameTroop.members().length);
};

OK, no problem. Except, what if I now want to modify that function to log the number of possible party members that could join your party? If I do this:
Code:
SampleManager.sampleMethod = function() {
  console.log($gameActors._data.length);
  console.log($gameParty.members().length);
};
Well, what happened to Sharm's logic? It doesn't exist any more, because I wrote my Plugin as if nobody else was going to be modifying that function.

I can get around it by storing what that original function did as a function with a different name, then calling that:
Code:
Zevia.sampleMethodOverride = SampleManager.sampleMethod;
SampleManager.sampleMethod = function() {
  console.log($gameActors._data.length);
  Zevia.sampleMethodOverride();
};
So what that does is basically, "Call my piece of code, then just do whatever sampleMethod was doing previously." But, if I put my Plugin above Sharm's, then Sharm's definition of sampleMethod overrides mine and now sampleMethod won't log the number of Actors available in the game. So now, Sharm has to do the same thing - store what sampleMethod does, add her code, then call the stored version.

At that point, if both of us have done a good job handling for the fact that both of us might modify the same method, then the import order won't matter - but maybe you wanted sampleMethod to only log the number of party members that are used in battle and not log the number of members at all. You're not saying, "Do this extra thing, then do what the default engine does," you're saying, "Don't let the default engine do its original purpose at all."

Well, now you can't just call the stored functionality in sampleMethod, you have to overwrite it. And now, if my Plugin is imported first, then when I store the sampleMethod function, I'll be storing the original default one that logs all the party members and not just the battle ones, so we've created a dependency that means Sharm's Plugin must be imported before mine.

Now imagine that you have to jump through these hoops with a Plugin that's 2000 to 5000 lines long (as a lot of, say, Yanfly's are). Maybe you only have to account for one method. Maybe you don't even need to pay attention to the other Plugin. Maybe you have to account for tens of methods. You won't know the answer until you import it, run it in your project, see what breaks, look through their code, figure out what changes they made, figure out how to make it compatible... It just adds so much overhead.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,368
Reaction score
15,181
First Language
English
Primarily Uses
RMMV
I think Sharm's eyes just glazed over :) But great explanation!
 

Sharm

Pixel Tile Artist
Veteran
Joined
Nov 15, 2012
Messages
12,785
Reaction score
10,933
First Language
English
Primarily Uses
N/A
I'm sorry, only half of that made sense, (But why would you overwrite a method instead of creating one? Doesn't this mean that everyone assuming that plugins will be written together would make compatibility problems vanish?) but I appreciate the effort!

Well, what happened to Sharm's logic?
I would also like to know this.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
668
Reaction score
381
First Language
English
Primarily Uses
RMMV
But why would you overwrite a method instead of creating one?

Basically, any time you want to tell the default engine, "Instead of this, do this," compared to, "In addition to this, do this," you have to overwrite it.

For example, I wrote a Plugin that causes common events to be called whenever an Actor or Enemy dies. I wrote a couple new methods that will call common events, but how do I now make it so that when an Actor or Enemy dies, it's called? Well, I have to modify the Game_Battler.prototype.die (or Game_Actor.prototype.die / Game_Enemy.prototype.die) method to say, "In addition to the usual stuff that happens when someone dies, call my new methods." In which case, as a general rule, it doesn't really matter what order it gets imported.

But if you wanted to make a Plugin that says, "When an Actor or Enemy dies, instead of removing all their states except the death state, replace them with a different battler" (like, say, PokeMon), you have to replace the original logic. At that point, I have to ensure that in my Plugin, when I say, "In addition to the usual stuff that happens," I'm referencing your "usual stuff" and not the default "usual stuff."
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,316
Reaction score
7,845
First Language
Indonesian
Primarily Uses
RMVXA
In a nutshell, a code clash is like
Scripter A: "I want this code to behave like this for my sake" (Override/Overwrite)
Scripter B: "I don't care what it does, I just want to add a new piece of code here" (Alias method)

If u put B below A, it will works
If u put A below B, B will not work. Because A will replace what B modified.

This is also why a "certain scripter" explicitly state in their core module that it will not work if put together with Yanfly's plugin. I don't want to name shaming. But I think some of u may know :p

But why would you overwrite a method instead of creating one?
The scenario example is like "I want my plugin to do stuff before the effect of the item is applied". Of course, they want to modify a part where the item apply function is executed. Creating a new method does nothing if it's never used. They need to be used in default code where the code runs.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,368
Reaction score
15,181
First Language
English
Primarily Uses
RMMV
Having multiple 'core' modules from multiple scripters is always an invitation for trouble. The very name suggests they are changing the behaviour of some very basic stuff, so chances are you're going to get conflicts.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
11,997
First Language
English
Primarily Uses
RMVXA
As Shaz has mentioned it, I thought I'd give the link to the topic by modern algebra about making script requests. As it is in Tutorials, a lot of people may not know it exists, or where to find it.

I recommend that all you scripters/plugin writers note it, and if necessary link it in someone's request thread if they obviously don't have a clue how to make a suitable request. Maybe it will help some individuals make better quality requests.

https://forums.rpgmakerweb.com/index.php?threads/convince-strangers-to-write-scripts-for-you.8197/
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,316
Reaction score
7,845
First Language
Indonesian
Primarily Uses
RMVXA
Yeah, I generally despise "core module" that usually change the behavior of the default code AND it's a requirement to all of their plugins. If the said core module only change the default code and it is not a requirement for other plugins, it's fine. If it's just a collection of scripter's convenience, I'm also fine but not both. However, for the latter case, I believe people hate the term "core module" because it usually invites more problems while in most of the time, it's just scripter's collection of functions for their convenience.

But the point is, every scripter have their own visions, which usually clashes with each other. Like, they don't agree with each other so incompatibility happens. Either of the sides has to follow the other side. Or just rely on some random strangers to patch their incompatibilities.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
668
Reaction score
381
First Language
English
Primarily Uses
RMMV
But the point is, every scripter have their own visions, which usually clashes with each other. Like, they don't agree with each other so incompatibility happens. Either of the sides has to follow the other side. Or just rely on some random strangers to patch their incompatibilities.

We'll just implement community coding standards.
Better make everyone use a linter to help enforce them.
Version control with reviewable pull requests would let us improve code as a group before it gets merged to the collective community.
Better write unit tests to help document how code should function and make sure authors have properly made sure their stuff works.

Waaaaaiiiiitttt a minute...
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
733
Reaction score
594
First Language
French
Primarily Uses
I highly doubt a how to write a plugin tutorial would fix the state of things.
In my experience so many people are just not interested. I've replied to so many topics saying "this can be solved with readily available script calls in the rpg maker equivalent of event commands thread (link)" and the times where it worked were few and far between.
Sure most go look into the thread, but almost everyone copy pastes without even thinking, and then if I continue to answer it usually ends with me writing the script call.
Either I write so detailed explanations that I might as well have written the call, or it usually doesn't work.


I'll also join the others in saying that if you want to release plugins to the public and actually have people use them, you just have to make them compatible with Yanfly's. So you have to understand how MV works, which is no small feat, then go through Yanfly's, and that's quite the undertaking. Just ensuring compatibility with Battle engine core is painful, but with all the addons? I'm not opening this can of worms again.
 

Nekohime1989

Nekohime
Veteran
Joined
May 31, 2014
Messages
498
Reaction score
228
First Language
English
Primarily Uses
RMMZ
I always try to think in good head space.
Learning your first programming language is no simple task. Javascript is a good starting point however. (Although Java is actually better)
It took me a full year to learn my first programming language which was C.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,368
Reaction score
15,181
First Language
English
Primarily Uses
RMMV
We'll just implement community coding standards.

I'll also join the others in saying that if you want to release plugins to the public and actually have people use them, you just have to make them compatible with Yanfly's.

If these things ever occur, I would stop sharing plugins with the community and just make them for myself.

I just don't have the time or the interest in learning how someone else's plugins work, in order to make mine compatible, or in learning a bunch of community-imposed requirements. My plugins are for my use, or for specific requests. If someone else wants to use them and wants them to be compatible with XYZ other plugin, that's something they'll have to sort out.
 

Bricabrac

The Storyteller
Veteran
Joined
May 24, 2016
Messages
113
Reaction score
218
First Language
Italian
Primarily Uses
RMMV
Oh hey! I'm part of the group of people who can code a little, but struggle to understand how the default code works. I can write my own "pseudo-plugins" by mixing events with my own functions, but I never managed to make my own plugins.

I was wondering... I saw people in this topic lamenting the lack of tutorials/community resources; but as others said, SRD and Sulpour video series are actually pretty good.
Wouldn't it be a good start to adapt those video series in text form?
I personally hate following video tutorial while programming. I can't copy-paste examples, I struggle to stay focused, and being a non-native speaker, I can't always understand the words (SRD talks fast).
I think transcribing the videos (with the authors' permissions, of course!) would make them way more accessible to a wider audience :kaoluv:plus, transcribing the videos and taking screens are tasks even non-coders could do! Everyone could help!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,368
Reaction score
15,181
First Language
English
Primarily Uses
RMMV
Possibly with SRD videos, but it wouldn't be right to do it with Soulpour's - "hey, you're banned from this community but we really like your videos - is it okay if we transcribe them and share them on the forum?"
 

Nekohime1989

Nekohime
Veteran
Joined
May 31, 2014
Messages
498
Reaction score
228
First Language
English
Primarily Uses
RMMZ
I'm with Shaz, their is no need for Community Coding standards. The thought of that just... Frightens me...
It would be safer to just ask for help with getting two plugins two work together. Few large projects have just one code. And every one codes differently, they work together to make sure their stuff is compatible with one another. I've always been turned away from projects that force coding standards. It's just pure misery. Then it stops being game design and becomes a chore.
 

Zevia

Veteran
Veteran
Joined
Aug 4, 2012
Messages
668
Reaction score
381
First Language
English
Primarily Uses
RMMV
If these things ever occur, I would stop sharing plugins with the community and just make them for myself.

I'm with Shaz, their is no need for Community Coding standards. The thought of that just... Frightens me...

Just to be clear, I was joking when I mentioned every single item in that post. The "waaaaiiiiit a minute..." was because that's already what you do for a job and imposing those limitations would ensure nobody would do this any more as a hobby.
 

Latest Threads

Latest Profile Posts

so... I decided since a park was an area in my game... here's an enemy that's slide with a hand behind it. cause why not.
Hot chocolate and music make studying and note-taking much easier :kaoluv:
Until my hand cramps up from writing too much!
Doing RPG Maker News for 21st September 2021


Malak is still waiting for Dark Deception Chapter 4... This was him yesterday after another sugar crash.
Again, he's fine. He's just bored at this point, considering he's exhausted his entire vacation bucket list.
Am I the only one who files custom resources under specific folders to remember who to credit? :kaoswt2:
1632263519730.png

Forum statistics

Threads
115,269
Messages
1,088,475
Members
149,873
Latest member
DeadlightBC
Top