As the title states, the How To Change Windowskins Using RGSS tutorial is to demonstrate how to change a windowskin using RGSS. Each RPG Maker (RMXP, VX and VXA) handles windowskins slightly differently but the scripting process is essentially the same.
How Windowskins Are Handled
In the Database, however, RMVXA allows you to change the colouration of the windowskin to suit the theme and needs of your game. This will override the background image of your chosen windowskin and the colour scheme will be used instead. An easy solution to this is to apply my RMVX to RMVXA Windowskin Patch to overcome this.
Changing Windowskins With RGSS
So to change the default windowskin, import it into the appropriate folder (the filename itself doesn’t matter) and then look for the corresponding lines in Window_Base. Remember that RMVX windowskins are also compatible with RMVXA.
self.windowskin = RPG::Cache.windowskin(@windowskin_name)
Always Alias
It’s always recommended that you use alias as and when you can, rather than directly modifying any of the default scripts. That way it prevents any risks for corrupting the code and makes it easier to modify if something goes wrong.
The following formula is used for alias:
class Window_Base < Window alias cwws_winbs_initialize initialize def initialize(x, y, width, height) cwws_winbs_initialize(x, y, width, height) $game_system.windowskin_name = "windowskin name" end end
class Window_Base < Window alias cwws_winbs_initialize initialize def initialize(x, y, width, height) cwws_winbs_initialize(x, y, width, height) self.windowskin = Cache.system("windowskin name") end
You must log in to post a comment.