tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
817
Reaction score
1,422
First Language
English
Primarily Uses
N/A
RestoreBattle - Version 1.00 (2017/1/14)

Creator name: Trb

Overview
Allows you to save in battle and resume the battle from the battle save.

Features
- Save and restore is done through plugin commands.
- To reset the battle save, run the script
Code:
$gameSystem._battleSaveData = []

<Plugin Command>
Code:
SaveBattle
Saves the previous battle state.
If you want to save multiple times, add a number like "SaveBattle 1" or "SaveBattle 2"

Code:
RestoreBattle
Before the battle event, you can restore from battle save.
If multiple files are saved, restored the data with “RestoreBattle 1” or “RestoreBattle 2”

Note: plugin commands for this plugin are not case sensitive. SAVEBATTLE and savebattle can be used.

Event Sample)
Lwl9Vtm.png


Battle with one Minotaur and two bats.
fsY5c8Q.png


After defeating two bats and then escape-
(SaveBattle was used)
RB7ARrG.png

[Harold escaped!]

Retry the battle: only Minotaur remains
(RestoreBattle 1 restore the state from SaveBattle 1)
m1wTBJb.png

[Minotaur appears!]

Credit and Thanks: Trb

Terms of Use- Free for commercial and non-commercial use.

License - MIT License: http://opensource.org/licenses/mit-license.php

You can download js file from the thread attachment or Dropbox link: https://www.dropbox.com/s/68qehkaoew47j5u/Trb_RestoreBattle.js?dl=1
 

Attachments

  • Trb_RestoreBattle.js
    2.9 KB · Views: 12

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
154
Reaction score
46
First Language
English
Primarily Uses
RMMV
This could be used for a Reset skill. I’ll have to try this out.
 

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
154
Reaction score
46
First Language
English
Primarily Uses
RMMV
@tale is there a way to reset mid-battle? i was unable to accomplish this using a skill common event.
 

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
817
Reaction score
1,422
First Language
English
Primarily Uses
N/A
@dragonx777 Reset battle save does not mean it resets the battle process you're in.
If you reset battle save in battle, technically you're erasing battle save.
Plugin meant to handle saves while entering (restore) or escaping (save) battle.
 

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
154
Reaction score
46
First Language
English
Primarily Uses
RMMV
Darn. Well that makes sense. Would there be a way to edit the plugin to have that optional functionality?
 

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
817
Reaction score
1,422
First Language
English
Primarily Uses
N/A
Restart Battle would probably be separate plugin/ add-on.

I found a script call that does the trick. If you're using it for skill, set Scope to None.
Code:
BattleManager.setup($gameTroop._troopId, true, false);
SceneManager.push(Scene_Battle);

If you want fully recovered party.
Code:
BattleManager.setup($gameTroop._troopId, true, false);
SceneManager.push(Scene_Battle);

$gameParty.members().forEach(function(m){
 m.recoverAll();
});

However it looks a bit clutter due to extra message windows from escape, victory, etc..

Maybe someone who's more familiar with javascript could make this a lot neater to handle.

During my test with Battle processing script call-
After Minotaur is gone and two bats remains, I escaped.
I tried battle again with two bats, then I used script call to restart.
It brings back the Minotaur. It works, except not used with functionality of RestoreBattle.

Note: script call actually starts another battle processing of the same encounter. If you escape a battle after script call, ends up repeating encounter.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I just did some math and... apparently what seemed to be a little fun gimmick turned out to be an 80+ actors project :kaoswt2:
Yay! the original character contest 3 pack is here!
Both MV and MZ looks very good, congratulation for both RMW and Tkool participant!
I definitely can add these characters to use for my game project.

Steam link
The worst part of game development has to be marketing. Ugh...
May be starting a new job in a month or so. The thought is both exciting and terrifying.
Not like a rollercoaster though. Rollercoasters are just terrifying.
"Merchants don't sell you a product. They sell you something RIGHT NOW. That's all they're selling, the product of having what you want RIGHT NOW and not having to wait for it."

Forum statistics

Threads
112,476
Messages
1,068,551
Members
146,143
Latest member
marquez19marissa
Top