Thomas' Script Corner

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
Thomas' Script Corner
Short Script Snippets by Thomas Smith


Hello! I decided to start getting into scripting a little. I am not a good scripter, but I can make a little bit. These will be small scripts, adding a bit of functionality or changing what is there a bit.
Feel free to use how you wish in either commercial or non-commercial games. No credit either! :biggrin: You can make requests here, but it is unlikely that I will answer them. Keep in mind that I will not make large scripts, at least not yet, only small scripts.

SCRIPTS:
SKIP TITLE SCREEN - This is my first script. It's very small, and it removes the title screen at the beginning and automatically starts a new game. Good for very short games. I just made this quickly for practice, feel free to use how you like.
Code:
# Skip Title Screen by Thomas Smith
# This script removes the title screen and automatically starts a new game.
# Good for a short game that needs no title screen.

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 - Extremely short script, but one that is vital to pretty much every game. While a message window is activated, all other movement pauses. I hope someone will like it!
Code:
# Pause While Talking by Thomas Smith
# This script pauses all other movement during message windows.
# Good for cut scenes on map or for an ABS.

class Game_Event < Game_Character
  alias update_self_movement_orig update_self_movement
  def update_self_movement
    return if $game_message.busy?
    update_self_movement_orig
  end
end
DISABLE DASH - Maybe the shortest script in existence, it simply disables dash for the whole game. Not much else to say.
Code:
# Disable Dash by Thomas Smith
# This script removes all dashing from the game completely.
# Not much else to say about this.

class Game_Player
  def dash?
    false
  end
end

Tell me immediately if something does not work :biggrin:
 
Last edited:

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
Hi Thomas, make sure to separate MV and VXA scripts to their respective boards.
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
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.
 

Starmage

Veteran
Veteran
Joined
Apr 2, 2016
Messages
783
Reaction score
843
First Language
FIlipino
Primarily Uses
N/A
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
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
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 ^_^
 

Starmage

Veteran
Veteran
Joined
Apr 2, 2016
Messages
783
Reaction score
843
First Language
FIlipino
Primarily Uses
N/A
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
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
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.
 

Starmage

Veteran
Veteran
Joined
Apr 2, 2016
Messages
783
Reaction score
843
First Language
FIlipino
Primarily Uses
N/A
Wow! That sounds like a very useful script! Important for scenes that require everything to stop for a while. :D Keep up the progress, Thomas!
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
Wow! That sounds like a very useful script! Important for scenes that require everything to stop for a while. :D Keep up the progress, Thomas!
Thank you :biggrin:
 

Starmage

Veteran
Veteran
Joined
Apr 2, 2016
Messages
783
Reaction score
843
First Language
FIlipino
Primarily Uses
N/A
Nice Disable dash script! These are very useful tools to work with when starting a new game! :D Kudos for your progress, Thomas! ^^
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
Nice Disable dash script! These are very useful tools to work with when starting a new game! :D Kudos for your progress, Thomas! ^^
Thank you so much!
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
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.
 

Nightblade50

Developer of "Delta Origins"
Veteran
Joined
Nov 10, 2016
Messages
2,133
Reaction score
4,253
First Language
English, French
Primarily Uses
RMVXA
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.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top