RMMV Jump into Javascript, a breakdown and explanation of the default js files in MV.

Heartless_Angel

Lv. 666
Veteran
Joined
Mar 19, 2018
Messages
50
Reaction score
49
First Language
German
Primarily Uses
RMMZ
Would be nice if this would be updated to MZ.
Or the offical tutorial would come out already...
 

neosky

VX.net Retired Staff
Member
Joined
Mar 22, 2012
Messages
28
Reaction score
19
First Language
english
Primarily Uses
N/A
Does this work for MZ as well?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,752
Reaction score
2,848
First Language
English
Primarily Uses
RMMZ
Part 11 is up!

@neosky It mostly does, I'll probably do a breakdown of the code changes from MV -> MZ after I finish with MV itself.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
909
Reaction score
394
First Language
english
Primarily Uses
RMMV
i'm trying to learn javascript but i cant understand any of this.

it seems like this is being explained in a way that i would only be able to understand if i already have scripting knowledge from ruby. which i have none of.
and i get thrown off every time mentions "heres how ruby did it, this is how javascrpt is different"

i have plenty of experience with eventing using the base engine, and some yanfly's notetags (only minimal experience actually making action sequences). yet whenever i use gamedata when making an event, i can make it work but really i have no idea what im actually looking at when i'm just seeing it from the event contents. everything after $ is just complete jibberish in my mind.

if someone could direct me to a link where every aspect of javascript is explained as more of like a highschool "introduction to..." level instead of a collage "101" level that would be great.

this link is even harder to understand then what you have here, which is all i had before this.
but whats here still seems more medium level of scripting knowledge while i need more beginner level explanation and preferably some hand holding / hands on learning.
ive always been a tactile learner and not really do to well with just visual and audial learning (which is why the methods used in schools for teaching is feking stupid since only math, shop, art and music classes use tactile teaching methods)
self taught is defiantly not my strong suit.

sorry about this turning into more of a rant.
whats here is still defiantly better then what i had before.
and mega props for the time and effort putting this together when have no real incentive outside of just trying to be helpful to people like me.
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,752
Reaction score
2,848
First Language
English
Primarily Uses
RMMZ
i'm trying to learn javascript but i cant understand any of this.

it seems like this is being explained in a way that i would only be able to understand if i already have scripting knowledge from ruby. which i have none of.
and i get thrown off every time mentions "heres how ruby did it, this is how javascrpt is different"

i have plenty of experience with eventing using the base engine, and yanfly's notetags (only minimal experience actually making action sequences). yet whenever i use gamedata when making an event, i can make it work but really i have no idea what im actually looking at when i'm just seeing it from the event contents. everything after $ is just complete jibberish in my mind.

if someone could direct me to a link where every aspect of javascript is explained as more of like a highschool "introduction to..." level instead of a collage "101" level that would be great.

this link is even harder to understand then what you have here, which is all i had before this.
but whats here still seems more medium level of scripting knowledge while i need more beginner level explanation and preferably some hand holding / hands on learning.
ive always been a tactile learner and not really do to well with just visual and audial learning (which is why the methods used in schools for teaching is feking stupid since only math, shop, art and music classes use tactile teaching methods)
self taught is defiantly not my strong suit.

sorry about this turning into more of a rant.
whats here is still defiantly better then what i had before.
and mega props for the time and effort putting this together when have no real incentive outside of just trying to be helpful to people like me.
The early episodes fully explain every new function and keyword as they come so it should be accessible to complete beginners. If it's not, I need to rework it. Can you give me an example of something you don't understand which I didn't explain in the series?
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
909
Reaction score
394
First Language
english
Primarily Uses
RMMV
ive actually been trying to learn from this since around the time part 9 released.
(by learn from i more mean "read and failed attempt to wrap my head around what im seeing")
main thing that incentivized me to make the post was seeing a massively overly explained 1 tiny aspect of scripting (this was posted in the forums just earlier today)

i think the difference in the teaching method is what works for me.
i guess its like a wall of information in sentences vs a paragraph of explanation
1 example could be part1 "new concept: this"
The "this" keyword in Javascript is similar to that of Ruby, and returns a reference to the object which called the code containing it.

i have no clue what the sentence actually means. i dont know what it did in ruby. i can see it being used above and below this sentence. but i just cant make sense of any of it.

