Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Changing the font in script

This is the current (in progress) copy of my main-menu script. I'm trying to get the menu to appear using Franklin Gothic Medium font. No idea how to go about doing that....Other than this the only thing i'd like to change font wise is the regular text font for in-game messages.

Code:
#==============================================================================
# ¦ [RMVX] Dragon-Quest Style Menu System Version 1.20
#------------------------------------------------------------------------------
# by Ekras
#
# released on 04/07/2008
#
# Credit to Woratana [woratana@hotmail.com] for his LiteMenu which
# this is based on
#
# Thanks to XXXXXX for some forum help :)
#
# Updates to version 1.2
# - Script Name changed from "Dragon Quest Style Status Indicator"
#   to "Dragon Quest Style Menu System"
# - Dragon Quest Style Status Screen coded
# - Dragon Quest Style Equip Screen coded
# - Able to add a sprite to the mini-boxes (disabled by default)
#
# Updates to Version 1.1
# -Added the ability to turn the mini-boxes on and off
# -Added the ability to have the mini-boxes display left to right
# -Added a menu option to toggle the left-right display
# -Added a blank 4th line so if you need it you can easilly add it
#  (don't forget to adjust the text positions, and turn the line on)
# -Added support for the menu showing gold
# -Made it so with gold enabled it only appears in player 1s box
# -Re-integrated missing Litemenu functions
# -Error Codes now appear fully in the text boxes
#
# Features Version 1.0
# - Based on LiteMenu 1.1 by Woratana
# - Allows for Dragon-Quest style HP and MP indicators to
#   appear at the bottom of the screen on the menu
# - Removed Location Window Support 
# - Boxes can be moved around by adjusting varibles in the set-up
# - Able to adjust each lines text and/or stat with ease
# - Able to adjust the positions of the boxes!
# - Default size supports up to 8 character names but boxes can be expanded
# - Uses database menu colors etc.
# - Currently supports showing Name, Level, HP, and MP in the boxes
# - Easy to add new stats to be shown
#==============================================================================
module DQ_Menu_Setup

  #Configure the Main Menu here
=begin
This part of the script allows you to quickly change the display of the main menu.
You can set the number of rows and colums, as well as what items are displayed
=end
  
  NUM_ROWS = 4 # The number of Rows in the main menu
  NUM_COL = 2  # The number of columns in the main menu
  
  ITEM_1_TYPE = 2        #1's are scene calls, 2s are windows
  
  ITEM_1_NAME = 'Status2'
  ITEM_2_NAME = 'Spell'
end

module Wor_Litemenu

  #Litemenu Setup
  MENU_WINDOW_Y = 20
  CHARA_WINDOW_Y = 80
  CHARA_WINDOW_WIDTH = 175
  SHOW_LV = false
  GOLD_TEXT_X = 84
  VOCAB_GOLD = "GP:"
  SHOW_LOCATION_WINDOW = false
  VOCAB_LOCATION = "Location:"
  LOCATION_WINDOW_Y = 135
  LOCATION_TEXT_X = 150
  GOLD_TEXT_X = 84
end

class Scene_Menu < Scene_Base

  def initialize(menu_index = 0)
    @menu_index = menu_index
    @LASTX = 0
    
#MINI-BOX SETUP HERE  

#These boxes are kinda tricky - messing with one effects the others sometimes
#You can move it anywhere, it may just take a little while to find the right
#combination of numbers. 

#   Main Setup
    @BOX_ONOFF = true #true to turn the miniboxes on, false to turn them off
    @NS_LOCATION = -70 #Move the mini-boxes to the left or right
    @NS_GAP = 220 #Adjust this to make the mini-boxes closer or further apart
    @BOX_W = 110 # Adjust the width of the mini-boxes
    @BOX_H = 115 #Adjust the height of the mini-boxes
    @BOX_Y = 280 #Adjust the Y coordinates of the mini-boxes
    @BOX_LEFT_RIGHT = 1 # set to 1 for the boxes to fold out right to left
                        # set to 2 for the boxes to fold out left to right    
    
