Global search for a function?

BlueMage

Slime Lv99
Veteran
Joined
Apr 13, 2019
Messages
116
Reaction score
149
First Language
English
Primarily Uses
RMVX
Hi there, i want to ask if there is any way (through console?) to do a Global search for something.
Like a function to see which plugins has defined it?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Type the function in console (without any brackets/parameters), press enter and then click on the result. It will open the script file.
Screenshot_47.png
 

BlueMage

Slime Lv99
Veteran
Joined
Apr 13, 2019
Messages
116
Reaction score
149
First Language
English
Primarily Uses
RMVX
Thanks @Poryg but if i remember it right, that will show only the name of the last plugin which defined the function right? (and the code of the function too). Is there anyway to check for all plugins which has defined that function?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Actually, there is.
I'll demonstrate on an example from my plugin.
Screenshot_48.png

1. Type the method you want to find. Press Enter.
2. You'll see whatever it aliased.
3. Type that alias and press enter.
4. Press the result.

There is only one thing where this fails: Where you don't alias a function, but only completely overwrite it. In this case you'd have to deactivate the plugin that overwrites the function.
Or of course you can always open your IDE and browse through the js files.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
a more comfortable way of searching is to use a multifile text editor like (for example) Textpad (there are others like it around).

with it, you just open every js file in your project at the same time, giving you the option to comfortably swith between all plugins and all core files and search over all those files in any form of text search (which includes searching for incomplete functionnames)
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
As said above, for more specific, Notepad++ (iirc) and VSCode has global search function bind in CTRL+SHIFT+F.
 

BlueMage

Slime Lv99
Veteran
Joined
Apr 13, 2019
Messages
116
Reaction score
149
First Language
English
Primarily Uses
RMVX
Thanks guys! For all great advises! =D
 

Mrs_Allykat

Failsauce
Veteran
Joined
Oct 13, 2017
Messages
546
Reaction score
2,194
First Language
English
Primarily Uses
RMMV
I use GrepWin, since it's recursive and can replace multiple instances of misspellings across many files in the data directory... (edit, and multiple json files, ruby, JS, PHP, and so on.)
 

bunslunch

Villager
Member
Joined
Dec 29, 2018
Messages
5
Reaction score
5
First Language
English
Primarily Uses
RMMV
I still write in newbie non-obfuscated JavaScript myself, even since 2007.
The JavaScript window.Tumblr object is way deeper, btw. (I write UserScripts)

But here is a trick I learned for any deep this, that I can't find owner of.

To find the owner of a this deep nested EXAMPLE
proto = new proto = new proto = new proto = new proto (or whatever)
kind of situation...
Don't be shy about inserting a temporary global, to better learn the third party code.
whatamI.png

window.whatAmI in the devTools console will reference all the goodies of line 10,507 in rpg_objects.js

You won't need to be doing this once you have firm grip on the workings. It's like training wheels.

I haven't needed to do it in so long, I'm not even sure if this ^ this is a good example.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,868
Messages
1,017,066
Members
137,576
Latest member
SadaSoda
Top