Going over the engine I have been tempted to change existing scripts but my experience with other game engines is that its often not necessary to do so and is often a mistake.
For example I am looking into turning the default battle system into a fully real time active battle system. This means that the BattleManager module script would need to be modified from what I can tell. Yet I am unsure if it is a good idea.
If I do decide to modify existing scripts is it easy to revert my changes if I realize the effects are undesirable without losing work on other scripts I have created?
edit: I believe I just answered my own question by experimenting. The answer appears to be no, its not necessary to modify original scripts, I can just make a new script that call functions with the same names and the newer script will take priority.
Modify existing scripts or not to modify existing scripts?
● ARCHIVED · READ-ONLY
-
-
Yes. When you open a new project, the scripts will all be default. So if you make a mistake, you can just create a new project and copy the "default" script into your other project.If I do decide to modify existing scripts is it easy to revert my changes if I realize the effects are undesirable without losing work on other scripts I have created?
-
Complete RGSS3 Scripts forum is meant for complete script submssions only
I've moved this thread to RGSSx Support. Please be sure to post your threads in the correct forum next time. Thank you.
Default method rewrites are inevitable if you want a relatively complex system.
Considering the fact that you can just make a new blank project in the event you need the original code intact, it shouldn't be an issue. In fact, you don't even have to touch the scripts above the materials section if you want to modify them. You could make a default class copy in the materials section and modify only that.If I do decide to modify existing scripts is it easy to revert my changes if I realize the effects are undesirable without losing work on other scripts I have created?
And in the case of your own scripts, you can just keep older versions of them archived. Use a version control system like Git or something if you really need to. -
Just overwrite existing definitions in your own script. Then if stuff goes wrong you can just delete your script. This is one reason why I like ruby; I don't think it's possible to do this in a lot of other languages.
-
By doing this you have a lot of redundant code, so in practice this is not very good, but for simplicity it is fine to use in instances like scripting.
-
If you mean by "Modify existing scripts" to open the editor, delete default code, and replace with yours, you should never ever do this.
In my opinion, the sections above materials should be visble on the editor, but unchangeable (and would include the Hidden Classes Code) -
Once I learned that the materials section can easily modify all of the above scripts I immediately moved all of my current changes to materials and reverted changes to the main scripts. Everything seems to be working fine at the moment and now its much easier for me to keep track of all of my own changes.If you mean by "Modify existing scripts" to open the editor, delete default code, and replace with yours, you should never ever do this.
In my opinion, the sections above materials should be visble on the editor, but unchangeable (and would include the Hidden Classes Code)