Recursive programming - what the hey?

I'm currently teaching myself coding and I've found recursive programming to be a real head-scratcher. I see it a few times in RGSS script and it always brings me to a brick wall.

For an example. I'm trying to make a bit of code that will do something whenever the user changes map. I think I've found what I'm looking for in scene_map line 203 (this is VX Ace):

def perform_transfer    pre_transfer    $game_player.perform_transfer    post_transferendSee that? It calls the method perform_transfer within the definition of perform_transfer. How does this work? Where is actually the nuts and bolts of perform_transfer? I'm feeling really stupid right now someone please help me out!!

Thanks!
Noting that I have zero experience with ruby, it would appear that while you are looking at a MAP-related perform_transfer, the one that is called is a PLAYER-related perform_transfer? Different methods?
I just came in here to say that I think that's what it is.

Who's stupid?

I'm stupid.

Carry on.....
I'm not REAL familiar with Ruby or exactly how the base scripts are built in RPG Maker. That said, based on my knowledge of other programming languages, "pre_transfer" & "post_transfer" should be methods of their own within that class or script.

If you use Ctrl+F, type "pre_transfer" or "post_transfer", and click "Find Next" to jump to each mention of those words you should eventually find the actual method definitions for those in the script somewhere.

As for "$game_player.perform_transfer" you should be able to use the same search method to find the definition of "perform_transfer" in the "Game_Player" class (that would be the script labeled "Game_Player" in the script list).

Sorry if that's not much help, I'm not a Ruby coder by any stretch of the imagination but most languages follow similar rules.

I'm sure there are plenty of veteran coders here who can fill in the blanks.

Original thread: https://forums.rpgmakerweb.com/threads/recursive-programming-what-the-hey.54908/