i'm just trying to gain enough understanding so i can do the "code" sections of yanfly notetags without having to ask the forums for a copy/paste version every time i want to make a complex skill.
and how to use $gamedata in just 1 script instead of 12+ lines of event content setting and checking a variable.
the extreme beginner level stuff, like learning how to use script calls.
not even the editing/making .js stuff. i feel like that would still be years after.
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,752
Reaction score
2,848
First Language
English
Primarily Uses
RMMZ
Okay, so the earlier ones need to go even further into describing the absolute basics. I'll see if I can insert a "lesson 0" or something that goes over that stuff.
 

Restart

Veteran
Veteran
Joined
Mar 15, 2019
Messages
848
Reaction score
707
First Language
English
Primarily Uses
RMMV
It might be easier for the introduction to start with a piece of code with an obvious practical use in a game, then explain the basic concepts involved in making it work. Even though I've personally meddled with main.js, I don't think it's a good start for figuring out how to make a normal plugin work.

Maybe something like 'change the character portrait image based on which hat is equipped'?

That touches on a few different important things (actors, windows, and managers), which can be expanded on later.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,752
Reaction score
2,848
First Language
English
Primarily Uses
RMMZ
It might be easier for the introduction to start with a piece of code with an obvious practical use in a game, then explain the basic concepts involved in making it work. Even though I've personally meddled with main.js, I don't think it's a good start for figuring out how to make a normal plugin work.

Maybe something like 'change the character portrait image based on which hat is equipped'?

That touches on a few different important things (actors, windows, and managers), which can be expanded on later.
That's what I did for Slip into Ruby; I started out explaining how to create a basic bestiary.

Hmm. Maybe I could do the same tutorial for MV, since a few people came on board for JiJ who've already read SiR.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,752
Reaction score
2,848
First Language
English
Primarily Uses
RMMZ
Part 13 is up!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
1,785
Reaction score
918
First Language
English
Primarily Uses
RMMV
Hmm. Maybe I could do the same tutorial for MV
I think it depends on what your ultimate goal is with this collection. Right now, it's a very useful explanation of the code for people who can do JavaScript but not at an advanced enough level to just read and follow the code to find what they need (or who don't want to read the entire darned engine to figure out what this data type is keeping track of).

