Can you make a window invisible?

Bya

Villager
Member
Joined
Oct 30, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
This is pretty self explanatory. I have that blue window there, which has my characters and their health icons. Is there a way to make that particular window invisible, so it only shows my characters? I'm using Molegato's custom battle status config.

Untitled.png
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
There's no side view battle in the Ace RTP.  What battle script are you using?  Please provide a link.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.



Any change can be done by scripting, but as Shaz said we need to know which script is responsible for the window you want to be changed - and that is NOT a default windows, you need to give us the links to the battlescripts you're using before we can offer any advice.
 

Bya

Villager
Member
Joined
Oct 30, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
Like I said before, I was using Molegato's custom script. 


http://hastebin.com/aliloyevep.rb is the config script that I edit


http://hastebin.com/idofoyosok.rb is what it pulls from, which I don't touch


You're right in that there's no side view, as it's technically the base window which I've just moved around and scaled.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
From what I can read in the second link (the actual script) every window has its own opacity described in the config code. You can change the opacity of every window you want to change there. If you want it to be full transparent set it to be 0. If you only want the battle status window to be transparent then change the config script under "status window" and set OPACITY to 0.


We could argue about how it looks after that, having a single transparent window while every other window is not can be quite hugly, but that's up to you. Just keep in mind that changing windows opacity (opacity goes from 0 to 255) will make them more transparent (if you reduce it) or less transparent (if you increase it). With this in mind you should be able to handle it on your own ;)


I hope this helps.
 
Last edited by a moderator:

Bya

Villager
Member
Joined
Oct 30, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
Thank you so much, that's perfect!
 

Bya

Villager
Member
Joined
Oct 30, 2016
Messages
8
Reaction score
0
First Language
English
Primarily Uses
I had another question on this topic, however. When I select Fight instead of Escape, my window moves to the left slightly. I've tried a bunch of stuff out but I haven't been able to stop it from doing that. I'd be ok with having it off screen and then slide into view, but I can't get that to work either.

Untitled.png
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
A way to let the window "slide" is to let the window hide when it slides on the right and then show it when it slides on the left.

@window_name.hide #this is to hide your window
@window_name.show #this is to show your window

#@window_name is the window you want to hide/show.



But for what I can see it seems that the script you're using doesn't handle the status window in the Scene_Battle code. That explains why your window moves...in the default Scene_Battle it moves because the viewport moves as well.



So if you want to display your battle status window only then selecting your actions just add this to your scripts:

Code:
class Scene_Battle < Scene_Base
	def move_info_viewport(ox)
    	current_ox = @info_viewport.ox
    	@info_viewport.ox = [ox, current_ox + 16].min if current_ox < ox
    	@info_viewport.ox = [ox, current_ox - 16].max if current_ox > ox
    	if @actor_command_window.active
      		@status_window.show
    	end
    	if (@party_command_window.active || BattleManager.in_turn?)
      		@status_window.hide
    	end
  	end
end



If you want to display your battle status when skill animations are displayed then add this one:

Code:
class Scene_Battle < Scene_Base
	def move_info_viewport(ox)
    	current_ox = @info_viewport.ox
    	@info_viewport.ox = [ox, current_ox + 16].min if current_ox < ox
    	@info_viewport.ox = [ox, current_ox - 16].max if current_ox > ox
    	if @actor_command_window.active
      		@status_window.show
    	end
    	if @party_command_window.active
      		@status_window.hide
    	end
  	end
end
Keep in mind that with this one the status window will actually move when animations are displayed.



EDIT: another thing you could do (and it will probably look better) is to change your window opacity when moving it so that when the animations are displayed it appears to be semi-transparent, when you are selecting your actions it appears blue.


EDIT2: Another way to change it to stay in a fixed spot should be this one (add this BEFORE your custom battle window script):

class Scene_Battle < Scene_Base
def create_info_viewport
@info_viewport = Viewport.new
@info_viewport.rect.y = Graphics.height - @status_window.height
@info_viewport.rect.height = @status_window.height
@info_viewport.z = 100
@info_viewport.ox = 64
@status_window.viewport = @viewport
end
end



This will bind your status window to another viewport (not the one who is being moved) so it should stay in a fixed spot.


IMPORTANT: depending on your other windows configuration it can cause windows to overlap. So be careful when using it and be sure to configure other windows properly.
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
823
First Language
Hungarian
Primarily Uses
RMVXA
class Scene_Battle < Scene_Base
def create_info_viewport
@info_viewport = Viewport.new
@info_viewport.rect.y = Graphics.height - @status_window.height
@info_viewport.rect.height = @status_window.height
@info_viewport.z = 100
@info_viewport.ox = 64
@status_window.viewport = @viewport
end
end


You will use the main viewport for your status window if you do that, and that means that you will need to re-position your status window as well, because the main viewport's position is different than the one used for the status window (it's Y position, height and ox properties are different).


Also, the actor and party command windows are using the viewport used by the status window as well, so unless the battle HUD script used changes that, you will have to deal with those 2 windows as well.


To stop the sliding completely, all you have to do is remove everything in the move_info_viewport method found in the Scene_Battle class, just comment everything out there.


If you want to move the window to a different position, find all move_info_viewport calls in the Scene_Battle class, and change it's argument to whatever you want. That argument is the distance in pixels to move to the left.


If you want to move the direct position of your window, and with that, the area where the window can slide, you should set the X position of the @info_viewport viewport found in the Scene_Battle class. Doing this and changing the sliding distance (and speed if you want slower/quicker slide effect) of the viewport, you can slide these windows in from the right side of the screen. It takes a bit of testing to get this right, but when you get how these stuffs work, it will be easy.


Bottom line...


The status, actor command and party command windows are all connected with the same viewport (by default). You must consider this if you want to change their position/viewport.
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,048
Messages
1,018,545
Members
137,834
Latest member
EverNoir
Top