#==============================================================================
# * Skript (Game)
#==============================================================================
class Game_System
#----------------------------------------------------------------------------
attr_accessor :kapitel
#----------------------------------------------------------------------------
alias kapitel_gamesys_ini initialize
def initialize
@kapitel = nil
kapitel_gamesys_ini
end
#----------------------------------------------------------------------------
end
#==============================================================================
# * Skript (Window)
#==============================================================================
class Window_Kapitel < Window_Base
#----------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH + 72)
refresh
end
#----------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Kapitel:")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_system.kapitel, 2)
end
#----------------------------------------------------------------------------
end
#------------------------------------------------------------------------------
class Window_Time < Window_Base
#----------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH + 64)
refresh
end
#----------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Spielzeit:")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, text, 2)
end
#----------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
#----------------------------------------------------------------------------
end
#==============================================================================
# * Skript (Scene)
#==============================================================================
class Scene_Menu
#----------------------------------------------------------------------------
def start
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(160, 0)
@playtime_window = Window_Time.new(0, 176)
@kapitel_window = Window_Kapitel.new(0, 264)
end
#----------------------------------------------------------------------------
def terminate
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@kapitel_window.dispose
@playtime_window.dispose
end
#----------------------------------------------------------------------------
def update
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@kapitel_window.update
@playtime_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#----------------------------------------------------------------------------
end
#==============================================================================
# Kapitel + Spielzeit fürs Standardmenü - von ERZENGEL - 12. Februar 2008
#==============================================================================
$game_system.kapitel = "Name des Kapitels"
$game_system.kapitel = "1 - Der Nebel"
einfügen. Das kannst du dann z.B. 20 Maps später wieder machen und diesmal $game_system.kapitel = "2 - Sonnenuntergang"
eingeben.
Öffne zuerst den Script Editor (über F11). Klicke über Main einmal rechts und wähle Insert/Einfügen. Es entsteht dann ein leeres Feld. Klick auf dieses und gebt ihm einen Namen. Füge in den leeren, rechten Textfeld nun den Skriptcode ein.Name ist egal, aber Kapitel+Spielzeit-Addon oder sowas wäre gut ^^
Nach Kapitel suchen (ist lial hervorgehoben) und mit Rezept ersetzen wink.gif Anführiungszeichen da lassen.
#==============================================================================Habs DICK geschrieben.. xD
# * Skript (Game)
#==============================================================================
class Game_System
#----------------------------------------------------------------------------
attr_accessor :kapitel
#----------------------------------------------------------------------------
alias kapitel_gamesys_ini initialize
def initialize
@kapitel = nil
kapitel_gamesys_ini
end
#----------------------------------------------------------------------------
end
#==============================================================================
# * Skript (Window)
#==============================================================================
class Window_Kapitel < Window_Base
#----------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH + 72)
refresh
end
#----------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Kapitel:")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_system.kapitel, 2)
end
#----------------------------------------------------------------------------
end
#------------------------------------------------------------------------------
class Window_Time < Window_Base
#----------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH + 64)
refresh
end
#----------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Spielzeit:")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, text, 2)
end
#----------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
#----------------------------------------------------------------------------
end
#==============================================================================
# * Skript (Scene)
#==============================================================================
class Scene_Menu
#----------------------------------------------------------------------------
def start
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(160, 0)
@playtime_window = Window_Time.new(0, 176)
@kapitel_window = Window_Kapitel.new(0, 264)
end
#----------------------------------------------------------------------------
def terminate
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@kapitel_window.dispose
@playtime_window.dispose
end
#----------------------------------------------------------------------------
def update
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@kapitel_window.update
@playtime_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#----------------------------------------------------------------------------
end
#==============================================================================
# Kapitel + Spielzeit fürs Standardmenü - von ERZENGEL - 12. Februar 2008
#==============================================================================