Modify existing scripts or not to modify existing scripts?

TheCastle

Veteran
Veteran
Joined
Apr 2, 2012
Messages
150
Reaction score
2
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Levi

Veteran
Veteran
Joined
Jun 7, 2012
Messages
798
Reaction score
143
First Language
English
Primarily Uses
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?
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.
 

Mr. Bubble

Makes stuff.
Member
Joined
Mar 1, 2012
Messages
853
Reaction score
163
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.

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?
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.

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.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 
Last edited by a moderator:

Helladen

Deviant Designer
Veteran
Joined
Jul 13, 2012
Messages
635
Reaction score
188
First Language
English
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.
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,452
First Language
Portuguese
Primarily Uses
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)
 
Last edited by a moderator:

TheCastle

Veteran
Veteran
Joined
Apr 2, 2012
Messages
150
Reaction score
2
First Language
English
Primarily Uses
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top