Хорошо! Хорошо!:  0
Плохо! Плохо!:  0
Страница 1 из 2 12 ПоследняяПоследняя
Показано с 1 по 10 из 14

Тема: Advanced Equipment Screen

  1. #1
    Маститый Аватар для Narcotic Truth
    Информация о пользователе
    Регистрация
    29.04.2008
    Адрес
    RUSSIA
    Сообщений
    1,280
    Записей в дневнике
    2
    Репутация: 26 Добавить или отнять репутацию

    По умолчанию Advanced Equipment Screen

    Advanced Equipment Screen
    By Narcotic Truth

    Описание:
    Небольшая модификация оригинального скрипта, для более интересного визуального оформления и большего количества статов для отображения.

    Скрин:



    Дополнительно:
    Дополнительная графика

    Скрипты:
    Scene_Equip
    Код:
    #==============================================================================
    # ** Scene_Equip
    #------------------------------------------------------------------------------
    #  This class performs equipment screen processing.
    #==============================================================================
    
    class Scene_Equip
      #--------------------------------------------------------------------------
      # * Object Initialization
      #     actor_index : actor index
      #     equip_index : equipment index
      #--------------------------------------------------------------------------
      def initialize(actor_index = 0, equip_index = 0)
        @actor_index = actor_index
        @equip_index = equip_index
        @sprite = Sprite.new
        @char = Sprite.new
        
        @ITYPE = Sprite.new
        @sprite.bitmap = RPG::Cache.picture("Menu-Back-Inventory.png")
       
    
      end
      #--------------------------------------------------------------------------
      # * Main Processing
      #--------------------------------------------------------------------------
      def main
        # Get actor
        @actor = $game_party.actors[@actor_index]
    
        # Make windows
        @left_window = Window_EquipLeft.new(@actor)
        @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)
        # Associate help window
        @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
        # Set cursor position
        @right_window.index = @equip_index
        refresh
        # Execute transition
        Graphics.transition
        # Main loop
        loop do
          # Update game screen
          Graphics.update
          # Update input information
          Input.update
          # Frame update
          update
          # Abort loop if screen is changed
          if $scene != self
            break
          end
        end
        # Prepare for transition
        Graphics.freeze
        # Dispose of windows
        @left_window.dispose
        @right_window.dispose
        @item_window1.dispose
        @item_window2.dispose
        @item_window3.dispose
        @item_window4.dispose
        @item_window5.dispose
          @ITYPE.bitmap.dispose
          @char.bitmap.dispose
    #      @armor.bitmap.dispose
    #      @shield.bitmap.dispose
    #      @implant.bitmap.dispose
    #      @belt.bitmap.dispose
      end
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh
        # Set item window to visible
            @char.bitmap = RPG::Cache.picture("Characters/" + "C"+@actor.id.to_s) 
        @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)
        # Get currently equipped item
        item1 = @right_window.item
        # Set current item window to @item_window
        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 is active
        if @right_window.active
          # Erase parameters for after equipment change
          @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil)
        end
        # If item window is active
        if @item_window.active
          # Get currently selected item
          item2 = @item_window.item
          # Change equipment
          last_hp = @actor.hp
          last_sp = @actor.sp
          @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
          # Get parameters for after equipment change
          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
          # Return equipment
          @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
          @actor.hp = last_hp
          @actor.sp = last_sp
          # Draw in left window
          @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
        # Update windows
        @left_window.update
        @right_window.update
        @item_window.update
        refresh
        # If right window is active: call update_right
        if @right_window.active
          update_right
          return
        end
        # If item window is active: call update_item
        if @item_window.active
          update_item
          return
        end
      end
      #--------------------------------------------------------------------------
      # * Frame Update (when right window is active)
      #--------------------------------------------------------------------------
      def update_right
        
        if @right_window.index == 0 
        @ITYPE.bitmap = RPG::Cache.picture("R-hand.png")
      end
        if @right_window.index == 1 
        @ITYPE.bitmap = RPG::Cache.picture("L-hand.png")
      end
        if @right_window.index == 2 
        @ITYPE.bitmap = RPG::Cache.picture("head.png")
      end 
        if @right_window.index == 3 
        @ITYPE.bitmap = RPG::Cache.picture("Body.png")
      end
        if @right_window.index == 4 
        @ITYPE.bitmap = RPG::Cache.picture("Implant.png")
      end 
        # If B button was pressed
        if Input.trigger?(Input::B)
          # Play cancel SE
          $game_system.se_play($data_system.cancel_se)
          # Switch to menu screen
          
          @sprite.bitmap.dispose
          @ITYPE.bitmap.dispose
          @char.bitmap.dispose
    #      @armor.bitmap.dispose
    #      @shield.bitmap.dispose
    #      @implant.bitmap.dispose
    #      @belt.bitmap.dispose
          
          $scene = Scene_Menu.new(2)
          return
        end
        # If C button was pressed
        if Input.trigger?(Input::C)
          # If equipment is fixed
          if @actor.equip_fix?(@right_window.index)
            # Play buzzer SE
            $game_system.se_play($data_system.buzzer_se)
            return
          end
          # Play decision SE
          $game_system.se_play($data_system.decision_se)
          # Activate item window
          @right_window.active = false
          @item_window.active = true
          @item_window.index = 0
          return
        end
        # If R button was pressed
        if Input.trigger?(Input::R)
          # Play cursor SE
          $game_system.se_play($data_system.cursor_se)
          # To next actor
          @actor_index += 1
          @actor_index %= $game_party.actors.size
          # Switch to different equipment screen
          $scene = Scene_Equip.new(@actor_index, @right_window.index)
          return
        end
        # If L button was pressed
        if Input.trigger?(Input::L)
          # Play cursor SE
          $game_system.se_play($data_system.cursor_se)
          # To previous actor
          @actor_index += $game_party.actors.size - 1
          @actor_index %= $game_party.actors.size
          # Switch to different equipment screen
          $scene = Scene_Equip.new(@actor_index, @right_window.index)
          return
        end
      end
      #--------------------------------------------------------------------------
      # * Frame Update (when item window is active)
      #--------------------------------------------------------------------------
      def update_item
        # If B button was pressed
        if Input.trigger?(Input::B)
          # Play cancel SE
          $game_system.se_play($data_system.cancel_se)
          # Activate right window
          @right_window.active = true
          @item_window.active = false
          @item_window.index = -1
          return
        end
        # If C button was pressed
        if Input.trigger?(Input::C)
          # Play equip SE
          $game_system.se_play($data_system.equip_se)
          # Get currently selected data on the item window
          item = @item_window.item
          # Change equipment
          @actor.equip(@right_window.index, item == nil ? 0 : item.id)
          # Activate right window
          @right_window.active = true
          @item_window.active = false
          @item_window.index = -1
          # Remake right window and item window contents
          @right_window.refresh
          @item_window.refresh
          return
        end
      end
    end
    Window_EquipLeft
    Код:
    #==============================================================================
    # ** Window_EquipLeft
    #------------------------------------------------------------------------------
    #  This window displays actor parameter changes on the equipment screen.
    #==============================================================================
    
    class Window_EquipLeft < Window_Base
      #--------------------------------------------------------------------------
      # * Object Initialization
      #     actor : actor
      #--------------------------------------------------------------------------
      def initialize(actor)
        super(-7, 378, 399, 110)
        self.contents = Bitmap.new(width - 0, height - 0)
        @actor = actor
        refresh
      end
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh
        self.contents.clear
        self.contents.font.color = normal_color
        self.contents.font.size = 18
        self.contents.font.bold = true
        self.contents.draw_text(95,  0, 24, 32, @actor.level.to_s, 2)
        self.contents.draw_text(69, 16, 50, 32, @actor.atk.to_s, 2)
        self.contents.draw_text(69, 32, 50, 32, @actor.pdef.to_s, 2)
        self.contents.draw_text(69, 48, 50, 32, @actor.mdef.to_s, 2)
        
        self.contents.draw_text(240,  0, 50, 32, @actor.str.to_s, 2)
        self.contents.draw_text(240, 16, 50, 32, @actor.dex.to_s, 2)
        self.contents.draw_text(240, 32, 50, 32, @actor.agi.to_s, 2)
        self.contents.draw_text(240, 48, 50, 32, @actor.int.to_s, 2)    
        
        if @new_atk != nil
          self.contents.font.color = normal_color
          self.contents.draw_text(123, 16, 40, 32, "->", 1)
                               if @actor.atk >= @new_atk
                                  self.contents.font.color = red_color
                               end
                               if @actor.atk <= @new_atk
                                  self.contents.font.color = green_color
                               end
                               if @actor.atk == @new_atk
                                  self.contents.font.color = system_color
                               end
          self.contents.draw_text(150, 16, 36, 32, @new_atk.to_s, 2)
        end
        
        
        if @new_pdef != nil
          self.contents.font.color = normal_color
          self.contents.draw_text(123, 32, 40, 32, "->", 1)
                               if @actor.pdef >= @new_pdef
                                  self.contents.font.color = red_color
                               end
                               if @actor.pdef <= @new_pdef
                                  self.contents.font.color = green_color
                               end
                               if @actor.pdef == @new_pdef
                                  self.contents.font.color = system_color
                               end      
                self.contents.draw_text(150, 32, 36, 32, @new_pdef.to_s, 2)
        end
        
        if @new_mdef != nil
          self.contents.font.color = normal_color
          self.contents.draw_text(123, 48, 40, 32, "->", 1)
                               if @actor.mdef >= @new_mdef
                                  self.contents.font.color = red_color
                               end
                               if @actor.mdef <= @new_mdef
                                  self.contents.font.color = green_color
                               end
                               if @actor.mdef == @new_mdef
                                  self.contents.font.color = system_color
                               end      
          self.contents.draw_text(150, 48, 36, 32, @new_mdef.to_s, 2)
        end    
        
          
              
        if @new_str != nil
          self.contents.font.color = normal_color
          self.contents.draw_text(294, 0, 40, 32, "->", 1)
                               if @actor.str >= @new_str
                                  self.contents.font.color = red_color
                               end
                               if @actor.str <= @new_str
                                  self.contents.font.color = green_color
                               end
                               if @actor.str == @new_str
                                  self.contents.font.color = system_color
                               end      
          self.contents.draw_text(321, 0, 36, 32, @new_str.to_s, 2)
        end
        
              
        if @new_dex != nil
          self.contents.font.color = normal_color
          self.contents.draw_text(294, 16, 40, 32, "->", 1)
                               if @actor.dex >= @new_dex
                                  self.contents.font.color = red_color
                               end
                               if @actor.dex <= @new_dex
                                  self.contents.font.color = green_color
                               end
                               if @actor.dex == @new_dex
                                  self.contents.font.color = system_color
                               end      
          self.contents.draw_text(321, 16, 36, 32, @new_dex.to_s, 2)
        end
        
        if @new_agi != nil
          self.contents.font.color = normal_color
          self.contents.draw_text(294, 32, 40, 32, "->", 1)
                               if @actor.agi >= @new_agi
                                  self.contents.font.color = red_color
                               end
                               if @actor.agi <= @new_agi
                                  self.contents.font.color = green_color
                               end
                               if @actor.agi == @new_agi
                                  self.contents.font.color = system_color
                               end      
          self.contents.draw_text(321, 32, 36, 32, @new_agi.to_s, 2)
        end
        
    
        if @new_int != nil
          self.contents.font.color = normal_color
          self.contents.draw_text(294, 48, 40, 32, "->", 1)
                               if @actor.int >= @new_int
                                  self.contents.font.color = red_color
                               end
                               if @actor.int <= @new_int
                                  self.contents.font.color = green_color
                               end
                               if @actor.int == @new_int
                                  self.contents.font.color = system_color
                               end      
          self.contents.draw_text(321, 48, 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
      #--------------------------------------------------------------------------
      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_agi != 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
    Код:
    #==============================================================================
    # ** 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
      #--------------------------------------------------------------------------
      def initialize(actor)
        super(250, 64, 165, 192)
        self.contents = Bitmap.new(width-10 , height-5)
        @actor = actor
        refresh
        self.index = 0
      end
      #--------------------------------------------------------------------------
      # * Item Acquisition
      #--------------------------------------------------------------------------
      def item
        return @data[self.index]
      end
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh
        self.contents.clear
            self.contents.font.size = 16
            self.contents.font.bold = true
        @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
        draw_item_name(@data[0], -25, 32 * 0)
        draw_item_name(@data[1], -25, 32 * 1)
        draw_item_name(@data[2], -25, 32 * 2)
        draw_item_name(@data[3], -25, 32 * 3)
        draw_item_name(@data[4], -25, 32 * 4)
      end
    
    end
    Window_EquipItem
    Код:
    #==============================================================================
    # ** 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)
      #--------------------------------------------------------------------------
      def initialize(actor, equip_type)
        super(0, 33, 255, 320)
        @actor = actor
        @equip_type = equip_type
        @column_max = 1
        refresh
        self.active = false
        self.index = -1
      end
      #--------------------------------------------------------------------------
      # * Item Acquisition
      #--------------------------------------------------------------------------
      def item
        return @data[self.index]
      end
      #--------------------------------------------------------------------------
      # * Refresh
      #--------------------------------------------------------------------------
      def refresh
        if self.contents != nil
          self.contents.dispose
          self.contents = nil
        end
        @data = []
        # Add equippable weapons
        if @equip_type == 0
          weapon_set = $data_classes[@actor.class_id].weapon_set
          for i in 1...$data_weapons.size
            if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
              @data.push($data_weapons[i])
            end
          end
        end
        # Add equippable armor
        if @equip_type != 0
          armor_set = $data_classes[@actor.class_id].armor_set
          for i in 1...$data_armors.size
            if $game_party.armor_number(i) > 0 and armor_set.include?(i)
              if $data_armors[i].kind == @equip_type-1
                @data.push($data_armors[i])
              end
            end
          end
        end
        # Add blank page
        @data.push(nil)
        # Make a bit map and draw all items
        @item_max = @data.size
        self.contents = Bitmap.new(width - 32, row_max * 32)
        for i in 0...@item_max-1
          draw_item(i)
        end
      end
      #--------------------------------------------------------------------------
      # * Draw Item
      #     index : item number
      #--------------------------------------------------------------------------
      def draw_item(index)
        item = @data[index]
        x = 4 
        y = index * 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 = normal_color
        self.contents.font.size = 16
        self.contents.font.bold = true
        self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
        self.contents.draw_text(x + 180, y, 16, 32, ":", 1)
        self.contents.draw_text(x + 185, y, 24, 32, number.to_s, 2)
      end
      #--------------------------------------------------------------------------
      # * Help Text Update
      #--------------------------------------------------------------------------
      def update_help
        @help_window.set_text(self.item == nil ? "" : self.item.description)
      end
    end
    Window_Base
    Код:
    #==============================================================================
    # ** Window_Base
    #------------------------------------------------------------------------------
    #  This class is for all in-game windows.
    #==============================================================================
    
    class Window_Base < Window
      #--------------------------------------------------------------------------
      # * Object Initialization
      #     x      : window x-coordinate
      #     y      : window y-coordinate
      #     width  : window width
      #     height : window height
      #--------------------------------------------------------------------------
      def initialize(x, y, width, height)
        super()
        @windowskin_name = $game_system.windowskin_name
        
        if $ws == '0'
              self.windowskin = RPG::Cache.windowskin("DOT.png")
            else
                  self.windowskin = RPG::Cache.windowskin("DOT_2.png")
                end
                
        self.x = x
        self.y = y
        self.width = width
        self.height = height
        self.z = 100
      end
      #--------------------------------------------------------------------------
      # * Dispose
      #--------------------------------------------------------------------------
      def dispose
        # Dispose if window contents bit map is set
        if self.contents != nil
          self.contents.dispose
    
        end
        super
      end
      #--------------------------------------------------------------------------
      # * Get Text Color
      #     n : text color number (0-7)
      #--------------------------------------------------------------------------
      def text_color(n)
        case n
        when 0
          return Color.new(255, 255, 255, 255)
        when 1
          return Color.new(255, 255, 255, 160)
        when 2
          return Color.new(90, 100, 140, 255)
        when 3
          return Color.new(128, 255, 128, 255)
        when 4
          return Color.new(128, 255, 255, 255)
        when 5
          return Color.new(255, 128, 255, 255)
        when 6
          return Color.new(255, 255, 128, 255)
        when 7
          return Color.new(192, 192, 192, 255)
        when 8
          return Color.new(0, 0, 0, 255)
        else
          normal_color
        end
      end
      
      def red_color
        return Color.new(191, 0, 0, 255)
      end
      def green_color
        return Color.new(0, 191, 9, 255)
      end
      #--------------------------------------------------------------------------
      # * Get Normal Text Color
      #--------------------------------------------------------------------------
      def normal_color
        return Color.new(255, 255, 255, 255)
      end
      #--------------------------------------------------------------------------
      # * Get Disabled Text Color
      #--------------------------------------------------------------------------
      def disabled_color
        return Color.new(255, 255, 255, 128)
      end
      #--------------------------------------------------------------------------
      # * Get System Text Color
      #--------------------------------------------------------------------------
      def system_color
        return Color.new(192, 224, 255, 255)
      end
      #--------------------------------------------------------------------------
      # * Get Crisis Text Color
      #--------------------------------------------------------------------------
      def crisis_color
        return Color.new(255, 255, 64, 255)
      end
      #--------------------------------------------------------------------------
      # * Get Knockout Text Color
      #--------------------------------------------------------------------------
      def knockout_color
        return Color.new(255, 64, 0)
      end
      #--------------------------------------------------------------------------
      # * Frame Update
      #--------------------------------------------------------------------------
      def update
        super
        # Reset if windowskin was changed
        if $game_system.windowskin_name != @windowskin_name
          @windowskin_name = $game_system.windowskin_name
          self.windowskin = RPG::Cache.windowskin(@windowskin_name)
        end
      end
      #--------------------------------------------------------------------------
      # * Draw Graphic
      #     actor : actor
      #     x     : draw spot x-coordinate
      #     y     : draw spot y-coordinate
      #--------------------------------------------------------------------------
      def draw_actor_graphic(actor, x, y)
        bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
        cw = bitmap.width / 4
        ch = bitmap.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
      end
      #--------------------------------------------------------------------------
      # * Draw Name
      #     actor : actor
      #     x     : draw spot x-coordinate
      #     y     : draw spot y-coordinate
      #--------------------------------------------------------------------------
      def draw_actor_name(actor, x, y)
        self.contents.font.color = normal_color
        self.contents.draw_text(x, y, 120, 32, actor.name)
      end
      #--------------------------------------------------------------------------
      # * Draw Class
      #     actor : actor
      #     x     : draw spot x-coordinate
      #     y     : draw spot y-coordinate
      #--------------------------------------------------------------------------
      def draw_actor_class(actor, x, y)
        self.contents.font.color = normal_color
        self.contents.draw_text(x, y, 236, 32, actor.class_name)
      end
      #--------------------------------------------------------------------------
      # * Draw Level
      #     actor : actor
      #     x     : draw spot x-coordinate
      #     y     : draw spot y-coordinate
      #--------------------------------------------------------------------------
      def draw_actor_level(actor, x, y)
        self.contents.font.color = system_color
        self.contents.draw_text(x, y, 32, 32, "Lvl")
        self.contents.font.color = normal_color
        self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
      end
      #--------------------------------------------------------------------------
      # * Make State Text String for Drawing
      #     actor       : actor
      #     width       : draw spot width
      #     need_normal : Whether or not [normal] is needed (true / false)
      #--------------------------------------------------------------------------
      def make_battler_state_text(battler, width, need_normal)
        # Get width of brackets
        brackets_width = self.contents.text_size("[]").width
        # Make text string for state names
        text = ""
        for i in battler.states
          if $data_states[i].rating >= 1
            if text == ""
              text = $data_states[i].name
            else
              new_text = text + "/" + $data_states[i].name
              text_width = self.contents.text_size(new_text).width
              if text_width > width - brackets_width
                break
              end
              text = new_text
            end
          end
        end
        # If text string for state names is empty, make it [normal]
        if text == ""
          if need_normal
            text = "[Normal]"
          end
        else
          # Attach brackets
          text = "[" + text + "]"
        end
        # Return completed text string
        return text
      end
      #--------------------------------------------------------------------------
      # * Draw State
      #     actor : actor
      #     x     : draw spot x-coordinate
      #     y     : draw spot y-coordinate
      #     width : draw spot width
      #--------------------------------------------------------------------------
      def draw_actor_state(actor, x, y, width = 120)
        text = make_battler_state_text(actor, width, true)
        self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
        self.contents.draw_text(x, y, width, 32, text)
      end
      #--------------------------------------------------------------------------
      # * Draw EXP
      #     actor : actor
      #     x     : draw spot x-coordinate
      #     y     : draw spot y-coordinate
      #--------------------------------------------------------------------------
      def draw_actor_exp(actor, x, y)
        self.contents.font.color = system_color
        self.contents.draw_text(x, y, 24, 32, "Exp")
        self.contents.font.color = normal_color
        self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
        self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
        self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
      end
      #--------------------------------------------------------------------------
      # * Draw HP
      #     actor : actor
      #     x     : draw spot x-coordinate
      #     y     : draw spot y-coordinate
      #     width : draw spot width
      #--------------------------------------------------------------------------
      def draw_actor_hp(actor, x, y, width = 144)
        # Draw "HP" text string
        self.contents.font.color = system_color
        self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
        # Calculate if there is draw space for MaxHP
        if width - 32 >= 108
          hp_x = x + width - 108
          flag = true
        elsif width - 32 >= 48
          hp_x = x + width - 48
          flag = false
        end
        # Draw HP
        self.contents.font.color = actor.hp == 0 ? knockout_color :
          actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
        self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
        # Draw MaxHP
        if flag
          self.contents.font.color = normal_color
          self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
          self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
        end
      end
      #--------------------------------------------------------------------------
      # * Draw SP
      #     actor : actor
      #     x     : draw spot x-coordinate
      #     y     : draw spot y-coordinate
      #     width : draw spot width
      #--------------------------------------------------------------------------
      def draw_actor_sp(actor, x, y, width = 144)
        # Draw "SP" text string
        self.contents.font.color = system_color
        self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
        # Calculate if there is draw space for MaxHP
        if width - 32 >= 108
          sp_x = x + width - 108
          flag = true
        elsif width - 32 >= 48
          sp_x = x + width - 48
          flag = false
        end
        # Draw SP
        self.contents.font.color = actor.sp == 0 ? knockout_color :
          actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
        self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
        # Draw MaxSP
        if flag
          self.contents.font.color = normal_color
          self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
          self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
        end
      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)
        case type
        when 0
          parameter_name = $data_system.words.atk
          parameter_value = actor.atk
        when 1
          parameter_name = $data_system.words.pdef
          parameter_value = actor.pdef
        when 2
          parameter_name = $data_system.words.mdef
          parameter_value = actor.mdef
        when 3
          parameter_name = $data_system.words.str
          parameter_value = actor.str
        when 4
          parameter_name = $data_system.words.dex
          parameter_value = actor.dex
        when 5
          parameter_name = $data_system.words.agi
          parameter_value = actor.agi
        when 6
          parameter_name = $data_system.words.int
          parameter_value = actor.int
        end
        self.contents.font.color = system_color
        self.contents.draw_text(x, y, 120, 32, parameter_name)
        self.contents.font.color = normal_color
        self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
      end
      #--------------------------------------------------------------------------
      # * Draw Item Name
      #     item : item
      #     x    : draw spot x-coordinate
      #     y    : draw spot y-coordinate
      #--------------------------------------------------------------------------
      def draw_item_name(item, x, y)
        if item == nil
          return
        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 = normal_color
        self.contents.draw_text(x + 28, y, 212, 32, item.name)
      end
    end
    Последний раз редактировалось Arnon; 05.06.2013 в 19:36.
    --- Yellow House Studio ---

  2. #2
    Маститый Аватар для Andrew
    Информация о пользователе
    Регистрация
    08.02.2011
    Адрес
    Беларусь, Витебск
    Сообщений
    1,049
    Записей в дневнике
    3
    Репутация: 30 Добавить или отнять репутацию

    По умолчанию

    Был бы такой на ВХ.


  3. #3
    Пользователь Аватар для Тайреш
    Информация о пользователе
    Регистрация
    19.05.2010
    Адрес
    Екатеринбург
    Сообщений
    39
    Репутация: 3 Добавить или отнять репутацию

    По умолчанию

    Ооо, да уж...


  4. #4
    Создатель Аватар для Рольф
    Информация о пользователе
    Регистрация
    14.04.2008
    Адрес
    Южно- Сахалинск/Пенза
    Сообщений
    10,283
    Записей в дневнике
    2
    Репутация: 108 Добавить или отнять репутацию

    По умолчанию

    Красиво молодец, намного лучше моего старого вышло.

  5. #5
    Создатель Аватар для Рольф
    Информация о пользователе
    Регистрация
    14.04.2008
    Адрес
    Южно- Сахалинск/Пенза
    Сообщений
    10,283
    Записей в дневнике
    2
    Репутация: 108 Добавить или отнять репутацию

    По умолчанию

    Был бы такой на ВХ.
    Я сейчас занимаюсь скриптом журнала для своей игры и для общего пользования. После могу посмотреть.

  6. #6
    Маститый Аватар для Nalia
    Информация о пользователе
    Регистрация
    18.09.2009
    Адрес
    Пенза
    Сообщений
    1,412
    Записей в дневнике
    105
    Репутация: 87 Добавить или отнять репутацию

    По умолчанию

    Действительно, круто. Хорошо бы ещё сделать, чтобы с multipile weapon работал. )
    Я отрицаю вашу реальность и заменю её своей. (c) Джон Адам Севидж

    Надо работать, работать надо. Ремешки под касками затянуть потуже, шинели в порядок привести, в кобуру засунуть трудолюбие 36 калибра и марш за мейкер! (с) Tall Men

  7. #7
    Маститый Аватар для Narcotic Truth
    Информация о пользователе
    Регистрация
    29.04.2008
    Адрес
    RUSSIA
    Сообщений
    1,280
    Записей в дневнике
    2
    Репутация: 26 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от Nalia Посмотреть сообщение
    Действительно, круто. Хорошо бы ещё сделать, чтобы с multipile weapon работал. )
    Скинь скрипт - попробую слепить.
    --- Yellow House Studio ---

  8. #8
    Создатель Аватар для Рольф
    Информация о пользователе
    Регистрация
    14.04.2008
    Адрес
    Южно- Сахалинск/Пенза
    Сообщений
    10,283
    Записей в дневнике
    2
    Репутация: 108 Добавить или отнять репутацию

    По умолчанию

    Должен нормально встать, скрипт не сильно меняет стандартные данные.

  9. #9
    Маститый Аватар для Narcotic Truth
    Информация о пользователе
    Регистрация
    29.04.2008
    Адрес
    RUSSIA
    Сообщений
    1,280
    Записей в дневнике
    2
    Репутация: 26 Добавить или отнять репутацию

    По умолчанию

    Выложите скрипт multipile weapon. Добавлю в свой.
    --- Yellow House Studio ---

  10. #10
    Бывалый Аватар для Yin
    Информация о пользователе
    Регистрация
    28.09.2010
    Сообщений
    742
    Записей в дневнике
    1
    Репутация: 25 Добавить или отнять репутацию

    По умолчанию

    Тебе какой? Старый от Гулияме или новый Мультислотс от ДерВульфмэна?

Страница 1 из 2 12 ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Advanced Equipment Screen