Custom Title Screen Help

Ah, that's the problem then, I kept the original Scene_Title in each project I loaded Roninator's into, but commented it out. It still exists, just, it isn't being run.

Having uncommented the original, the script does work now, but it's not quite what I'm aiming for. The way it is now it just kind of shakes while slowly zooming out. What I'm hoping to make it do is zoom out, then when it stops zooming that's when it shakes and causes the boom sound. Think like, it's moving quickly away from the player, and shaking once it hits a wall.

EDIT: I've got the script at the very bottom of the base engine 'Scene_' scripts.
I updated the script above.

All scripts should be added below materials and above main.
Unless you are an expert programmer you should not be touching the original code.
Understood! It's working great now, just a matter of adjusting the timing. Thanks so much!
EDIT: I've got the script at the very bottom of the base engine 'Scene_' scripts.
Good. One thing to learn is 'how' to use scripts. A second would be how they work, but that's another matter.

The 'alias' command (or alias_method command if you wanna be technical) is a means to attach code. Its actual function as a method within the Module class itself is to give an existing method (like 'command_new_game') and give it a wholly new name. Thus, by writing a replacement as Rovinator2 had done, he re-introduced the contents of the original method (which he renamed as 'r2_new_game_clear_global_variabble') into his replacement.

By using the Alias command, you need not have to re-writen entire methods unless there is serious need. And these new scripts would be best below the Scene_ scripts as you have just learned.

Just take care of what I prefer to call "load order" heirarchy. That is, some scripts may not play well with others.

Conan-the-Destroyer_Another-Story.jpg
Unless you are an expert programmer you should not be touching the original code.

I could have been bitten for saying something like that. 😛
And that's a good advice indeed. To be honest with you all, pretty much nobody should be touching the original code directly unless that person is extremely skilled and knows how to endure the pain that might caused him or her later on.

alias is some sort of reserved term while alias_method is an actual Module method available everywhere by default. (The comma found between the method names gives it away.) Its parameters can be method_names or :symbols but as I told @Roninator2 once, the preferred option is providing it with :symbols because internally it will always look for a method's :symbol. It's just how it works and no complain or discussion will ever change that fact. It should be treated as a classical rule of thumb. It's important to accept certain things as language features you have to deal with properly.

Veteran scripters can replace whole existing methods, but this usually happens in battle systems where there's a "real need" to break the system on purpose. Even so, you can find dozens of aliased methods inside their codes. For a menu scene that wouldn't make any sense. You would have to ask yourself if there's an actual reason why the new code can't call the old one and why you should repeat pretty much all of the original code in the new one plus all the required changes. So aliasing methods is a great tool to rely upon there.

EDIT

Inheritance matters as well. You can alias methods belonging to the superclass even if they cannot be found in the child class.

Ruby:
class ChildClass < SuperClass
end

Thus, alias lets you alter both the child class or its parent class, mainly depending on which one truly needs the aliasing. In this case Scene_Title's parent class is Scene_Base, but we aliased it in the child class Scene_Title.

Nonetheless, aliasing a parent class method when we already know that super method already exists and does the job without the issues alias experiences after a F12 reset, makes it totally illogical from a practical gamer's or developer's viewpoint.

In Javascript I've noticed how either default plugins and custom ones include functions inside functions, but that's happening there because class hierarchy doesn't really exist as it does here in Ruby and RGSS. All functions (their equivalent of methods in Ruby) are first class citizens with "all rights" and access to anything declared in the same general or functional scope. Ruby NEVER tries to emulate that. C and C++ don't either. JS targets browsers while Ruby, C and C++ target stand alone applications. Their logic changes depending on such different realities and environments.
The statement claiming it impossible to alias methods of a superclass that cannot be found in the child class is incorrect. Methods of a superclass are of course inherited by the child class. And they are just as accessible by alias within the child class as they are the parent.

My AnimBat! system (RPGMaker XP) aliases the 'collapse' method while within Sprite_Battler, a method inherited from RPG::Sprite. Yet, there is no defined collapse method visible within Sprite_Battler. It need not be visible... it is inherited nonetheless.

However, you do need to take precautions when doing so. Incorrect use of alias upon methods inherited from a parent can cause a stack error (the dreaded F12 as it were). But I know from experience how to properly handle.
I made a silly typo. I'll come back if I can prove my point. Sorry for the disappointment.

EDIT

OK, I discovered why I had that strange impression. I forgot to declare the parent class the first time I created a brand new class. Sorry about the misrepresentation of how alias works between parent and child classes. I edited my previous reply accordingly.

Yet, I gotta make emphasis on the following point.

kyonides said:
Thus, alias lets you alter both the child class or its parent class, mainly depending on which one truly needs the aliasing. In this case Scene_Title's parent class is Scene_Base, but we aliased it in the child class Scene_Title.

Nonetheless, aliasing a parent class method when we already know that super method already exists and does the job without the issues alias experiences after a F12 reset, makes it totally illogical from a practical gamer's or developer's viewpoint.

Shaking... if it ever looks like a typical earthquake, it would not move to the left the same amount it will later move to the right. That's pretty much going back to the same starting position. It's useless unless you want people to think some invisible hand is trying to pull the window or sprite to the left. For a real shaking it gotta go back to the initial coordinate + some extra pixels. So a -4 and +4 would simply cancel each other and never visibly shake as intended. It's not a long enough trip to the right hand side of the game window. This remains valid even if you multiply the times the object moves to either side by the same amount.
As of now, your current post now edited reads:
You can alias methods belonging to the superclass even if they cannot be found in the child class.

Of course, your original statement prior to edit was
You can't alias methods belonging to the superclass that cannot be found in the child class.

I am changing THIS post which I had previously crafted which was a rebuttal of content you initially supplied, content that existed and not removed until 'after' my rebuttal was published. But now updated since the content you posted no longer exists, and noting your previous post contents have changed.
Not gonna discuss a script that I had to remove even before you finished publishing your reply. I'll only say that I tested the final version of the test script and confirmed it should work no matter if you alias either the parent method or the child one. Weird, don't you think?

So what did I do? I went back to that post and the previous one to fix the statements as to properly portray the actual inner workings of the useful alias method. Still, I presented a small argument advising against using it whenever you can simply call super from the child class method. And even then, there's a caveat. OK, I won't discuss it here because the OP has never reached such an extreme point in aliasing at all. (A good thing if you ask me.)

Yeah, the use and consequences of alias, some normal while others makes you feel uneasy, makes it an intriguing topic indeed.

Original thread: https://forums.rpgmakerweb.com/threads/custom-title-screen-help.159202/