custom windowskin for each character?

as the title says, I want to know if it is possible to make each character have its own windowskin depending on who is the leader.
Basically what I mean is something like this.
If the blue-haired one is the leader of the group, the windowskin will be this:
(Ignore what is marked in blue, it was the only capture I had at hand.)
1744676254626.png

But if I take another partner as a leader, for example, this one with light blue hair, the windowskin changes to this one:
1744676276216.png

This is mostly because it was recommended to me that each controllable character should have its own interface, in order to give it a more unique aesthetic.
And with good reason, since there will be parts where you will only control one at a time, I would like to see if I can make each character have their own windowskin.
First tell us if you need to change 1 window or just all of them.

To manually change a windowskin you'd just need to adapt this script call to a given window:

Ruby:
@some_window.windowskin = "My New Windowskin"

Obviously, no window is called @some_window, but that gives you an idea of what to look for in any of the scene scripts. We always recommend to paste all changes to default scripts in the Materials section for debugging purposes.
First tell us if you need to change 1 window or just all of them.

To manually change a windowskin you'd just need to adapt this script call to a given window:

Ruby:
@some_window.windowskin = "My New Windowskin"

Obviously, no window is called @some_window, but that gives you an idea of what to look for in any of the scene scripts. We always recommend to paste all changes to default scripts in the Materials section for debugging purposes.
What I will try to do is to have all the windowskin changed simultaneously when changing leaders.
And can you explain in more detail about the call script? I tried to do it through a common event, but it didn't work.
First tell us if you need to change 1 window or just all of them.

To manually change a windowskin you'd just need to adapt this script call to a given window:

Ruby:
@some_window.windowskin = "My New Windowskin"

Obviously, no window is called @some_window, but that gives you an idea of what to look for in any of the scene scripts. We always recommend to paste all changes to default scripts in the Materials section for debugging purposes.
1744692927379.png

1744692956854.png

This error appear when I try to make the script call.
OK, you need to learn some basics first. It's not too much info, just a bit of it.

Window_MenuCommand is a class but not the window itself.

You gotta look for any script that includes code like:

Ruby:
@menu_window = Window_MenuCommand.new

It might or might not include parameters (stuff, between, parentheses) and that's what you need to call yourself.

Thus, in my hypothetical example you're next step would be calling:

Ruby:
@menu_window.windowskin = "My Windowskin"

The problem with that line is that you can only change it once. Or you'd only be able to watch the latest call be applied to your window if you called it several times in a row.

I've changed my mind. Now you can depend on this scriptlet to handle the actors' IDs and their corresponding windowskins.

Ruby:
# * Actors' Custom Windowskins ACE * #

module WinSkin
  def self.actor_skin(actor_id)
    case actor_id
    when 1
      "My Skin 1"
    when 2
      "My Skin 2"
    else
      "Window"
    end
  end
end

class Game_Party
  def leader_id
    @actors[0]
  end
end

class Window_Base
  alias :skin_win_bs_up :update
  def initialize(x, y, width, height)
    super
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end

  def update
    skin_win_bs_up
    update_skin
  end

  def update_skin
    return if $game_party.leader_id == @actor_id
    @actor_id = $game_party.leader_id
    filename = WinSkin.actor_skin(@actor_id)
    self.windowskin = Cache.system(filename)
  end
end

What it allows you to accomplish here is to get the specific filename for your party's leader.
Add more when Number lines as needed.

Place all your custom windowskins in the Graphics/System folder.
OK, you need to learn some basics first. It's not too much info, just a bit of it.

Window_MenuCommand is a class but not the window itself.

You gotta look for any script that includes code like:

Ruby:
@menu_window = Window_MenuCommand.new

It might or might not include parameters (stuff, between, parentheses) and that's what you need to call yourself.

Thus, in my hypothetical example you're next step would be calling:

Ruby:
@menu_window.windowskin = "My Windowskin"

The problem with that line is that you can only change it once. Or you'd only be able to watch the latest call be applied to your window if you called it several times in a row.

I've changed my mind. Now you can depend on this scriptlet to handle the actors' IDs and their corresponding windowskins.

Ruby:
# * Actors' Custom Windowskins ACE * #

module WinSkin
  def self.actor_skin(actor_id)
    case actor_id
    when 1
      "My Skin 1"
    when 2
      "My Skin 2"
    else
      "Window"
    end
  end
end

class Game_Party
  def leader_id
    @actors[0]
  end
end

class Window_Base
  alias :skin_win_bs_up :update
  def initialize(x, y, width, height)
    super
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end

  def update
    skin_win_bs_up
    update_skin
  end

  def update_skin
    return if $game_party.leader_id == @actor_id
    @actor_id = $game_party.leader_id
    filename = WinSkin.actor_skin(@actor_id)
    self.windowskin = Cache.system(filename)
  end
end

What it allows you to accomplish here is to get the specific filename for your party's leader.
Add more when Number lines as needed.