#   NAME SETUP
    @NAME_ONOFF = true #True is on, false is off
    @N_X = 0 # Set the X coordinates for the characters name
    @N_Y = 0 # Set the Y coordinates for the characters name
    
 # Setup Each line of text in the boxes. By default it supports a name line and
 # up to 3 other lines of text. (With a 4th coded but disabled)
 # Adjusting these changes the boxes for all characters.
 # I included instructions below on how to add more as well as how to 
 # add new stats to the list.
#   LINE 1 SETUP
    @LINEONE_ONOFF = true #true to turn the box on, false to turn it off
    @L1_Y = 20 # Set the y coordinates of the text
    @L1_X = 0 # Set x coordinates of the stat header
    @L1_X2 = 30 # set the distance of the stat from the header
    @L1_HEADER = 'HP:' #Sets the text header of the stat
    @L1_STAT = 1 # See Stat Guide Below
  
#   LINE 2 SETUP
    @LINETWO_ONOFF = true #true to turn the box on, false to turn it off
    @L2_Y = 40 # Set the y coordinates of the text
    @L2_X = 0 # Set x coordinates of the stat header
    @L2_X2 = 30 # set the distance of the stat from the header
    @L2_HEADER = 'MP:' #Sets the text header of the stat
    @L2_STAT = 2 # See Stat Guide Below 

#   LINE 3 SETUP
    @LINETHREE_ONOFF = true #true to turn the box on, false to turn it off
    @L3_Y = 60 # Set the y coordinates of the text
    @L3_X = 0 # Set x coordinates of the stat header
    @L3_X2 = 30 # set the distance of the stat from the header
    @L3_HEADER = 'LV:' #Sets the text header of the stat
    @L3_STAT = 3 # See Stat Guide Below
#   LINE 4 SETUP
    @LINETFOUR_ONOFF = false #true to turn the box on, false to turn it off
    @L4_Y = 80 # Set the y coordinates of the text
    @L4_X = 0 # Set x coordinates of the stat header
    @L4_X2 = 30 # set the distance of the stat from the header
    @L4_HEADER = 'GP:' #Sets the text header of the stat
    @L4_STAT = 4 # See Stat Guide Below
    
    #STAT GUIDE
    
# This is the list of currently implemented stats to show in the mini-boxes
# To use input their item number in the STAT line of the line you want it to
# show up on. If you want it to show anything else it shouldn't take you 
# long to get it to display it

# 
# 1 : Hitpoints
# 2 : Magic-Points
# 3 : Level
# 4 : Gold - Only appears in Player 1s box!
#
#   #ERROR LIST
#
# The displayed errors show up in the following format:
#
# ER: - stands for error
# After the ER there will be an  #xL number
# # stands for the line number of the error
# L stands for the error code
#
# Error code A means that the line numbers stat is below zero
# Error code B means that the line numbers stat is above the highest STAT # (3)



#   ADVANCED SETUP
#      -ADDING NEW LINES
# So you want to add new stats to the boxes huh? Heres how to do it. First off
# change the total number of lines to how many lines are going to be displayed.

    @LCOUNT = 4 #Set the number of lines here
#Now to add a new line go to EACH window box, and copy/pasting an existing line
# and modify it to display your new stat. Shouldn't be too hard. 
# Dont forget to change the error code to reflect the new line number
# once you are done, go above and copy/paste a setup from a line, and change the
# varibles on the new one to reflect the new line.
#
#     -ADDING NEW STATS TO BE DISPLAYED
# To add a new stat to the menus first add it to the STAT Guide Above
# Once you have a number go down into EACH Menu box below and copy/paste a stat item
# Change if @L1_STAT == X to the number of the new stat
# Now add to each box an event to get the info of the stat
# Finally edit the stat section of the new item in the list, 
#
#
# Sending new STATS to the author
#
# If you feel the next release of this script should have other stats in it
# email me at strager at comcast dot net with a subject line of "MINI-BOX STAT".
# email without this subject line will not be read (my email only accepts
# pre-approved subject lines
#
# In the email change the STAT number to #
# Send only one status box's code- I'm smart enough to replicate it in the other
# boxes :)
# Please don't email other requests (use the forums to make script requests)
end

def start
    
    super
    psize = ($game_party.members.size)
    create_menu_background
    create_command_window
    lite_create_location_window if Wor_Litemenu::SHOW_LOCATION_WINDOW == true
    lite_create_actor_window

