How do you guys decided which function to replace?

Outside of basic syntax I know very little about javascript,  (or any other language.) and I want to write a plugin that does stuff when conditions are met.


I started by googling information about it and I found 3 different templates, and a couple of youtube series on plugin creation. The videos were great for plugin commands, they also all covered replacing a function on a project title scene. So I went and looked at the templates, The first one I found was about replacing the same title screen function that all the youtube videos covered. The second was for creating a scene and the third one I found was for plugin commands. 


Do I have to replace a function, or is it possible to write something that just runs in the background? Another question I have is what functions do people normally replace? I understand picking a function if my aim is to replace that same function, but what I if don't need to replace function ?
It really depends on what you're trying to do. You don't always need to override (replace) existing functions; sometimes you just want to call your own code, like from a plugin command, for instance.


I made a plugin that changes the default behaviour for saving on desktop platforms. In this instance I overrode existing functionality so that when the save command is called by the default system, my function is used instead. I made another plugin dealing with dungeon creation, and it relies entirely on plugin commands calling the functionality and overrides none of the default methods.


How you create your code in terms of to override or not depends entirely on what you need to accomplish.
Yes, what you do depends on your goal.  If I want to make a new menu or scene within the menu, I will look for an existing one that most closely does the mechanics of what I want mine to do (so if I want a lot of commands that will lead to other windows, I might look at Scene_Menu; if I want something that imitates the item selection window, I'll look at Scene_Item).  Then I'll use that as a basis to make my own, adjusting my version where necessary (using a new scene name, new window names, modifying the logic as necessary).


It would be better if you state what you're trying to achieve, and then we might be able to point you to some good starting places.
I made another plugin dealing with dungeon creation, and it relies entirely on plugin commands calling the functionality and overrides none of the default methods.

This part I understand, I loaded up an old VXAce project and wrote a plugin command that emulates an event system I made some time ago.

It would be better if you state what you're trying to achieve, and then we might be able to point you to some good starting places.

Right now the only objective is to check if conditions are met, and if they are do something in response. At the moment there is no over all goal, im just doing stuff to improve my understanding. 

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-guys-decided-which-function-to-replace.73273/