Leon
Legend-
Content Count
1,713 -
Joined
-
Last visited
-
Days Won
23
Content Type
Profiles
Forums
Blogs
Downloads
Calendar
Gallery
Everything posted by Leon
-
This script makes the first save file (Save1) and makes it an 'Autosave' file that can be loaded, but not saved over. It also renames the other 3 save files "1, 2, 3". This shouldn't need a screenshot, but if one is requested, I'll make it. The instructions are in the header of the script itself. #=============================================================================== # Liz's Autosave Script #------------------------------------------------------------------------------- # Just place this script below all default scripts and above main. # It will handle itself. # # To Auto-save: # Use the 'Script...' command and input: # Autosave.save #=============================================================================== module Autosave def self.save filename = make_filename(0) file = File.open(filename, "wb") write_save_data(file) file.close end def self.write_save_data(file) # Make character data for drawing save file characters = [] for i in 0...$game_party.actors.size actor = $game_party.actors[i] characters.push([actor.character_name, actor.character_hue]) end # Write character data for drawing save file Marshal.dump(characters, file) # Wrire frame count for measuring play time Marshal.dump(Graphics.frame_count, file) # Increase save count by 1 $game_system.save_count += 1 # Save magic number # (A random value will be written each time saving with editor) $game_system.magic_number = $data_system.magic_number # Write each type of game object 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 def self.make_filename(file_index) return "Save#{file_index + 1}.rxdata" end end class Window_SaveFile < Window_Base def refresh self.contents.clear self.contents.font.color = normal_color if @file_index == 0 name = "Autosave" if $scene.is_a?(Scene_Save) self.contents.font.color = disabled_color end else name = "File #{@file_index}" self.contents.font.color = normal_color end 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 end class Scene_Save < Scene_File alias lizzie_autosave_ss_ondec on_decision def on_decision(filename) if filename.include?("Save1.rxdata") $game_system.se_play($data_system.buzzer_se) return end lizzie_autosave_ss_ondec(filename) end end
-
Now, my turn to post some code. :P #=============================================================================== # Liz's Autosave Script #=============================================================================== module Auto_Save def self.save filename = make_filename(0) file = File.open(filename, "wb") write_save_data(file) file.close end def self.write_save_data(file) # Make character data for drawing save file characters = [] for i in 0...$game_party.actors.size actor = $game_party.actors[i] characters.push([actor.character_name, actor.character_hue]) end # Write character data for drawing save file Marshal.dump(characters, file) # Wrire frame count for measuring play time Marshal.dump(Graphics.frame_count, file) # Increase save count by 1 $game_system.save_count += 1 # Save magic number # (A random value will be written each time saving with editor) $game_system.magic_number = $data_system.magic_number # Write each type of game object 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 def self.make_filename(file_index) return AppData.make_filename(file_index) end end class Window_SaveFile < Window_Base def refresh self.contents.clear self.contents.font.color = normal_color if @file_index == 0 name = "Autosave" self.contents.font.color = disabled_color else name = "File #{@file_index}" self.contents.font.color = normal_color end 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 end class Scene_Save < Scene_File alias lizzie_autosave_ss_ondec on_decision def on_decision(filename) if @file_index == 0 $game_system.se_play($data_system.buzzer_se) return end lizzie_autosave_ss_ondec(filename) end end It utilizes save 1, renames it Autosave, then renames the rest of them 1, 2, etc. Also, you cannot SAVE over autosave, only load it. Just place it below your two other save file scripts, and it shoudl work beautifully. ^_^ I tested it thoroughly.
-
I have been working on this, I have just found a small delay that I'm working on. ^_^ no worries! EDIT: Ok, It's done. ^_^ Works with the default battle system BEAUTIFULLY. #=============================================================================== # Instructions: #------------------------------------------------------------------------------- # # In the module of this script, put the filename of your base windowskin in # Def_Skin = "" # # and your battle windowskin in # Battle_Skin = "" # #=============================================================================== module WindowSkin Def_Skin = "001-Blue01" Battle_Skin = "test" end module Graphics class << self if @lizzie_cbw_stack.nil? alias_method :lizzie_cbw_update, :update @lizzie_cbw_stack = true end def update lizzie_cbw_update if $scene != self check_scene end end def check_scene win = WindowSkin if $scene.is_a?(Scene_Battle) $data_system.windowskin_name = win::Battle_Skin else $data_system.windowskin_name = win::Def_Skin end end end end class Window_BattleStatus < Window_Base alias lizzie_cbw_battlestatus_init initialize def initialize lizzie_cbw_battlestatus_init win = WindowSkin self.windowskin = RPG::Cache.windowskin(win::Battle_Skin) end end
-
"Don't you realize? There's more to you than there is to you!"
-
I nominated Tomo... where is he?
-
Let's Play a Game! Answer Every Question with Another Question!
Leon replied to Heretic86's topic in Spam-O-Rama!
Did you know that necrosis is a serious disease? -
You see, they (the O-bummer administration) picked the wrong guy to torture. He just built an upload site; He didn't control WHAT was uploaded to the site. I must say, copyright infringement inflates the costs to other people, because of the greed. This much is true. But to take it out on a guy who didn't EXACTLY commit the crime is crap.
-
I assume no matter how many times I say 'Don't nominate me', It won't do any good?
-
Maybe I'll just wait for the new Fire Emblem. I tried the demo, and it looks rather promising.
-
Looks like you did a real good job. When I get some free time, I'll give it a shot. Just too much on my plate today to shoot for it now. Wish I did, it's nice to see something different.
-
Well, firefly, we gotta show everyone what we can do. And band together, to bring this back to former glory. We need contributers, and people working on projects. Everyone, we CAN do this.
-
dolar, don't nominate me for that, plz? But, I do have a nomination... Tomo. He's been active, even when many others weren't.
-
Mkay, Tiggy. ^_^
-
I may just look into them. I just would also like some mobile options as well for the Vita/3DS
-
You're welcome. DOn't be a stranger. And remember, There is no problem without a solution!
-
This site has sat idle for far too long. I have returned to see what glory has grown, only to see this beautiful flower of my home wither to almost nothing. I WONT TAKE IT. I am here now, to bring this site back, from the ashes; and you will all bear witness to what teamwork, perseverence, and hard work can accomplish. Together, with everyone's help, we can bring this site back up to the top, into the pantheon of great RPG Making forums! I remember Creation Asylum, with its cliques and scripters who didn't even care. Its graphic artists who seldom made anything for you. Its writers who thought your ideas sucked, without offering assistance. This site was once, and will once again be a place of friendship, a forum where people can come, congregate, knowing they will get the help, understanding, and friendship they need to make their ideas and dreams come true. Now, I implore every member on this site... if this place means half as much to you as it does to me, Marked, and a few others... Don't roll your eyes and say 'I don't have the time anymore..' We MAKE time for what is important to us! Marked giving his all into this, I am ashamed I left. Now, Join us, in rebuilding this site! Earning the reputation and respect it deserves, and allowing this site to rise from the ashes!
-
Cutting deep, there... was that REALLY necessary? Either way, why go through so much hassle when there is an easier way?
-
Far as I know, not really. Because the game recognizes events by ID. you'd have to transfer more than just the code of the event. there's a lot more there. I recommend having a switch trigger when the sprite reaches the end of the map, and when it does switch, have another event on another map turn on.
-
For vista I had to install it on the desktop. i dont know anything about Win8, but can you try that?
-
The next morning, she rose and grabbing her bag, headed down into the bar area. There, she looked around, and sat, hoping for a hearty meal to start the day.
-
The less you own, the less that owns you.