(XP) Requesting some tweaks to Battle Dome System.

Started by Scoryth, July 12, 2012, 09:21:30 am

Previous topic - Next topic

Scoryth

I'm using Nathmatt's Battle Dome with Blizz-ABS. There are a couple of things I would like to tweak to the Battle Dome system because I'm kind of OCD about it lol. First, after you kill the last enemy in battle, I would like there to be some kind of short gap in time between the defeat of the last enemy and the pop up of the results screen. Currently, as the last enemy dies, it instantly pops up, and I just want a little bit of time in between that. For example, in the DBS, once you kill the last enemy, there's usually a second or so that goes by before the results box appears. I'd like something like that - just a brief moment from defeat to screen.

Second, I'd like there to be a way to pause the action to cast a spell's animation. For example, say an enemy is casting a really epic attack. I'd like something that pauses the action so the animation can fully run. Then once the animation is complete, the damage pops occur and play resumes. Something along the lines of Secret of Mana or Secret of Evermore, if you're familiar with those games. During spell animations, all characters are paused, the animation plays, then damage pops and play continues.

If my descriptions are difficult to understand, feel free to ask so I can clarify.

Here is Nathmatt's Battle Dome system.
http://forum.chaos-project.com/index.php/topic,3183.0.html

Thanks for any help you can provide.

ThallionDarkshine

The first thing I can do, the second seems a lot harder.

Go to line #235 of the second part of the battle dome script. Enter this code:

wait_count = 0
loop do
    break if wait_count = Graphics.frame_count * 2
    wait_count += 1
end


That should work, but let me know if you have any problems.

ForeverZer0

@Thallion:
That is incorrect. It will simply go on until a "script is hanging" error crashes the game.

If you want only a pause, without anything else updating, you can even use a stupid method like this:

def wait(frames = 40)
 loop { Graphic.update; break if frames <= 0; frames -= 1  }
end


You can simply insert a call to that method anywhere you please and it will suspend script processing right there for the given number of frames.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

ThallionDarkshine

Yeah, I forgot the graphics.update and double equals signs. Here's the updated code:

wait_count = 0
loop do
    Graphics.update
    wait_count += 1
    break if wait_count == Graphics.frame_count * 2
end

KK20

That's still not going to work Thallion. Every time you call Graphics.update the 'frame_count' increases by one. 'wait_count' is never going to catch up to 'Graphics.frame_count * 2', creating a 'Script is hanging'.

And even if you do drop the Graphics.update, 'frame_count' may be a ridiculous high value. That loop would have to wait a looooooooooong time before 'wait_count' could ever catch up to it.

The suggestion that FZer0 posted is the most logical. Set a timer, count it down by one, and when it reaches zero, stop.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

Line 193.

@phase = 4 if $game_map.battlers_group(BlizzABS::Alignments::ENEMY_GROUP).size == 0


Change it to:

if $game_map.battlers_group(BlizzABS::Alignments::ENEMY_GROUP).size == 0
  @phase = 4
  self.delay(40) # 40 frames = 1 second
end
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

Quote from: Blizzard on August 04, 2012, 02:32:32 am
Line 193.

@phase = 4 if $game_map.battlers_group(BlizzABS::Alignments::ENEMY_GROUP).size == 0


Change it to:

if $game_map.battlers_group(BlizzABS::Alignments::ENEMY_GROUP).size == 0
  @phase = 4
  self.delay(1) #number of seconds
end



edit: my method already multiplies it by 40
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


ThallionDarkshine

I realized that I used the wrong variable:

wait_count = 0
loop do
    Graphics.update
    wait_count += 1
    break if wait_count == Graphics.frame_rate * 2
end