Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Just move the Cursor of the Item_Scene to the right
#15
Here we go: (added as a attachment)

Code:
#==============================================================================
# ** MOG Scene Equip Asuka V1.5
#     By Moghunter  
#     http://www.atelier-rgss.com
#------------------------------------------------------------------------------
# ** Reinvisioned version
#    
#    This variant has retooled the MOG module by adding more configurables for
#    the user.  No longer are the graphics hardwired into the code but are now
#    able to be altered in the revised configuration serction.
#
#    Also, a number of redundant modules within the Windows and Scene classes
#    have been removed.  Some have been aliased to increase compatibility with
#    other systems.
#==============================================================================


module MOG
 
 # BASIC MENU CONFIGURATION
   # Equip Menu Graphics Used
     EQUIP_LAYOUT      = "Layout-Equip"    # Equip Menu Graphics
     EQUIP_BACKGROUND  = "Back-Other"      # Animated background graphic
     EQUIP_TYPE_1      = "ST_EQU"          # Equip Graphic (Equal)
     EQUIP_TYPE_2      = "ST_UP"           # Equip Graphic (Raises Stats)
     EQUIP_TYPE_3      = "ST_DOWN"         # Equip Graphic (Lowers Stats)
     PORTRAIT          = "_P"              # Suffix for portrait graphics
   # Menu
     EQUIP_FX          = 0                 # Back FX (0=Moving/ 1=Still/ 2=Map)
     EQUIP_TRAN_TIME   = 20                # Transition Time.  
     EQUIP_TRAN_TYPE   = "004-Blind04"     # Transition Type (Name).
   # Stat Level Maximums
     EQUIP_STAT_MAX_1  = 999               # Set Maximum (STR,DEX,AGL,INT)
     EQUIP_STAT_MAX_2  = 999               # Set Maximum (ATK,PDEF,MDEF)
   # Font Used  
     EQUIP_FONT        = "Georgia"         # Font used in equip menu
     EQUIP_FONT_COLOR  = Color.new(0,0,0)  # Font color used open areas
     
 # MENU GAUGE GRAPHICS
   # Stat Window
     EQUIP_STAT_BACK   = "Status-Equip"    # Stat Window Graphics
   # Empty Bars      
     EQUIP_STAT_BAR_E  = "STAT_Bar_Bk"     # Empty bar for Stats    
   # Fill Bars
     EQUIP_STAT_BAR    = "STAT_Bar"        # Fill bar for Stats
 
end

# Mogscript global
$mogscript = {} if $mogscript == nil
$mogscript["menu_asuka"] = true



#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
 #--------------------------------------------------------------------------
 # * Draw Empty Face #2
 #--------------------------------------------------------------------------  
 def nada2(actor)
   face = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
 end    
 #--------------------------------------------------------------------------
 # * Draw Large Portrait (or Battler if unavailable)
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------  
 def draw_heroface2(actor,x,y)
   face = RPG::Cache.picture(actor.name + MOG::PORTRAIT) rescue nada2(actor)
   cw = face.width
   ch = face.height
   src_rect = Rect.new(0, 0, cw, ch)
   if face == RPG::Cache.battler(actor.battler_name, actor.battler_hue)
     self.contents.blt(x + 40 , y - ch - 240, face, src_rect)    
   else  
     self.contents.blt(x , y - ch, face, src_rect)    
   end
 end  
 #--------------------------------------------------------------------------
 # * Draw Equipment Gain/Loss
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     type  : indicator type
 #--------------------------------------------------------------------------
 def drw_eqpup(x,y,type)
   case type
   when 0
     est = RPG::Cache.icon(MOG::EQUIP_TYPE_1)
   when 1
     est = RPG::Cache.icon(MOG::EQUIP_TYPE_2)
   when 2
     est = RPG::Cache.icon(MOG::EQUIP_TYPE_3)  
   end  
   cw = est.width
   ch = est.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x , y - ch, est, src_rect)    
 end  
 #--------------------------------------------------------------------------
 # * Draw Equipment Stat Graphic
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------
 def drw_equist(x,y)
   equist = RPG::Cache.picture(MOG::EQUIP_STAT_BACK)
   cw = equist.width
   ch = equist.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x , y - ch, equist, src_rect)    
 end  
 #--------------------------------------------------------------------------
 # * Draw Parameter
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     type  : parameter type (0-6)
 #--------------------------------------------------------------------------
 def draw_actor_parameter(actor, x, y, type)
   back = RPG::Cache.picture(MOG::EQUIP_STAT_BAR_E)    
   cw = back.width  
   ch = back.height
   src_rect = Rect.new(0, 0, cw, ch)    
   self.contents.blt(x + 50 , y - ch + 20, back, src_rect)  
   meter = RPG::Cache.picture(MOG::EQUIP_STAT_BAR)    
   case type
   when 0
     parameter_value = actor.atk
     cw = meter.width  * actor.atk / MOG::EQUIP_STAT_MAX_2
   when 1
     parameter_value = actor.pdef
     cw = meter.width  * actor.pdef / MOG::EQUIP_STAT_MAX_2
   when 2
     parameter_value = actor.mdef
     cw = meter.width  * actor.mdef / MOG::EQUIP_STAT_MAX_2
   when 3
     parameter_value = actor.str
     cw = meter.width  * actor.str / MOG::EQUIP_STAT_MAX_1
   when 4
     parameter_value = actor.dex
     cw = meter.width  * actor.dex / MOG::EQUIP_STAT_MAX_1
   when 5
     parameter_value = actor.agi
     cw = meter.width  * actor.agi / MOG::EQUIP_STAT_MAX_1
   when 6
     parameter_value = actor.int
     cw = meter.width  * actor.int / MOG::EQUIP_STAT_MAX_1
   end
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 120, y - 2, 36, 32, parameter_value.to_s, 2)
   ch = meter.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 50 , y - ch + 20, meter, src_rect)
 end
end


#==============================================================================
# ** Window_EquipLeft
#------------------------------------------------------------------------------
#  This window displays actor parameter changes on the equipment screen.
#==============================================================================

