Add Variables on Main Menu (LUNA)

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:

Spoiler
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
Bump
bump??
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.

Original thread: https://forums.rpgmakerweb.com/threads/add-variables-on-main-menu-luna.63078/