Status
Not open for further replies.

McMillan

Veteran
Veteran
Joined
Sep 21, 2016
Messages
36
Reaction score
3
First Language
English
Primarily Uses
I hope this is the right place to ask for script advice/assistance.


Okay so, Earlier, I managed to eliminate message window bordering, and made the transparency in windows uniform by editing that Window.png file. I didn't like the result, so instead I chose to eliminate the transparency by adding "self.back_opacity = 255" to the Window_Base default script. So now the message/text windows are the way I like them.


However.


I also wanted to have name windows so I used yanfly's Ace Message System script to get them. Unfortunately, the name windows are the same color as the text windows. I want to change the color of the name window, but I don't know how. The script only has the following options for the name window:

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Name Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # The name window is a window that appears outside of the main message
    # window box to display whatever text is placed inside of it like a name.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    NAME_WINDOW_X_BUFFER = -20     # Buffer x position of the name window.
    NAME_WINDOW_Y_BUFFER = 0       # Buffer y position of the name window.
    NAME_WINDOW_PADDING  = 0       # Padding added to the horizontal position.
    NAME_WINDOW_OPACITY  = 0       # Opacity of the name window.
    NAME_WINDOW_COLOUR   = 15      # Text colour used by default for names.

As a bypass, I tried to use a large picture to color the window with the \pic[x] command provided by the script, however, the picture is limited in size to the number of lines of text there are.


Is there a script somewhere that allows me to change the background color of specific windows? Is there a command as simple as "self.back_opacity = 255" that I can use to choose which windows have which colors? I'd really appreciate some help.


Yanfly's Ace Message System: https://yanflychannel.wordpress.com/rmvxa/core-scripts/ace-message-system/


http://pastebin.com/5iBEcjsb
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,410
Reaction score
15,213
First Language
English
Primarily Uses
RMMV
When you ask for help with scripts, please provide a link to the script's forum/website/blog/whatever to make it easier for people to find - no matter how popular you think they are.


I assume you want to change the background colour rather than the text colour, as Yanfly's script appears to do that.


The appearance of the window is based on the windowskin you're using, and the tone you set in the System tab.  I believe if you can manage a way to change the tone for the name window, that would be what you're after.


Window_Base has an update_tone method that's run after initialization and during the update method.  So you could override this method for the name window class and instead of using $game_system.window_tone, just use a different tone.  I suggest you create a constant that is a new tone where you set all the values, then just use that in the command rather than using Tone.new(...) each time.


In fact you could probably add a NAME_WINDOW_TONE = Tone.new(...) to the header of that script and use that.  As far as where to put the other changes and the name of the class, I don't know as I don't use the script and you didn't give a link and I'm not going to go searching for it.  Hopefully you'll be able to figure it out.


Although, re-reading your post, you said you elimated the background from the windows by changing the opacity in the Window_Base class.  If you changed opacity of all windows, how can the name window have a colour?  Or did you only do it to some windows?  You might need to provide further information on what you've actually done (show us the method, don't just give us one line with no context) if you need more help.
 
Last edited by a moderator:

McMillan

Veteran
Veteran
Joined
Sep 21, 2016
Messages
36
Reaction score
3
First Language
English
Primarily Uses
Right, sorry about that. Edited the question to include links to the script at the end of the post.


I'm assuming the Tone.new(...) is where you place the rgba values?
 

McMillan

Veteran
Veteran
Joined
Sep 21, 2016
Messages
36
Reaction score
3
First Language
English
Primarily Uses
Although, re-reading your post, you said you eliminated the background from the windows by changing the opacity in the Window_Base class.  If you changed opacity of all windows, how can the name window have a colour?  Or did you only do it to some windows?  You might need to provide further information on what you've actually done (show us the method, don't just give us one line with no context) if you need more help.

Oh, the color wasn't eliminated, I eliminated the opacity by inserting " self.back_opacity = 255" into the Window_Base script so that the color of the windows would be full and not see through. Only the opacity was set to max. The color of the windows is still there, set via the database. The only thing eliminated was the window borders by erasing them in Window.png


The main issue for now is being able to change the color of a particular window to a different color from the system default.


Here's pictures to show the current situation:


[Removed]


In the 2nd image, you'll see that the middle area is a different color from the window, but that's the failed attempt I mentioned earlier where I tried to use the \pic[x] command to have a picture fill the entire window so it could be a different color. However, the picture is limited seemingly by the number of lines of text the name window has.


So I'm hoping there's a way to change the name window background color.
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,410
Reaction score
15,213
First Language
English
Primarily Uses
RMMV
Ah, sorry - I was thinking you set it to 0 to make the background invisible.


What I said above should work - you just need to set that constant to the tone you want (use the System tab to play with the tone to get the correct RGBA values) and then add the update_tone method for the correct class name.


So (thanks for adding the links - I can help you more now), where you've got all the NAME_WINDOW settings in the script, add a new line that's like this:


NAME_WINDOW_TONE = Tone.new(a, b, c, d)


where a, b, c, d are the red, green, blue, and alpha settings you got when figuring out the right colour.


Then add this

Code:
class Window_NameMessage < Window_Base
  #--------------------------------------------------------------------------
  # * Update Tone
  #--------------------------------------------------------------------------
  def update_tone
    self.tone.set(YEA::MESSAGE::NAME_WINDOW_TONE)
  end
end

to the very bottom of the script.
 
Last edited by a moderator:

McMillan

Veteran
Veteran
Joined
Sep 21, 2016
Messages
36
Reaction score
3
First Language
English
Primarily Uses
Thank you very, very much for this help! I really needed it! Solved my issue perfectly.


Results:

[IMG]http://i.imgur.com/cQ3mKNC.png[/IMG]
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,121
Reaction score
8,932
First Language
English
Primarily Uses
RMMV
Gonna move this to script support and then close it, since you found your answer.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

When doing a map or whatever, kind of wish you could round out some parts.
Glad to announce:
Released a plugin mod for MV: SelectMultipleTargets v3.0 (mod of original by Zevia)

port to MZ is following

1,Randomly generate events with planted spawner events(great flexibility for customization and auto-match player's level)
2,Randomly enter roguelike dungeon
3,Player can exit dungeon or back to town or choose to challenge BOSS at the end of each dungeon
4,Dungeon maps can be randomly generated by a third-party tool
Got locked out of the house yesterday... best friends who had the spare ghosted me. Locksmith had to literally drill thru the lock bc they couldn't pick it. Whole process took 4 hours and far too much money. And they have to come back next week bc they don't have the right cylinder, cause it's an old interlocking lock. I'm livid lol
 I’m probably going to regret this, but I need kobolds for my project and I’ve decided to sprite them myself. This is Attempt #1, front view only.

KoboldFront.gif

Forum statistics

Threads
115,356
Messages
1,089,248
Members
150,047
Latest member
skarndever
Top