Well, we know that the problem has something to do with the method
update_help in Window_Skill. Using Find brought me nowhere; nothing was out of place. I had to then refer to the parent class Window_Selectable. Finding every instance of update_help brought me to three methods: index=, help_window=, and update (we can rule out update). Now to determine what is the cause, we find where the help window is assigned to skill window.
def create_item_window
dy = @category_window.y + @category_window.height
dh = 480 - dy
@skill_window = Window_Skill.new(0, dy, 640, dh, @actor)
@skill_window.help_window = @help_window #<- Ah, here it is
@skill_window.deactivate.unselect
@target_window = Window_Target.new
hide_target_window
end
Which, if we look at the method
help_window=
def help_window=(help_window)
@help_window = help_window
# Update help text (update_help is defined by the subclasses)
if self.active and @help_window != nil # Skill_Window is indeed active and we just set @help_window, so it's not nil
update_help
end
end
It is calling update_help, which will then write the skill located at -1 (why -1? Because when you create a new Window_Selectable,
initialize sets the @index to -1) in the array of the actor's skills.
You can prevent this from happening if you set the Skill Window to be inactive
before calling
help_window=, which, according to your current code, is a matter of swapping two lines.
def create_item_window
dy = @category_window.y + @category_window.height
dh = 480 - dy
@skill_window = Window_Skill.new(0, dy, 640, dh, @actor)
@skill_window.deactivate.unselect # Swap this
@skill_window.help_window = @help_window # with that
@target_window = Window_Target.new
hide_target_window
end