Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,013
First Language
English
Primarily Uses
RMVXA
In XP you had an event command to play a battle transition, so it could, if you wanted it to, play anywhere.


Now battle transitions have been incorporated into the whole battle processing.  However, I would like to be able to play a particular battle transition on an ordinary map.  Is this possible?  Maybe with a script call?  Maybe with some other cunning trick?


Thanks
 

GGZiron

Veteran
Veteran
Joined
Nov 6, 2016
Messages
102
Reaction score
48
First Language
Bulgarian
Primarily Uses
RMMZ
I don't know how helpful this will be, but I found the battle transition is defined here:

Code:
def perform_battle_transition
    Graphics.transition(60, "Graphics/System/BattleStart", 100)
    Graphics.freeze
  end

That is in the Scene_Map class, row 254. I think the first digit (60) is the frames you wait, then the filename for graphics, the other digit cannot exactly figure what it is for.


For pre battle scene(sound included), i found this:

Code:
def pre_battle_scene
    Graphics.update
    Graphics.freeze
    @spriteset.dispose_characters
    BattleManager.save_bgm_and_bgs
    BattleManager.play_battle_bgm
    Sound.play_battle_start
  end

That is in the same class (Scene_Map), row 237.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,013
First Language
English
Primarily Uses
RMVXA
I think you're right that it is somehow linked with this.  However, if I try a script call with this

Code:
Graphics.transition(60, "Graphics/System/BattleStart", 100)
    Graphics.freeze

(though with the name of a different transition graphic) it doesn't display properly and goes into a sort of loop.


If I include the 'end' line, I get an error message that it doesn't like that, and if I include the line 

Code:
perform_battle_transition

I get another error message.
 

GGZiron

Veteran
Veteran
Joined
Nov 6, 2016
Messages
102
Reaction score
48
First Language
Bulgarian
Primarily Uses
RMMZ
I don't think you should call it this way. If you don't plan to use the default, maybe you could overwrite it under materials?

Code:
class Scene_Map < Scene_Base

  def perform_battle_transition
    Graphics.transition(60, "Graphics/System/BattleStart", 100) #but with your graphic instead
    Graphics.freeze
  end
  
end

If you plan to use with default, maybe some conditions ll help?

Code:
class Scene_Map < Scene_Base
  
  def perform_battle_transition

    Graphics.transition(60, "Graphics/System/BattleStart", 100) if $game_variables[100] == 0# variable 100 from event is default

    Graphics.transition(60, "Graphics/System/BattleStart", 100) if $game_variables[100] == 1# variable 100 from event is 1

    #add more rows with this logic

    Graphics.freeze

  end

  

end

In my second example, you only will need to change variable 100 before to call a battle normally(if you want different variable, just replace the number between [ ] )


You can change each row graphic file.


In first example, you just call the battle normally. Now when i think of it, instead first example you could just change the graphic file from graphics/system folder.
 
Last edited by a moderator:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,013
First Language
English
Primarily Uses
RMVXA
Ah, I should explain.


For battles I shall continue to use 'BattleStart' graphic (though it's not the default one).


I want, however, to be able to use a battle transition instead of fadeout/fadein for some things - using a different graphic than the one for battles.  This will be on the map, no battle involved.


For that scenario, could I add the line

Code:
Graphics.transition(60, "Graphics/System/BattleStart", 100) if $game_variables[100] == 1# variable 100 from event is 1

to the main script?  I could turn on e.g. variable 200 before showing the transition and have a different graphic name in that line?  So my mod the default script (placed under the existing line) would be


Graphics.transition(60, "Graphics/System/Transition03", 100) if $game_variables[200] == 1# variable 100 from event is default Graphics.transition(60, "Graphics/System/Transition02, 100) if $game_variables[200] == 2# variable 100 from event is 1


But how would I call this from an ordinary event?
 

GGZiron

Veteran
Veteran
Joined
Nov 6, 2016
Messages
102
Reaction score
48
First Language
Bulgarian
Primarily Uses
RMMZ
As you did it, without the

Code:
if $game_variables[100] == 1# variable 100 from event is 1

should work, but doesn't. I think it actually calls the method, because got no crash either, but i think we forget something.


If you script call Graphics.freeze , it works, as It's effect is exactly to freeze your screen.


Well, hope someone more experienced can help.
 
Last edited by a moderator:
  • Like
Reactions: Kes

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,434
Reaction score
606
First Language
Italian
Primarily Uses
RMVXA
@GGZiron Well, Graphics.transition is actually working in your case. What you're missing it the fact that you are probably trying it in the same map (or in a similar map). What the transition does is fill the black part in the image with the new image and the white part with the old one, then the black part expands toward the white one and overwrites it (to put it simple).


@ksjp17 to use it in an ordinary event let your event freeze the graphics using Graphics.freeze, then transfer the player in the new map and, after transfering the player, use the Graphic.transition method. Keep in mind that the more similar the two maps are, the less visible your transition will be. If you test it in the same map you will NEVER get the feeling of it being played.


In general, a good way to display your transition is to tint your screen (black or white, up to you), freeze the graphics, then tint the screen back to its original color and after that use the transition. If you do that you can see it working even while testing it in the same map.


EDIT: here is an image of how my event looks like (this will actually work in the same map too).

Immagine.png

Of course you can edit the event to put anything you want between the second Tint Screen and the Graphics.transition.
 
Last edited by a moderator:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,013
First Language
English
Primarily Uses
RMVXA
Nearly there.  However, what is happening is that in addition to the transition graphic showing on the map, it is sort of repeating itself where the message box would be, if there was a message displayed, which there isn't.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,434
Reaction score
606
First Language
Italian
Primarily Uses
RMVXA
Mmm, that's strange because even when there is a window on the screen, the Graphics.transition should work on the whole screen (including the window). Are you using any script? Did you test it in a blank project?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,013
First Language
English
Primarily Uses
RMVXA
It looks like it's Yanfly Ace Core Engine - which is something I simply cannot do without.  It's not quite the full depth of the message box, but it's the same location on screen.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,434
Reaction score
606
First Language
Italian
Primarily Uses
RMVXA
Yes, that script resizes your screen as well, that means your transition image will be repeated. I am just guessing because I didn't check Yanfly's script yet but I think resizing your transition image with the new screen size given by YEA-CoreEngine should work.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,013
First Language
English
Primarily Uses
RMVXA
Of course!! Thank you, my brain is so addled atm that I never thought of it.  Now everything is just exactly how I want it.


Thanks to both of you for rescuing my idea from the trash heap where I was about to consign it.  I am most grateful.


Closing
 
Last edited by a moderator:
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

At work.
Co: "This bug drove me insane. I tried a lot of things to debug, it just stuck".
Me: "How did you debug it?"
Co: *shows a complicated debugging method using breakpoints and everything*
Me: "What about ... " *casually prints a stack trace in the try/catch exception
Co: "Wait, you can do that??"
Totally original and unique OC
Harold.png
So after completing the Mass Effect Trilogy the first time as a Vanguard, I decided to replay the trilogy as a Soldier. Thus far, I've just finished the Horizon mission in ME2, and I'm already exhausted from ME2's f**k-awful enemy design.
Yeah, now Yes !!!! "boom boom "
"Fire the monsters, guards!!!"

index.php
I can't stop buying resource packs I'll never use, or engines for that matter, or free resources as my two terabyte external will attest. I am a digital hoarder I guess. Some people get drunk off the silly juice when they are bored, I just buy shiny digital nonsense I don't need.

Forum statistics

Threads
118,648
Messages
1,117,551
Members
155,749
Latest member
MattDevloG
Top