The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: MrMoo on April 29, 2009, 03:05:03 PM

Title: [RESOLVED]RMXP Style Battle Transitions
Post by: MrMoo on April 29, 2009, 03:05:03 PM
RMXP Style Transitions
April 29 2009




Summary
I've searched all the major sites and I could only find rmxp styled map transitions. I want something similar where there's no fade to black during battle transitions, just like in rmxp. It should just use the transition image to do a straight cut into the battle with no color fades. I've tried looking around the game scripts and was stumped as to what I should edit. I have a feeling it might be in Scene_Map or Game_Map. I found a section about transitions in Scene_Map but from the looks of it, it seems that is for the transition out of battle, which I do not want to change by the way.

In short, I want a snippet, edit, or even full blown script to recreate the battle transition style of RMXP. This should not affect transitions in maps, or after battle. Thanks in advance to whoever chooses to tackle this.

Features Desired

Mockups
I'm going to assume everyone here knows what the RMXP transitions are like.

Games its been in




Did you search?
Yes

Where did you search?

What did you search for?
Title: Re: [REQUEST]RMXP Style Battle Transitions
Post by: modern algebra on May 07, 2009, 02:50:08 AM
I can look into it. No promises though.
Title: Re: [REQUEST]RMXP Style Battle Transitions
Post by: modern algebra on May 07, 2009, 03:18:34 AM
OK, this is easy. But it looks weird because of the way that battlebacks appear in VX. Since they looks similar to the map, it has a weird, IDK. You can see it when you try it.

Placing this in a new script entry between Materials and Main ought to work:


class Scene_Map
  def perform_battle_transition
  end
end

class Scene_Battle
  def perform_transition
    Graphics.transition(80, "Graphics/System/BattleStart", 0)
  end
end
Title: Re: [RESOLVED]RMXP Style Battle Transitions
Post by: MrMoo on May 08, 2009, 07:44:36 PM
Ah thanks MA. It does work, and I guess it's cause when you test it, you were probably using the default battle system's wavy background thing. I haven't tried it on my main game yet, but it'll probably look better depending on your transition and battle backs.

Also, after playing around with it, I think setting the last digit to somewhere around 40-60 will make the transition more smooth like in the style of XP. As with 0 everything will appear like a straight line transition.
Title: Re: [RESOLVED]RMXP Style Battle Transitions
Post by: modern algebra on May 08, 2009, 07:46:55 PM
Yeah, probably it will look better with battlebacks. If you want, I could make it so that it doesn't always need to be the same transition graphic, by the way. Just tell me how you would like the system to know when to switch transitions.
Title: Re: [RESOLVED]RMXP Style Battle Transitions
Post by: MrMoo on May 08, 2009, 08:21:47 PM
That would be great actually, and will also help with testing out multiple transitions without having to constantly restart the game.
Perhaps have a script option of either random or selected transition. Random would simply use any transitions present in the game folder and script, and selection transitions would probably use a call script function. A call script can also be used to switch between random and selection mode.
Title: Re: [RESOLVED]RMXP Style Battle Transitions
Post by: modern algebra on May 09, 2009, 02:16:10 AM
I don't want to make a new folder in Graphics because there are ways for that to cause problems when making encrypted data. Instead, you can put the transition graphics in System. I have this:

class Game_System
  attr_writer :transition_graphic
  def transition_graphic
    random_transitions = ["BattleStart"]
    return @transition_graphic unless @transition_graphic == nil
    r_int = rand (random_transitions.size)
    return random_transitions[r_int]
  end
end

class Scene_Map
  def perform_battle_transition
    Graphics.freeze
  end
end

class Scene_Battle
  def perform_transition
    Graphics.transition(80, "Graphics/System/" + $game_system.transition_graphic)
  end
end


To set up what files can be used as transitions, merely include its name in the array at the top, so this thing:


    random_transitions = ["BattleStart"]


To add more, just place a comma and the next filename in quotes, like:


    random_transitions = ["BattleStart", "transitionfile2", "transitionfile3", etc...]


By default, it will randomly select from that array. You can set a specific transition graphic with this code in a call script:


$game_system.transition_graphic = "filename"


To set it back to random, use this:


$game_system.transition_graphic = nil
Title: Re: [RESOLVED]RMXP Style Battle Transitions
Post by: MrMoo on May 09, 2009, 06:06:44 PM
Thanks MA, this will definitely help in my testing. Thanks for taking the request and more.