if @BOX_ONOFF == true 
    
  if @BOX_LEFT_RIGHT == 1  
    for actor in $game_party.members
      if psize == 4
        @LASTX = ((@NS_GAP * 1) - @NS_LOCATION)
        create_newstat_windowfour (psize)
      elsif psize == 3
        @LASTX = ((@NS_GAP * 2) - @NS_LOCATION)
        create_newstat_windowthree (psize)
      elsif psize == 2
        @LASTX = ((@NS_GAP * 3) - @NS_LOCATION)
        create_newstat_windowtwo (psize)
      elsif psize == 1
        @LASTX = ((@NS_GAP * 4) - @NS_LOCATION)
        create_newstat_window (psize)
      end
      psize = (psize - 1)
    end
  end
  
if @BOX_LEFT_RIGHT == 2  
  for actor in $game_party.members
      if psize == 4
        @LASTX = ((@NS_GAP * 4) - @NS_LOCATION)
        create_newstat_windowfour (psize)
      elsif psize == 3
        @LASTX = ((@NS_GAP * 3) - @NS_LOCATION)
        create_newstat_windowthree (psize)
      elsif psize == 2
        @LASTX = ((@NS_GAP * 2) - @NS_LOCATION)
        create_newstat_windowtwo (psize)
      elsif psize == 1
        @LASTX = ((@NS_GAP * 1) - @NS_LOCATION)
        create_newstat_window (psize)
      end
      psize = (psize - 1)
    end
  end
  end
end

#Create Actor (from Litemenu)

def lite_create_actor_window
	member = []
	@item_max = $game_party.members.size
	for actor in $game_party.members
	 member.push ((actor.name) + " Lv." + (actor.level.to_s)) if Wor_Litemenu::SHOW_LV == true
	 member.push (actor.name) if Wor_Litemenu::SHOW_LV == false
	end
	@status_window = Window_Command.new(Wor_Litemenu::CHARA_WINDOW_WIDTH, member)
	@status_window.index = @menu_index
	@status_window.x = (554 /2) - (@status_window.width/2)
	@status_window.y = Wor_Litemenu::CHARA_WINDOW_Y
	@status_window.visible = false
end

#Reimplemented litemenu map-name script

def lite_get_map_name
    mapdata = load_data("Data/MapInfos.rvdata")
    map_id = $game_map.map_id
    @map_name = mapdata[map_id].name
  end

#Reimplemented litemenu gold

  def lite_draw_currency_value(value, x, y, width)
    cx = @location_window.contents.text_size(Vocab::gold).width
    @location_window.contents.font.color = @location_window.normal_color
    @location_window.contents.draw_text(x+53, y, @location_window.width+cx, 24, value, 0)
    @location_window.contents.font.color = @location_window.system_color
    @location_window.contents.draw_text(x+(($game_party.gold).to_s.size * 8)+68, y, @location_window.width, 24, Vocab::gold, 0)
  end 

#reimplemented location window  
def lite_create_location_window
    width = 300
    height = 90
    x = (554 /2) - (width/2)
    y = Wor_Litemenu::LOCATION_WINDOW_Y
    @location_window = Window_Base.new(x, y, width, height)
    @location_window.create_contents
    lite_get_map_name
    @location_window.contents.font.color = @location_window.system_color
    @location_window.contents.draw_text(0, 0, 300, 24, Wor_Litemenu::VOCAB_GOLD)
    @location_window.contents.font.color = @location_window.normal_color
    lite_draw_currency_value($game_party.gold, 4, 0, Wor_Litemenu::GOLD_TEXT_X)
    @location_window.contents.font.color = @location_window.system_color
    @location_window.contents.draw_text(0, 32, 300, 24, Wor_Litemenu::VOCAB_LOCATION)
    @location_window.contents.font.color = @location_window.normal_color
    @location_window.contents.draw_text(Wor_Litemenu::LOCATION_TEXT_X, 32, 300, 24, @map_name)
  end  
  
# Party member 1's Box
def create_newstat_window (ac)
    
    member = []
    hitpoints = []
    magpoints = []
    lev = []
    @item_max = $game_party.members.size
    for actor in $game_party.members
    member.push (actor.name) 
    hitpoints.push (actor.hp)
    magpoints.push (actor.mp)
    lev.push (actor.level.to_s)

    end  
  
    width = @BOX_W
    height = @BOX_H
    x = ((@LASTX) /2) - (width/2)
    y = (@BOX_Y + 10)
    @newstat_window = Window_Base.new(x, y, width, height)

    
    @newstat_window.create_contents
