Okay well I know how to force the player to save his game.
Like I can actually make him have to save the game before he can move on.
But thats not what the request is.
I want to be able to force the Game itself save without going into the save screen. I want to be able to use a syntax like this or something.
ForceSave(Slot # Here)
Where slot # here is what slot number the script saves the data to.
I don't know if this script is possible but it would work perfect for my star wars mini project.
Thanks in advanced.
Um... isn't this... basically... built in...?
file = File.open(filename, "wb")
write_save_data(file)
file.close
Took that from Scene_Save.
That's basically what happens when you decide to save in the slot from the regular save screen.
Doesn't work.
Quote from: game_guy on January 18, 2009, 11:29:44 pm
Okay thank you!
But how do you decide what slot it is?
I think it's stated right there...
def on_decision(filename) # Play save SE
$game_system.se_play($data_system.save_se)
# Write save data
file = File.open(filename, "wb")
write_save_data(file)
file.close
Except you need to replace the savedata of that with SAVE001 or whatever the savefiles are named? Simple assumptions for the win...
And to accommodate your edited post, can't you launch this with a Call Script?
I used Script Call and it crashed
And I'm not quite getting what you posted?
Talking with Aqua, I just decided I might as well use my extensive resources and search for this problem, since I would figure there'd be something on this case (Playing Phoenix Wright >_>; ).
So I found a topic on .ORG that has the solution. Thanks Zeriab!
http://www.rmxp.org/forums/viewtopic.php?f=8&t=53216&p=504504&hilit=force+save#p504504
I had forgotten I made that >_>
I would suggest using this instead
class Scene_Save
def self.save(file_index)
save_obj = self.new
file = File.open(save_obj.make_filename(file_index), "wb")
save_obj.write_save_data(file)
file.close
end
end
The syntax is:
Scene_Save.save(slot)For example
Scene_Save.save(0) saves to the first slot and
Scene_Save.save(3) saves to the last slot.
*hugs*
- Zeriab
Thanks Zeriab!
Wierd thing is I used the event syntax and put it into a script. Then I customized it a little. This is actually much better. Thanks!
*powers up*
@Zeriab: Might I ask, why make a new object? Wouldn't something like this do?
class Scene_Save
def self.save(file_index)
file = File.open(make_filename(file_index), 'wb')
write_save_data(file)
file.close
end
end
EDIT: nvm, I got why, I'm so stupid >.<
Oh wow...very nice job Zeriab!