Страница 380 из 643 ПерваяПервая ... 280330370378379380381382390430480 ... ПоследняяПоследняя
Показано с 3,791 по 3,800 из 6423

Тема: Общие вопросы

  1. #3791
    Маститый Аватар для Элрик
    Информация о пользователе
    Регистрация
    09.09.2010
    Сообщений
    1,284
    Записей в дневнике
    47
    Репутация: 24 Добавить или отнять репутацию

    По умолчанию

    С интернета скачай, нарисуй сам, проблем-то. Разработчик игр, называется.

  2. #3792
    Местный Аватар для АндрейЕ
    Информация о пользователе
    Регистрация
    24.05.2014
    Адрес
    Тольятти
    Сообщений
    225
    Репутация: 33 Добавить или отнять репутацию

    По умолчанию

    UPD
    Для того чтобы при использовании навыка использовалась вещь и показывалось её количество то нужно сделать так:

    В скриптах. Раздел Окна. Строчка Window_SkillList. Строчка 98.
    Заменить Draw Skill Use Cost на
    PHP код:
      def draw_skill_cost(rectskill)
        if 
    skill.note.match(/item\[(\d+)\]/i)
          
    item_id skill.note[/item\[(.+?)\]/i][/\d+/].to_i
          text 
    $game_party.item_number($data_items[item_id]).to_s
          draw_text
    (recttext,2)
        
    elsif @actor.skill_tp_cost(skill) > 0
          change_color
    (tp_cost_colorenable?(skill))
          
    draw_text(rect, @actor.skill_tp_cost(skill), 2)
        
    elsif @actor.skill_mp_cost(skill) > 0
          change_color
    (mp_cost_colorenable?(skill))
          
    draw_text(rect, @actor.skill_mp_cost(skill), 2)
        
    end
      end 
    И добавить скрипт в строчку Дополнения Yanfly Engine Ace - Skill Cost Manager v1.03 но немного измененный(удален последний раздел Window_SkillList):
    Спойлер Скрипт:
    PHP код:
    #==============================================================================

    # ▼ Yanfly Engine Ace - Skill Cost Manager v1.03
    # -- Last Updated: 2012.01.23
    # -- Level: Normal, Hard, Lunatic
    # -- Requires: n/a

    #==============================================================================

    $imported = {} if $imported.nil?
    $imported["YEA-SkillCostManager"] = true

    #==============================================================================
    # ▼ Updates
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # 2012.08.06 - Restore SP-Paramater: TCR
    # 2012.01.23 - Compatibility Update: Doppelganger
    # 2011.12.11 - Started Script and Finished.
    #            - Added max and min notetags.

    #==============================================================================
    # ▼ Introduction
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script adds more functionality towards skill costs. Skills can now cost
    # HP, more MP, more TP, gold, and even have custom costs. The way the skill
    # costs are drawn in the display windows are changed to deliver more effective
    # and reliable information to the player. And if four skill costs aren't enough
    # to satisfy you, you can even make your own custom skill costs.

    #==============================================================================
    # ▼ Instructions
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # To install this script, open up your script editor and copy/paste this script
    # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.

    # -----------------------------------------------------------------------------
    # Actor Notetags - These notetags go in the actors notebox in the database.
    # -----------------------------------------------------------------------------
    # <hp cost rate: x%>
    # Allows the actor to drop the HP cost of skills to x%.

    # <tp cost rate: x%>
    # Allows the actor to drop the TP cost of skills to x%.

    # <gold cost rate: x%>
    # Allows the actor to drop the Gold cost of skills to x%.

    # -----------------------------------------------------------------------------
    # Class Notetags - These notetags go in the class notebox in the database.
    # -----------------------------------------------------------------------------
    # <hp cost rate: x%>
    # Allows the class to drop the HP cost of skills to x%.

    # <tp cost rate: x%>
    # Allows the class to drop the TP cost of skills to x%.

    # <gold cost rate: x%>
    # Allows the class to drop the Gold cost of skills to x%.

    # -----------------------------------------------------------------------------
    # Skill Notetags - These notetags go in the skills notebox in the database.
    # -----------------------------------------------------------------------------
    # <hp cost: x>
    # Sets the skill's HP cost to x. This function did not exist by default in
    # RPG Maker VX Ace.

    # <hp cost: x%>
    # Sets the HP cost to a percentage of the actor's MaxHP. If a normal HP cost is
    # present on the skill, too, then this value is added to the HP cost.

    # <hp cost max: x>
    # <hp cost min: x>
    # Sets the maximum and minimum range of the HP Cost of the skill. If you do not
    # use this tag, there will be no maximum and/or minimum range.

    # <mp cost: x>
    # Sets the skill's MP cost to x. Allows MP cost to exceed 9999, which is RPG
    # Maker VX Ace's database editor's maximum limit.

    # <mp cost: x%>
    # Sets the MP cost to a percentage of the actor's MaxMP. If a normal MP cost is
    # present on the skill, too, then this value is added to the MP cost.

    # <mp cost max: x>
    # <mp cost min: x>
    # Sets the maximum and minimum range of the MP Cost of the skill. If you do not
    # use this tag, there will be no maximum and/or minimum range.

    # <tp cost: x>
    # Sets the skill's TP cost to x. Allows TP cost to exceed 100, which is RPG
    # Maker VX Ace's database editor's maximum limit.

    # <tp cost: x%>
    # Sets the TP cost to a percentage of the actor's MaxTP. If a normal TP cost is
    # present on the skill, too, then this value is added to the TP cost.

    # <tp cost max: x>
    # <tp cost min: x>
    # Sets the maximum and minimum range of the TP Cost of the skill. If you do not
    # use this tag, there will be no maximum and/or minimum range.

    # <gold cost: x>
    # Sets the skill's gold cost to x. Enemies with skills that cost gold do not
    # use gold. If the player does not have enough gold, the skill can't be used.

    # <gold cost: x%>
    # Sets the skill's gold cost equal to a percentage of the party's total gold.
    # If both a regular gold cost and a percentile gold cost is used, the total of
    # both values will be the skill's gold cost.

    # <gold cost max: x>
    # <gold cost min: x>
    # Sets the maximum and minimum range of the Gold Cost of the skill. If you do
    # not use this tag, there will be no maximum and/or minimum range.

    # --- Making Your Own Custom Costs ---

    # <custom cost: string>
    # If you decide to have a custom cost for your game, insert this notetag to
    # change what displays in the skill menu visually.

    # <custom cost colour: x>
    # This is the "Window" skin text colour used for the custom cost. By default,
    # it is text colour 0, which is the white colour.

    # <custom cost size: x>
    # This is the text font size used for the custom cost in the display windows.
    # By default, it is font size 20.

    # <custom cost icon: x>
    # If you wish to use an icon for your custom cost, replace x with the icon ID
    # you wish to show in display windows. By default, it is 0 (and not shown).

    # <custom cost requirement>
    #  string
    #  string
    # </custom cost requirement>
    # Sets the custom cost requirement of the skill with an eval function using the
    # strings in between. The strings are a part of one line even if in the notebox
    # they are on separate lines.

    # <custom cost perform>
    #  string
    #  string
    # </custom cost perform>
    # Sets how the custom cost payment is done with an eval function using the
    # strings in between. The strings are a part of one line even if in the notebox
    # they are on separate lines.

    # -----------------------------------------------------------------------------
    # Weapon Notetags - These notetags go in the weapons notebox in the database.
    # -----------------------------------------------------------------------------
    # <hp cost rate: x%>
    # Allows the weapon to drop the HP cost of skills to x% when worn.

    # <tp cost rate: x%>
    # Allows the weapon to drop the TP cost of skills to x% when worn.

    # <gold cost rate: x%>
    # Allows the weapon to drop the Gold cost of skills to x% when worn.

    # -----------------------------------------------------------------------------
    # Armour Notetags - These notetags go in the armours notebox in the database.
    # -----------------------------------------------------------------------------
    # <hp cost rate: x%>
    # Allows the armour to drop the HP cost of skills to x% when worn.

    # <tp cost rate: x%>
    # Allows the armour to drop the TP cost of skills to x% when worn.

    # <gold cost rate: x%>
    # Allows the armour to drop the TP cost of skills to x% when worn.

    # -----------------------------------------------------------------------------
    # Enemy Notetags - These notetags go in the enemies notebox in the database.
    # -----------------------------------------------------------------------------
    # <hp cost rate: x%>
    # Allows the enemy to drop the HP cost of skills to x%.

    # <tp cost rate: x%>
    # Allows the enemy to drop the TP cost of skills to x%.

    # -----------------------------------------------------------------------------
    # State Notetags - These notetags go in the states notebox in the database.
    # -----------------------------------------------------------------------------
    # <hp cost rate: x%>
    # Allows the state to drop the HP cost of skills to x% when afflicted.

    # <tp cost rate: x%>
    # Allows the state to drop the TP cost of skills to x% when afflicted.

    # <gold cost rate: x%>
    # Allows the state to drop the Gold cost of skills to x% when afflicted.

    #==============================================================================
    # ▼ Compatibility
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
    # it will run with RPG Maker VX without adjusting.

    #==============================================================================

    module YEA
      module SKILL_COST
        
        
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - HP Cost Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # New to this script are HP costs. HP costs require the battler to have
        # sufficient HP before being able to use the skill. The text colour that's
        # used, the suffix, or whether or not to use an icon. If you do not wish
        # to use an icon, set the icon to 0.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        
    HP_COST_COLOUR 21         # Colour used from "Window" skin.
        
    HP_COST_SIZE   20         # Font size used for HP costs.
        
    HP_COST_SUFFIX "%sHP"     # Suffix used for HP costs.
        
    HP_COST_ICON   0          # Icon used for HP costs. Set 0 to disable.
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - MP Cost Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # Here, you can change the settings for MP costs: the text colour that's
        # used, the suffix, or whether or not to use an icon. If you do not wish
        # to use an icon, set the icon to 0.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        
    MP_COST_COLOUR 23         # Colour used from "Window" skin. Default: 23
        
    MP_COST_SIZE   20         # Font size used for MP costs. Default: 24
        
    MP_COST_SUFFIX "%sMP"     # Suffix used for MP costs. No suffix default.
        
    MP_COST_ICON   0          # Icon used for MP costs. Set 0 to disable.
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - TP Cost Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # Here, you can change the settings for TP costs: the text colour that's
        # used, the suffix, or whether or not to use an icon. If you do not wish
        # to use an icon, set the icon to 0.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        
    TP_COST_COLOUR 2          # Colour used from "Window" skin. Default: 29
        
    TP_COST_SIZE   20         # Font size used for TP costs. Default: 24
        
    TP_COST_SUFFIX "%sTP"     # Suffix used for TP costs. No suffix default.
        
    TP_COST_ICON   0          # Icon used for TP costs. Set 0 to disable.
        
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # - Gold Cost Settings -
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        # New to this script are Gold costs. Gold costs require the party to have
        # enough gold before being able to use the skill. The text colour that's
        # used, the suffix, or whether or not to use an icon. If you do not wish
        # to use an icon, set the icon to 0.
        #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
        
    GOLD_COST_COLOUR 6          # Colour used from "Window" skin.
        
    GOLD_COST_SIZE   20         # Font size used for Gold costs.
        
    GOLD_COST_SUFFIX "%sGold"   # Suffix used for Gold costs.
        
    GOLD_COST_ICON   0          # Icon used for Gold costs. Set 0 to disable.
        
      
    end # SKILL_COST
    end # YEA

    #==============================================================================
    # ▼ Editting anything past this point may potentially result in causing
    # computer damage, incontinence, explosion of user's head, coma, death, and/or
    # halitosis so edit at your own risk.
    #==============================================================================

    module YEA
      module REGEXP
      module BASEITEM
        
        HP_COST_RATE 
    = /<(?:HP_COST_RATE|hp cost rate):[ ](\d+)([%])>/i
        TP_COST_RATE 
    = /<(?:TP_COST_RATE|tp cost rate):[ ](\d+)([%])>/i
        GOLD_COST_RATE 
    = /<(?:GOLD_COST_RATE|gold cost rate):[ ](\d+)([%])>/i
        
      end 
    # BASEITEM
      
    module SKILL
        
        HP_COST_SET 
    = /<(?:HP_COST|hp cost):[ ](\d+)>/i
        HP_COST_PER 
    = /<(?:HP_COST|hp cost):[ ](\d+)([%])>/i
        MP_COST_SET 
    = /<(?:MP_COST|mp cost):[ ](\d+)>/i
        MP_COST_PER 
    = /<(?:MP_COST|mp cost):[ ](\d+)([%])>/i
        TP_COST_SET 
    = /<(?:TP_COST|tp cost):[ ](\d+)>/i
        TP_COST_PER 
    = /<(?:TP_COST|tp cost):[ ](\d+)([%])>/i
        GOLD_COST_SET 
    = /<(?:GOLD_COST|gold cost):[ ](\d+)>/i
        GOLD_COST_PER 
    = /<(?:GOLD_COST|gold cost):[ ](\d+)([%])>/i
        
        CUSTOM_COST_TEXT 
    = /<(?:CUSTOM_COST|custom cost):[ ](.*)>/i
        CUSTOM_COST_COLOUR 
    =
          /<(?:
    CUSTOM_COST_COLOUR|custom cost colour|custom cost color):[ ](\d+)>/i
        CUSTOM_COST_SIZE 
    = /<(?:CUSTOM_COST_SIZE|custom cost size):[ ](\d+)>/i
        CUSTOM_COST_ICON 
    = /<(?:CUSTOM_COST_ICON|custom cost icon):[ ](\d+)>/i
        CUSTOM_COST_REQUIREMENT_ON 

          /<(?:
    CUSTOM_COST_REQUIREMENT|custom cost requirement)>/i
        CUSTOM_COST_REQUIREMENT_OFF 

          /<\/(?:
    CUSTOM_COST_REQUIREMENT|custom cost requirement)>/i
        CUSTOM_COST_PERFORM_ON 

          /<(?:
    CUSTOM_COST_PERFORM|custom cost perform)>/i
        CUSTOM_COST_PERFORM_OFF 

          /<\/(?:
    CUSTOM_COST_PERFORM|custom cost perform)>/i
        
        HP_COST_MIN 
    = /<(?:HP_COST_MIN|hp cost min):[ ](\d+)>/i
        HP_COST_MAX 
    = /<(?:HP_COST_MIN|hp cost max):[ ](\d+)>/i
        MP_COST_MIN 
    = /<(?:MP_COST_MIN|mp cost min):[ ](\d+)>/i
        MP_COST_MAX 
    = /<(?:MP_COST_MIN|mp cost max):[ ](\d+)>/i
        TP_COST_MIN 
    = /<(?:TP_COST_MIN|tp cost min):[ ](\d+)>/i
        TP_COST_MAX 
    = /<(?:TP_COST_MIN|tp cost max):[ ](\d+)>/i
        GOLD_COST_MIN 
    = /<(?:GOLD_COST_MIN|gold cost min):[ ](\d+)>/i
        GOLD_COST_MAX 
    = /<(?:GOLD_COST_MIN|gold cost max):[ ](\d+)>/i
        
      end 
    # SKILL
      
    end # REGEXP
    end # YEA

    #==============================================================================
    # ■ Icon
    #==============================================================================

    module Icon
      
      
    #--------------------------------------------------------------------------
      # self.mp_cost
      #--------------------------------------------------------------------------
      
    def self.mp_cost; return YEA::SKILL_COST::MP_COST_ICONend
      
      
    #--------------------------------------------------------------------------
      # self.tp_cost
      #--------------------------------------------------------------------------
      
    def self.tp_cost; return YEA::SKILL_COST::TP_COST_ICONend
      
      
    #--------------------------------------------------------------------------
      # self.hp_cost
      #--------------------------------------------------------------------------
      
    def self.hp_cost; return YEA::SKILL_COST::HP_COST_ICONend
      
      
    #--------------------------------------------------------------------------
      # self.gold_cost
      #--------------------------------------------------------------------------
      
    def self.gold_cost; return YEA::SKILL_COST::GOLD_COST_ICONend
        
    end 
    # Icon

    #==============================================================================
    # ■ Numeric
    #==============================================================================

    class Numeric
      
      
    #--------------------------------------------------------------------------
      # new method: group_digits
      #--------------------------------------------------------------------------
      
    unless $imported["YEA-CoreEngine"]
      
    def group; return self.to_send
      end 
    # $imported["YEA-CoreEngine"]
        
    end # Numeric

    #==============================================================================
    # ■ DataManager
    #==============================================================================

    module DataManager
      
      
    #--------------------------------------------------------------------------
      # alias method: load_database
      #--------------------------------------------------------------------------
      
    class <<selfalias load_database_scm load_databaseend
      def self
    .load_database
        load_database_scm
        load_notetags_scm
      end
      
      
    #--------------------------------------------------------------------------
      # new method: load_notetags_scm
      #--------------------------------------------------------------------------
      
    def self.load_notetags_scm
        groups 
    = [$data_actors$data_classes$data_skills$data_weapons,
          
    $data_armors$data_enemies$data_states]
        for 
    group in groups
          
    for obj in group
            next 
    if obj.nil?
            
    obj.load_notetags_scm
          end
        end
      end
      
    end 
    # DataManager

    #==============================================================================
    # ■ RPG::BaseItem
    #==============================================================================

    class RPG::BaseItem
      
      
    #--------------------------------------------------------------------------
      # public instance variables
      #--------------------------------------------------------------------------
      
    attr_accessor :tp_cost_rate
      attr_accessor 
    :hp_cost_rate
      attr_accessor 
    :gold_cost_rate
      
      
    #--------------------------------------------------------------------------
      # common cache: load_notetags_scm
      #--------------------------------------------------------------------------
      
    def load_notetags_scm
        
    @tp_cost_rate 1.0
        
    @hp_cost_rate 1.0
        
    @gold_cost_rate 1.0
        
    #---
        
    self.note.split(/[\r\n]+/).each { |line|
          case 
    line
          
    #---
          
    when YEA::REGEXP::BASEITEM::TP_COST_RATE
            
    @tp_cost_rate = $1.to_i 0.01
          when YEA
    ::REGEXP::BASEITEM::HP_COST_RATE
            
    @hp_cost_rate = $1.to_i 0.01
          when YEA
    ::REGEXP::BASEITEM::GOLD_COST_RATE
            
    @gold_cost_rate = $1.to_i 0.01
          
    #---
          
    end
        
    # self.note.split
        #---
      
    end
      
    end 
    # RPG::BaseItem

    #==============================================================================
    # ■ RPG::Skill
    #==============================================================================

    class RPG::Skill RPG::UsableItem
      
      
    #--------------------------------------------------------------------------
      # public instance variables
      #--------------------------------------------------------------------------
      
    attr_accessor :hp_cost
      attr_accessor 
    :hp_cost_percent
      attr_accessor 
    :mp_cost_percent
      attr_accessor 
    :tp_cost_percent
      attr_accessor 
    :gold_cost
      attr_accessor 
    :gold_cost_percent
      
      attr_accessor 
    :hp_cost_min
      attr_accessor 
    :hp_cost_max
      attr_accessor 
    :mp_cost_min
      attr_accessor 
    :mp_cost_max
      attr_accessor 
    :tp_cost_min
      attr_accessor 
    :tp_cost_max
      attr_accessor 
    :gold_cost_min
      attr_accessor 
    :gold_cost_max
      
      attr_accessor 
    :use_custom_cost
      attr_accessor 
    :custom_cost_text
      attr_accessor 
    :custom_cost_colour
      attr_accessor 
    :custom_cost_size
      attr_accessor 
    :custom_cost_icon
      attr_accessor 
    :custom_cost_requirement
      attr_accessor 
    :custom_cost_perform
      
      
    #--------------------------------------------------------------------------
      # common cache: load_notetags_scm
      #--------------------------------------------------------------------------
      
    def load_notetags_scm
        
    @hp_cost 0
        
    @gold_cost 0
        
    @hp_cost_percent 0.0
        
    @mp_cost_percent 0.0
        
    @tp_cost_percent 0.0
        
    @gold_cost_percent 0.0
        
        
    @custom_cost_text "0"
        
    @custom_cost_colour 0
        
    @custom_cost_size 20
        
    @custom_cost_icon 0
        
    @custom_cost_requirement ""
        
    @custom_cost_perform ""
        
        
    @use_custom_cost false
        
    @custom_cost_req_on false
        
    @custom_cost_per_on false
        
    #---
        
    self.note.split(/[\r\n]+/).each { |line|
          case 
    line
          
    #---
          
    when YEA::REGEXP::SKILL::MP_COST_SET
            
    @mp_cost = $1.to_i
          when YEA
    ::REGEXP::SKILL::MP_COST_PER
            
    @mp_cost_percent = $1.to_i 0.01
          when YEA
    ::REGEXP::SKILL::TP_COST_SET
            
    @tp_cost = $1.to_i
          when YEA
    ::REGEXP::SKILL::TP_COST_PER
            
    @tp_cost_percent = $1.to_i 0.01
          when YEA
    ::REGEXP::SKILL::HP_COST_SET
            
    @hp_cost = $1.to_i
          when YEA
    ::REGEXP::SKILL::HP_COST_PER
            
    @hp_cost_percent = $1.to_i 0.01
          when YEA
    ::REGEXP::SKILL::GOLD_COST_SET
            
    @gold_cost = $1.to_i
          when YEA
    ::REGEXP::SKILL::GOLD_COST_PER
            
    @gold_cost_percent = $1.to_i 0.01
          
    #---
          
    when YEA::REGEXP::SKILL::HP_COST_MIN
            
    @hp_cost_min = $1.to_i
          when YEA
    ::REGEXP::SKILL::HP_COST_MAX
            
    @hp_cost_max = $1.to_i
          when YEA
    ::REGEXP::SKILL::MP_COST_MIN
            
    @mp_cost_min = $1.to_i
          when YEA
    ::REGEXP::SKILL::MP_COST_MAX
            
    @mp_cost_max = $1.to_i
          when YEA
    ::REGEXP::SKILL::TP_COST_MIN
            
    @tp_cost_min = $1.to_i
          when YEA
    ::REGEXP::SKILL::TP_COST_MAX
            
    @tp_cost_max = $1.to_i
          when YEA
    ::REGEXP::SKILL::GOLD_COST_MIN
            
    @gold_cost_min = $1.to_i
          when YEA
    ::REGEXP::SKILL::GOLD_COST_MAX
            
    @gold_cost_max = $1.to_i
          
    #---
          
    when YEA::REGEXP::SKILL::CUSTOM_COST_TEXT
            
    @custom_cost_text = $1.to_s
          when YEA
    ::REGEXP::SKILL::CUSTOM_COST_COLOUR
            
    @custom_cost_colour = $1.to_i
          when YEA
    ::REGEXP::SKILL::CUSTOM_COST_SIZE
            
    @custom_cost_size = $1.to_i
          when YEA
    ::REGEXP::SKILL::CUSTOM_COST_ICON
            
    @custom_cost_icon = $1.to_i
          when YEA
    ::REGEXP::SKILL::CUSTOM_COST_REQUIREMENT_ON
            
    @custom_cost_req_on true
            
    @use_custom_cost true
          when YEA
    ::REGEXP::SKILL::CUSTOM_COST_REQUIREMENT_OFF
            
    @custom_cost_req_on false
            
    @use_custom_cost true
          when YEA
    ::REGEXP::SKILL::CUSTOM_COST_PERFORM_ON
            
    @custom_cost_per_on true
            
    @use_custom_cost true
          when YEA
    ::REGEXP::SKILL::CUSTOM_COST_PERFORM_OFF
            
    @custom_cost_per_on false
            
    @use_custom_cost true
          
    else
            @
    custom_cost_requirement += line.to_s if @custom_cost_req_on
            
    @custom_cost_perform += line.to_s if @custom_cost_per_on
          
    #---
          
    end
        
    # self.note.split
        #---
      
    end
      
    end 
    # RPG::Skill

    #==============================================================================
    # ■ Game_BattlerBase
    #==============================================================================

    class Game_BattlerBase
      
      
    #--------------------------------------------------------------------------
      # alias method: skill_cost_payable?
      #--------------------------------------------------------------------------
      
    alias game_battlerbase_skill_cost_payable_scm skill_cost_payable?
      
    def skill_cost_payable?(skill)
        return 
    false if hp <= skill_hp_cost(skill)
        return 
    false unless gold_cost_met?(skill)
        return 
    false unless custom_cost_met?(skill)
        return 
    game_battlerbase_skill_cost_payable_scm(skill)
      
    end
      
      
    #--------------------------------------------------------------------------
      # new method: gold_cost_met?
      #--------------------------------------------------------------------------
      
    def gold_cost_met?(skill)
        return 
    true unless actor?
        return 
    $game_party.gold >= skill_gold_cost(skill)
      
    end
      
      
    #--------------------------------------------------------------------------
      # new method: custom_cost_met?
      #--------------------------------------------------------------------------
      
    def custom_cost_met?(skill)
        return 
    true unless skill.use_custom_cost
        
    return eval(skill.custom_cost_requirement)
      
    end
      
      
    #--------------------------------------------------------------------------
      # alias method: pay_skill_cost
      #--------------------------------------------------------------------------
      
    alias game_battlerbase_pay_skill_cost_scm pay_skill_cost
      def pay_skill_cost
    (skill)
        
    game_battlerbase_pay_skill_cost_scm(skill)
        
    self.hp -= skill_hp_cost(skill)
        
    $game_party.lose_gold(skill_gold_cost(skill)) if actor?
        
    pay_custom_cost(skill)
      
    end
      
      
    #--------------------------------------------------------------------------
      # new method: pay_custom_cost
      #--------------------------------------------------------------------------
      
    def pay_custom_cost(skill)
        return 
    unless skill.use_custom_cost
        
    eval(skill.custom_cost_perform)
      
    end
      
      
    #--------------------------------------------------------------------------
      # alias method: skill_mp_cost
      #--------------------------------------------------------------------------
      
    alias game_battlerbase_skill_mp_cost_scm skill_mp_cost
      def skill_mp_cost
    (skill)
        
    game_battlerbase_skill_mp_cost_scm(skill)
        
    += skill.mp_cost_percent mmp mcr
        n 
    = [n.to_iskill.mp_cost_max].min unless skill.mp_cost_max.nil?
        
    = [n.to_iskill.mp_cost_min].max unless skill.mp_cost_min.nil?
        return 
    n.to_i
      end
      
      
    #--------------------------------------------------------------------------
      # alias method: skill_tp_cost
      #--------------------------------------------------------------------------
      
    alias game_battlerbase_skill_tp_cost_scm skill_tp_cost
      def skill_tp_cost
    (skill)
        
    game_battlerbase_skill_tp_cost_scm(skill) * tcr_y
        n 
    += skill.tp_cost_percent max_tp tcr_y
        n 
    = [n.to_iskill.tp_cost_max].min unless skill.tp_cost_max.nil?
        
    = [n.to_iskill.tp_cost_min].max unless skill.tp_cost_min.nil?
        return 
    n.to_i
      end
      
      
    #--------------------------------------------------------------------------
      # new method: tcr_y
      #--------------------------------------------------------------------------
      
    def tcr_y
        n 
    1.0
        
    if actor?
          
    *= self.actor.tp_cost_rate
          n 
    *= self.class.tp_cost_rate
          
    for equip in equips
            next 
    if equip.nil?
            
    *= equip.tp_cost_rate
          end
        
    else
          
    *= self.enemy.tp_cost_rate
          
    if $imported["YEA-Doppelganger"] && !self.class.nil?
            
    *= self.class.tp_cost_rate
          end
        end
        
    for state in states
          next 
    if state.nil?
          
    *= state.tp_cost_rate
        end
        
    return n
      end
      
      
    #--------------------------------------------------------------------------
      # new method: skill_hp_cost
      #--------------------------------------------------------------------------
      
    def skill_hp_cost(skill)
        
    skill.hp_cost hcr
        n 
    += skill.hp_cost_percent mhp hcr
        n 
    = [n.to_iskill.hp_cost_max].min unless skill.hp_cost_max.nil?
        
    = [n.to_iskill.hp_cost_min].max unless skill.hp_cost_min.nil?
        return 
    n.to_i
      end
      
      
    #--------------------------------------------------------------------------
      # new method: hcr
      #--------------------------------------------------------------------------
      
    def hcr
        n 
    1.0
        
    if actor?
          
    *= self.actor.hp_cost_rate
          n 
    *= self.class.hp_cost_rate
          
    for equip in equips
            next 
    if equip.nil?
            
    *= equip.hp_cost_rate
          end
        
    else
          
    *= self.enemy.hp_cost_rate
          
    if $imported["YEA-Doppelganger"] && !self.class.nil?
            
    *= self.class.hp_cost_rate
          end
        end
        
    for state in states
          next 
    if state.nil?
          
    *= state.hp_cost_rate
        end
        
    return n
      end
      
      
    #--------------------------------------------------------------------------
      # new method: skill_gold_cost
      #--------------------------------------------------------------------------
      
    def skill_gold_cost(skill)
        
    skill.gold_cost gcr
        n 
    += skill.gold_cost_percent $game_party.gold gcr
        n 
    = [n.to_iskill.gold_cost_max].min unless skill.gold_cost_max.nil?
        
    = [n.to_iskill.gold_cost_min].max unless skill.gold_cost_min.nil?
        return 
    n.to_i
      end
      
      
    #--------------------------------------------------------------------------
      # new method: gcr
      #--------------------------------------------------------------------------
      
    def gcr
        n 
    1.0
        n 
    *= self.actor.gold_cost_rate
        n 
    *= self.class.gold_cost_rate
        
    for equip in equips
          next 
    if equip.nil?
          
    *= equip.gold_cost_rate
        end
        
    for state in states
          next 
    if state.nil?
          
    *= state.gold_cost_rate
        end
        
    return n
      end
      
    end 
    # Game_BattlerBase
      
    #==============================================================================
    # ■ Window_Base
    #==============================================================================

    class Window_Base Window
      
      
    #--------------------------------------------------------------------------
      # overwrite methods: cost_colours
      #--------------------------------------------------------------------------
      
    def mp_cost_colortext_color(YEA::SKILL_COST::MP_COST_COLOUR); end;
      
    def tp_cost_colortext_color(YEA::SKILL_COST::TP_COST_COLOUR); end;
      
    def hp_cost_colortext_color(YEA::SKILL_COST::HP_COST_COLOUR); end;
      
    def gold_cost_colortext_color(YEA::SKILL_COST::GOLD_COST_COLOUR); end;
      
    end # Window_Base 


    Настройки:
    В навыке в примечание нужно вписать:

    <item[21]>
    <custom cost requirement>
    $game_party.item_number($data_items[21])
    >=1
    </custom cost requirement>
    <custom cost perform>
    $game_party.lose_item(($data_items[21]), 1)
    </custom cost perform>
    Где:
    21- это ID вещи.
    ">=1" - 1 это сколько вещей нужно для использования навыка.
    "(($data_items[21]), 1)" 1 это сколько вещей будет тратится.


    Вопрос о том как убрать надпись ВЕЩИ в битве остается открытым
    Последний раз редактировалось АндрейЕ; 25.02.2016 в 13:09.

  3. #3793
    Местный Аватар для Potato
    Информация о пользователе
    Регистрация
    12.04.2012
    Адрес
    Вторая палатка слева
    Сообщений
    243
    Записей в дневнике
    1
    Репутация: 5 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от dirge Посмотреть сообщение
    В чем проблема то? Список же прокручивается
    Тогда я ничего не понимаю, я подхожу к говнарю у которого вещей больше чем 8 и лист дальше не идёт

  4. #3794
    Местный Аватар для АндрейЕ
    Информация о пользователе
    Регистрация
    24.05.2014
    Адрес
    Тольятти
    Сообщений
    225
    Репутация: 33 Добавить или отнять репутацию

    По умолчанию

    Мне уже неудобно спрашивать так часто. Но опять прошу помощи. Честно ищу ответ в сети перед тем как его сюда задавать.

    Два вопроса в следующем:

    Первый: все тот же, как убрать в меню битвы строки с АТАКА и ВЕЩИ.


    Второй: как прописать через выполнить скрипт команду по изучению или забыванию типа навыка. Через стандартные команды события не нашел.
    Это у меня будет висеть в общих событиях и проверять:

    если у персонажа есть в руке меч то изучить тип навыка Удары мечем, при этом забыть тип навыка: Удары руками.

    а если меча нет то изучить тип навыка: Удары руками, при этом забыть тип навыка Удары мечем.

  5. #3795
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    первое вроде это Scene_Battle create_actor_command_window
    или в Window_ActorCommand make_command_list
    второе не это?

  6. #3796
    Местный Аватар для АндрейЕ
    Информация о пользователе
    Регистрация
    24.05.2014
    Адрес
    Тольятти
    Сообщений
    225
    Репутация: 33 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от HopeBree Посмотреть сообщение
    первое вроде это Scene_Battle create_actor_command_window
    или в Window_ActorCommand make_command_list
    второе не это?
    По первому:
    Scene_Battle create_actor_command_window - тут если тут делать зеленым строчки с атакой и вещи то они видимы но не нажимаются

    Window_ActorCommand make_command_list - тут если тут делать зеленым строчки с атакой и вещи то они исчезают.

    Спасибо Это помогло!!

    По второму:
    да, частично это, при надевании оружия появляется нужный тип, но если ставить запрещаемый тип навыка(удар руками), то он видим но неактивен. хотелось бы конечно чтобы он исчез.
    Пока в задумке есть идея попробовать создать оружие "руки" и чтобы когда снимаеш оружие ставились они, но пока не продумал как можно реализовать, так крайняя идея будет)

  7. #3797
    Местный Аватар для Riko
    Информация о пользователе
    Регистрация
    03.09.2015
    Адрес
    В самом днище....
    Сообщений
    218
    Репутация: 24 Добавить или отнять репутацию

    По умолчанию

    Всем привет.
    Возник такой вопрос.Есть скрипт на крафт систему и систему сбора.Вобщем ставлю в ивенте условие,чтоб добыча осуществлялась только,если в инвентаре есть нужный инструмент.А ресурс добывается независимо от наличия этого инструмента.Что я делаю не так?
    Вложения Вложения
    Сталинская формула:
    Не согласен - критикуй, критикуешь - предлагай, предлагаешь - делай, делаешь - отвечай!

    Лицензионный RPG Maker MV. СПАСИБО ГНОМ!!!

  8. #3798
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от АндрейЕ Посмотреть сообщение
    По первому:
    Scene_Battle create_actor_command_window - тут если тут делать зеленым строчки с атакой и вещи то они видимы но не нажимаются

    Window_ActorCommand make_command_list - тут если тут делать зеленым строчки с атакой и вещи то они исчезают.

    Спасибо Это помогло!!

    По второму:
    да, частично это, при надевании оружия появляется нужный тип, но если ставить запрещаемый тип навыка(удар руками), то он видим но неактивен. хотелось бы конечно чтобы он исчез.
    Пока в задумке есть идея попробовать создать оружие "руки" и чтобы когда снимаеш оружие ставились они, но пока не продумал как можно реализовать, так крайняя идея будет)
    вроде понял, дома напишу мини скрипт, если осилю
    мб до меня кто-то справится.
    суть в том:
    запись тегов в нотетаг <skill id>.
    при экипировке предмета добавляет скил, при снятии удаляет его полностью.

  9. #3799
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    вот я и дома, и секунду, как это не работает?
    Спойлер Отлично все работает!:





  10. #3800
    Местный Аватар для АндрейЕ
    Информация о пользователе
    Регистрация
    24.05.2014
    Адрес
    Тольятти
    Сообщений
    225
    Репутация: 33 Добавить или отнять репутацию

    По умолчанию

    Это работает но выше писал про тип навыка)

    Про эти: http://clip2net.com/s/3uR80Hg


    У персонажа пока изначально стоит добавления типа навыка Удар руками:
    http://clip2net.com/s/3uR8cPp

    В орудии стоит добавления навыка удар мечем и тип навыка - удар руками
    http://clip2net.com/s/3uR8iZh

    Но в игре получается так что когда меча нет, то тип навыка удар руками а когда меч взят то как ты выше показал только тип навыка добавляется удар мечем. Но удар руками при этом не исчезает.
    Внутри каждого типа навыка у меня будет список своих навыков
    Например добавлю тип бутыльки, в котором будут навыки с использованием бутыльков.
    Также со свитками например или еще с чем)

    Если в общем: у меня будут разные типы навыков для разного оружия а в каждом типе свои навыки для него)

    Как нибудь сделать бы, чтобы когда у персонажа в руке есть оружие то тип навыка "Удар руками" удалялся, а когда оружия нет то тип навыка "удар руками" возвращался.

    Извиняюсь за такие ссылки на картинки, так как сайт куда обычно заливаю, упал(
    Последний раз редактировалось АндрейЕ; 26.02.2016 в 19:35.

Страница 380 из 643 ПерваяПервая ... 280330370378379380381382390430480 ... ПоследняяПоследняя

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

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

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

Метки этой темы

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

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

Ваши права

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