Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> ~[Force Save]~ version 1.0, Force the player to save when playing a new game
YanXie
post Jun 7 2008, 12:50 AM
Post #1


Because Tomorrow Will Surely Come...
Group Icon

Group: Revolutionary
Posts: 1,137
Type: None
RM Skill: Skilled




Force Save

Version 1.0 revision 1
Author puppeto4
Release Date 06/06/2008

Exclusive Script at RPG RPG Revolution


Introduction

While writing my GameOverEnhanced script, I thought the error possiblity if there is no save
file exist(which is solved in another way), so I'd just write this for the challenge :3


Features

This script will force player to save when starting a new game.


Script

Download below :

Attached File  ForceSaveScript.txt ( 5.63K ) Number of downloads: 76


Or copy from spoiler below :

[Show/Hide] ForceSaveScript
CODE
#==============================================================================
# ** Force Save
#------------------------------------------------------------------------------
# Author  : puppeto4 (puppeto5@hotmail.com)
# Version : 1.0 revision 1
# Date    : 06 / 06 / 2008
# Note    : Order Pizza Hut, support the rebellion.
# Check RPG RPG Revolution(http://www.rpgrevolution.com) for support
#------------------------------------------------------------------------------
# Function :  
#   This script will force player to save when starting a new game.
#==============================================================================
#==============================================================================
# ** Puppeto
#------------------------------------------------------------------------------
#  This module handles setup for any script writen by me ^^.
#==============================================================================

module Puppeto
  # Message shown when the force save screen appear.
  ForceMessage     = "Please save your game before proceed"
#==============================================================================
# ** End of Puppeto module
#------------------------------------------------------------------------------
end  
#==============================================================================
# ** Class Alias
#==============================================================================
#----------------------------------------------------------------------------
# * Aliased Class(es) : Scene_Title, Scene_File
#----------------------------------------------------------------------------
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================
#----------------------------------------------------------------------------
# * Aliased Method(s) : command_new_game
#----------------------------------------------------------------------------

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias puppet_forcesave_command_new_game command_new_game    
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    # The usual
    puppet_forcesave_command_new_game
    # If $FSAVE is false or nil
    if $FSAVE == false or $FSAVE.nil?
      # Call Scene_File(save type)
      $scene = Scene_File.new(true, true, false)
      # Set $FSAVE to true to enable force_save in Scene_File
      $FSAVE = true
    end  
  end
end
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This class performs the save and load screen processing.
#==============================================================================
#----------------------------------------------------------------------------
# * Aliased Method(s) : main, start, return_scene
# * New Method(s)     : force_save
#----------------------------------------------------------------------------

class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  if @new_stack.nil?
    alias puppet_forcesave_main main    
    alias puppet_forcesave_start start    
    alias puppet_forcesave_return_scene return_scene  
    @new_stack = true
  end  
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    puppet_forcesave_main             # The usual
    force_save if $FSAVE              # Start force save if $FSAVE is true
  end
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    # The usual
    puppet_forcesave_start
    # Set a difference text on help windo if $FSAVE is true
    @help_window.set_text(Puppeto::ForceMessage, 1) if $FSAVE
  end  
  #--------------------------------------------------------------------------
  # * Return to Original Screen
  #--------------------------------------------------------------------------
  def return_scene
    # If $FSAVE is true
    if $FSAVE
      # If Input::B is triggered
      if Input.trigger?(Input::B)
        # Stop all SE playback
        Audio.se_stop
        # Ignore if play_buzzer SE
        next if Sound.play_buzzer
        # Return
        return
      end  
    end  
    # The usual
    puppet_forcesave_return_scene
  end    
  #--------------------------------------------------------------------------
  # * Force Save
  #--------------------------------------------------------------------------
  def force_save
    # Call Scene_Map
    $scene = Scene_Map.new
    # Set $FSAVE to false to prevent looping
    $FSAVE = false      
  end  
end
#==============================================================================
# ** End of Class Alias
#==============================================================================



Customization

Change the value in line 21 if you feel like it :3


Compatibility

