Tsukihime 1,487 Posted May 12, 2013 (edited) This script allows you to set up troop event pages as "post battle" events. These events will run after the battle is over, but before the game leaves the battle scene. It allows you to run extra events that should occur after the victory/defeat messages. Download Get it at Hime Works! Installation Place this script below Materials and above Main Usage To set a post-battle event page, add one of the following comments <post battle victory> - runs after victory <post battle defeat> - runs after defeat The page will automatically be run when the condition is met. Compatibility This script overwrites the default victory and defeat processing methods, but they only add an extra line. If you are using a script that also overwrites one of these methods, you can just copy the appropriate line into your own code process_post_victory_event process_post_defeat_event And it will work. Edited March 2, 2015 by Tsukihime 1 Bunni89 reacted to this Share this post Link to post Share on other sites
magic2345 252 Posted May 12, 2013 Haha, this is a very interesting script. There are lots of things this would be useful for, nice idea there Tsukihime. Share this post Link to post Share on other sites
Coolie 147 Posted May 12, 2013 There's a small typo on line 92, "Th" needs to be "TH" for the module reference. Share this post Link to post Share on other sites
Tsukihime 1,487 Posted May 12, 2013 I fixed it in my project but didn't copy it over lol Thanks. Share this post Link to post Share on other sites
Tsukihime 1,487 Posted August 11, 2013 (edited) I have updated the script to make it easier to handle compatibility issues. The main problem is that this script overwrites the default victory and defeat processing methods, but they only add an extra line. If you are using a script that also overwrites one of these methods, you can just copy the appropriate line into your own code process_post_victory_event process_post_defeat_event And it will work. Edited August 11, 2013 by Tsukihime Share this post Link to post Share on other sites
sean2099 3 Posted August 22, 2013 (edited) How would I set it up if I want a skill where if the player reaches zero or less hp, it would have a chance to resurrect him and not go to the gameover screen. edit - I will get it a whirl and see what happens. So, you don't think it can be run as a common event? Edited August 22, 2013 by sean2099 1 Frysning reacted to this Share this post Link to post Share on other sites
Tsukihime 1,487 Posted August 22, 2013 (edited) Not with this script. These are events that occur after the battle is over. You might be able to do it with End Phase Triggers where your skill adds a state, and then once you die (eg: actor HP 0% or less, or maybe you will need custom page conditions), you would run the event and try to revive the actor. Edited August 22, 2013 by Tsukihime Share this post Link to post Share on other sites
HumanNinja 144 Posted March 19, 2014 Another great script. This is a really cool aftermath type script and so easy to use. You da man! Share this post Link to post Share on other sites
Apostrophe 2 Posted March 21, 2014 (edited) Looking for some help, I'm having a bit of a problem with this script and not sure how to work it out. This is my Battle Event tab: Comment: <post battle defeat> Fadeout Screen Abort Battle Control Variables: [0004:Died_Map] = Map ID Control Variables: [0005:Died_Loc_X] = Players Map X Control Variables: [0006:Died_Loc_Y] = Players Map Y Transfer Player: [024: Afterlife] (008,018), Up, None Fadein Screen ... ... What is supposed to happen, is at your defeat, the screen fades out, you return to the map where it collects the location you were at when you died, you're transferred to an "Afterlife" map, the screen fades in, and you have a conversation before a "recover all" is run and then you are returned to the location you died. All the player should see is the game fade out after being defeated and then fade in at the "Afterlife" map and have the discussion as the game continues. What actually happens is the screen fades out, then the screen fades back in (still on the battle screen, but minus the HUD) and you have the conversation right there on the battle screen. After the conversation completes, the battle screen fades out to the Game Over screen... Edit: Revised what actually happens more accurately. Edited March 21, 2014 by Apostrophe Share this post Link to post Share on other sites
Tsukihime 1,487 Posted March 21, 2014 That's what the script does: it plays things out in the battle scene after the battle is finished. Share this post Link to post Share on other sites
Apostrophe 2 Posted March 21, 2014 (edited) Sure, but shouldn't it leave the battle when I specifically ask it to using Abort Battle or give me the opportunity to stop myself from dying if I do a Recover All? Edited March 21, 2014 by Apostrophe Share this post Link to post Share on other sites
HumanNinja 144 Posted March 21, 2014 When everyone dies in battle then I'm pretty sure that's it. You may be wanting one of those 'gameover with options' scripts Share this post Link to post Share on other sites
Tsukihime 1,487 Posted March 21, 2014 (edited) Sure, but shouldn't it leave the battle when I specifically ask it to using Abort Battle or give me the opportunity to stop myself from dying if I do a Recover All? This script is specifically for events that should happen after you either win or lose. You can use End Phase Triggers if you want to abort the battle if the defeat condition has been met (by default, everyone dies) Edited March 21, 2014 by Tsukihime Share this post Link to post Share on other sites
Apostrophe 2 Posted March 21, 2014 When everyone dies in battle then I'm pretty sure that's it. You may be wanting one of those 'gameover with options' scripts Well, yes and no. It's like this. In my game, you control a one-person party for the entire game. Should he be defeated in battle, instead of the battle fading out to a game over screen, it fades out and then in to another map where you talk to a special character who warns you that he will return you to life just once, so you better get used to saving your game. Then he returns you to the exact spot you died. Should you die again, the game checks to see if the switch is active and then the battle fades out to the familiar "Game Over" screen. But you definitely shouldn't see the "Game Over" screen the first time you die, since that's where you meet this special character. It's similar to other past RPGs, like the original Dragon Warrior (where death sends you to the King who takes half your gold and lets you continue,) Dragon Fantasy (where death sends you to the Church with half your gold,) or Final Fantasy Legend II (where death sends you to Odin who returns you to where you died as long as you promise to fight him one day.) At first, I tried doing this via Kread-Ex's "Game Over Common Event" script, but that fades out of the battle and into the map you were on previously before running. So instead of a seamless transition from death in battle to the afterlife location, the player sees your character standing there alive for a moment before the Common Event script kicks in. That's why I was hoping this script would work, so I would be able to fade out the battle and transfer to the afterlife map without (the player seeing your character) returning, alive, to the map he was on before he died. This script is specifically for events that should happen after you either win or lose. You can use End Phase Triggers if you want to abort the battle if the defeat condition has been met (by default, everyone dies) Okay, I'll take a look at that one and see if it can accomplish what I'm trying to do. Thanks. Share this post Link to post Share on other sites