Jump to content

Recommended Posts

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.

 

event_postbattle1.gif

 

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.

 

event_postbattle2.jpg

 

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 by Tsukihime

Share this post


Link to post
Share on other sites

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.

event_postbattle2.jpg

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 by Tsukihime

Share this post


Link to post
Share on other sites

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 by sean2099

Share this post


Link to post
Share on other sites

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 by Tsukihime

Share this post


Link to post
Share on other sites

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 by Apostrophe

Share this post


Link to post
Share on other sites

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 by Apostrophe

Share this post


Link to post
Share on other sites

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

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 by Tsukihime

Share this post


Link to post
Share on other sites

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×