class Window_EquipLeft < Window_Base
 alias mog_init initialize
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     actor : actor
 #--------------------------------------------------------------------------
 def initialize(actor)
   mog_init(actor)
   self.opacity = 0
   self.height = 446
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = MOG::EQUIP_FONT
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------  
 def refresh
   self.contents.clear
   draw_heroface2(@actor, 20, 460)      
   drw_equist(0,390)    
   draw_actor_name(@actor, 4, 0)
   draw_actor_level(@actor, 4, 32)
   draw_actor_parameter(@actor, 10, 164 , 0)
   draw_actor_parameter(@actor, 10, 196 , 1)
   draw_actor_parameter(@actor, 10, 228 , 2)
   draw_actor_parameter(@actor, 10, 260 , 3)
   draw_actor_parameter(@actor, 10, 292 , 4)
   draw_actor_parameter(@actor, 10, 324 , 5)
   draw_actor_parameter(@actor, 10, 356 , 6)        
   if @new_atk != nil
     self.contents.font.color = system_color
     if @new_atk < @actor.atk
     drw_eqpup(170,190,2)  
     self.contents.font.color = Color.new(255,50,50,255)      
     elsif @new_atk > @actor.atk
     drw_eqpup(170,190,1)  
     self.contents.font.color = Color.new(50,250,150,255)
     else
     drw_eqpup(170,190,0)        
     self.contents.font.color = Color.new(255,255,255,255)      
     end      
     self.contents.draw_text(190, 162, 36, 32, @new_atk.to_s, 2)
   end
   if @new_pdef != nil
     if @new_pdef < @actor.pdef
     drw_eqpup(170,226,2)  
     self.contents.font.color = Color.new(255,50,50,255)      
     elsif @new_pdef > @actor.pdef
     drw_eqpup(170,226,1)  
     self.contents.font.color = Color.new(50,250,150,255)
     else
     drw_eqpup(170,226,0)        
     self.contents.font.color = Color.new(255,255,255,255)      
     end  
     self.contents.draw_text(190, 194, 36, 32, @new_pdef.to_s, 2)
   end
   if @new_mdef != nil
     if @new_mdef < @actor.mdef
     drw_eqpup(170,258,2)  
     self.contents.font.color = Color.new(255,50,50,255)      
     elsif @new_mdef > @actor.mdef
     drw_eqpup(170,258,1)  
     self.contents.font.color = Color.new(50,250,150,255)
     else
     drw_eqpup(170,258,0)        
     self.contents.font.color = Color.new(255,255,255,255)      
     end
     self.contents.draw_text(190, 226, 36, 32, @new_mdef.to_s, 2)
   end
   if @new_str  != nil
     if @new_str < @actor.str
     drw_eqpup(170,290,2)  
     self.contents.font.color = Color.new(255,50,50,255)      
     elsif @new_str > @actor.str
     drw_eqpup(170,290,1)  
     self.contents.font.color = Color.new(50,250,150,255)
     else
     drw_eqpup(170,290,0)        
     self.contents.font.color = Color.new(255,255,255,255)      
     end
     self.contents.draw_text(190, 258, 36, 32, @new_str.to_s, 2)
   end
   if @new_dex  != nil
     if @new_dex < @actor.dex
     drw_eqpup(170,322,2)  
     self.contents.font.color = Color.new(255,50,50,255)      
     elsif @new_dex > @actor.dex
     drw_eqpup(170,322,1)  
     self.contents.font.color = Color.new(50,250,150,255)
     else
     drw_eqpup(170,322,0)        
     self.contents.font.color = Color.new(255,255,255,255)      
     end
     self.contents.draw_text(190, 290, 36, 32, @new_dex.to_s, 2)
   end
   if @new_agi  != nil
     if @new_agi < @actor.agi
     drw_eqpup(170,354,2)  
     self.contents.font.color = Color.new(255,50,50,255)      
     elsif @new_agi > @actor.agi
     drw_eqpup(170,354,1)  
     self.contents.font.color = Color.new(50,250,150,255)
     else
     drw_eqpup(170,354,0)        
     self.contents.font.color = Color.new(255,255,255,255)      
     end
     self.contents.draw_text(190, 322, 36, 32, @new_agi.to_s, 2)
   end
   if @new_int  != nil
     if @new_int < @actor.int
     drw_eqpup(170,386,2)  
     self.contents.font.color = Color.new(255,50,50,255)      
     elsif @new_int > @actor.int
     drw_eqpup(170,386,1)  
     self.contents.font.color = Color.new(50,250,150,255)
     else
     drw_eqpup(170,386,0)        
     self.contents.font.color = Color.new(255,255,255,255)      
     end
     self.contents.draw_text(190, 354, 36, 32, @new_int.to_s, 2)
   end
 end
 #--------------------------------------------------------------------------
 # * Set parameters after changing equipment
 #     new_atk  : attack power after changing equipment
 #     new_pdef : physical defense after changing equipment
 #     new_mdef : magic defense after changing equipment
 #     new_str  : strength after changing equipment
 #     new_dex  : dexterity after changing equipment
 #     new_agi  : agility after changing equipment
 #     new_int  : intelligence after changing equipment
 #--------------------------------------------------------------------------  
 def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex,
   new_agi, new_int)
   if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or
     @new_str != new_str or @new_dex != new_dex or @new_agl != new_agi or
     @new_int != new_int      
     @new_atk = new_atk
     @new_pdef = new_pdef
     @new_mdef = new_mdef
     @new_str = new_str
     @new_dex = new_dex
     @new_agi = new_agi
     @new_int = new_int
     refresh
   end
 end
end



#==============================================================================
# ** Window_EquipRight
#------------------------------------------------------------------------------
#  This window displays items the actor is currently equipped with on the
#  equipment screen.
#==============================================================================

