How do you guys decided which function to replace?

Orichalcum+

Veteran
Veteran
Joined
Apr 17, 2015
Messages
72
Reaction score
52
First Language
English
Primarily Uses
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 ?
 
Last edited by a moderator:

taarna23

Marshmallow Princess
Global Mod
Joined
Jul 20, 2012
Messages
2,402
Reaction score
4,969
First Language
English
Primarily Uses
RMMZ
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
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.
 

Orichalcum+

Veteran
Veteran
Joined
Apr 17, 2015
Messages
72
Reaction score
52
First Language
English
Primarily Uses
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. 
 

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