Question about transparant backgrounds

Status
Not open for further replies.

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I've been replacing transparent text boxes with pictures lately to try and give my game its own unique look.  But I've ran into a slight problem.  I can't figure out how to make the message windows for the Show Choices event command transparent and it's clashing pretty bad with my pictures.  Is there any way to solve this?
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
A temporary solution: you can import a transparent Window.png file to your project (but leave the coloured blocks and arrows) which will show up as nothing being there in-game.


Though this also means you'll have a transparent menu.
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
paste this somewhere at the bottom of your scripts:

You'll have to make a windowskin like Celianna said but use your png, but replace the blue part of the window with your png.

Replace "WIndowSkinFileName" with the name of the file you made. Then pick a switch in game in replace the "1" with the id of the switch you choose and turn the switch on whenever you want to use the transparent png for your choices and then turn it off once you're done.

Code:
class Window_ChoiceList < Window_Command  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  alias berylstone_background_initialize initialize  def initialize(message_window)    berylstone_background_initialize(message_window)    self.windowskin = Cache.system("WIndowSkinFileName") if $game_switches[1]  endend 
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
A temporary solution: you can import a transparent Window.png file to your project (but leave the coloured blocks and arrows) which will show up as nothing being there in-game.

Though this also means you'll have a transparent menu.
After I import the file into my project's system folder how do I make it load into my game so that it uses that file instead of the original?

paste this somewhere at the bottom of your scripts:

You'll have to make a windowskin like Celianna said but use your png, but replace the blue part of the window with your png.

Replace "WIndowSkinFileName" with the name of the file you made. Then pick a switch in game in replace the "1" with the id of the switch you choose and turn the switch on whenever you want to use the transparent png for your choices and then turn it off once you're done.

class Window_ChoiceList < Window_Command  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  alias berylstone_background_initialize initialize  def initialize(message_window)    berylstone_background_initialize(message_window)    self.windowskin = Cache.system("WIndowSkinFileName") if $game_switches[1]  endend 
This looks handy since it appears like it would give me control over when to use my custom skins, but it doesn't seem to be working for me.  I rewrote the line to this:

self.windowskin = Cache.system("Window_Custom1") if $game_switches[65]

I then turn on Switch65 in the event prior to the Windows showing up, but it's still showing the default window skin. 
 
Last edited by a moderator:

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
You changed it correctly. That snippet was just for the choice list, I can make it for the message window as well if you'd like.

A few trouble shooting questions:

Are you using other scripts that effect the message or choices windows?

Did you figure out how to import the window skin into your project? If you press F10 and look in "System" it should show up there with a red dot next to it.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
You changed it correctly. That snippet was just for the choice list, I can make it for the message window as well if you'd like.

A few trouble shooting questions:

Are you using other scripts that effect the message or choices windows?

Did you figure out how to import the window skin into your project? If you press F10 and look in "System" it should show up there with a red dot next to it.
That would be appreciated if you don't mind making one for the windows too.  That would save me the trouble of having to show pictures all the time.

To my knowledge I'm not using any scripts that effect message or choice windows.

And I see the file Window_Custom1 in my system folder when I push F10.  So it's there, it just doesn't seem to be being used for anything and I don't know how to replace the original file with it.
 
Last edited by a moderator:

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
Sorry was on the phone with the hubby.

By the way, to replace the original file you'd just name it the same thing... Window.png

Ok, ditch the other code and use this one

#==============================================================================# ■ Window_Message#==============================================================================class Window_Message < Window_Base  #--------------------------------------------------------------------------  # * Main Processing of Fiber  #--------------------------------------------------------------------------  alias custom_window_skin_update    update  def update    custom_window_skin_update    window_skin = $game_switches[65] ? "Window_Custom1" : "Window"    self.windowskin = Cache.system(window_skin)    @choice_window.windowskin = Cache.system(window_skin)  endendthat should update properly now

editted sloppy alias name. Forgot to change it after testing it, changed it now
 
Last edited by a moderator:

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
Sorry was on the phone with the hubby.

By the way, to replace the original file you'd just name it the same thing... Window.png

Ok, ditch the other code and use this one

#==============================================================================# ■ Window_Message#==============================================================================class Window_Message < Window_Base  #--------------------------------------------------------------------------  # * Main Processing of Fiber  #--------------------------------------------------------------------------  alias custom_window_skin_update    update  def update    custom_window_skin_update    window_skin = $game_switches[65] ? "Window_Custom1" : "Window"    self.windowskin = Cache.system(window_skin)    @choice_window.windowskin = Cache.system(window_skin)  endendthat should update properly now

editted sloppy alias name. Forgot to change it after testing it, changed it now
Np Venka, I had a phone call as well so that's why I vanished.  Naming the file the same as the original was my problem it seems.  I renamed my transparent one Window and now the game is reading it and my system windows are transparent.  So ty for pointing that out.

I'm a little confused though.  How would I use different file names in your script if I need to keep the file names exactly as the original for the game to read it?  Or does that script allow the engine to read different file names into the system?
 
Last edited by a moderator:

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
the script is so you can use different window skins. You can keep the default one as it is and use just the one you want for window message/choice.
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
the script is so you can use different window skins. You can keep the default one as it is and use just the one you want for window message/choice.
I see.  Well thank you very much for the script, I appreciate it.  I will give it a try tomorrow after I get some rest. 

#Edit

Looks like it's working now so what ever changes you did looks like it did the trick.  Thanks again.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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