Title Screen Subtitle Text

ZirconStorms

VX & VX Ace Scripts
Veteran
Joined
Dec 22, 2014
Messages
359
Reaction score
113
First Language
English
Primarily Uses
RMVXA
Title Screen Subtitle Text - 1.0 // A purely visual script. Allows a couple of customization features.

Customization:
  • Adjust font settings for the subtitles (shadow, outline, bold, italics, name, size)
  • Adjust alignment and vertical offset of the subtitle text.
Screenshots:
example.png

Setup:
  • Paste under the Materials slot, above main.
  • No demo necessary.
Usage notes & Planned features:
  • Don't remove the usage and author part of the header. Reposting isn't allowed.
  • Possible animation feature + subtitle graphic feature to be added in the future.
Code:
#==============================================================================
#
# ** Title: Title Screen Subtitle Text 1.0
#    Created: July 2019
#    Creator: ZirconStorms
#
#------------------------------------------------------------------------------
#
# Script is allowed for commercial and non-commercial games.
# In the game's credits or read.me, credit "ZirconStorms".
#
#==============================================================================
# Customizable Section Begins Here.
#==============================================================================

module GHOSTSUBTITLE
  SUBTITLE_FONT_NAME = Font.default_name
  #put name in quotes. example: SUBTITLE_FONT_NAME = "Calibri"
  #for default font file = Font.default_name
  SUBTITLE_ITALICS = false
  #true if you want italics, false if you don't want italics.
  SUBTITLE_BOLD = false
  #true if you want bold, false if you don't want bold.
  SUBTITLE_OUTLINE = true
  #true if you want outline, false if you don't want outline.
  SUBTITLE_SHADOW = false
  #true if you want shadow, false if you don't want shadow.
  SUBTITLE_SIZE = 32
  #size of the subtitle font.
  SUBTITLE_ALIGNMENT = 1
  #0 = Left; 1 = Center; 2 = Right
  SUBTITLE_TEXT = "Subtitle Text"
  #Example: SUBTITLE_TEXT = "text goes here"
  SUBTITLE_VERTICAL_OFFSET = 40
  #Offsets the subtitle [number] pixels downwards.
  #You can use -[number] values if you want.
end

#==============================================================================
# Customizable Section Ends Here
#==============================================================================

class Scene_Title < Scene_Base

  alias ghostsubtitlestart start
  def start
    super
    SceneManager.clear
    Graphics.freeze
    create_subtitle
    ghostsubtitlestart
  end
 
  alias ghostsubtitle_terminate terminate
  def terminate
    super
    dispose_subtitle
    ghostsubtitle_terminate
  end
 
  def create_subtitle
    @subtitle_sprite = Sprite.new
    @subtitle_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    @subtitle_sprite.z = 300
    @subtitle_sprite.y += GHOSTSUBTITLE::SUBTITLE_VERTICAL_OFFSET
    @subtitle_sprite.bitmap.font.name = GHOSTSUBTITLE::SUBTITLE_FONT_NAME
    @subtitle_sprite.bitmap.font.size = GHOSTSUBTITLE::SUBTITLE_SIZE
    @subtitle_sprite.bitmap.font.outline = GHOSTSUBTITLE::SUBTITLE_OUTLINE
    @subtitle_sprite.bitmap.font.italic = GHOSTSUBTITLE::SUBTITLE_ITALICS
    @subtitle_sprite.bitmap.font.shadow = GHOSTSUBTITLE::SUBTITLE_SHADOW
    @subtitle_sprite.bitmap.font.bold = GHOSTSUBTITLE::SUBTITLE_BOLD
    rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2)
    @subtitle_sprite.bitmap.draw_text(rect, GHOSTSUBTITLE::SUBTITLE_TEXT, GHOSTSUBTITLE::SUBTITLE_ALIGNMENT)
  end
 
  def dispose_subtitle
    @subtitle_sprite.bitmap.dispose
    @subtitle_sprite.dispose
  end
 
end
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

Yay! Got 3 new frying pans, its weird, but I'm so happy about it.
Yelp. I've discovered that I am one of those people who should not be drinking coffee. Took me a week detoxing off of coffee and switching to tea to realize how badly it was affecting me- and I've been drinking the stuff for years. Yikes!
I bought a gaiter with Meijer printed on it.

I'm still a Walmart worker, and I wore it today for work.
Trying out new carpet autotiles and I can't decide if it's working or not. Pixeling soft carpets is hard
It seems like this is going to be another remote semester. RIP.

Forum statistics

Threads
99,516
Messages
966,348
Members
131,146
Latest member
jakobhenerey309
Top