I posted here, not sure where it went, it just disappeared. I post in the right place, right?
I need help converting this 2-part script from RMXP into RMVX ACE, plz help, much appreciated.
If I put this in the wrong place very sorry could you plz move it. If you delete it plz at least give an explanation. I'm confuse here.
I need help converting this 2-part script from RMXP into RMVX ACE, plz help, much appreciated.
# Window_Journal
#------------------------------------------------------------------------------
# This window displays a journal.
#==========================================================================
class Window_Journal < Window_Selectable
# ------------------------
def initialize
super(0, 32, 460, 330)
#----------------------------------------------------------
# populate your journal with entries.
@Data = []
@Data[1] = "Sniff the Glove"
@Data[2] = "Jump off a bridge after your friends"
# this is the offset for your switches. If you start with switch 100, set @offset = 99
# con neu muon start with switch 1 thi set offset = 0
@offset = 99
### to change the windowskin for the journal
# self.windowskin = RPG::Cache.windowskin("RMXP4life_Wood.png")
#----------------------------------------------------------
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Draw the contents of the item window
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
# variables
@journal_height = (@data.size - 1)*32 # y coord of entire journal (# of entries - 1) * 32
@n = 0 # y coord for each entry
@item_max = 0 # max items to display
# draw the bitmap. the text will appear on this bitmap
self.contents = Bitmap.new(width - 32, @journal_height)
for i in [email hidden]
if $game_switches[i + @offset] == true
draw_item(i)
@item_max += 1
end
end
end
#--------------------------------------------------------------------------
# * Draw an individual item in the window
# index : Index of the item to be drawn
#--------------------------------------------------------------------------
def draw_item(index)
item = @Data[index]
rect = Rect.new(10, @n, 640, 32)
self.contents.fill_rect(rect, Color.new(0,0,0,0))
self.contents.draw_text(10, @n, 640, 32, "-", 0)
self.contents.draw_text(25, @n, 640, 32, item, 0)
@n += 32
end
end
#------------------------------------------------------------------------------
# This window displays a journal.
#==========================================================================
class Window_Journal < Window_Selectable
# ------------------------
def initialize
super(0, 32, 460, 330)
#----------------------------------------------------------
# populate your journal with entries.
@Data = []
@Data[1] = "Sniff the Glove"
@Data[2] = "Jump off a bridge after your friends"
# this is the offset for your switches. If you start with switch 100, set @offset = 99
# con neu muon start with switch 1 thi set offset = 0
@offset = 99
### to change the windowskin for the journal
# self.windowskin = RPG::Cache.windowskin("RMXP4life_Wood.png")
#----------------------------------------------------------
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Draw the contents of the item window
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
# variables
@journal_height = (@data.size - 1)*32 # y coord of entire journal (# of entries - 1) * 32
@n = 0 # y coord for each entry
@item_max = 0 # max items to display
# draw the bitmap. the text will appear on this bitmap
self.contents = Bitmap.new(width - 32, @journal_height)
for i in [email hidden]
if $game_switches[i + @offset] == true
draw_item(i)
@item_max += 1
end
end
end
#--------------------------------------------------------------------------
# * Draw an individual item in the window
# index : Index of the item to be drawn
#--------------------------------------------------------------------------
def draw_item(index)
item = @Data[index]
rect = Rect.new(10, @n, 640, 32)
self.contents.fill_rect(rect, Color.new(0,0,0,0))
self.contents.draw_text(10, @n, 640, 32, "-", 0)
self.contents.draw_text(25, @n, 640, 32, item, 0)
@n += 32
end
end
# – Scene_Status
#------------------------------------------------------------------------------
# This class contains the windows for the character status menu that can be
# accessed from the main menu.
#==========================================================================
class Scene_Journal
#--------------------------------------------------------------------------
# — Initialize the Status menu
#--------------------------------------------------------------------------
def initialize(callback = 0) #callback from menu
@callback = callback
end
def main
@journal_window = Window_Journal.new
@journal_window.x = 90
@journal_window.y = 70
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@journal_window.dispose
end
#--------------------------------------------------------------------------
# — Draw the Status menu
#--------------------------------------------------------------------------
def update
@journal_window.update
if @journal_window.active
update_item
return
end
end
#--------------------------------------------------------------------------
# — Update menu after player makes a selection
#--------------------------------------------------------------------------
def update_item
# Cancel key pressed (go to menu)
if Input.trigger?(Input::😎 or Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
if @callback == 0
$scene = Scene_Menu.new(6)
else
$scene = Scene_Map.new
end
return
end
end
end
#------------------------------------------------------------------------------
# This class contains the windows for the character status menu that can be
# accessed from the main menu.
#==========================================================================
class Scene_Journal
#--------------------------------------------------------------------------
# — Initialize the Status menu
#--------------------------------------------------------------------------
def initialize(callback = 0) #callback from menu
@callback = callback
end
def main
@journal_window = Window_Journal.new
@journal_window.x = 90
@journal_window.y = 70
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@journal_window.dispose
end
#--------------------------------------------------------------------------
# — Draw the Status menu
#--------------------------------------------------------------------------
def update
@journal_window.update
if @journal_window.active
update_item
return
end
end
#--------------------------------------------------------------------------
# — Update menu after player makes a selection
#--------------------------------------------------------------------------
def update_item
# Cancel key pressed (go to menu)
if Input.trigger?(Input::😎 or Input.trigger?(Input::L)
$game_system.se_play($data_system.cancel_se)
if @callback == 0
$scene = Scene_Menu.new(6)
else
$scene = Scene_Map.new
end
return
end
end
end
If I put this in the wrong place very sorry could you plz move it. If you delete it plz at least give an explanation. I'm confuse here.