class Window_EquipRight < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     actor : actor
 #--------------------------------------------------------------------------
 alias mog_init initialize
 def initialize(actor)
   mog_init(actor)
   self.opacity = 0
   self.contents.font.name = MOG::EQUIP_FONT
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------  
 def refresh
   self.contents.clear
   @data = []
   @data.push($data_weapons[@actor.weapon_id])
   @data.push($data_armors[@actor.armor1_id])
   @data.push($data_armors[@actor.armor2_id])
   @data.push($data_armors[@actor.armor3_id])
   @data.push($data_armors[@actor.armor4_id])
   @item_max = @data.size
   self.contents.font.color = system_color
   draw_item_name(@data[0], 92, 32 * 0)
   draw_item_name(@data[1], 92, 32 * 1)
   draw_item_name(@data[2], 92, 32 * 2)
   draw_item_name(@data[3], 92, 32 * 3)
   draw_item_name(@data[4], 92, 32 * 4)
 end
end



#==============================================================================
# ** Window_EquipItem
#------------------------------------------------------------------------------
#  This window displays choices when opting to change equipment on the
#  equipment screen.
#==============================================================================



class Window_EquipItem < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     actor      : actor
 #     equip_type : equip region (0-3)
 #--------------------------------------------------------------------------
 alias mog_init initialize
 def initialize(actor, equip_type)
   mog_init(actor, equip_type)
   self.width    = 368
   self.x        = 272
   self.opacity  = 0
   @column_max   = 1
   refresh
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #     index : item number
 #--------------------------------------------------------------------------  
 def draw_item(index)
   self.contents.font.name = MOG::EQUIP_FONT
   item = @data[index]
   x = 4 + index % 1 * (288 + 32)
   y = index / 1 * 32
   case item
   when RPG::Weapon
     number = $game_party.weapon_number(item.id)
   when RPG::Armor
     number = $game_party.armor_number(item.id)
   end
   bitmap = RPG::Cache.icon(item.icon_name)
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
   self.contents.font.color = MOG::EQUIP_FONT_COLOR
   self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
   self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
   self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
 end
end



#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
#  This class performs equipment screen processing.
#==============================================================================

