And here we are!
#------------------------------------------------------------------
#------------------------------------------------------------------
# The Mormegil's Pretty Sunsets HUD
# v 1.0
#------------------------------------------------------------------
#------------------------------------------------------------------
#
# This is a HUD system has a window that checks if a certain Common
# Event was called, and the possibility to call it by pressing a
# button on map.
#
#------------------------------------------------------------------
#
# $$$$$$$$$$$$$$$ CUSTOMIZATION OPTIONS $$$$$$$$$$$$$$$$$$$$
#
# You can customize the position of the window of the HUD,
TMPS_HUD_EVENT_POSITION = [0, 0]
# its text,
TMPS_HUD_TEXT_ON = "Online"
TMPS_HUD_TEXT_OFF = "Offline"
# the button you need to press to turn the common event on/off,
TMPS_BUTTON = Input::X # default is A
# the switch this common events toggles
TMPS_SWITCH = 1 # insert ID here
# and the common event called:
TMPS_COMMON_EVENT = 1 # insert ID here
#------------------------------------------------------------------
#------------------------------------------------------------------
#------------------------------------------------------------------
# STOP EDITING PAST THIS POINT!
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#
class Scene_Map < Scene_Base
alias tmps_event_start start
def start
@window_TMPS = Window_TMPS.new(TMPS_HUD_EVENT_POSITION[0], TMPS_HUD_EVENT_POSITION[1])
tmps_event_start
end
alias update_tmps update
def update
update_tmps
update_tmps_event_call
@window_TMPS.update
end
def update_tmps_event_call
if Input.trigger?(TMPS_BUTTON)
common_event = $data_common_events[TMPS_COMMON_EVENT]
if $game_switches[TMPS_SWITCH]
$game_switches[TMPS_SWITCH] = false
else
$game_switches[TMPS_SWITCH] = true
end
$game_temp.common_event_id = common_event.id
end
end
end
class Window_TMPS < Window_Base
def initialize(x, y, width = 110)
@txton = TMPS_HUD_TEXT_ON
@txtoff = TMPS_HUD_TEXT_OFF
super(x, y, width, WLH + 32)
self.opacity = 255
@width_window_tmps = self.width
refresh
end
def refresh
if $game_switches[TMPS_SWITCH]
onoff = "ON"
else
onoff = "OFF"
end
self.contents.clear
draw_event_onoff(@width_window_tmps - 8, @txton, @txtoff, onoff)
end
def draw_event_onoff(width, text_on, text_off, onoff = "OFF")
if onoff == "ON"
self.contents.draw_text(4, 0, width, WLH, text_on)
elsif onoff == "OFF"
self.contents.draw_text(4, 0, width, WLH, text_off)
end
end
def update
refresh
end
end
I still don't know how to mess around with the format, but this should be enough to start! The rest is up to masters of RMVX language...