Will clash with any script that rewrite "command_new_game" method in Scene_Title(if there is any script like that huh.gif )
Should be compatible wih Neo Save System by woratana(not very sure,since I didn't take at look at the code)


Screenshot


For the curious kitten...


DEMO

DEMO


Installation

Copy and paste in a new script page below material section but above main


FAQ

ohmy.gif Spinzaku


Terms and Conditions

Credit to me, puppeto4. Free to use for non-commercial project.

Do not redistribute this script without my permission.


Special Thanks

Thanks to Code Geass anime production team, the anime give me spirit when I want to give up smile.gif

cheers,puppeto4. smile.gif


__________________________
how make teleport to graveyard then your character die?

AWAY FOR VACATION.
NOT HERE UNTIL JAN/FEB 2010 -w-/
Go to the top of the page
 
+Quote Post
   
cheahjc
post Jun 7 2008, 03:42 PM
Post #2


Got watermelons?
Group Icon

Group: Revolutionary
Posts: 186
Type: Event Designer
RM Skill: Skilled




Nice script thanks!


__________________________

[Show/Hide] This is my signature, BEWARE


[Show/Hide] Click here to see how awesome I am






[Show/Hide] Funny T-Shirts






[Show/Hide] Can you read this?

Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.

[Show/Hide] They Found Nemo!



WARNING, The Following picture may be frightening to Nemo fans and sushi haters


[Show/Hide] Continue




[Show/Hide] Awesome Quotes


"Yesterday was history, tomorrow is a mystery, and today is a gift. Thats why they call it the present." - Kong Fu Panda

"What are you? Dumb?"
"Well you should have knwon I was dumb, so your the dumb one!" Max from Wizards of Waverly Place

"If everyone is thinking alike then sombody isn't thinking." - George Patton.

"Always bear in mind that your own resolution to succeed is more important than any one thing" - Abraham Lincoln

"Ask not what your country can do for you--ask what you can do for your country" - John F. Kennedy

"Leadership is not position. Leadership is action" - UNKNOWN

"You can't a home run unless you step up to the plate."
"You can't catch a fish unless you put your line in the water."
"You can't reach you goals if you don't try." - Kathy Seligman

"Shoot for the moon. Even if you miss, you will land among the stars" - Les Brown


Thanks Leper!

Cheahjc is too cool for school.
GO ASIANS!
Go to the top of the page
 
+Quote Post
   
shiriko1989
post Jun 9 2008, 06:21 PM
Post #3


Level 4
Group Icon

Group: Member
Posts: 45
Type: Artist
RM Skill: Undisclosed




What should I do if we enter a new chapter in the game with force save?


__________________________
Go to the top of the page
 
+Quote Post
   
Kylock
post Jun 9 2008, 07:04 PM
Post #4


Level 6
Group Icon

Group: Member
Posts: 85
Type: Scripter
RM Skill: Advanced




QUOTE (shiriko1989 @ Jun 9 2008, 09:35 PM) *
What should I do if we enter a new chapter in the game with force save?


This script is clearly for new games... so this question isn't really relevant. There is an event command called Show Save Screen, that should be good enough.

This post has been edited by Kylock: Jun 9 2008, 07:06 PM


__________________________
Go to the top of the page
 
+Quote Post
   
RoxasXIII
post Jun 9 2008, 08:50 PM
Post #5


No. XIII
Group Icon

Group: Revolutionary
Posts: 281
Type: None
RM Skill: Advanced




Me likey...I will definately use once in my life.This is awseome!...Thanks...


__________________________
Go to the top of the page
 
+Quote Post
   
sora1293
post Feb 16 2010, 01:31 PM
Post #6


Level 3
Group Icon

Group: Member
Posts: 30
Type: Artist
RM Skill: Intermediate




this is great!



This post has been edited by sora1293: Feb 16 2010, 02:01 PM


__________________________
[Show/Hide] What FF Chracter I'm am?...
[Show/Hide] What KH Character am I'm?...
[Show/Hide] What Sonic Character am I'm?...

Go to!

[Show/Hide] I'm working on...

[free] ---- = Person looking for a team to join
[art] ----- = artist
Go to the top of the page
 
+Quote Post
   
Akroona_Shadow_o...
post Aug 6 2010, 03:32 PM
Post #7



Group Icon

Group: Member
Posts: 3
Type: None
RM Skill: Beginner




In my game there is a little bit of gambling, and I was wondering how I could modify this script to force save so that people couldn't 'cheat' the system by pressing F12 if they lose a money on a 'game'.


__________________________
I am Akroona! Fear me as the shadow of Death itself!
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 21st May 2013 - 09:08 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker