| Seigneur (Nv 3) |
 |
Inscrit le: 09 Jan 2007, 01:00 Messages: 453 Localisation: Suisse Niveau RPG Maker: Connaisseur Logiciel(s) préféré(s): Chromium, Photofilte, RPG Maker Point(s) Fort(s): Aucun Sexe: Masculin Points d'aide: 4/60
Créations :
Voir ses créations
|
KGC_2PaneSave
Auteur: KGC Traduction: Randal Installation: Copier le code au dessus de main. Le nom n'a pas d'importance. Description: Ce script est une simple modification de l'apparence des fenêtres de chargement et de sauvegarde. A la ligne 16, vous pouvez spécifier le nombre de page de sauvegarde. Script: - Code: Tout sélectionner
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/ �Ÿ‚QƒyƒCƒ“Ž®ƒZ�[ƒu �| KGC_2PaneSave�Ÿ #_/---------------------------------------------------------------------------- #_/ ‚QƒyƒCƒ“Ž®‚̃Z�[ƒu‰æ–Ê‚ð�ì�¬‚µ‚Ü‚·�B - Script traduit by Randal #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#============================================================================== # �š ƒJƒXƒ^ƒ}ƒCƒY�€–Ú �š #==============================================================================
module KGC # �Ÿƒy�[ƒW�” # 1 ƒy�[ƒW‚ɂ‚«ƒZ�[ƒuƒtƒ@ƒCƒ‹ 4 ŒÂ�B # ‘½‚·‚¬‚邯ƒZ�[ƒu/ƒ��[ƒh‰æ–Ê‚Ì•Ž¦‚ª’x‚‚È‚è‚Ü‚·�B # �¦•K‚¸ 1 ˆÈ�ã‚ðŽw’肵‚Ä‚‚¾‚³‚¢�B TPS_PAGE_NUMBER = 1 # �Ÿƒtƒ@ƒCƒ‹”Ô�†�‘Ž® # �y{i}..ƒtƒ@ƒCƒ‹”Ô�†�z TPS_FILE_INDEX_FORMAT = "Partie {i}"
# �Ÿƒ�ƒ“ƒo�[ƒŠƒXƒg‚Ì—ñ�”(1�`4) # 5 ˆÈ�ã‚É‚·‚邯•ަ‚ª”í‚è‚Ü‚·�B TPS_MEMBER_COLS = 3 # �Ÿ�T‚¦ƒ�ƒ“ƒo�[‚à•`‰æ # �ᑽ�l�”ƒp�[ƒeƒB�⓱“üŽž‚̂ݗLŒø�B TPS_DRAW_ALL_MEMBER = true end
#�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š
$imported = {} if $imported == nil $imported["2PaneSave"] = true
#============================================================================== # �¡ Window_SaveFile #==============================================================================
class Window_SaveFile < Window_Base attr_accessor :destination #-------------------------------------------------------------------------- # �œ ƒIƒuƒWƒFƒNƒg�‰Šú‰» # file_index : ƒZ�[ƒuƒtƒ@ƒCƒ‹‚̃Cƒ“ƒfƒbƒNƒX # filename : ƒtƒ@ƒCƒ‹–¼ #-------------------------------------------------------------------------- def initialize(file_index, filename) super(file_index * 160, 64, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) @file_index = file_index @filename = "Save#{@file_index + 1}.rxdata" @time_stamp = Time.at(0) @file_exist = FileTest.exist?(@filename) if @file_exist file = File.open(@filename, "r") @time_stamp = file.mtime @frame_count = Marshal.load(file) unless @frame_count.is_a?(Integer) @frame_count = Marshal.load(file) end 9.times { |i| # •s—v‚ȉÓ�Š‚ð“ǂݔò‚΂· Marshal.load(file) } @total_sec = @frame_count / Graphics.frame_rate file.close end refresh @destination = self.x @selected = false end #-------------------------------------------------------------------------- # �œ ƒŠƒtƒŒƒbƒVƒ… #-------------------------------------------------------------------------- def refresh # MapInfo.rxdata ‚ðƒ��[ƒh mapinfo = load_data("Data/MapInfos.rxdata") self.contents.clear # ƒtƒ@ƒCƒ‹”Ô�†‚ð•`‰æ self.contents.font.color = system_color name = KGC::TPS_FILE_INDEX_FORMAT.dup name.gsub!(/{i}/) { "#{@file_index + 1}" } self.contents.draw_text(4, 0, 120, 32, name) @name_width = contents.text_size(name).width # ƒZ�[ƒuƒtƒ@ƒCƒ‹‚ª‘¶�Ý‚·‚é�ê�‡ if @file_exist # ƒvƒŒƒCŽžŠÔ‚ð•`‰æ hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 time_string = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, time_string) end end #-------------------------------------------------------------------------- # �œ ƒtƒŒ�[ƒ€�X�V #-------------------------------------------------------------------------- def update super # ƒEƒBƒ“ƒhƒEˆÚ“® if self.x != @destination if (self.x - @destination).abs < 12 self.x = @destination else dist = (@destination - self.x) / 8 if dist < 0 dist = [dist, -12].min else dist = [dist, 12].max end self.x += dist end end end end
#�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š
#============================================================================== # �¡ Window_SaveFileInfo #------------------------------------------------------------------------------ # �@ƒtƒ@ƒCƒ‹‚Ì�î•ñ‚𕎦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·�B #==============================================================================
class Window_SaveFileInfo < Window_Base #-------------------------------------------------------------------------- # �œ ƒIƒuƒWƒFƒNƒg�‰Šú‰» #-------------------------------------------------------------------------- def initialize super(0, 160, 640, 320) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = 20 end #-------------------------------------------------------------------------- # �œ ƒŠƒtƒŒƒbƒVƒ… # file_index : ƒZ�[ƒuƒtƒ@ƒCƒ‹‚̃Cƒ“ƒfƒbƒNƒX #-------------------------------------------------------------------------- def refresh(file_index) if @file_index == file_index return end self.contents.clear @file_index = file_index filename = "Save#{file_index + 1}.rxdata" if FileTest.exist?(filename) self.contents.font.color = normal_color self.contents.font.name = Font.default_name self.contents.font.size = 20 self.contents.font.bold = Font.default_bold draw_file_info(filename) else self.contents.font.color = disabled_color self.contents.font.name = "Times New Roman" self.contents.font.size = 32 self.contents.font.bold = true self.contents.draw_text(0, 112, 640, 64, "- VIDE -", 1) end end #-------------------------------------------------------------------------- # �œ ƒtƒ@ƒCƒ‹�î•ñ•`‰æ # filename : ‘Î�Ûƒtƒ@ƒCƒ‹–¼ #-------------------------------------------------------------------------- def draw_file_info(filename) file = File.open(filename, "r") time_stamp = file.mtime frame_count = Marshal.load(file) unless frame_count.is_a?(Integer) frame_count = Marshal.load(file) end game_system = Marshal.load(file) game_switches = Marshal.load(file) game_variables = Marshal.load(file) game_self_switches = Marshal.load(file) game_screen = Marshal.load(file) game_actors = Marshal.load(file) game_party = Marshal.load(file) game_troop = Marshal.load(file) game_map = Marshal.load(file) total_sec = frame_count / Graphics.frame_rate file.close # ƒLƒƒƒ‰ƒNƒ^�[‚ð•`‰æ actors = game_party.actors if $imported["LargeParty"] && !KGC::TPS_DRAW_ALL_MEMBER actors = game_party.battle_actors end actors.each_with_index { |actor, i| x = i / 5 * (608 / KGC::TPS_MEMBER_COLS) y = i % 5 * 48 out = dead = false if $imported["LargeParty"] && !game_party.battle_actors.include?(actor) out = true elsif actor.dead? dead = true end image = RPG::Cache.character(actor.character_name, actor.character_hue) rect = Rect.new(0, 0, image.width >> 2, image.height >> 2) self.contents.blt(x, y, image, rect, out ? 128 : 255) self.contents.font.color = dead ? knockout_color : normal_color self.contents.draw_text(x + 40, y, 108, 24, actor.name) self.contents.font.color = system_color self.contents.draw_text(x + 40, y + 24, 32, 24, "Niveau ") self.contents.font.color = normal_color self.contents.draw_text(x + 72, y + 24, 64, 24, actor.level.to_s) } # ƒvƒŒƒCŽžŠÔ‚ð•`‰æ hour = total_sec / 3600 min = total_sec / 60 % 60 sec = total_sec % 60 time_string = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = system_color self.contents.draw_text(480, 240, 48, 24, "Temps") self.contents.font.color = normal_color self.contents.draw_text(528, 240, 80, 24, time_string, 2) # ƒ^ƒCƒ€ƒXƒ^ƒ“ƒv‚ð•`‰æ time_string = time_stamp.strftime("%Y/%m/%d %H:%M") self.contents.draw_text(448, 264, 160, 24, time_string, 2) # ƒZ�[ƒu�ê�Š�E”C–±‚ð•`‰æ if $imported["PlaceMission"] mapinfo = load_data("Data/MapInfos.rxdata") place = "" # ƒ}ƒbƒv–¼‚ª–³‚¢�ê�‡ if game_system.place == nil || game_system.place == "" # ƒ}ƒbƒv–¼‚ðŽæ“¾ place = mapinfo[game_map.map_id].name else place = game_system.place end self.contents.font.color = system_color cx = self.contents.text_size("ƒZ�[ƒu�ê�Š").width self.contents.draw_text(4, 240, cx, 24, "ƒZ�[ƒu�ê�Š") self.contents.font.color = normal_color self.contents.draw_text(8 + cx, 240, 596 - cx, 24, place) self.contents.font.color = system_color cx = self.contents.text_size("”C–±").width self.contents.draw_text(4, 264, cx, 24, "”C–±") self.contents.font.color = normal_color self.contents.draw_text(8 + cx, 264, 596 - cx, 24, game_system.mission) end end end
#�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š�™�š
_________________
|
|