You should be able to find and edit the original function if you search for it in the "rpg_objects.js" file too if you prefer that.
I just generally think it's cleaner to copy these functions into a new javascript file and to do your edits there. If you have multiple versions of the same function, the latest (the one in your custom plugin) takes precedence.
Using a separate file might make further modifying, removing or porting of your feature to other projects easier (although especially for features that require more than one function edit), you won't run the risk of forgetting what you changed 3 months down the line and wondering why your game does what it does, it might make possible conflicts with other third party plugins a bit easier to resolve since you don't have to dig through the original plugins as much and can also swap the plugin positions if needed.