#Name Line
    if @NAME_ONOFF == true
    @newstat_window.contents.font.color = @newstat_window.system_color  
    @newstat_window.contents.draw_text(@N_X, @N_Y, 300, 20, member[(ac - 1)])
    end
    
    #Line One
    
    #Set Color
    @newstat_window.contents.font.color = @newstat_window.normal_color
    
    if @LINEONE_ONOFF == true
      @newstat_window.contents.draw_text( @L1_X, @L1_Y, 300, 20,@L1_HEADER) if (@L1_STAT <= @LCOUNT)
      if @L1_STAT < 0
        @newstat_window.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,'ER:1XA')
      end
      if @L1_STAT == 1
        @newstat_window.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L1_STAT == 2
        @newstat_window.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L1_STAT == 3
        @newstat_window.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,lev[(ac - 1)])
      end
      if @L1_STAT == 4
       @newstat_window.contents.draw_text( (@L1_X+ @L2_X2), @L1_Y, 300, 20,$game_party.gold)
      end
      if @L1_STAT > @LCOUNT
        @newstat_window.contents.draw_text(@L1_X, @L1_Y, 300, 20,'ER:1XB')
      end
    end
        
#Line Two
    
    #Set Color
    @newstat_window.contents.font.color = @newstat_window.normal_color
    
    if @LINETWO_ONOFF == true
      @newstat_window.contents.draw_text( @L2_X, @L2_Y, 300, 20,@L2_HEADER) if (@L2_STAT <= @LCOUNT)
      if @L2_STAT < 0
        @newstat_window.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,'ER:1XA')
      end
      if @L2_STAT == 1
        @newstat_window.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L2_STAT == 2
        @newstat_window.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,magpoints[(ac - 1)])
      end
       if @L2_STAT == 3
        @newstat_window.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,lev[(ac - 1)])
      end
        if @L2_STAT == 4
       @newstat_window.contents.draw_text( (@L2_X + @L2_X2), @L2_Y, 300, 20,$game_party.gold)
      end
      if @L2_STAT > @LCOUNT
        @newstat_window.contents.draw_text( @L2_X, @L2_Y, 300, 20,'ER:1XB')
      end
    end

#Line Three
    
    #Set Color
    @newstat_window.contents.font.color = @newstat_window.normal_color
    
  if @LINETHREE_ONOFF == true
      @newstat_window.contents.draw_text( @L3_X, @L3_Y, 300, 20,@L3_HEADER) if (@L3_STAT <= @LCOUNT)
     
      
      if @L3_STAT < 0
        @newstat_window.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,'ER:1XA')
      end
      if @L3_STAT == 1
        @newstat_window.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L3_STAT == 2
        @newstat_window.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,magpoints[(ac - 1)])
      end
       if @L3_STAT == 3
        @newstat_window.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,lev[(ac - 1)])
      end
      if @L3_STAT == 4
       @newstat_window.contents.draw_text( (@L3_X + @L3_X2), @L3_Y, 300, 20,$game_party.gold)
      end
      if @L3_STAT > @LCOUNT
        @newstat_window.contents.draw_text(@L3_X, @L3_Y, 300, 20,'ER:1XB')
      end

    end
#Line Four (Off by default)    
 if @LINEFOUR_ONOFF == true
      @newstat_window.contents.draw_text( @L4_X, @L4_Y, 300, 20,@L4_HEADER) if (@L4_STAT <= @LCOUNT)
     
      
      if @L4_STAT < 0
        @newstat_window.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,'ER:1XA')
      end
      if @L4_STAT == 1
        @newstat_window.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L4_STAT == 2
        @newstat_window.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,magpoints[(ac - 1)])
      end
       if @L4_STAT == 3
        @newstat_window.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,lev[(ac - 1)])
      end
      if @L4_STAT == 4
       @newstat_window.contents.draw_text( (@L4_X + @L4_X2), @L4_Y, 300, 20,$game_party.gold)
      end

      if @L4_STAT > @LCOUNT
        @newstat_window.contents.draw_text( @L4_X, @L4_Y, 300, 20,'ER:1XB')
      end
      end
    @LASTX = (@LASTX + @NS_LOCATION)
    end  
# Party Member 2's Box
    def create_newstat_windowtwo (ac)
    
    member = []
    hitpoints = []
    magpoints = []
    lev = []
    @item_max = $game_party.members.size
    for actor in $game_party.members
    member.push (actor.name) 
    hitpoints.push (actor.hp)
    magpoints.push (actor.mp)
    lev.push (actor.level.to_s)
    end  
  
    width = @BOX_W
    height = @BOX_H
    x = ((@LASTX) /2) - (width/2)
    y = (@BOX_Y + 10)
    @newstat_windowtwo = Window_Base.new(x, y, width, height)
    
    @newstat_windowtwo.create_contents
   
    
    #Name Line
    if @NAME_ONOFF == true
    @newstat_windowtwo.contents.font.color = @newstat_windowtwo.system_color  
    @newstat_windowtwo.contents.draw_text(@N_X, @N_Y, 300, 20, member[(ac - 1)])
    end
    
    #Line One
    
    #Set Color
    @newstat_windowtwo.contents.font.color = @newstat_windowtwo.normal_color
    
    if @LINEONE_ONOFF == true
      @newstat_windowtwo.contents.draw_text( @L1_X, @L1_Y, 300, 20,@L1_HEADER) if (@L1_STAT <= @LCOUNT) and (@L1_STAT != 4)
      if @L1_STAT < 0
        @newstat_windowtwo.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,'ER:1XA')
      end
      if @L1_STAT == 1
        @newstat_windowtwo.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L1_STAT == 2
        @newstat_windowtwo.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L1_STAT == 3
        @newstat_windowtwo.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,lev[(ac - 1)])
      end
      if @L1_STAT > @LCOUNT
        @newstat_windowtwo.contents.draw_text( @L1_X, @L1_Y, 300, 20,'ER:1XB')
      end
    end
        
#Line Two
    
    #Set Color
    @newstat_windowtwo.contents.font.color = @newstat_windowtwo.normal_color
    
    if @LINETWO_ONOFF == true
      @newstat_windowtwo.contents.draw_text( @L2_X, @L2_Y, 300, 20,@L2_HEADER) if (@L2_STAT <= @LCOUNT) and (@L2_STAT != 4)
      if @L2_STAT < 0
        @newstat_windowtwo.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,'ER:1XA')
      end
      if @L2_STAT == 1
        @newstat_windowtwo.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L2_STAT == 2
        @newstat_windowtwo.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L2_STAT == 3
        @newstat_windowtwo.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,lev[(ac - 1)])
      end

      if @L2_STAT > @LCOUNT
        @newstat_windowtwo.contents.draw_text( @L2_X, @L2_Y, 300, 20,'ER:1XB')
      end
    end

#Line Three
    
    #Set Color
    @newstat_windowtwo.contents.font.color = @newstat_windowtwo.normal_color
    
    if @LINETHREE_ONOFF == true
      @newstat_windowtwo.contents.draw_text( @L3_X, @L3_Y, 300, 20,@L3_HEADER) if (@L3_STAT <= @LCOUNT) and (@L3_STAT != 4)
      if @L3_STAT < 0
        @newstat_windowtwo.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,'ER:1XA')
      end
      if @L3_STAT == 1
        @newstat_windowtwo.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L3_STAT == 2
        @newstat_windowtwo.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L3_STAT == 3
        @newstat_windowtwo.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,lev[(ac - 1)])
      end

      if @L3_STAT > @LCOUNT
        @newstat_windowtwo.contents.draw_text( @L3_X , @L3_Y, 300, 20,'ER:1XB')
      end
    end  
    
 #Line Four (Off by default)    
 if @LINEFOUR_ONOFF == true
      @newstat_windowtwo.contents.draw_text( @L4_X, @L4_Y, 300, 20,@L4_HEADER) if (@L4_STAT <= @LCOUNT)
     
      
      if @L4_STAT < 0
        @newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,'ER:1XA')
      end
      if @L4_STAT == 1
        @newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L4_STAT == 2
        @newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,magpoints[(ac - 1)])
      end
       if @L4_STAT == 3
        @newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,lev[(ac - 1)])
      end
      if @L4_STAT == 4
       @newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2), @L4_Y, 300, 20,$game_party.gold)
      end

      if @L4_STAT > @LCOUNT
        @newstat_windowtwo.contents.draw_text( @L4_X, @L4_Y, 300, 20,'ER:1XB')
      end
      end 
  
    @LASTX = (@LASTX + @NS_LOCATION)
    end
    

 # Party member 3's Box 
    def create_newstat_windowthree (ac)
    
    member = []
    hitpoints = []
    magpoints = []
    lev = []
    @item_max = $game_party.members.size
    for actor in $game_party.members
    member.push (actor.name) 
    hitpoints.push (actor.hp)
    magpoints.push (actor.mp)
    lev.push (actor.level.to_s)
    end  
  
    width = @BOX_W
    height = @BOX_H
    x = ((@LASTX) /2) - (width/2)
    y = (@BOX_Y + 10)
    @newstat_windowthree = Window_Base.new(x, y, width, height)

    
    @newstat_windowthree.create_contents
  
    #Name Line
    if @NAME_ONOFF == true
    @newstat_windowthree.contents.font.color = @newstat_windowthree.system_color  
    @newstat_windowthree.contents.draw_text(@N_X, @N_Y, 300, 20, member[(ac - 1)])
    end
    
#Line One
    
    #Set Color
    @newstat_windowthree.contents.font.color = @newstat_windowthree.normal_color
    
    if @LINEONE_ONOFF == true
      @newstat_windowthree.contents.draw_text( @L1_X, @L1_Y, 300, 20,@L1_HEADER) if (@L1_STAT <= @LCOUNT) and (@L1_STAT != 4)
      if @L1_STAT < 0
        @newstat_windowthree.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,'ER:1XA')
      end
      if @L1_STAT == 1
        @newstat_windowthree.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L1_STAT == 2
        @newstat_windowthree.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L1_STAT == 3
        @newstat_windowthree.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,lev[(ac - 1)])
      end
      if @L1_STAT > @LCOUNT
        @newstat_windowthree.contents.draw_text( @L1_X, @L1_Y, 300, 20,'ER:1XB')
      end
    end
        
#Line Two
    
    #Set Color
    @newstat_windowthree.contents.font.color = @newstat_windowthree.normal_color
    
    if @LINETWO_ONOFF == true
      @newstat_windowthree.contents.draw_text( @L2_X, @L2_Y, 300, 20,@L2_HEADER) if (@L2_STAT <= @LCOUNT) and (@L2_STAT != 4)
      if @L2_STAT < 0
        @newstat_windowthree.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,'ER:1XA')
      end
      if @L2_STAT == 1
        @newstat_windowthree.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L2_STAT == 2
        @newstat_windowthree.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L2_STAT == 3
        @newstat_windowthree.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,lev[(ac - 1)])
      end
      if @L2_STAT > @LCOUNT
        @newstat_windowthree.contents.draw_text(@L2_X, @L2_Y, 300, 20,'ER:1XB')
      end
    end

#Line Three
    
    #Set Color
    @newstat_windowthree.contents.font.color = @newstat_windowthree.normal_color
    
    if @LINETHREE_ONOFF == true
      @newstat_windowthree.contents.draw_text( @L3_X, @L3_Y, 300, 20,@L3_HEADER) if (@L3_STAT <= @LCOUNT) and (@L3_STAT != 4)
      if @L3_STAT < 0
        @newstat_windowthree.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,'ER:1XA')
      end
      if @L3_STAT == 1
        @newstat_windowthree.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L3_STAT == 2
        @newstat_windowthree.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L3_STAT == 3
        @newstat_windowthree.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,lev[(ac - 1)])
      end
      if @L3_STAT > @LCOUNT
        @newstat_windowthree.contents.draw_text( @L3_X, @L3_Y, 300, 20,'ER:1XB')
      end
    end  
    #Line Four (Off by default)    
 if @LINEFOUR_ONOFF == true
      @newstat_windowthree.contents.draw_text( @L4_X, @L4_Y, 300, 20,@L4_HEADER) if (@L4_STAT <= @LCOUNT)
     
      
      if @L4_STAT < 0
        @newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,'ER:1XA')
      end
      if @L4_STAT == 1
        @newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L4_STAT == 2
        @newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,magpoints[(ac - 1)])
      end
       if @L4_STAT == 3
        @newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,lev[(ac - 1)])
      end
      if @L4_STAT == 4
       @newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2), @L4_Y, 300, 20,$game_party.gold)
      end

      if @L4_STAT > @LCOUNT
        @newstat_windowthree.contents.draw_text( @L4_X, @L4_Y, 300, 20,'ER:1XB')
      end
      end

    @LASTX = (@LASTX + @NS_LOCATION)
    end
 #Party Member 4's box 
    def create_newstat_windowfour (ac)
    
    member = []
    hitpoints = []
    magpoints = []
    lev = []
    @item_max = $game_party.members.size
    for actor in $game_party.members
    member.push (actor.name) 
    hitpoints.push (actor.hp)
    magpoints.push (actor.mp)
    lev.push (actor.level.to_s)
    end  
  
    width = @BOX_W
    height = @BOX_H
    x = ((@LASTX) /2) - (width/2)
    y = (@BOX_Y + 10)
    @newstat_windowfour = Window_Base.new(x, y, width, height)

    
    @newstat_windowfour.create_contents
    
        #Name Line
    if @NAME_ONOFF == true
    @newstat_windowfour.contents.font.color = @newstat_windowfour.system_color  
    @newstat_windowfour.contents.draw_text(@N_X, @N_Y, 300, 20, member[(ac - 1)])
    end
    
#Line One
    
    #Set Color
    @newstat_windowfour.contents.font.color = @newstat_windowfour.normal_color
    
    if @LINEONE_ONOFF == true
      @newstat_windowfour.contents.draw_text( @L1_X, @L1_Y, 300, 20,@L1_HEADER) if (@L1_STAT <= @LCOUNT) and (@L1_STAT != 4)
      if @L1_STAT < 0
        @newstat_windowfour.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,'ER:1XA')
      end
      if @L1_STAT == 1
        @newstat_windowfour.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L1_STAT == 2
        @newstat_windowfour.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L1_STAT == 3
        @newstat_windowfour.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,lev[(ac - 1)])
      end
      if @L1_STAT > @LCOUNT
        @newstat_windowfour.contents.draw_text(@L1_X, @L1_Y, 300, 20,'ER:1XB')
      end
    end
        
#Line Two
    
    #Set Color
    @newstat_windowfour.contents.font.color = @newstat_windowfour.normal_color
    
    if @LINETWO_ONOFF == true
      @newstat_windowfour.contents.draw_text( @L2_X, @L2_Y, 300, 20,@L2_HEADER) if (@L2_STAT <= @LCOUNT) and (@L2_STAT != 4)
      if @L2_STAT < 0
        @newstat_windowfour.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,'ER:1XA')
      end
      if @L2_STAT == 1
        @newstat_windowfour.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L2_STAT == 2
        @newstat_windowfour.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L2_STAT == 3
        @newstat_windowfour.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,lev[(ac - 1)])
      end
      if @L2_STAT > @LCOUNT
        @newstat_windowfour.contents.draw_text(@L2_X, @L2_Y, 300, 20,'ER:1XB')
      end
    end

#Line Three
    
    #Set Color
    @newstat_windowfour.contents.font.color = @newstat_windowfour.normal_color
    
    if @LINETHREE_ONOFF == true
      @newstat_windowfour.contents.draw_text( @L3_X, @L3_Y, 300, 20,@L3_HEADER) if (@L3_STAT <= @LCOUNT) and (@L3_STAT != 4)
      if @L3_STAT < 0
        @newstat_windowfour.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,'ER:1XA')
      end
      if @L3_STAT == 1
        @newstat_windowfour.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L3_STAT == 2
        @newstat_windowfour.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,magpoints[(ac - 1)])
      end
      if @L3_STAT == 3
        @newstat_windowfour.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,lev[(ac - 1)])
      end
      if @L3_STAT > @LCOUNT
        @newstat_windowfour.contents.draw_text(@L3_X , @L3_Y, 300, 20,'ER:1XB')
      end
    end
  #Line Four (Off by default)    
 if @LINEFOUR_ONOFF == true
      @newstat_windowfour.contents.draw_text( @L4_X, @L4_Y, 300, 20,@L4_HEADER) if (@L4_STAT <= @LCOUNT)
     
      
      if @L4_STAT < 0
        @newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,'ER:1XA')
      end
      if @L4_STAT == 1
        @newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,hitpoints[(ac - 1)])
      end
      if @L4_STAT == 2
        @newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,magpoints[(ac - 1)])
      end
       if @L4_STAT == 3
        @newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,lev[(ac - 1)])
      end
      if @L4_STAT == 4
       @newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2), @L4_Y, 300, 20,$game_party.gold)
      end

      if @L4_STAT > @LCOUNT
        @newstat_windowfour.contents.draw_text( @L4_X, @L4_Y, 300, 20,'ER:1XB')
      end
      end       
    @LASTX = (@LASTX + @NS_LOCATION)
    end

    
# End Character Boxes

#Terminate
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @status_window.dispose
    @location_window.dispose if @location_window
    
    psize = ($game_party.members.size)
   
 if @BOX_ONOFF == true   
    for actor in $game_party.members
      if psize == 4
       @newstat_windowfour.dispose
      elsif psize == 3
       @newstat_windowthree.dispose
      elsif psize == 2
       @newstat_windowtwo.dispose
      elsif psize == 1
       @newstat_window.dispose

      end
      psize = (psize - 1)
    end     
  end
  end

  # UPDATE
   def update
    super
    
    update_menu_background
    @command_window.update
    if @command_window.active
      update_command_selection      
    elsif @status_window.active
      @status_window.update
      update_actor_selection
      end
  end
  def create_command_window
	s1 = DQ_Menu_Setup::ITEM_1_NAME
	s2 = DQ_Menu_Setup::ITEM_2_NAME
	s3 = Vocab::equip
	s4 = Vocab::status
	s5 = "Blah"
	s6 = Vocab::game_end
  s7 = Vocab::item
  s8 = "Null"
	@command_window = Window_Command.new(200, [s1, s2, s3, s4, s5, s6, s7,s8],DQ_Menu_Setup::NUM_COL,DQ_Menu_Setup::NUM_ROWS)
	@command_window.index = @menu_index
	@command_window.x = (230 /2) - (@command_window.width/2) #167
	@command_window.y = Wor_Litemenu::MENU_WINDOW_Y
	if $game_party.members.size == 0 
	  @command_window.draw_item(0, false)
	  @command_window.draw_item(1, false)
	  @command_window.draw_item(2, false)
	  @command_window.draw_item(3, false) 
	end
	if $game_system.save_disabled
	  @command_window.draw_item(4, false) 
	end
end

# Command Selection Re-Write

def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      
      
      when 0      # Item
        
        $scene = Scene_Item.new if DQ_Menu_Setup::ITEM_1_TYPE == 1
          

        
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
      when 5      # End Game
        $scene = Scene_End.new
      when 6      # test
         $scene = Scene_Item.new
      end
    end
  end

#--------------------------------------------------------------------------
# * Actor Selection
#--------------------------------------------------------------------------  

  def start_actor_selection
    @command_window.active = false
    @status_window.visible = true
    @status_window.active = true
    @status_window.index = 0
  end

  def end_actor_selection
    @command_window.active = true
    @status_window.visible = false
    @status_window.active = false
    @status_window.index = -1
  end
  
end
 
Ok so I figured out how to change the default font....I still cant seem to figure out how to change the font for just one menu though....

EX:

Code:
def create_dqs_window
    s1 = 'HP & MP'
    s2 = 'Attack Power'
    s3 = 'See Stats'
    s4 = 'Refill'
    @dqs_window = Window_Command.new(200, [s1,s2,s3,s4])
    @dqs_window.x = 80
    @dqs_window.y = 60
    @dqs_window.index = 4
    @dqs_window.visible = false
    if $game_party.members.size == 0          # If number of party members is 0
      @dqs_window.draw_item(0, false)     # Disable item
      @dqs_window.draw_item(1, false)     # Disable skill
      @dqs_window.draw_item(2, false)     # Disable equipment
      @dqs_window.draw_item(3, false)     # Disable status
    end
    
  end

If I wanted this window to appear as a different font from default what would I do?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top