I've just barely started learning JS, and maybe I just need to spend a bit more time learning it and I'll be able to answer my own question, but are there specific codes that RPG Maker or other games use that wouldn't be covered in a basic course on JS? I'm going through stuff on Khan Academy, and it feels like the codes it teaches are different from what I have seen people using in this forum, in that it feels more generalized. I feel like the codes I've seen posted here, with language like "user.isStateAffected(x)", are something specific that I need to learn from somewhere else. Is there somewhere where all these codes are listed, or is it something you just figure this out from learning general JS?
MV RPG Maker/Game Specific Language?
Learning Javascriptsome codes are added by the plugin creator, and user, battler, target can
be used when eval the JS code in note tags if you aim for it.
you can create your own functions if you want too, but the main function
of the core are still required for them to read it inside the game.
you can learn JS and study plugin creators code to see how things are
done or could be done as there are many ways to make it work.
JS isn't something you learn on a short notice, as I try to learn JS on my own,
but is also very difficult in my situation, for others is easy to pick up.
be used when eval the JS code in note tags if you aim for it.
you can create your own functions if you want too, but the main function
of the core are still required for them to read it inside the game.
you can learn JS and study plugin creators code to see how things are
done or could be done as there are many ways to make it work.
JS isn't something you learn on a short notice, as I try to learn JS on my own,
but is also very difficult in my situation, for others is easy to pick up.
No and yes.
Any code that's already written by someone will have unique words used in it. So, in your example,
But that has nothing to do with learning JavaScript.
That format, of
So the ultimate answer to your question is if you do JavaScript tutorials/courses and learn the syntax and to recognize what you're reading...there is nothing in RPG Maker that's somehow specific to RPG Maker.
Any of the users on here who knew how to code in a sufficiently similar language before picking up RPG Maker would have known how to read the code when looking at it. Speaking for myself, I didn't know anything about JavaScript specifically when I started using MV, and with C/C++ knowledge was able to read and write things for RPG Maker.
Any code that's already written by someone will have unique words used in it. So, in your example,
user.isStateAffected() are a variable and function that's defined in RPG Maker's code and is specific to it.But that has nothing to do with learning JavaScript.
That format, of
object.method() is completely standard.
So the ultimate answer to your question is if you do JavaScript tutorials/courses and learn the syntax and to recognize what you're reading...there is nothing in RPG Maker that's somehow specific to RPG Maker.
Any of the users on here who knew how to code in a sufficiently similar language before picking up RPG Maker would have known how to read the code when looking at it. Speaking for myself, I didn't know anything about JavaScript specifically when I started using MV, and with C/C++ knowledge was able to read and write things for RPG Maker.
I had prior knowledge of Javascript from my work with web development, but I had to learn RPG Maker's codebase from scratch because I didn't know how they'd done anything until I read the core js files.
Basically, this.
You ask: "Is there somewhere where all these codes are listed" and the answer is, yes - in the RMMV/RMMZ codebase. That means all of those .js files you see in the "js" folder in your project, the ones labelled "rpg_xxx.js".
A basic course in JS or any other programming language will mostly just tell you the basic syntax. That is, that stuff like how a function call in JS for "x" function looks like "someVariable.x(args)" or that if-else clause in JS looks like "if (condition) { do whatever }" with parentheses for the condition and curly braces containing the code to execute if met.
Anything actually specific and "useful" to RPGMaker, like which functions load images from the project files and what functions play sound effects are not going to be in a basic JS tutorial. You will need to pore over the rpg_xxx.js files to find out.
For example, you will only know that there is such a function as AudioManager.play_bgm() or AudioManager.play_se() that plays music by looking at the code, either at the AudioManager class in rpg_managers.js or most likely when you look at the code for the title screen (Scene_Title in rpg_scenes.js) and see that the function AudioManage.play_bgm($dataSystem.titleBgm) is called at when it runs its "playTitleMusic()" function.
When seeing that, you might also realize that the engine loads the data from the System.json file (the one in your project's "data" folder) into a variable called "$dataSystem" and that the bgm filename you assigned for the title screen music is stored in its property "titleBgm".
But a basic course won't tell you that, only reading the codebase and experience working with it will.
Original thread: https://forums.rpgmakerweb.com/threads/rpg-maker-game-specific-language.157440/