How can I know object's variable name and public methods??

qwertwo

Villager
Member
Joined
Mar 27, 2017
Messages
7
Reaction score
0
First Language
Korean
Primarily Uses
RMMV
My native language is Korean. Please note that my English si not perfect.


When I just want to type my own javascript, How can I know the lists of classes' name and their public methods??

Forexample, $gameVariables.setValue(1,0); is used for make variable[1] to have value 0.
I want to know more about those.

I would be grateful if you could provide me with where to find the objects' name, the public functions that can manipulate the game data.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
[move]Learning JavaScript[/move]
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
If you want the full list of everything that's in scope to you at any given time, open the console log and type "window". You'll get a list of every object that's in the window scope, including "global variables" like $gameVariables and $gameParty. You can then expand/collapse objects as you like to see their properties, functions, and prototypes.
 

qwertwo

Villager
Member
Joined
Mar 27, 2017
Messages
7
Reaction score
0
First Language
Korean
Primarily Uses
RMMV
If you want the full list of everything that's in scope to you at any given time, open the console log and type "window". You'll get a list of every object that's in the window scope, including "global variables" like $gameVariables and $gameParty. You can then expand/collapse objects as you like to see their properties, functions, and prototypes.


wow... when I looked at the full list of objects, it's really confusing. Do you have any tip to how to find public functions easily?

ty so much though.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
Depends on what you mean by "public functions". If you mean a full list of every function that's callable from any object in the window scope, you'd basically have to have a plugin that loops through every child of the window, then loops through every object in that child, looks for function definitions, and outputs them to the console. And I'd have to question why you even need that. What are you trying to accomplish?
 

qwertwo

Villager
Member
Joined
Mar 27, 2017
Messages
7
Reaction score
0
First Language
Korean
Primarily Uses
RMMV
Depends on what you mean by "public functions". If you mean a full list of every function that's callable from any object in the window scope, you'd basically have to have a plugin that loops through every child of the window, then loops through every object in that child, looks for function definitions, and outputs them to the console. And I'd have to question why you even need that. What are you trying to accomplish?
guess my question was way to broad.

I'm trying to make non-target action system( like hot line maimi, tera) and pick up an object system( like by pressing certain button, you pick up an wood and carry around).
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,961
First Language
English
Primarily Uses
RMMV
There isn't really a "cheat" for getting what functions you have access to when it comes to things like that. It's a trial and error process of figuring out what objects do the thing you want to make function differently, then poking around until you find out how they work.
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top