Jump to content
New account registrations are disabed. This website is now an archive. Read more here.

zahraa

Member
  • Content Count

    472
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by zahraa

  1. Hi everybody! I want to choose a windowskin for title screen which is different from main windowskin in game :huh2: sorry for awful English Tell me if it's hard understand :annoyed:
  2. Yeah,demo link doesn't work. i really like to use this script! please upload its demo again!
  3. zahraa

    Auto save

    Sorry,there was a small problem that i just fix it.No need to change your script because IT'S EXCELLENT ! :D Thank you sooo much
  4. zahraa

    Auto save

    But i can save over it !
  5. zahraa

    Auto save

    Ok here you go: module AppData GAME_TITLE = "game title" def self.make_filename(index) dir = "#{ENV['APPDATA']}\\#{GAME_TITLE}" Dir.mkdir(dir) unless File.directory?(dir) return "#{dir}\\Save#{index + 1}.rxdata" end end class Scene_File def make_filename(index) return AppData.make_filename(index) end end class Scene_Title alias check_appdata_files update def update if @checked == nil (0..3).each {|i| if FileTest.exist?(AppData.make_filename(i)) @continue_enabled = true @command_window.refresh break end } @checked = true end check_appdata_files end end class Window_SaveFile def initialize(file_index, filename) super(0, 64 + file_index % 4 * 104, 640, 104) self.contents = Bitmap.new(width - 32, height - 32) @file_index = file_index @filename = AppData.make_filename(@file_index) @time_stamp = Time.at(0) @file_exist = FileTest.exist?(@filename) if @file_exist file = File.open(@filename, "r") @time_stamp = file.mtime @characters = Marshal.load(file) @frame_count = Marshal.load(file) @game_system = Marshal.load(file) @game_switches = Marshal.load(file) @game_variables = Marshal.load(file) @total_sec = @frame_count / Graphics.frame_rate file.close end refresh @selected = false end end #--------------------- # Personal Save Files # By: Polraudio # Credits: Polraudio, RPG Advocate, Cybersam # Version: 1.0 #--------------------- =begin #---------------------------------------------------- Features: - Allows you to have up to Unlimited save files - You can have a name for your save files Instructions: Place above main Contact: If you have any questions or comments you can find me at www.rmxpunlimited.net(Best Method) Or email me polraudio@gmail.com =end class Window_SaveFile < Window_Base # ------------------- def initialize(file_index, filename, position) y = 64 + position * 104 super(0, y, 640, 104) self.contents = Bitmap.new(width - 32, height - 32) @file_index = file_index @filename = @filename = AppData.make_filename(@file_index) @time_stamp = Time.at(0) @file_exist = FileTest.exist?(@filename) if @file_exist file = File.open(@filename, "r") @time_stamp = file.mtime @characters = Marshal.load(file) @frame_count = Marshal.load(file) @game_system = Marshal.load(file) @game_switches = Marshal.load(file) @game_variables = Marshal.load(file) @total_sec = @frame_count / Graphics.frame_rate file.close end refresh @selected = false end def refresh self.contents.clear self.contents.font.color = normal_color name = "File #{@file_index + 1}" self.contents.draw_text(4, 0, 600, 32, name) @name_width = contents.text_size(name).width if @file_exist for i in 0...@characters.size bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1]) cw = bitmap.rect.width / 4 ch = bitmap.rect.height / 4 src_rect = Rect.new(0, 0, cw, ch) x = 300 - @characters.size * 32 + i * 64 - cw / 2 self.contents.blt(x, 68 - ch, bitmap, src_rect) end 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, 8, 600, 32, time_string, 2) self.contents.font.color = normal_color time_string = @time_stamp.strftime("%Y/%m/%d %H:%M") self.contents.draw_text(4, 40, 600, 32, time_string, 2) end end def selected=(selected) @selected = selected update_cursor_rect end def update_cursor_rect if @selected self.cursor_rect.set(0, 0, @name_width + 8, 32) else self.cursor_rect.empty end end end class Scene_File SAVEFILE_MAX = 10 # ------------------- def initialize(help_text) @help_text = help_text end # ------------------- def main @help_window = Window_Help.new @help_window.set_text(@help_text) @savefile_windows = [] @cursor_displace = 0 for i in 0..3 @savefile_windows.push(Window_SaveFile.new(i, make_filename(i), i)) end @file_index = 0 @savefile_windows[@file_index].selected = true Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @help_window.dispose for i in @savefile_windows i.dispose end end # ------------------- def update @help_window.update for i in @savefile_windows i.update end if Input.trigger?(Input::C) on_decision(make_filename(@file_index)) $game_temp.last_file_index = @file_index return end if Input.trigger?(Input::B) on_cancel return end if Input.repeat?(Input::DOWN) if Input.trigger?(Input::DOWN) or @file_index < SAVEFILE_MAX - 1 if @file_index == SAVEFILE_MAX - 1 $game_system.se_play($data_system.buzzer_se) return end @cursor_displace += 1 if @cursor_displace == 4 @cursor_displace = 3 for i in @savefile_windows i.dispose end @savefile_windows = [] for i in 0..3 f = i - 2 + @file_index name = make_filename(f) @savefile_windows.push(Window_SaveFile.new(f, name, i)) @savefile_windows[i].selected = false end end $game_system.se_play($data_system.cursor_se) @file_index = (@file_index + 1) if @file_index == SAVEFILE_MAX @file_index = SAVEFILE_MAX - 1 end for i in 0..3 @savefile_windows[i].selected = false end @savefile_windows[@cursor_displace].selected = true return end end if Input.repeat?(Input::UP) if Input.trigger?(Input::UP) or @file_index > 0 if @file_index == 0 $game_system.se_play($data_system.buzzer_se) return end @cursor_displace -= 1 if @cursor_displace == -1 @cursor_displace = 0 for i in @savefile_windows i.dispose end @savefile_windows = [] for i in 0..3 f = i - 1 + @file_index name = make_filename(f) @savefile_windows.push(Window_SaveFile.new(f, name, i)) @savefile_windows[i].selected = false end end $game_system.se_play($data_system.cursor_se) @file_index = (@file_index - 1) if @file_index == -1 @file_index = 0 end for i in 0..3 @savefile_windows[i].selected = false end @savefile_windows[@cursor_displace].selected = true return end end end def make_filename(index) return AppData.make_filename(index) end end class Scene_Save < Scene_File def initialize super("Which file would you like to save to?") end def on_decision(filename) $game_system.se_play($data_system.save_se) file = File.open(filename, "wb") write_save_data(file) file.close if $game_temp.save_calling $game_temp.save_calling = false $scene = Scene_Map.new return end $scene = Scene_Menu.new(6) end def on_cancel $game_system.se_play($data_system.cancel_se) if $game_temp.save_calling $game_temp.save_calling = false $scene = Scene_Map.new return end $scene = Scene_Menu.new(6) end def write_save_data(file) characters = [] for i in 0...$game_party.actors.size actor = $game_party.actors[i] characters.push([actor.character_name, actor.character_hue]) end Marshal.dump(characters, file) Marshal.dump(Graphics.frame_count, file) $game_system.save_count += 1 $game_system.magic_number = $data_system.magic_number Marshal.dump($game_system, file) Marshal.dump($game_switches, file) Marshal.dump($game_variables, file) Marshal.dump($game_self_switches, file) Marshal.dump($game_screen, file) Marshal.dump($game_actors, file) Marshal.dump($game_party, file) Marshal.dump($game_troop, file) Marshal.dump($game_map, file) Marshal.dump($game_player, file) end end class Scene_Load < Scene_File def initialize $game_temp = Game_Temp.new $game_temp.last_file_index = 0 latest_time = Time.at(0) for i in 0..3 filename = make_filename(i) if FileTest.exist?(filename) file = File.open(filename, "r") if file.mtime > latest_time latest_time = file.mtime $game_temp.last_file_index = i end file.close end end super("Which file would you like to load?") end def on_decision(filename) unless FileTest.exist?(filename) $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.load_se) file = File.open(filename, "rb") read_save_data(file) file.close $game_system.bgm_play($game_system.playing_bgm) $game_system.bgs_play($game_system.playing_bgs) $game_map.update $scene = Scene_Map.new end def on_cancel $game_system.se_play($data_system.cancel_se) $scene = Scene_Title.new end def read_save_data(file) characters = Marshal.load(file) Graphics.frame_count = Marshal.load(file) $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) $game_player = Marshal.load(file) if $game_system.magic_number != $data_system.magic_number $game_map.setup($game_map.map_id) $game_player.center($game_player.x, $game_player.y) end $game_party.refresh end end
  6. zahraa

    Auto save

    well,i have 2 custom scripts : first one used for more savefile second one used for changing savefile path i don't think they are conflicting scripts but i can post them if you think you need them to make an auto save script. here they are (i changed them a little :D) thanks
  7. zahraa

    Auto save

    yeah,i know i'm not first one who request this script but i couldn't find what i want i found a script,it auto saves the game on file 1 but i want to save it above all of savefiles and make a new bar called it auto save. thanks
  8. Hi everybody! How can i change language of text box ? i can change language in event mode but when the game starts,it shows nothing in text box (i want to change its language to one of Asian language which is totally different with English) Thanks alot
  9. zahraa

    vehicle script

    Hi! I need a vehicle script.a lot of them are out there but they are not what i exactly want.for example,this is very good script but you must use Shift button to exit and enter the ship but i want to use 'space' button: http://save-point.org/thread-2157.html Note:please find or write a script that can work with Easy Party Switcher by Blizzard Thanks
  10. oh,i missed it: my laptop windows is 7,so i used the path that made for 7,but if someone that use xp want to save game,what will happen?should i write either ways in script?and what about username?if my Laptop username is A and someone else use B as username,can computer find the path for both of them?
  11. i did it.but it can't open savefile.i went to savefile's folder that i made and i saw savefile there.but when i open project,it show no load file.also,when i open my project and save a file and back to menu,then go back to save screen again,there is no load file. if my meaning is unclear,tell me and i will capture a video from my problem.
  12. i want to save my game's savefile in a folder that called "Games" for example.not same as game folder.i want something like aveyond's savefile path i searched at google for this script and i found one answer but it made me confuse .please write a easy answer as it possible aveyond savefile location: Vista & 7: C:\Users\[username]\AppData\Roaming\Aveyond II XP: C:\Documents and Settings\[username]\Application Data\Aveyond II REALLY sorry for bad english
  13. thank you.i used diagostimo's script.but i can use it somewhere else.
  14. i know this is not your script.i just told "you did your best too". i asked diagostimo for credit because i am not exactly sure who wrote it and yes,it was front of the dialog
  15. excellent work :5: :clap: :alright: very special thanks!:icon12: who should i credit for this?diagostimo?:D thallion did her/his best too.^_^
  16. same problem with that video :dl.dropbox.com/u/93827519/SRFile2012_8_1_22_26_29_225.avi but this error comes at the end:
  17. i captured a video from my problem: https://dl.dropbox.com/u/93827519/SRFile2012_8_1_22_26_29_225.avi
  18. i copied this script in a new page and replaced "edited Scene_End" instead of default Scene_End and run my game.but when i go to menu and choose end and next shutdown,that error comes again. even when i start a new project and do same things,this error comes
  19. when i choose new adventure(new game) this error comes:
  20. 1. when you have at least one savefile and choose new game,i want that a window comes and ask "are you sure?".please edit this script:(this is RMXP default title script) 2. and the same thing for shutdown when you are playing the game.a window comes and ask "are you sure ?" please edit this script:(this is RMXP default end script) please answer.i think it takes 5 min for scripters thanks
×
×
  • Create New...