Place all your custom windowskins in the Graphics/System folder.
Wow!
Ok, I was looking at the script, although at the beginning it didn't work because my game crashes, after changing its position, IT WORKS!!!!
I have to say that it has a certain error in which when opening the menu, the first second the normal window is shown, and then it changes to the Custom one.
Anyway, I think that could be fixed.
¡¡¡Thanks you so much!!!
The configuration section aka the module so don't forget to follow the examples included in the scriptlet. I just think it's way better than adding tons of when Number lines one after another.

UPDATED

Ruby:
# * Actors' Custom Windowskins ACE * #
#   Scripter : Kyonides
#   2025-04-15

# All Windowskins Need to be Placed in the Graphics/System directory!

module WinSkin
  SKINS = {} # <<== Leave it Alone!
  # Default Windowskin or Skin for Unlisted Actors
  SKINS.default = "Window"
  # Custom Windowskins
  SKINS[1] = "My Skin 1"
  SKINS[2] = "My Skin 2"
end

class Game_System
  attr_accessor :start_game
end

class Game_Party
  alias :kyon_skin_gm_pty_init :initialize
  def initialize
    kyon_skin_gm_pty_init
    $game_system.start_game = true
  end

  def leader_id
    @actors[0]
  end
end

class Window_Base
  alias :kyon_skin_win_bs_up :update
  def initialize(x, y, width, height)
    super
    update_windowskin
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end

  def update
    kyon_skin_win_bs_up
    update_windowskin
  end

  def update_windowskin
    if $game_system.start_game
      set_custom_windowskin
    else
      set_default_windowskin
    end
  end

  def set_custom_windowskin
    return if $game_party.leader_id == @actor_id
    @actor_id = $game_party.leader_id
    filename = WinSkin::SKINS[@actor_id]
    self.windowskin = Cache.system(filename)
  end

  def set_default_windowskin
    return if @windowskin_name
    @windowskin_name = "Window"
    self.windowskin = Cache.system(@windowskin_name)
  end
end
The configuration section aka the module so don't forget to follow the examples included in the scriptlet. I just think it's way better than adding tons of when Number lines one after another.

UPDATED

Ruby:
# * Actors' Custom Windowskins ACE * #
#   Scripter : Kyonides
#   2025-04-15

# All Windowskins Need to be Placed in the Graphics/System directory!

module WinSkin
  SKINS = {} # <<== Leave it Alone!
  # Default Windowskin or Skin for Unlisted Actors
  SKINS.default = "Window"
  # Custom Windowskins
  SKINS[1] = "My Skin 1"
  SKINS[2] = "My Skin 2"
end

class Game_System
  attr_accessor :start_game
end

class Game_Party
  alias :kyon_skin_gm_pty_init :initialize
  def initialize
    kyon_skin_gm_pty_init
    $game_system.start_game = true
  end

  def leader_id
    @actors[0]
  end
end

class Window_Base
  alias :kyon_skin_win_bs_up :update
  def initialize(x, y, width, height)
    super
    update_windowskin
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end

  def update
    kyon_skin_win_bs_up
    update_windowskin
  end

  def update_windowskin
    if $game_system.start_game
      set_custom_windowskin
    else
      set_default_windowskin
    end
  end

  def set_custom_windowskin
    return if $game_party.leader_id == @actor_id
    @actor_id = $game_party.leader_id
    filename = WinSkin::SKINS[@actor_id]
    self.windowskin = Cache.system(filename)
  end

  def set_default_windowskin
    return if @windowskin_name
    @windowskin_name = "Window"
    self.windowskin = Cache.system(@windowskin_name)
  end
end
Ok, I just tried the updated script, and apparently it works the same, it still shows the normal window for 1 second.

If you're wondering, I have the script in the highest position to make it work.
1744745523890.png
Well, I was testing it and the only thing I felt that I had to change was when a condition related to the windowskin should be fulfilled.

Ruby:
# * Actors' Custom Windowskins ACE * #
#   Scripter : Kyonides
#   2025-04-15

# All Windowskins Need to be Placed in the Graphics/System directory!

module WinSkin
  SKINS = {} # <<== Leave it Alone!
  # Default Windowskin or Skin for Unlisted Actors
  SKINS.default = "Window"
  # Custom Windowskins
  SKINS[1] = "My Skin 1"
  SKINS[2] = "My Skin 2"
end

class Game_System
  attr_accessor :start_game
end

class Game_Party
  alias :kyon_winskin_gm_pty_stp_start_mbrs :setup_starting_members
  def setup_starting_members
    kyon_winskin_gm_pty_stp_start_mbrs
    $game_system.start_game = true
  end

  def leader_id
    @actors[0]
  end
end

class Window_Base
  alias :kyon_winskin_win_bs_up :update
  def initialize(x, y, width, height)
    super
    update_windowskin
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end

  def update
    kyon_winskin_win_bs_up
    update_windowskin
  end

  def update_windowskin
    if $game_system.start_game
      set_custom_windowskin
    else
      set_default_windowskin
    end
  end

  def set_custom_windowskin
    return if $game_party.leader_id == @actor_id
    @actor_id = $game_party.leader_id
    filename = WinSkin::SKINS[@actor_id]
    self.windowskin = Cache.system(filename)
  end

  def set_default_windowskin
    return if @windowskin_name
    @windowskin_name = "Window"
    self.windowskin = Cache.system(@windowskin_name)
  end
end

Concerning the UI refresh speed, my best guess would be that the machine is kind of slow. Otherwise, I have no idea why it doesn't change it in a split second. The original version didn't include the call to update the windowskin in new windows, but the last 2 releases certainly do.

EDIT

After watching your clip, I'd say there gotta be something else altering the windowskin's normal behavior. Like another script modifying Window_Base or a related window class...
Well, I was testing it and the only thing I felt that I had to change was when a condition related to the windowskin should be fulfilled.

Ruby:
# * Actors' Custom Windowskins ACE * #
#   Scripter : Kyonides
#   2025-04-15

# All Windowskins Need to be Placed in the Graphics/System directory!

module WinSkin
  SKINS = {} # <<== Leave it Alone!
  # Default Windowskin or Skin for Unlisted Actors
  SKINS.default = "Window"
  # Custom Windowskins
  SKINS[1] = "My Skin 1"
  SKINS[2] = "My Skin 2"
end

class Game_System
  attr_accessor :start_game
end

class Game_Party
  alias :kyon_winskin_gm_pty_stp_start_mbrs :setup_starting_members
  def setup_starting_members
    kyon_winskin_gm_pty_stp_start_mbrs
    $game_system.start_game = true
  end

  def leader_id
    @actors[0]
  end
end

class Window_Base
  alias :kyon_winskin_win_bs_up :update
  def initialize(x, y, width, height)
    super
    update_windowskin
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end

  def update
    kyon_winskin_win_bs_up
    update_windowskin
  end

  def update_windowskin
    if $game_system.start_game
      set_custom_windowskin
    else
      set_default_windowskin
    end
  end

  def set_custom_windowskin
    return if $game_party.leader_id == @actor_id
    @actor_id = $game_party.leader_id
    filename = WinSkin::SKINS[@actor_id]
    self.windowskin = Cache.system(filename)
  end

  def set_default_windowskin
    return if @windowskin_name
    @windowskin_name = "Window"
    self.windowskin = Cache.system(@windowskin_name)
  end
end

Concerning the UI refresh speed, my best guess would be that the machine is kind of slow. Otherwise, I have no idea why it doesn't change it in a split second. The original version didn't include the call to update the windowskin in new windows, but the last 2 releases certainly do.

EDIT

After watching your clip, I'd say there gotta be something else altering the windowskin's normal behavior. Like another script modifying Window_Base or a related window class...
By machine, you mean my PC? my computer is too powerful to be slow (unless you mean something else).
anyway, i have no idea why that happens :/

EDIT

Probably that could be a cause, in any case I leave you my script file here
I've found the culprit, it's the Window Color Opacity script. We're talking about a very short script, yet, it overwrites Window_Base's initialize method, causing your 1 second delay issue.

Now you can delete that custom script and use this patch to still be able to preset a given window's back opacity.

Ruby:
# * Window's Back Opacity Patch        * #
#   For Actors' Custom Windowskins ACE
#   Scripter : Kyonides
#   2025-04-15

class Window_Base
  # For Default Windows
  OPACITY = 110
  # For Custom Windows Modified by Yanfly's System Options
  OPACITY_OPTION_VAR_ID = 94
  alias :kyon_preset_back_opac_win_bs_init :initialize
  def initialize(x, y, width, height)
    kyon_preset_back_opac_win_bs_init
    preset_back_opacity
  end

  def preset_back_opacity
    if $imported["YEA-SystemOptions"]
      self.back_opacity = $game_variables[OPACITY_OPTION_VAR_ID]
    else
      self.back_opacity = OPACITY
    end
  end 
end
I've found the culprit, it's the Window Color Opacity script. We're talking about a very short script, yet, it overwrites Window_Base's initialize method, causing your 1 second delay issue.

Now you can delete that custom script and use this patch to still be able to preset a given window's back opacity.

Ruby:
# * Window's Back Opacity Patch        * #
#   For Actors' Custom Windowskins ACE
#   Scripter : Kyonides
#   2025-04-15

class Window_Base
  # For Default Windows
  OPACITY = 110
  # For Custom Windows Modified by Yanfly's System Options
  OPACITY_OPTION_VAR_ID = 94
  alias :kyon_preset_back_opac_win_bs_init :initialize
  def initialize(x, y, width, height)
    kyon_preset_back_opac_win_bs_init
    preset_back_opacity
  end

  def preset_back_opacity
    if $imported["YEA-SystemOptions"]
      self.back_opacity = $game_variables[OPACITY_OPTION_VAR_ID]
    else
      self.back_opacity = OPACITY
    end
  end
end
After testing, everything works correctly!
thank you very much for your script!🙂

Original thread: https://forums.rpgmakerweb.com/threads/custom-windowskin-for-each-character.176962/