Disposing Windows in Battle Scene

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Welcome Message
Hello everybody!
I'm having a little problem here.
 
Problem Description
I'm trying to make a window in Scene_Battle, where some information would be shown (variable and stuff - it doesn't matter here).
The thing is, I know how to make a window and it appears in battle scene, but it gets disposed when character's turn comes doesn't appear back.
I'm suspecting MOG's ATB is causing this, but I'm not sure.
 
Visual Demonstration
Basically, that's how that looks.

And what happens when turn comes:
 
Summary
As you can see, the window simply disappears and I have no idea how to prevent that. Am I doing something wrong, or it's because of MOG's ATB?
 
Additional Information
What is in the window is not important - I just want to make a transparent window with some information in it.
 
References
1) This is the very basic script for my window.
#-< ҉ >---< Initialize >----------------------------------------------------class Window_WutWindow < Window_Basedef initialize(x, y)super(x, y, 200, 48)self.opacity = 50refreshend#-< ҉ >---< Draw Content >----------------------------------------------------def refreshself.contents.clearself.contents.draw_text(0, 0, 150, 24, "BOX OF FUN", 0)end # Refreshend # class#-< ҉ >---< Create window in Battle Scene >------------------------------------class Scene_Battle < Scene_Base#-< ҉ >---< Start >---------------------------------------------------------alias wutwindow_start startdef startwutwindow_startcreate_wutwindow_windowend#-< ҉ >---< Create WUT Window >----------------------------------def create_wutwindow_window@wutwindow_window = Window_WutWindow.new(50, 50)endend#=[ ҉ ]===[ END ]===============================================================
If there's something missing, that causes this - I'd appreciate your help.
2) Just in case here's the MOG's ATB Script + Battle HUD.
There is the whole HUD drawn, so if it's possible to add that information (window) here, then I'd also appreciate your help.
 
Farewell Message
Does anybody know what causes this and how to prevent that window from disposing?
Thank you in advance.

Origin of Thread
Firstly I asked that question on the other thread ~ And so far I got and tried this, but the same thing happens.
Hello again,
QUESTION: how to create a window in battle scene? I'd like to draw text, numbers, gauges and other stuff in battle scene.  *properly*
EXAMPLE: Draw a text and variable next to it for example in the upper-right corner in battle scene.
WHAT I HAVE TRIED: I made a simple window like many others, but in battle scene the window is disposed IDK why when character's turn comes. Is there another more efficient way to do this?
Is there something to add here to prevent that or I need to make it completely in different way? If so, I think I'll create a thread for this.
Thank you in advance.
Maybe like this?

Code:
class Scene_Battle < Scene_Base  alias :rikifive_random_alias_create_all_windows_4C3n :create_all_windows  def create_all_windows    rikifive_random_alias_create_all_windows_4C3n    create_hud_window  end  def create_hud_window    viewport = Viewport.new    viewport.ox = Graphics.width - 100    viewport.z = 150    @hud_window = Window_RikifiveHUD.new    @hud_window.viewport = viewport    # And maybe add some set_handler's here if your window is selectable ...  endendclass Window_RikifiveHUD < Window_Base  def initialize    super(0, 0, 100, 100)    # And other things...  endend
 
Last edited by a moderator:

KockaAdmiralac

Cube-shaped garbage can
Veteran
Joined
Jun 15, 2015
Messages
569
Reaction score
153
First Language
Serbian
Primarily Uses
N/A
I think the problem is in the MOG Battle System or Battle HUD.

I tested it with YEA Battle Engine and Yami Engine Symphony, and the window appeared...

I'll try to find out what's the problem and I'll edit this post then.

EDIT : Or not. I'll just post it down there.
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
The window appears, but it's disposed right after one of characters' ATB gauge fills up and command window pops out.

I think adding 'that window' in MOG's script among with the battle HUD etc. could solve the problem, but I'm not sure.
 

KockaAdmiralac

Cube-shaped garbage can
Veteran
Joined
Jun 15, 2015
Messages
569
Reaction score
153
First Language
Serbian
Primarily Uses
N/A
I know what you mean.

This code works for me :

Code:
class Scene_Battle < Scene_Base  alias :rikifive_random_alias_create_all_windows_4C3n :create_all_windows  def create_all_windows    rikifive_random_alias_create_all_windows_4C3n    create_hud_window  end  def create_hud_window    viewport = Viewport.new    viewport.ox = Graphics.width - 100    viewport.z = 1000    @hud_window = Window_RikifiveHUD.new    @hud_window.viewport = viewport    # And maybe add some set_handler's here if your window is selectable ...  endendclass Window_RikifiveHUD < Window_Base  def initialize    super(0, 0, 100, 100)    self.z = 150    # And other things...  end  def update    super    self.visible = true unless self.visible  endend
 
Last edited by a moderator:

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
Yes it works (though some flickering can be sometimes noticed) ~ but still works. =)

So basically, that was the answer:

self.visible = true unless self.visible

=)

Have you found why is that happening?
 

KockaAdmiralac

Cube-shaped garbage can
Veteran
Joined
Jun 15, 2015
Messages
569
Reaction score
153
First Language
Serbian
Primarily Uses
N/A
Nope.

But I found out the window is snapping to invisibility whenever command window opens.

I'm not quite a fan of MOG scripts, so I didn't want to look WHY is that actually happening.

This may be less performance-friendly, but working for now...
 

Rikifive

Bringer of Happiness
Veteran
Joined
Jun 21, 2015
Messages
1,441
Reaction score
680
First Language
Polish
Primarily Uses
Other
I see. Perhaps I'll try to find that later.

Thanks for help.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top