What @Tiamat-86 and other complete newbies need (and I've recommended to them) is to do an actual JavaScript tutorial, like the nice interactive ones at w3schools. If you want this thread to be a one-stop shop for the complete beginner, then there's a ton to add in that range...for someone who just doesn't know anything about coding and needs to be taught basic syntax of assignment and comparative operators, etc.

But, personally, I like the direction you already have for this. I think it's easier to learn the extreme basics without trying to shoehorn them into the context of RPG Maker.
 

xiumu

Warper
Member
Joined
Sep 27, 2020
Messages
4
Reaction score
0
First Language
Chinese
Primarily Uses
RMMV
Hi there,
I have been using your tutorials as references for over an year now and it's been really helpful for writing my own plugins. I noticed that a new part is up, so I just feel that this is a good chance to thank you for your work so far (and hope for more updates in the future!).
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
150
Reaction score
23
First Language
Swedish
Primarily Uses
N/A
This is a companion series to Slip into Ruby (my teardown of the RPG Maker VX Ace default scripts) and aims to teach a bit of Javascript while explaining exactly how everything works under the hood of MV's .js files.

Part 1: https://rpgmaker.net/tutorials/1230/ (main.js, rpg_scenes.js (Scene_Base))
Part 2: https://rpgmaker.net/tutorials/1357/ (rpg_scenes.js (Scene_Boot, Scene_Title))
Part 3: https://rpgmaker.net/tutorials/1358/ (rpg_scenes.js (Scene_Map))
Part 4: https://rpgmaker.net/articles/1359/ (rpg_scenes.js (Scene_MenuBase, Scene_Menu, Scene_ItemBase, Scene_Item, Scene_Skill))
Part 5: https://rpgmaker.net/articles/1362/ (rpg_scenes.js (Scene_Equip, Scene_Options, Scene_File, Scene_Save, Scene_Load, Scene_GameEnd, Scene_Shop))
Part 6: https://rpgmaker.net/articles/1378/ (rpg_scenes.js (Scene_Name, Scene_Debug, Scene_Battle))
Part 7: https://rpgmaker.net/articles/1384/ (rpg_objects.js (Game_Temp, Game_System, Game_Timer, Game_Message))
Part 8: https://rpgmaker.net/articles/1393/ (rpg_objects.js (Game_Switches, Game_Variables, Game_SelfSwitches, Game_Screen, Game_Picture, Game_Item))
Part 9: https://rpgmaker.net/articles/2615/ (rpg_objects.js (Game_Action, Game_ActionResult))
Part 10: https://rpgmaker.net/articles/2694/ (rpg_objects.js (Game_BattlerBase))
Part 11: https://rpgmaker.net/articles/2770/ (rpg_objects.js (Game_Battler))
Part 12: https://rpgmaker.net/articles/2774/ (rpg_objects.js (Game_Actor))
Part 13: https://rpgmaker.net/articles/2778/ (rpg_objects.js (Game_Enemy, Game_Actors, Game_Unit))

Hopefully this will be helpful to people just starting out or who want to understand a bit more about how MV does what it does! Eventually I'll even be tearing down the basest of the base classes like the content of pixi.js and the core classes like Window and Bitmap.
Impressive, do you know any way I can get a good-ish understanding of how the windows in the menus are drawn and works? What with updating windows and such, I am currently trying to modify it quite a bit and I keep hitting bumps that lead me down a rabbithole...

Best regards,
Bishiba
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,752
Reaction score
2,848
First Language
English
Primarily Uses
RMMZ
It's going to be a while before I get to the window classes, but I will get there! If you have any specific questions feel free to PM me.
 

Arudama

Warper
Member
Joined
Jul 16, 2021
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMZ
AS someone who already knows how to program in C++ and Java, this is a handy reference for learning aspects of Javascript. Although I had to reference a Javascript bible for some unexplained syntax. For instance, I still don't know what blah.blah.blah = function() {} means for instance -- the prototype object method is a little confusing as well, but from what I can tell from other tutorials on javascript, it seems as though .prototype is just a convoluted means to add extra 'security' to objects in general(?).

Furthermore, as this tutorial did help with learning some Javascript syntax, and I guess it helped with learning some aspects of the API itself, I leave the first part of the tutorial not knowing how to practically apply any aspect of what you outlined here if I decided to go ahead and try and practice it hands-on. As far as I can guess, SceneManager is a wrapper to Win32 API; or some other interfacing that handles pixel placements (and RPGM defined tiles) on the screen since this is supposed to be compatible with more than just Windows devices.

I'm aware of your previous Ruby series (I'm very new here, this tutorial pushed me into making an account), so maybe you fleshed out what all of this API interface means there, but it'd be nice if I didn't have to cross-reference two tutorials. Hopefully, the other tutorials will flesh out more of how you practically apply this stuff into an actual game.

Also, unlike others in this forum, I more than welcome a video tutorial series. Despite the fact that I too prefer text, I would more than happily watch the video the first time, and reference a transcription - with some pictures of course - for the hundreds of times after. If you still decide to go with the video tutorials tho, you might wanna have a sample game project to walk us through as you teach us the RPGM:MZ API.

Regardless, thank you for this informative series of tutorials. It's an engaging way to learn Javascript, as well as RPGM.
 

Frostorm

[]D[][]V[][]D aka "Staf00"
Veteran
Joined
Feb 22, 2016
Messages
1,965
Reaction score
1,670
First Language
English
Primarily Uses
RMMV
@Trihan I would love a tutorial/guide for MZ's Time Progress battle system. I've realized I need to build one from scratch in order to get such a mechanic to work w/ LTBS. :kaoswt:
 

Latest Threads

Latest Posts

Latest Profile Posts

Sneak peak of my upcoming update! Who's holding her, you may ask? Find out tonight!
10.PNG
BCj
Finished another GUI! Turn indicator wasn't made by me.

ff981f8dc50b03cf58038c644334b454.jpg


3cb092fdc00087acfa0a190fd891f0ed.jpg
Added a small refining scene to my game.

It makes sense that you try to focus on the squishy mages at the back of the party first, right? If the mage can out-DPS the enemy DPS before the latter can kill the tank in front, the fight becomes boring.

Forum statistics

Threads
115,240
Messages
1,088,299
Members
149,836
Latest member
GMT500
Top