class Scene_Equip
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------  
 def main
   unless MOG::EQUIP_FX == 2
     @mnback = Plane.new
     @mnback.bitmap = RPG::Cache.picture(MOG::EQUIP_BACKGROUND)
     @mnback.z = 1
   else
     @spriteset = Spriteset_Map.new
   end
   @mnlay = Sprite.new
   @mnlay.bitmap = RPG::Cache.picture(MOG::EQUIP_LAYOUT)
   @mnlay.z = 2
   @actor = $game_party.actors[@actor_index]
   @help_window = Window_Help.new
   @help_window.opacity = 0
   @help_window.x = -300
   @help_window.contents_opacity = 0
   @left_window = Window_EquipLeft.new(@actor)
   @left_window.x = -300
   @left_window.contents_opacity = 0
   @right_window = Window_EquipRight.new(@actor)
   @item_window1 = Window_EquipItem.new(@actor, 0)
   @item_window2 = Window_EquipItem.new(@actor, 1)
   @item_window3 = Window_EquipItem.new(@actor, 2)
   @item_window4 = Window_EquipItem.new(@actor, 3)
   @item_window5 = Window_EquipItem.new(@actor, 4)
   @item_window1.x = 640
   @item_window2.x = 640
   @item_window3.x = 640
   @item_window4.x = 640
   @item_window5.x = 640    
   @right_window.help_window = @help_window
   @item_window1.help_window = @help_window
   @item_window2.help_window = @help_window
   @item_window3.help_window = @help_window
   @item_window4.help_window = @help_window
   @item_window5.help_window = @help_window
   @right_window.index = @equip_index
   @right_window.x = 640
   refresh
   unless MOG::EQUIP_FX == 2
   Graphics.transition(MOG::EQUIP_TRAN_TIME, "Graphics/Transitions/" +
     MOG::EQUIP_TRAN_TYPE)
   else
     Graphics.transition
   end
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   for i in 0..20
   @left_window.x -= 15
   @left_window.contents_opacity -= 10
   @item_window.x += 20
   @item_window.contents_opacity -= 15
   @right_window.x += 20
   @right_window.contents_opacity -= 15
   Graphics.update  
   end  
   Graphics.freeze
   @help_window.dispose
   @left_window.dispose
   @right_window.dispose
   @item_window1.dispose
   @item_window2.dispose
   @item_window3.dispose
   @item_window4.dispose
   @item_window5.dispose
   @mnback.dispose unless MOG::EQUIP_FX == 2
   @spriteset.dispose if MOG::EQUIP_FX == 2
   @mnlay.dispose
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------  
 def refresh
   @item_window1.visible = (@right_window.index == 0)
   @item_window2.visible = (@right_window.index == 1)
   @item_window3.visible = (@right_window.index == 2)
   @item_window4.visible = (@right_window.index == 3)
   @item_window5.visible = (@right_window.index == 4)
   item1 = @right_window.item
   case @right_window.index
   when 0
     @item_window = @item_window1
   when 1
     @item_window = @item_window2
   when 2
     @item_window = @item_window3
   when 3
     @item_window = @item_window4
   when 4
     @item_window = @item_window5
   end
   if @right_window.active
     @left_window.set_new_parameters(nil, nil, nil,nil, nil, nil, nil)
   end
   if @item_window.active
     item2 = @item_window.item
     last_hp = @actor.hp
     last_sp = @actor.sp
     @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
     new_atk = @actor.atk
     new_pdef = @actor.pdef
     new_mdef = @actor.mdef
     new_str = @actor.str
     new_dex = @actor.dex
     new_agi = @actor.agi
     new_int = @actor.int    
     @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
     @actor.hp = last_hp
     @actor.sp = last_sp
     @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str,
     new_dex,new_agi,new_int)      
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------  
 def update
   if @right_window.x > 272
      @right_window.x -= 25
   elsif @right_window.x <= 272
      @right_window.x = 272
   end  
   if @item_window.x > 272
      @item_window.x -= 25
   elsif @item_window.x <= 272
       @item_window.x = 272
   end
   if @item_window.active == false  
     if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
       @item_window.x = 640  
     end  
   end
   if @left_window.x < 0
     @left_window.x += 15
     @left_window.contents_opacity += 10
   elsif @left_window.x >= 0
     @left_window.x = 0
     @left_window.contents_opacity = 255
   end
   if @help_window.x < 0
     @help_window.x  += 20
     @help_window.contents_opacity += 10
   elsif @help_window.x >= 0
     @help_window.x = 0
     @help_window.contents_opacity = 255
   end    
   @mnback.ox += 1 if MOG::EQUIP_FX == 0
   @left_window.update
   @right_window.update
   @item_window.update
   if Input.trigger?(Input::B) or Input.trigger?(Input::C) or
     Input.trigger?(Input.dir4) or Input.trigger?(Input::L) or
     Input.trigger?(Input::R) or Input.press?(Input.dir4)
     @help_window.x = -300
     @help_window.contents_opacity = 0
     refresh
   end    
   if @right_window.active
     update_right
     return
   end
   if @item_window.active
     update_item
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when item window is active)
 #--------------------------------------------------------------------------
 alias mog_update update_item
 def update_item
   mog_update
   refresh
 end
end


Attached Files
.png   line 176.png (Size: 88.73 KB / Downloads: 5)
Reply }


Messages In This Thread
RE: Just move the Cursor of the Item_Scene to the right - by Djigit - 08-10-2015, 05:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Permanently modifying move speed Keeroh 5 8,574 05-24-2017, 05:47 AM
Last Post: DerVVulfman
   little Edit of the cursor world map system Djigit 3 5,850 08-24-2014, 02:31 AM
Last Post: Djigit
   Atoa ACBS Target move wrong after move to center Djigit 4 5,792 08-04-2014, 05:16 AM
Last Post: Djigit
   Possible to move battle actors when escaping? NewHope 8 12,361 07-27-2012, 06:14 AM
Last Post: NewHope
   Cursor, Selection, and Scrolling tnsi 7 9,709 01-10-2012, 04:16 AM
Last Post: DerVVulfman



Users browsing this thread: