Hi guys I am here again for open a conversation about the overwriting!
so if we begin we all know overwriting is simply well redefine a existent method!
but I noticed they have multiple type overwriting so let's show what I know about them
Total Overwrite
This one is the more common overwrite method we actually know that's the true term of "overwrite". Where we totaly change the ORIGINAL Parent method.
E.g
# ORIGINAL ONE!class Window_Base < Window #-------------------------------------------------------------------------- # * Get Standard Padding Size #-------------------------------------------------------------------------- def standard_padding return 12 endend# OVERWRITED ONE! class Window_Base < Window #-------------------------------------------------------------------------- # * Get Standard Padding Size #-------------------------------------------------------------------------- def standard_padding return Graphics.height unless contents < 4 #EXAMPLE DO NOT TRY THIS NOT WORK! endendPartial Overwrite
that's also a common in rgss who have the objective to not redefine TOTALLY the method but have the goal to just add your own little code without destroying the normal code
E.g
# ORIGINAL ONE!class Scene_Base#-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate Graphics.freeze dispose_all_windows dispose_main_viewport endend# OVERWRITED ONE! class Scene_Base#-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate Graphics.freeze dispose_all_windows dispose_main_viewport dispose_system endendthen you also have
Localised Overwrite
this way is use for overwrite a PARENT method inside of a other script! (and will only affect the said script!)
E.g
class Scene_Base #-------------------------------------------------------------------------- # * Get Transition Speed #-------------------------------------------------------------------------- def transition_speed return 10 endendclass Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Get Transition Speed #-------------------------------------------------------------------------- def transition_speed return frame.rate + time #PURELLY A EXEMPLE NOT WORKING endendand they are!
I hope you will enjoy to read this if I forgot anything don't hesit to tell it I am not a master and I don't know everything in the coding!
so
Nio out~
so if we begin we all know overwriting is simply well redefine a existent method!
but I noticed they have multiple type overwriting so let's show what I know about them
Total Overwrite
This one is the more common overwrite method we actually know that's the true term of "overwrite". Where we totaly change the ORIGINAL Parent method.
E.g
# ORIGINAL ONE!class Window_Base < Window #-------------------------------------------------------------------------- # * Get Standard Padding Size #-------------------------------------------------------------------------- def standard_padding return 12 endend# OVERWRITED ONE! class Window_Base < Window #-------------------------------------------------------------------------- # * Get Standard Padding Size #-------------------------------------------------------------------------- def standard_padding return Graphics.height unless contents < 4 #EXAMPLE DO NOT TRY THIS NOT WORK! endendPartial Overwrite
that's also a common in rgss who have the objective to not redefine TOTALLY the method but have the goal to just add your own little code without destroying the normal code
E.g
# ORIGINAL ONE!class Scene_Base#-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate Graphics.freeze dispose_all_windows dispose_main_viewport endend# OVERWRITED ONE! class Scene_Base#-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate Graphics.freeze dispose_all_windows dispose_main_viewport dispose_system endendthen you also have
Localised Overwrite
this way is use for overwrite a PARENT method inside of a other script! (and will only affect the said script!)
E.g
class Scene_Base #-------------------------------------------------------------------------- # * Get Transition Speed #-------------------------------------------------------------------------- def transition_speed return 10 endendclass Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Get Transition Speed #-------------------------------------------------------------------------- def transition_speed return frame.rate + time #PURELLY A EXEMPLE NOT WORKING endendand they are!
I hope you will enjoy to read this if I forgot anything don't hesit to tell it I am not a master and I don't know everything in the coding!
so
Nio out~
Last edited by a moderator:

