Halfmoon Media

Illustrator, Eventer, Writer
Veteran
Joined
Aug 17, 2014
Messages
61
Reaction score
9
First Language
English
Primarily Uses
I'm trying to display 3 variables (18, 19, and 20) on the Main Menu, but I can't figure out how to do it. I want the variables to display strings (ex, $game_variables[18] = "Chapter 1"), they don't need icons or anything. I am trying to get them to display in that box on the right (attached picture), but I can't get them to show up at all.


Help?


((ignore the poor drawings - they were just place-holder images while I edited the menu layout))


Code I was using:

class Window_Gold < Window_Base
  def initialize
    super(0, 0, window_width, fitting_height(3))
    refresh
  end
  
  def refresh
    contents.clear
    draw_chapter(4,0,contents.width - 8)
    draw_objective(8,0,contents.width - 8)
    draw_location(12,0,contents.width - 8)
  end
  
  def draw_chapter(x,y,width)
    change_color(system_color)
    draw_text(x,y,width,line_height,"Chapter")
    change_color(normal_color)
    draw_text(x, y, width - 2, line_height, $game_variables[18], 2)
  end
  
  def draw_objective(x,y,width)
    change_color(system_color)
    draw_text(x,y,width,line_height,"Objective")
    change_color(normal_color)
    draw_text(x, y, width - 2, line_height, $game_variables[19], 2)
  end
  
  def draw_location(x,y,width)
    change_color(system_color)
    draw_text(x,y,width,line_height,"Location")
    change_color(normal_color)
    draw_text(x, y, width - 2, line_height, $game_variables[20], 2)
  end
end


Capture.PNG
 

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,236
Reaction score
15,648
First Language
Filipino
Primarily Uses
RMMZ
Have you tried using Lunatic Mode?


We have example snippets there that should allow you to display variables without having to do what you were doing.
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

Just downloaded the demo and boy howdy are my arms tired (???) :kaohi:
I just watched a trailer for the upcoming 2021 JRPG Fantasian. They demonstrated an interesting mechanic where random encounters can be sent to a stockpile instead of fighting them right away, which can be emptied in a single battle string at the player's choice of timing.
"The pleasure from the senses seems like nectar at first, but it is sour as the toxin in the end." -Kirshna
Just finished my first ever game - Aeon's Destiny! This was a lifelong dream and after hundreds of hours, I've made something I'm very proud of. Please check it out!

Forum statistics

Threads
109,155
Messages
1,042,590
Members
141,656
Latest member
drackdragon113
Top