Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Skills Learning System clashing with SDK [RMXP]

The following script is part of Skills Learning System (SLS 2.0)* by Charlie Lee. It fails on line 16** as long as SDK(2.3) is in the game scripts. Can anyone explain why this happens and how to fix it? Thanks in advance.

* - http://rmvxpuniverse.com/f23/t24

** - When trying to activate the equip screen

#==============================================================================
# ** Skills Learning System (SLS) by Charlie Lee  
#
# Version:           2.0
# Author:    Charlie Lee
#==============================================================================
class Scene_Equip
 alias sls_main main
 def main
   @equipment_skill_window=Window_Equipment_Skill.new
   @equipment_skill_window.actor=$game_party.actors[@actor_index]
   @equipment_skill_window_visible=$game_temp.equip_equipment_skill_window_visible
   @equipment_skill_window.set_x(336)
   @equipment_skill_window.set_y(128)
   # Original call
   sls_main
   @equipment_skill_window.dispose
 end
 
 alias sls_update update
 def update
   if Input.trigger?(Input::A)
     $game_temp.equip_equipment_skill_window_visible=!$game_temp.equip_equipment_skill_window_visible
   end
   if @item_window1.active
     @equipment_skill_window.target_x=((@item_window1.index+1)%2)*320+16
     @equipment_skill_window.target_y=272
     @equipment_skill_window.update(0,@item_window1.item.id)
     @equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
   elsif @item_window2.active
     @equipment_skill_window.target_x=((@item_window2.index+1)%2)*320+16
     @equipment_skill_window.target_y=272
     @equipment_skill_window.update(1,@item_window2.item.id)
     @equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
   elsif @item_window3.active
     @equipment_skill_window.target_x=((@item_window3.index+1)%2)*320+16
     @equipment_skill_window.target_y=272
     @equipment_skill_window.update(2,@item_window3.item.id)
     @equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
   elsif @item_window4.active
     @equipment_skill_window.target_x=((@item_window4.index+1)%2)*320+16
     @equipment_skill_window.target_y=272
     @equipment_skill_window.update(3,@item_window4.item.id)
     @equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
   elsif @item_window5.active
     @equipment_skill_window.target_x=((@item_window5.index+1)%2)*320+16
     @equipment_skill_window.target_y=272
     @equipment_skill_window.update(4,@item_window5.item.id)
     @equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
   elsif @right_window.active
     @equipment_skill_window.target_x=320+16
     @equipment_skill_window.target_y=128+32*@right_window.index
     @equipment_skill_window.update(@right_window.index,@right_window.item.id)
     @equipment_skill_window.visible=(true and $game_temp.equip_equipment_skill_window_visible)
   else
     @equipment_skill_window.visible=false
   end
   # Original call
   sls_update
 end
end  

class Game_Temp
 attr_accessor :equip_equipment_skill_window_visible
 alias equip_add_on_initialize initialize
 def initialize
   @equip_equipment_skill_window_visible=true
   equip_add_on_initialize
 end
end
 
I've used this before, and it seems to work with SDK version 1.5, but anything higher screws it up. Charlie Lee said that it wasn't made for the SDK so that would be why this is happening. As for a fix, you'd need someone more advanced than I to take a look at it.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top