ts50's Script Corner

cooltext405634105321900.png


Feel free to use how you wish in either commercial or non-commercial games. No credit necessary, but if you want you can credit me as ts50.

Add all scripts just above Main. Compatibility issues should be minimal.


SKIP TITLE SCREEN
Removes the title screen at the beginning and automatically starts a new game. Good for very short games or for games with custom, evented title screens. Obviously not compatible with title screen scripts; however, it should not create an error message but rather just ignore the title screen scripts.

Ruby:
=begin
SKIP TITLE SCREEN
by ts50
This script skips the title screen and continues directly to the
starting map as specified in the database ($game_map.autoplay).
No script settings.
=end

class Scene_Title < Scene_Base
  def start
    DataManager.setup_new_game
    $game_map.autoplay
    SceneManager.goto(Scene_Map)
  end
  def terminate
    Graphics.fadeout(Graphics.frame_rate)
  end
end

PAUSE WHILE TALKING
While a message window is activated, all other movement pauses. Originally written for a zombie survival game in which zombies would approach the player; while talking to an NPC, zombies would cluster around the player. This script pauses that. Tested with Yanfly Message System.
Ruby:
=begin
PAUSE WHILE TALKING
by ts50
This script pauses all event autonomous movement during a
message window. Tested with Yanfly Message System.
No script settings.
=end

class Game_Event < Game_Character
  alias update_self_movement_ts50 update_self_movement
  def update_self_movement
    return if $game_message.busy?
    update_self_movement_ts50
  end
end

DISABLE DASH
Maybe the shortest script in existence, it simply disables dash for the whole game. Not much else to say. The second version allows for this to be disabled via switch. Change "1" to whatever switch ID you want. The switch should be ON to disable dash.

Ruby:
=begin
DISABLE DASH
by ts50
This script disables all dash for the game.
No script settings.
=end

class Game_Player
  def dash?
    false
  end
end
Ruby:
=begin
DISABLE DASH
SWITCH EDITION
by ts50
This script disables all dash for the game.
Change the number in $game_switches[x] to whatever switch
ID determines dash. If switch is ON, dash is disabled. Change
true to false to reverse this (if switch is OFF, dash is disabled).
=end

if $game_switches[1] == true
  class Game_Player
    def dash?
      false
    end
  end
end
Hi Thomas, make sure to separate MV and VXA scripts to their respective boards.
Hi Thomas, make sure to separate MV and VXA scripts to their respective boards.
Sorry, @Archeia, I didn't see you post that. Hmmm, should I make two threads, one for my MV plugins and one for VX Ace scripts? I'll go ahead and make this only show VX Ace scripts, and make a new thread with MV plugins later.
Nice to see you start making scripts Thomas! This is a really good start! 🙂 Yes, this will be useful for short games or demos. ^_^ Can't wait to see more scripts from you soon! xD (I can't imagine the work and stress involved with scripting though). Congratulations for this! xD
Nice to see you start making scripts Thomas! This is a really good start! 🙂 Yes, this will be useful for short games or demos. ^_^ Can't wait to see more scripts from you soon! xD (I can't imagine the work and stress involved with scripting though). Congratulations for this! xD
Thank you so much! I am working on more scripts ^_^
You're welcome, Thomas! And that's great to hear! Who knows what you're able to produce in the future? 😉

I especially like VXace, so I'll stay tuned to your scripts. xD
You're welcome, Thomas! And that's great to hear! Who knows what you're able to produce in the future? 😉

I especially like VXace, so I'll stay tuned to your scripts. xD
Guess what? Another script I put together! This one pauses the game during message windows! It is extremely short, but I really like it! It is in the first post now.
Wow! That sounds like a very useful script! Important for scenes that require everything to stop for a while. 😀 Keep up the progress, Thomas!
Wow! That sounds like a very useful script! Important for scenes that require everything to stop for a while. 😀 Keep up the progress, Thomas!
Thank you 😀
Nice Disable dash script! These are very useful tools to work with when starting a new game! 😀 Kudos for your progress, Thomas! ^^
Nice Disable dash script! These are very useful tools to work with when starting a new game! 😀 Kudos for your progress, Thomas! ^^
Thank you so much!
Your second snippet won't work.

There is no method named as thomas_update_movement in Game_Event, so you can't really alias it.
Also, alias works like this:
Code:
alias alias_method_name original_method_name
def original_method_name(*args)
  # Add whatever needs to happen before the original things here
  alias_method_name(*args) # This calls the method aliased in it's previous state
  # Add whatever needs to happen after the original things here
end

And note that you should not alias methods which are inherited from a superclass without explicitly defining those methods in the subclass you work in.
You can use super calls in these cases instead, but that is an overwrite too, so careful with them.
Your second snippet won't work.

There is no method named as thomas_update_movement in Game_Event, so you can't really alias it.
Also, alias works like this:
Code:
alias alias_method_name original_method_name
def original_method_name(*args)
  # Add whatever needs to happen before the original things here
  alias_method_name(*args) # This calls the method aliased in it's previous state
  # Add whatever needs to happen after the original things here
end

And note that you should not alias methods which are inherited from a superclass without explicitly defining those methods in the subclass you work in.
You can use super calls in these cases instead, but that is an overwrite too, so careful with them.
Thank you, I believe I fixed it now. Tell me if it still doesn't work.
Bump
Redid main post appearance-wise, and added a semi-fancy logo.

Original thread: https://forums.rpgmakerweb.com/threads/ts50s-script-corner.92047/