Actors' Custom Windowskins VX + ACE - kyonides - 04-15-2025
Actors' Custom Windowskins
VX + ACE
by Kyonides
Introduction
Do you need to change the look of all of your windows based on who's the current party leader?
Then you definitely have to use this scriptlet for sure! 
Setup
- This scriptlet should be placed among the very first scripts in the Materials section.
- Go to the WinSkin module and add a new line per actor's ID like this:
Code: SKINS[2] = "My Skin 2"
If you forgot to add a custom windowskin for a given actor, it will use VX's or ACE's skin by default.
VX Script
Code: # * Actors' Custom Windowskins VX * #
# 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
place(x, y, width, height)
default_settings
create_contents
@opening = @closing = false
end
def place(x, y, w, h)
self.x = x
self.y = y
self.width = w
self.height = h
end
def default_settings
self.z = 100
self.back_opacity = 200
self.openness = 255
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
VX ACE Script
Code: # * 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
Terms & Conditions
Free as in beer.
Include me in your game credits.
That's it!
RE: Actors' Custom Windowskins VX + ACE - kyonides - 04-15-2025
Maintenance Update
After I had published the ACE version, I noticed it could easily be ported to VX and it didn't take long before that finally happened! 
Then while working on the XP port I noticed something important: what would occur if you were just trying to load the game for the very first time? 
Ooops! It would certainly crash!
That's why I had to revisit the scripts and add a mechanism to let the game set the title scene's default windowkin if no party has ever been created.
RE: Actors' Custom Windowskins VX + ACE - kyonides - 04-15-2025
Another Maintenance Update
This release includes 2 mandatory bug fixes. The first bug would have caused your game to crash immediately because of the very first menu not being able to properly calculate the width or height of that first window. The other one would try to apply a custom windowskin even before you have created a single party. This was provoked by VX's and VX ACE's default behavior of creating ALL game objects, including the party way before you can even start a new game or load a saved file. Fortunately, those nasty bugs have been smashed to smithereens already!
|