I want to change the text box sprites for certain areas or events in the game but I'm not sure how
View attachment 287111
Is there a way I can change the text box sprites of a certain switch or something turns on
RPG Maker VXAce SupportCan't you find a change windowskin event command on the event command list?
It only changes the background color for the text box not the sprite
Now you can change the windowskin via some event. Please read the embedded comments to learn how to use it.
Ruby:
# * KSkin ACE * #
# Scripter : Kyonides Arkanthes
# 2023-12-08
# How to Use * #
# Click on the Control Variables event command.
# Then choose the same variable ID as # the one defined by the VAR_ID constant,
# and quickly enter the "filename" # enclosed by double quotes "".
# Next go pick your favorite game switch with an ID equal to the SWITCH_ID
# constant's value and set its state to ON.
module KSkin
SKIN_SWITCH_ID = 1
SKIN_VAR_ID = 1
end
class Game_System
alias :kyon_winskin_gm_sys_init :initialize
def initialize
kyon_winskin_gm_sys_init
@default_windowskin = "Window"
@windowskin = "Window"
end
attr_accessor :default_windowskin, :windowskin
end
class Window_Base
alias :kyon_winskin_win_bs_up :update
def initialize(x, y, width, height)
super
$game_system ||= Game_System.new
refresh_windowskin
update_padding
update_tone
create_contents
@opening = @closing = false
end
def refresh_windowskin
@windowskin = $game_system.windowskin
self.windowskin = Cache.system(@windowskin)
end
def update
super
refresh_windowskin if $game_system.windowskin != @windowskin
update_tone
update_open if @opening
update_close if @closing
end
end
class Scene_Map
include KSkin
alias :kyon_winskin_scn_map_up_bsc :update_basic
def update_basic
kyon_winskin_scn_map_up_bsc
if $game_switches[SKIN_SWITCH_ID] and $game_variables[SKIN_VAR_ID] != 0
$game_system.windowskin = $game_variables[SKIN_VAR_ID]
$game_variables[SKIN_VAR_ID] = 0
$game_switches[SKIN_SWITCH_ID] = false
end
end
end
Thank you
Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-i-can-change-the-text-box-sprites-of-a-certain-switch-or-something-turns-on.163695/