Войти на сайт
×
|
ТЕМА: Где взять скрипт мечты всех мейкеристов?
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37832
|
Я уверен, что каждый второй мэйкерст мечтает о таком скрипте:
При получении уровня характеристики персонажа никак не увеличиваются (кроме жизней и маны), но ему дают 10 очков характеристик, которые он распределяет по своему усмотрению. По-моему это сделало бы любую игру в 100 раз интереснее! Кто знает, есть ли такой скрипт? Если нет, кто может сделать? (Dark? Light?) |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37833
|
На ВХ видал.
На ХР не видал. |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37834
|
SaretOdin-Sol пишет:
На ВХ видал. Скинь плиз хотя бы тот что для ВХ... хотя мне собственно для ХР надобно. На ХР не видал. |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37840
|
123th пишет:
если речь идёть о таких параметрах как str, dex, agi, int то никакого скрипта не надо - событие вполне справляется с этой задачей. И как же это интересно? Ну-ка задай-ка алгоритм. |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37842
|
Помоему, вот этот.
ВНИМАНИЕ: Спойлер! [ Нажмите, чтобы развернуть ][ Нажмите, чтобы скрыть ] #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ #_/ ◆ Attribute Point Stat Distribution - KGC_DistributeParameter ◆ VX ◆ #_/ ◇ Last Update: 11/16/2008 #_/ ◆ Written by TOMY #_/ ◆ Translation & Extended Updates by Mr. Anonymous #_/ ◆ Extended Annotation by Touchfuzzy #_/ ◆ KGC Site: #_/ ◆ ytomy.sakura.ne.jp/ #_/ ◆ Translator's Blog: #_/ ◆ mraprojects.wordpress.com #_/ #_/ This script gives you the ability to completely change the way actors' #_/ attributes are gained. This system allows for the player to distribute stat #_/ points to actors which are gained upon level up. #_/============================================================================= #_/ ◆ Script Commands ◆ #_/ These commands are used in "Script" function in the third page of event #_/ commands under "Advanced". #_/ #_/ * gain_rp(ActorID, Value) #_/ Increases the MaxRP of a given actor. #_/ #_/ * reset_distributed_count(ActorID) #_/ Resets the distributed RP of a given actor. #_/ #_/ * call_distribute_parameter(ActorID) #_/ Calls the Distribute Parameter screen for a given actor. #_/ #_/============================================================================= #_/ Install: Insert below KGC_ExtendedEquipScene and KGC_CustomMenuCommand. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ #==============================================================================# # ★ Customization ★ # #==============================================================================# module KGC module DistributeParameter # ◆ Distribution Tables ◆ # Here you may customize the costs and increase rates of specific parameters. # The order in which these costs and increase rates are set are as follows: # [IPC, IPSG, MAP, PCI, PSGI] # Key: # IPC = Initial Point Cost. This is how many AP it cost to buy the first # point of this parameter. # # IPSG = Initial Point Stat Growth. This is how much the stat will go up with # the first point of this parameter. # # MAP = Maximum Attribute Points. The maximum amount of AP that can be spent # on this stat. You may also put a level based equation in this but # remember that if you put in an equation it is IMPORTANT that you put # quotation marks ("") around it and to use level in all lower case. # By using 0 here, you effectively remove the limitation on how the # stat's growth ceiling. # # PCI = Point Cost Increase. For every AP spent in this parameter the cost # of this parameter increases by this amount. # # PSGI = Point Stat Growth Increase. For every AP spent in this parameter # the number of points you gain in the stat increases by this much. # # Also, if you completely remove a line (e.g. ":hit => [1, 1, 20, 0.7],") # it will remove it from the distribution screen altogether. # Very useful if your project doesn't require a specific stat to be shown. GAIN_PARAMETER = { # Parameter IPC, IPSG, MAP, PCI, PSGI :maxhp => [10, 5, "level", 2, 2], # Max HP :maxmp => [10, 2, "level", 2, 1], # Max MP :atk => [20, 1, "level", 4, 0.2], # Attack :def => [50, 1, "level", 15, 0.1], # Defense :spi => [20, 1, "level", 4, 0.2], # Spirit :agi => [20, 1, "level", 4, 0.2], # Agility #~ :maxhp => [10, 5, 0, 2, 2], # Max HP #~ :maxmp => [10, 2, 0, 2, 1], # Max MP #~ :atk => [20, 1, 0, 4, 0.2], # Attack #~ :def => [50, 1, 0, 15, 0.1], # Defense #~ :spi => [20, 1, 0, 4, 0.2], # Spirit #~ :agi => [20, 1, 0, 4, 0.2], # Agility #~ :hit => [1, 1, 20, 0.7], # Hit Ratio (Accuracy) #~ :eva => [1, 1, 20, 0.7], # Evasion #~ :cri => [1, 1, 20, 0.7], # Critical #~ :skill_speed => [1, 1, 20, 0.5], # Skill Speed #~ :item_speed => [1, 1, 20, 0.5], # Item Speed #~ :odds => [1, 1, 5], # Luck (Chance of being targetted) } # Do not remove this bracket. # ◆ AP Gain Rate ◆ # This is the equation that determines your total AP gained every level. # (Character Level to the 0.25th power + 2) * Level # "(level ** 0.25 + 2.0) * level" # This causes you to start at 3 points per level and increase slightly over # time. # As an example if you wish to gain a static 3 points per level write it as # MAXRP_EXP = "level * 3" MAXRP_EXP = "level * 10" # ◆ Individual Actor Gain Parameter Tables ◆ # You may choose to manually specify an individual actor's gain parameters. # To do so, use the same format as above GAIN_PARAMETER table but instead # use PERSONAL_GAIN_PARAMETER [n] (Where n = Actor ID) # Any parameter you do not set in this table will instead draw from the # GAIN_PARAMETER chart. # # Example: # PERSONAL_GAIN_PARAMETER[1] = { # :maxhp => [2, 20, 50, 0.5, 5], # :maxmp => [1, 10, 30, 0.3, 0.5], # :atk => [1, 1, 30, 0.3, 0.5], # :def => [1, 2, 30, 0.4, 0.5], # :spi => [1, 2, 50, 0.5, 0.8], # :agi => [1, 2, 30, 0.4, 0.6], # :hit => [1, 1, 20, 0.7], # :eva => [1, 1, 20, 0.7], # :cri => [1, 1, 20, 0.7], # :skill_speed => [1, 1, 20, 0.5], # :item_speed => [1, 1, 20, 0.5], # :odds => [1, 1, 5], # :maxrpexp => ["(level ** 0.25 + 2.0) * level"] # } PERSONAL_GAIN_PARAMETER = [] # ★ Insert Custom Actor Gain Tables Below Here ★ # ★ Insert Custom Actor Gain Tables Above Here ★ # ◆ Class-Specific Gain Parameter Tables ◆ # You may choose to manually specify an entire class's gain parameters. # To do so, use the same format as above GAIN_PARAMETER table but instead # use CLASS_GAIN_PARAMETER [n] (Where n = Number of class in the database) # Any parameter you do not set in this table will instead draw from the # GAIN_PARAMETER chart. Also note that class gain parameters take the highest # priority. CLASS_GAIN_PARAMETER = [] # ★ Insert Custom Class Gain Tables Below Here ★ # ★ Insert Custom Class Gain Tables Above Here ★ # ◆ AP = Attribute Points. These settings are for the AP Distrubution Screen. # VOCAB_RP appears at the top of the column which lists the AP cost of # the parameter VOCAB_RP = "Cost" # VOCAB_RP_A appears next to where it lists your current and total AP. VOCAB_RP_A = "AP" # ◆ Parameter Labels ◆ # Allows you to change the text of Hit Ratio, Evasion, Critical, Skill # Speed, Item Speed, and Odds (luck) on the distribution screen. VOCAB_PARAM = { :hit => "HIT", # Hit Ratio (Accuracy) :eva => "EVA", # Evasion :cri => "CRI", # Critical :skill_speed => "SSD", # Skill Speed :item_speed => "ISD", # Item Speed :odds => "LCK", # Odds (Luck) } # <- Do not remove this bracket. # ◆ Caption Text ◆ # Added by Mr. Anonymous. # These fields affect the text at the top of the distribution screen. # Attribute name label. AT_CAPTION = "Attribute" # AP cost/rate label. RT_CAPTION = "Rate" # Current AP spent on given attribute label. SP_CAPTION = "Spent" # Current status (right window) label. CS_CAPTION = "Current Status" # ◆ Help Window Text ◆ # Text of the menu title for the AP Distribution Screen. DISTRIBUTE_SCENE_CAPTION = "Stat Distribution - Press Q or W to switch characters." # ◆ Stat Distribution Cost When Maxed ◆ # This toggle allows you to remove the characters proceeding the amount of # points that have been spent on a skill when a growth ceiling on that stat # is unlimited (see growth tables: MAP). For example, let's say Max HP has # an umilimited ceiling of growth. Let's say you've spent 3 points in this # stat so far, so under the "Spent" column, this would normally read 3/---. # With this toggle set to true, it would instead simply read as 3. # true : Only the amount currently spent in the stat is displayed. # false : A line is drawn representing no ceiling to the stat. HIDE_MAX_COUNT_INFINITE = false # ◆ AP Gauge Colors ◆ # Allows you to change the color of the guages that appear under the stats # side bar. The color can also be determined by a numerical expression. # Example: GAUGE_START_COLOR = Color.new(255, 0, 0) <- This is red. # This is the fill color for the early phase of the guage. GAUGE_START_COLOR = 28 # This is the fill color for the late phase of the guage. (When full) GAUGE_END_COLOR = 29 # ◆ Menu Command Button & Text ◆ # When USE_MENU_DISTRIBUTE_PARAMETER_COMMAND = true, # the AP Distribution System is added to the menu under "Quit Game". # When false, it does not. (Obviously) USE_MENU_DISTRIBUTE_PARAMETER_COMMAND = false # Allows you to change the text for this button on the main command menu. VOCAB_MENU_DISTRIBUTE_PARAMETER = "Level Up" # ◆ Parameter Re-distribution ◆ # This affects whether the player can reassign the parameters that have # been increased. # true : Allows the player to reassign AP. # false : Prevents the player from unassigning AP if set to false. ENABLE_REVERSE_DISTRIBUTE = true # ◆ AP in Status Window ◆ # Added by Mr. Anonymous. # This toggle allows you to enable/disable the AP display on the status # screen. SHOW_STATUS_RP = true # This toggle allows you to adjust the position of the AP display on the # status screen. (If SHOW_STATUS_RP = true) # 0. Below Actor's Face Image # 1. Below Actor's Parameters SHOW_STATUS_RP_POS = 1 # ◆ Extra Parameters in Status Window ◆ # Added by Mr. Anonymous. # This toggle allows you to enable/disable the parameters for accuracy, # evasion, and critical below the regular paramaters (STR, DEF, SPI, AGI) SHOW_STATUS_EX_PARAMS = false # ◆ Call DistributeParameter From Actor Status Window ◆ # Added by Mr. Anonymous. # This allows you to change what key/button is pressed on the status window # to shift to the DistributeParameter window. # When set to nil, this is disabled. ( CALL_DISTPARAMKEY = Input::nil ) CALL_DISTPARAMKEY = Input: # On the keyboard, button X is the A key. # ◆ Show Actor Graphic ◆ # Added by Mr. Anonymous. # This toggle allows you to enable/disable the actor sprite in the Distribute # Parameter window next to the actor name. # true = Show the sprite. # false = Do not show. SHOW_SPRITE = true end end #=============================================================================# # ★ End Customization ★ # #=============================================================================# #=================================================# # IMPORT # #=================================================# $imported = {} if $imported == nil $imported["DistributeParameter"] = true #=================================================# module KGC::DistributeParameter # Set up parameter array PARAMS = [:maxhp, :maxmp, :atk, :def, :spi, :agi, :hit, :eva, :cri, :skill_speed, :item_speed, :odds] # Parameter Increase Structure GainInfo = Struct.new("GainInfo", :rp_cost, :value, :max_count, :rp_rev, :value_rev) # # ○ Create Parameter Increase Structures # def self.create_gain_param_structs(target) params = {} target.each { |k, v| info = GainInfo.new info.rp_cost = v[0] info.value = v[1] info.max_count = v[2] info.rp_rev = v[3] info.value_rev = v[4] params[k] = info } return params end # # ○ Create Parameter Increase Structures (For Individual Actors) # def self.create_gain_param_structs_for_personal(target) params = [] target.each_with_index { |gain_list, i| next if gain_list == nil params = create_gain_param_structs(gain_list) } return params end # Create Parameter Increase Structures GAIN_PARAMS = create_gain_param_structs(GAIN_PARAMETER) PERSONAL_GAIN_PARAMS = create_gain_param_structs_for_personal(PERSONAL_GAIN_PARAMETER) CLASS_GAIN_PARAMS = create_gain_param_structs_for_personal(CLASS_GAIN_PARAMETER) end #=================================================# #============================================================================== # ■ Vocab #============================================================================== module Vocab def self.hit return KGC::DistributeParameter::VOCAB_PARAM[:hit] return $data_system.terms.hit # Added 4/1/08 end def self.eva return KGC::DistributeParameter::VOCAB_PARAM[:eva] return $data_system.terms.eva # Added 4/1/08 end def self.cri return KGC::DistributeParameter::VOCAB_PARAM[:cri] return $data_system.terms.cri # Added 4/1/08 end def self.skill_speed return KGC::DistributeParameter::VOCAB_PARAM[:skill_speed] return $data_system.terms.skill_speed # Added 9/14/08 end def self.item_speed return KGC::DistributeParameter::VOCAB_PARAM[:item_speed] end def self.odds return KGC::DistributeParameter::VOCAB_PARAM[:odds] return $data_system.terms.odds # Added 9/14/08 end def self.rp return KGC::DistributeParameter::VOCAB_RP end def self.rp_a return KGC::DistributeParameter::VOCAB_RP_A end def self.distribute_parameter return KGC::DistributeParameter::VOCAB_MENU_DISTRIBUTE_PARAMETER end end #=================================================# #============================================================================== # □ KGC::Commands #============================================================================== module KGC module Commands module_function # # ○ パラメータ振り分けに関する値をチェック # def check_distribution_values (1...$data_actors.size).each { |i| actor = $game_actors actor.check_distribution_values actor.restore_distribution_values } end # # ○ RP の増減 # actor_id : アクター ID # value : 増減量 # def gain_rp(actor_id, value) actor = $game_actors[actor_id] return if actor == nil actor.gain_rp(value) end # # ○ 振り分け回数をリセット # actor_id : アクター ID # def reset_distributed_count(actor_id) actor = $game_actors[actor_id] return if actor == nil actor.clear_distribution_values actor.restore_distribution_values end # # ○ パラメータ振り分け画面の呼び出し # actor_index : アクターインデックス # def call_distribute_parameter(actor_index = 0) return if $game_temp.in_battle $game_temp.next_scene = :distribute_parameter $game_temp.next_scene_actor_index = actor_index end end end #=================================================# # INCLUDE COMMANDS # #=================================================# # Include KGC::Commands in Game_Interpreter # #=================================================# class Game_Interpreter include KGC::Commands end #=================================================# #============================================================================== # ■ Game_Battler #============================================================================== class Game_Battler # # ● 能力値に加算する値をクリア # alias clear_extra_values_KGC_DistributeParameter clear_extra_values def clear_extra_values clear_extra_values_KGC_DistributeParameter clear_distribution_values calc_distribution_values end # # ○ パラメータ振り分けに関する値をクリア # def clear_distribution_values @distributed_count = {} KGC::DistributeParameter::PARAMS.each { |param| @distributed_count[param] = 0 } end # # ○ パラメータ振り分けに関する値をチェック # def check_distribution_values last_distributed_count = @distributed_count clear_distribution_values @distributed_count = last_distributed_count if last_distributed_count != nil end # # ○ 各種修正値を計算 # def calc_distribution_values # 継承先で定義 end # # ○ 振り分けによる上昇値を取得 # param : パラメータの Symbol # def distributed_param(param) return 0 end end #=================================================# #============================================================================== # ■ Game_BattleAction #============================================================================== class Game_BattleAction # # ● 行動スピードの決定 # alias make_speed_KGC_DistributeParameter make_speed def make_speed make_speed_KGC_DistributeParameter if skill? n = [battler.distributed_param(:skill_speed), skill.speed].min @speed -= n end if item? n = [battler.distributed_param(:item_speed), item.speed].min @speed -= n end end end #=================================================# #============================================================================== # ■ Game_Actor #============================================================================== class Game_Actor < Game_Battler # # ● オブジェクト初期化 # actor_id : アクター ID # alias initialize_KGC_DistributeParameter initialize def initialize(actor_id) @actor_id = actor_id @class_id = $data_actors[actor_id].class_id initialize_KGC_DistributeParameter(actor_id) end # # ○ パラメータ増加量を取得 # def gain_parameter_list result = KGC::DistributeParameter::GAIN_PARAMS # アクター固有 list = KGC::DistributeParameter::PERSONAL_GAIN_PARAMS[self.id] result = result.merge(list) if list != nil # 職業固有 list = KGC::DistributeParameter::CLASS_GAIN_PARAMS[self.class_id] result = result.merge(list) if list != nil return result end # # ○ 各種修正値を計算 # def calc_distribution_values @rp_cost = 0 @distributed_param = {} gain_parameter_list.each { |k, v| next if v == nil cost = 0 param = 0 distributed_count(k).times { |i| cost_plus = v.rp_cost cost_plus += v.rp_rev * i if v.rp_rev != nil param_plus = v.value param_plus += v.value_rev * i if v.value_rev != nil cost += Integer(cost_plus) param += Integer(param_plus) } @rp_cost += [cost, 0].max @distributed_param[k] = param } end # # ○ 各種修正値を修復 # def restore_distribution_values calc_distribution_values self.hp = self.hp self.mp = self.mp end # # ○ 振り分けによる上昇値を取得 # param : パラメータの Symbol # def distributed_param(param) return 0 if @distributed_param == nil return 0 if @distributed_param[param] == nil return @distributed_param[param] end # # ● 基本 MaxHP の取得 # alias base_maxhp_KGC_DistributeParameter base_maxhp def base_maxhp n = base_maxhp_KGC_DistributeParameter + distributed_param(:maxhp) return n end # # ● 基本 MaxMP の取得 # alias base_maxmp_KGC_DistributeParameter base_maxmp def base_maxmp n = base_maxmp_KGC_DistributeParameter + distributed_param(:maxmp) return n end # # ● 基本攻撃力の取得 # alias base_atk_KGC_DistributeParameter base_atk def base_atk n = base_atk_KGC_DistributeParameter + distributed_param(:atk) return n end # # ● 基本防御力の取得 # alias base_def_KGC_DistributeParameter base_def def base_def n = base_def_KGC_DistributeParameter + distributed_param(:def) return n end # # ● 基本精神力の取得 # alias base_spi_KGC_DistributeParameter base_spi def base_spi n = base_spi_KGC_DistributeParameter + distributed_param(:spi) return n end # # ● 基本敏捷性の取得 # alias base_agi_KGC_DistributeParameter base_agi def base_agi n = base_agi_KGC_DistributeParameter + distributed_param(:agi) return n end # # ● 命中率の取得 # alias hit_KGC_DistributeParameter hit def hit n = hit_KGC_DistributeParameter + distributed_param(:hit) return n end # # ● 回避率の取得 # alias eva_KGC_DistributeParameter eva def eva n = eva_KGC_DistributeParameter + distributed_param(:eva) return n end # # ● クリティカル率の取得 # alias cri_KGC_DistributeParameter cri def cri n = cri_KGC_DistributeParameter + distributed_param(:cri) return n end # # ● 狙われやすさの取得 # alias odds_KGC_DistributeParameter odds def odds n = odds_KGC_DistributeParameter + distributed_param(:odds) return n end # # ○ MaxRP の取得 # def maxrp n = Integer(eval(KGC::DistributeParameter::MAXRP_EXP)) return [n + maxrp_plus, 0].max end # # ○ MaxRP 補正値の取得 # def maxrp_plus @maxrp_plus = 0 if @maxrp_plus == nil return @maxrp_plus end # # ○ RP の取得 # def rp return [maxrp - @rp_cost, 0].max end # # ○ 振り分け回数の取得 # param : 振り分け先パラメータ (Symbol) # def distributed_count(param) clear_distribution_values if @distributed_count == nil @distributed_count[param] = 0 if @distributed_count[param] == nil return @distributed_count[param] end # # ○ RP の増減 # value : 増減量 # def gain_rp(value) @maxrp_plus = maxrp_plus + value end # # ○ 振り分け回数の増減 # param : 振り分け先パラメータ (Symbol) # value : 増減量 # def gain_distributed_count(param, value = 1) n = distributed_count(param) @distributed_count[param] += value if n.is_a?(Integer) end # # ○ RP 振り分けによる成長効果適用 # param : 振り分け先パラメータ (Symbol) # reverse : 逆加算のときは true # def rp_growth_effect(param, reverse = false) gain = gain_parameter_list[param] return if gain == nil # 無効なパラメータ if reverse return if distributed_count(param) == 0 # 逆加算不可 else return unless can_distribute?(param) end gain_distributed_count(param, reverse ? -1 : 1) restore_distribution_values end # # ○ パラメータ振り分け可否判定 # param : 振り分け先パラメータ (Symbol) # def can_distribute?(param) gain = gain_parameter_list[param] return false if gain == nil # 無効なパラメータ return false if self.rp < distribute_cost(param) # RP 不足 if gain.max_count > 0 return false if gain.max_count <= distributed_count(param) # 回数上限 end return true end # # ○ パラメータ振り分けコスト計算 # param : 振り分け先パラメータ (Symbol) # def distribute_cost(param) gain = gain_parameter_list[param] return 0 if gain == nil # 無効なパラメータ n = gain.rp_cost if gain.rp_rev != nil count = distributed_count(param) count = [count, gain.max_count - 1].min if gain.max_count > 0 n += gain.rp_rev * count end return [Integer(n), 0].max end # # ○ パラメータ振り分け時の増加量計算 # param : 振り分け先パラメータ (Symbol) # def distribute_gain(param) gain = gain_parameter_list[param] return 0 if gain == nil # 無効なパラメータ n = gain.value if gain.value_rev != nil count = distributed_count(param) count = [count, gain.max_count - 1].min if gain.max_count > 0 n += gain.value_rev * count end return Integer(n) end end #=================================================# #============================================================================== # ■ Window_Base #============================================================================== class Window_Base < Window # # ○ RP の文字色を取得 # actor : アクター # def rp_color(actor) return (actor.rp == 0 ? knockout_color : normal_color) end # # ○ 振り分けゲージの色 1 の取得 # def distribute_gauge_color1 color = KGC::DistributeParameter::GAUGE_START_COLOR return (color.is_a?(Integer) ? text_color(color) : color) end # # ○ 振り分けゲージの色 2 の取得 # def distribute_gauge_color2 color = KGC::DistributeParameter::GAUGE_END_COLOR return (color.is_a?(Integer) ? text_color(color) : color) end # # ○ RP の描画 # actor : アクター # x : 描画先 X 座標 # y : 描画先 Y 座標 # width : 幅 # def draw_actor_rp(actor, x, y, width = 120) self.contents.font.color = system_color self.contents.draw_text(x, y, 40, WLH, Vocab::rp_a) self.contents.font.color = rp_color(actor) xr = x + width if width < 120 self.contents.draw_text(xr - 40, y, 40, WLH, actor.rp, 2) else self.contents.draw_text(xr - 90, y, 40, WLH, actor.rp, 2) self.contents.font.color = normal_color self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2) self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxrp, 2) end self.contents.font.color = normal_color end # # ○ 振り分けゲージの描画 # actor : アクター # param : パラメータ # x : 描画先 X 座標 # y : 描画先 Y 座標 # width : 幅 # def draw_actor_distribute_gauge(actor, param, x, y, width = 120) gain = actor.gain_parameter_list[param] return if gain == nil || gain.max_count <= 0 gw = width * actor.distributed_count(param) / gain.max_count gc1 = distribute_gauge_color1 gc2 = distribute_gauge_color2 self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color) self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2) end #============================================================================= # Added by Mr. Anonymous ( 4/1/08 ) # Sets up the initial parameters and the entended/extra parameters. #============================================================================= if KGC::DistributeParameter::SHOW_STATUS_EX_PARAMS alias draw_actor_parameter_KGC_DistributeParameter draw_actor_parameter def draw_actor_parameter(actor, x, y, type) draw_actor_parameter_KGC_DistributeParameter(actor, x, y, type) case type when 4 parameter_name = Vocab::hit parameter_value = actor.hit when 5 parameter_name = Vocab::eva parameter_value = actor.eva when 6 parameter_name = Vocab::cri parameter_value = actor.cri when 7 parameter_name = Vocab::odds parameter_value = actor.odds end self.contents.font.color = system_color self.contents.draw_text(x, y, 120, WLH, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2) end end end #=================================================# #============================================================================== # ■ Window_Command #============================================================================== class Window_Command < Window_Selectable unless method_defined?(:add_command) # # ○ コマンドを追加 # 追加した位置を返す # def add_command(command) @commands << command @item_max = @commands.size item_index = @item_max - 1 refresh_command draw_item(item_index) return item_index end # # ○ コマンドをリフレッシュ # def refresh_command buf = self.contents.clone self.height = [self.height, row_max * WLH + 32].max create_contents self.contents.blt(0, 0, buf, buf.rect) buf.dispose end # # ○ コマンドを挿入 # def insert_command(index, command) @commands.insert(index, command) @item_max = @commands.size refresh_command refresh end # # ○ コマンドを削除 # def remove_command(command) @commands.delete(command) @item_max = @commands.size refresh end end end #=================================================# #============================================================================== # ■ Window_Status #============================================================================== # Added by Mr. Anonymous ( 4/1/08 ) # Checks SHOW_STATUS_RP's value, if true RP is added to Status Window. #============================================================================== if KGC::DistributeParameter::SHOW_STATUS_RP class Window_Status < Window_Base # # ● Draw RP in Status Window # x : Width X - 128 (beneath actor face) # y : Hight Y (On row + Window_Status Definition) # alias draw_basic_info_KGC_DistributeParameter draw_basic_info def draw_basic_info(x, y) # Run original process draw_basic_info_KGC_DistributeParameter(x, y) # Checks SHOW_STATUS_RP_POS, if 0, RP is shown beneath face of actor. if KGC::DistributeParameter::SHOW_STATUS_RP_POS == 0 draw_actor_rp(@actor, x - 129, y + WLH * 4) end # If 1, RP is shown under parameters. (Centered) if KGC::DistributeParameter::SHOW_STATUS_RP_POS == 1 draw_actor_rp(@actor, x - 80, y + WLH * 14 - 6) end end # # ● Draw Extra (Normally Hidden) Parameters in Status Window # x : Width X - 128 (beneath actor face) # y : Hight Y (On row + Window_Status Definition) # Added by Mr. Anonymous ( 4/1/08 ) # alias draw_parameters_KCG_DistributeParameter draw_parameters def draw_parameters(x, y) # Run original process draw_parameters_KCG_DistributeParameter(x, y) if KGC::DistributeParameter::SHOW_STATUS_EX_PARAMS draw_actor_parameter(@actor, x, y + WLH * 4, 4) draw_actor_parameter(@actor, x, y + WLH * 5, 5) draw_actor_parameter(@actor, x, y + WLH * 6, 6) draw_actor_parameter(@actor, x, y + WLH * 7, 7) end end end end #=================================================# #============================================================================== # □ Window_DistributeParameterActor # # 振り分け画面で、アクターの情報を表示するウィンドウです。 #============================================================================== class Window_DistributeParameterActor < Window_Base # # ● オブジェクト初期化 # x : ウィンドウの X 座標 # y : ウィンドウの Y 座標 # actor : アクター # def initialize(x, y, actor) super(x, y, Graphics.width, WLH + 32) @actor = actor refresh end # # ● リフレッシュ # def refresh self.contents.clear draw_actor_name(@actor, 32, 0) draw_actor_level(@actor, 264, 0) draw_actor_rp(@actor, 372, 0) # Include actor class # Added by Mr. Anonymous ( 4/1/08 ) draw_actor_class(@actor, 152, 0) # Method for displaying actor's sprite # Added by Mr. Anonymous ( 4/1/08 ) if KGC::DistributeParameter::SHOW_SPRITE draw_actor_graphic(@actor, 14, 31) end end end #=================================================# #============================================================================== # □ Window_DistributeParameterList # # 振り分け画面で、成長させるパラメータを選択するウィンドウです。 #============================================================================== class Window_DistributeParameterList < Window_Selectable # # ● オブジェクト初期化 # actor : アクター # def initialize(actor) off_h = (WLH + 32) * 2 super(0, off_h, Graphics.width / 2 + 80, Graphics.height - off_h) @actor = actor refresh self.index = 0 end # # ○ 選択中のパラメータの Symbol を取得 # def parameter_symbol return @data[self.index] end # # ● 1 ページに表示できる行数の取得 # def page_row_max return super - 1 end # # ● 項目を描画する矩形の取得 # index : 項目番号 # def item_rect(index) rect = super(index) rect.y += WLH return rect end # # ● カーソルを 1 ページ後ろに移動 # def cursor_pagedown return if Input.repeat?(Input::R) super end # # ● カーソルを 1 ページ前に移動 # def cursor_pageup return if Input.repeat?(Input::L) super end # # ● リフレッシュ # def refresh @data = [] gain_params = @actor.gain_parameter_list KGC::DistributeParameter::PARAMS.each { |param| next if gain_params[param] == nil @data << param } @item_max = @data.size + 1 create_contents @item_max -= 1 draw_caption @item_max.times { |i| draw_item(i, @actor.can_distribute?(@data)) } end # # ○ Draw Captions # Editted by Mr. Anonymous # def draw_caption self.contents.font.color = system_color # This is shown at the top of the column that lists the stats. self.contents.draw_text( 4, 0, 96, WLH, KGC::DistributeParameter::AT_CAPTION) self.contents.draw_text(120, 0, 40, WLH, Vocab.rp, 2) # This is shown at the top of the column that lists the number of stat points # you will gain from buying the next point of the parameter. self.contents.draw_text(170, 0, 60, WLH, KGC::DistributeParameter::RT_CAPTION, 2) # This is shown at the top of the column that lists the current and max # points you have in each parameter. self.contents.draw_text(240, 0, 80, WLH, KGC::DistributeParameter::SP_CAPTION, 2) self.contents.font.color = normal_color end # # ○ 項目の描画 # index : 項目番号 # enabled : 有効フラグ # def draw_item(index, enabled = true) rect = item_rect(index) self.contents.clear_rect(rect) item = @data[index] if item != nil draw_parameter(rect.x, rect.y, @data[index], enabled) end end # # ○ 能力値の描画 # x : 描画先 X 座標 # y : 描画先 Y 座標 # type : 能力値の種類 # enabled : 有効フラグ # def draw_parameter(x, y, type, enabled) case type when :maxhp name = Vocab.hp when :maxmp name = Vocab.mp when :atk name = Vocab.atk when :def name = Vocab.def when :spi name = Vocab.spi when :agi name = Vocab.agi when :hit name = Vocab.hit when :eva name = Vocab.eva when :cri name = Vocab.cri when :skill_speed name = Vocab.skill_speed when :item_speed name = Vocab.item_speed when :odds name = Vocab.odds else return end self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 4, y, 96, WLH, name) gain = @actor.gain_parameter_list[type] value = @actor.distribute_cost(type) self.contents.draw_text(x + 120, y, 40, WLH, value, 2) value = sprintf("%+d", @actor.distribute_gain(type)) self.contents.draw_text(x + 190, y, 40, WLH, value, 2) if gain.max_count > 0 value = sprintf("%3d/%3d", @actor.distributed_count(type), gain.max_count) else value = sprintf("%3d%s", @actor.distributed_count(type), KGC::DistributeParameter::HIDE_MAX_COUNT_INFINITE ? "" : "/---") end self.contents.draw_text(x + 236, y, 80, WLH, value, 2) self.contents.font.color = normal_color end end #=================================================# #============================================================================== # □ Window_DistributeParameterStatus # # 振り分け画面で、アクターのステータスを表示するウィンドウです。 #============================================================================== class Window_DistributeParameterStatus < Window_Base # # ● オブジェクト初期化 # actor : アクター # def initialize(actor) dx = Graphics.width / 2 + 80 off_h = (WLH + 32) * 2 super(dx, off_h, Graphics.width - dx, Graphics.height - off_h) @actor = actor refresh end # # ● Refresh # def refresh original_height = self.height self.height = WLH * (existing_params.size + 1) + 32 create_contents self.height = original_height self.contents.font.color = system_color # Editted by Mr. Anonymous # This allows you to change the text that appears on top of the right panel # which contains current parameter changes. self.contents.draw_text(0, 0, width - 32, WLH, KGC::DistributeParameter::CS_CAPTION, 1) self.contents.font.color = normal_color dy = WLH existing_params.each { |param| draw_parameter(0, dy, param) dy += WLH } end # # ○ 存在するパラメータの一覧 # def existing_params result = [] gain_params = @actor.gain_parameter_list KGC::DistributeParameter::PARAMS.each { |param| next if gain_params[param] == nil result << param } return result end # # ○ 能力値の描画 # x : 描画先 X 座標 # y : 描画先 Y 座標 # type : 能力値の種類 # def draw_parameter(x, y, type) case type when :maxhp name = Vocab.hp value = @actor.maxhp when :maxmp name = Vocab.mp value = @actor.maxmp when :atk name = Vocab.atk value = @actor.atk when :def name = Vocab.def value = @actor.def when :spi name = Vocab.spi value = @actor.spi when :agi name = Vocab.agi value = @actor.agi when :hit name = Vocab.hit value = @actor.hit when :eva name = Vocab.eva value = @actor.eva when :cri name = Vocab.cri value = @actor.cri when :skill_speed name = Vocab.skill_speed value = @actor.distributed_param(type) when :item_speed name = Vocab.item_speed value = @actor.distributed_param(type) when :odds name = Vocab.odds value = @actor.odds else return end draw_actor_distribute_gauge(@actor, type, x + 106, y, 48) self.contents.font.color = system_color self.contents.draw_text(x + 4, y, 96, WLH, name) self.contents.font.color = normal_color self.contents.draw_text(x + 106, y, 48, WLH, value, 2) end end #=================================================# #============================================================================== # ■ Scene_Map #============================================================================== class Scene_Map < Scene_Base # # ● 画面切り替えの実行 # alias update_scene_change_KGC_DistributeParameter update_scene_change def update_scene_change return if $game_player.moving? # プレイヤーの移動中? if $game_temp.next_scene == :distribute_parameter call_distribute_parameter return end update_scene_change_KGC_DistributeParameter end # # ○ パラメータ振り分け画面への切り替え # def call_distribute_parameter $game_temp.next_scene = nil $scene = Scene_DistributeParameter.new( $game_temp.next_scene_actor_index, 0, Scene_DistributeParameter::HOST_MAP) end end #=================================================# #============================================================================== # ■ Scene_Menu #============================================================================== class Scene_Menu < Scene_Base if KGC::DistributeParameter::USE_MENU_DISTRIBUTE_PARAMETER_COMMAND # # ● コマンドウィンドウの作成 # alias create_command_window_KGC_DistributeParameter create_command_window def create_command_window create_command_window_KGC_DistributeParameter return if $imported["CustomMenuCommand"] @__command_distribute_parameter_index = @command_window.add_command(Vocab.distribute_parameter) if @command_window.oy > 0 @command_window.oy -= Window_Base::WLH end @command_window.index = @menu_index end end # # ● コマンド選択の更新 # alias update_command_selection_KGC_DistributeParameter update_command_selection def update_command_selection call_distribute_parameter_flag = false if Input.trigger?(Input::C) case @command_window.index when @__command_distribute_parameter_index # パラメータ振り分け call_distribute_parameter_flag = true end end # パラメータ振り分け画面に移行 if call_distribute_parameter_flag if $game_party.members.size == 0 Sound.play_buzzer return end Sound.play_decision start_actor_selection return end update_command_selection_KGC_DistributeParameter end # # ● アクター選択の更新 # alias update_actor_selection_KGC_DistributeParameter update_actor_selection def update_actor_selection if Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when @__command_distribute_parameter_index # パラメータ振り分け $scene = Scene_DistributeParameter.new( @status_window.index, @__command_distribute_parameter_index, Scene_DistributeParameter::HOST_MENU) return end end update_actor_selection_KGC_DistributeParameter end end #=================================================# #============================================================================== # □ Scene_DistributeParameter # # パラメータ振り分け画面の処理を行うクラスです。 #============================================================================== class Scene_DistributeParameter < Scene_Base # # ○ 定数 # HOST_MENU = 0 # 呼び出し元 : メニュー HOST_MAP = 1 # 呼び出し元 : マップ # # ● オブジェクト初期化 # actor_index : アクターインデックス # menu_index : コマンドのカーソル初期位置 # host_scene : 呼び出し元 (0..メニュー 1..マップ) # def initialize(actor_index = 0, menu_index = 0, host_scene = HOST_MENU) @actor_index = actor_index @menu_index = menu_index @host_scene = host_scene end # # ● 開始処理 # def start super create_menu_background @actor = $game_party.members[@actor_index] create_windows end # # ○ ウィンドウ作成 # def create_windows @help_window = Window_Help.new @help_window.set_text(KGC::DistributeParameter::DISTRIBUTE_SCENE_CAPTION) dy = @help_window.height @actor_window = Window_DistributeParameterActor.new(0, dy, @actor) @parameter_window = Window_DistributeParameterList.new(@actor) @status_window = Window_DistributeParameterStatus.new(@actor) end # # ● 終了処理 # def terminate super dispose_menu_background @help_window.dispose @actor_window.dispose @parameter_window.dispose @status_window.dispose end # # ○ 元の画面へ戻る # def return_scene case @host_scene when HOST_MENU $scene = Scene_Menu.new(@menu_index) when HOST_MAP $scene = Scene_Map.new end end # # ● フレーム更新 # def update super update_menu_background update_window if @parameter_window.active update_parameter_list end end # # ○ ウィンドウ更新 # def update_window @help_window.update @actor_window.update @parameter_window.update @status_window.update end # # ○ ウィンドウ再描画 # def refresh_window @actor_window.refresh @parameter_window.refresh @status_window.refresh Graphics.frame_reset end # # ○ 次のアクターの画面に切り替え # def next_actor @actor_index += 1 @actor_index %= $game_party.members.size $scene = Scene_DistributeParameter.new(@actor_index, @menu_index, @host_scene) end # # ○ 前のアクターの画面に切り替え # def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size $scene = Scene_DistributeParameter.new(@actor_index, @menu_index, @host_scene) end # # ○ フレーム更新 (パラメータウィンドウがアクティブの場合) # def update_parameter_list @status_window.oy = @parameter_window.oy if Input.trigger?(Input:: cool.gif Sound.play_cancel return_scene elsif input_growth? # 加算 param = @parameter_window.parameter_symbol unless @actor.can_distribute?(param) Sound.play_buzzer return end Input.repeat?(Input::C) ? Sound.play_decision : Sound.play_cursor @actor.rp_growth_effect(param) refresh_window elsif input_reverse_growth? # 減算 param = @parameter_window.parameter_symbol if @actor.distributed_count(param) == 0 Sound.play_buzzer return end Input.repeat?(Input::A) ? Sound.play_decision : Sound.play_cursor @actor.rp_growth_effect(param, true) refresh_window elsif Input.trigger?(Input::R) Sound.play_cursor next_actor elsif Input.trigger?(Input::L) Sound.play_cursor prev_actor end end # # ○ 加算入力 # def input_growth? if KGC::DistributeParameter::ENABLE_REVERSE_DISTRIBUTE return Input.repeat?(Input::C) || Input.repeat?(Input::RIGHT) else return Input.trigger?(Input::C) end end # # ○ 減算入力 # def input_reverse_growth? if KGC::DistributeParameter::ENABLE_REVERSE_DISTRIBUTE return Input.repeat?(Input::A) || Input.repeat?(Input::LEFT) else return false end end end #=================================================# #============================================================================== # ■ Scene_Status #============================================================================== # Added by Mr. Anonymous #============================================================================== class Scene_Status < Scene_Base # # ● Update Actor # alias update_KGC_DistributeParameter update def update # If the key assigned for calling distribute parameter from the status # screen is assigned and pressed, called the DistributeParameter scene. if KGC::DistributeParameter::CALL_DISTPARAMKEY != nil && Input.trigger?(KGC::DistributeParameter::CALL_DISTPARAMKEY) Sound.play_decision $scene = Scene_DistributeParameter.new(@actor_index) end # Run original process update_KGC_DistributeParameter end end #=================================================# #============================================================================== # ■ Scene_File #============================================================================== class Scene_File < Scene_Base # # ● Read Saved Data # file : 読み込み用ファイルオブジェクト (オープン済み) # alias read_save_data_KGC_DistributeParameter read_save_data def read_save_data(file) read_save_data_KGC_DistributeParameter(file) KGC::Commands.check_distribution_values Graphics.frame_reset end end Хотя я видел и аналогичный скрипт. Попробую и другой найти. |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37845
|
Злодей, это то что тебе нужно.
Наверное... |
Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: Злодей
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37846
|
123th пишет:
Злодей пишет:
И как же это интересно? Ну-ка задай-ка алгоритм. ну как как... в списке команд событий есть соответствующая - меняющая конкретный параметр у конкретного игрока на указанное число. создаём диалог типа: у вас осталось Х хп повысить дех повысить вит повысить инт повысить стр при выборе любого пункта вычитаем 1 из хп и прибавляем 1 к нужному параметру нужного игрока. в чём проблемма то? ну и событие вызывается при получении уровня. Не всё так просто! А как ты ивентом отследишь левел ап? А какой именно левел? А сколько именно осталось у игрока так называемного ХР? А как ты в стандартном 4х вариантном диалоговом окне дашь выбрать одного из скажем... 10 персонажей! У меня, допустим, партия из 10 чаров. |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37847
|
SaretOdin-Sol пишет:
Помоему, вот этот. ВНИМАНИЕ: Спойлер! [ Нажмите, чтобы развернуть ][ Нажмите, чтобы скрыть ] #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ #_/ ◆ Attribute Point Stat Distribution - KGC_DistributeParameter ◆ VX ◆ #_/ ◇ Last Update: 11/16/2008 #_/ ◆ Written by TOMY #_/ ◆ Translation & Extended Updates by Mr. Anonymous #_/ ◆ Extended Annotation by Touchfuzzy #_/ ◆ KGC Site: #_/ ◆ ytomy.sakura.ne.jp/ #_/ ◆ Translator's Blog: #_/ ◆ mraprojects.wordpress.com #_/ #_/ This script gives you the ability to completely change the way actors' #_/ attributes are gained. This system allows for the player to distribute stat #_/ points to actors which are gained upon level up. #_/============================================================================= #_/ ◆ Script Commands ◆ #_/ These commands are used in "Script" function in the third page of event #_/ commands under "Advanced". #_/ #_/ * gain_rp(ActorID, Value) #_/ Increases the MaxRP of a given actor. #_/ #_/ * reset_distributed_count(ActorID) #_/ Resets the distributed RP of a given actor. #_/ #_/ * call_distribute_parameter(ActorID) #_/ Calls the Distribute Parameter screen for a given actor. #_/ #_/============================================================================= #_/ Install: Insert below KGC_ExtendedEquipScene and KGC_CustomMenuCommand. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_ #==============================================================================# # ★ Customization ★ # #==============================================================================# module KGC module DistributeParameter # ◆ Distribution Tables ◆ # Here you may customize the costs and increase rates of specific parameters. # The order in which these costs and increase rates are set are as follows: # [IPC, IPSG, MAP, PCI, PSGI] # Key: # IPC = Initial Point Cost. This is how many AP it cost to buy the first # point of this parameter. # # IPSG = Initial Point Stat Growth. This is how much the stat will go up with # the first point of this parameter. # # MAP = Maximum Attribute Points. The maximum amount of AP that can be spent # on this stat. You may also put a level based equation in this but # remember that if you put in an equation it is IMPORTANT that you put # quotation marks ("") around it and to use level in all lower case. # By using 0 here, you effectively remove the limitation on how the # stat's growth ceiling. # # PCI = Point Cost Increase. For every AP spent in this parameter the cost # of this parameter increases by this amount. # # PSGI = Point Stat Growth Increase. For every AP spent in this parameter # the number of points you gain in the stat increases by this much. # # Also, if you completely remove a line (e.g. ":hit => [1, 1, 20, 0.7],") # it will remove it from the distribution screen altogether. # Very useful if your project doesn't require a specific stat to be shown. GAIN_PARAMETER = { # Parameter IPC, IPSG, MAP, PCI, PSGI :maxhp => [10, 5, "level", 2, 2], # Max HP :maxmp => [10, 2, "level", 2, 1], # Max MP :atk => [20, 1, "level", 4, 0.2], # Attack :def => [50, 1, "level", 15, 0.1], # Defense :spi => [20, 1, "level", 4, 0.2], # Spirit :agi => [20, 1, "level", 4, 0.2], # Agility #~ :maxhp => [10, 5, 0, 2, 2], # Max HP #~ :maxmp => [10, 2, 0, 2, 1], # Max MP #~ :atk => [20, 1, 0, 4, 0.2], # Attack #~ :def => [50, 1, 0, 15, 0.1], # Defense #~ :spi => [20, 1, 0, 4, 0.2], # Spirit #~ :agi => [20, 1, 0, 4, 0.2], # Agility #~ :hit => [1, 1, 20, 0.7], # Hit Ratio (Accuracy) #~ :eva => [1, 1, 20, 0.7], # Evasion #~ :cri => [1, 1, 20, 0.7], # Critical #~ :skill_speed => [1, 1, 20, 0.5], # Skill Speed #~ :item_speed => [1, 1, 20, 0.5], # Item Speed #~ :odds => [1, 1, 5], # Luck (Chance of being targetted) } # Do not remove this bracket. # ◆ AP Gain Rate ◆ # This is the equation that determines your total AP gained every level. # (Character Level to the 0.25th power + 2) * Level # "(level ** 0.25 + 2.0) * level" # This causes you to start at 3 points per level and increase slightly over # time. # As an example if you wish to gain a static 3 points per level write it as # MAXRP_EXP = "level * 3" MAXRP_EXP = "level * 10" # ◆ Individual Actor Gain Parameter Tables ◆ # You may choose to manually specify an individual actor's gain parameters. # To do so, use the same format as above GAIN_PARAMETER table but instead # use PERSONAL_GAIN_PARAMETER [n] (Where n = Actor ID) # Any parameter you do not set in this table will instead draw from the # GAIN_PARAMETER chart. # # Example: # PERSONAL_GAIN_PARAMETER[1] = { # :maxhp => [2, 20, 50, 0.5, 5], # :maxmp => [1, 10, 30, 0.3, 0.5], # :atk => [1, 1, 30, 0.3, 0.5], # :def => [1, 2, 30, 0.4, 0.5], # :spi => [1, 2, 50, 0.5, 0.8], # :agi => [1, 2, 30, 0.4, 0.6], # :hit => [1, 1, 20, 0.7], # :eva => [1, 1, 20, 0.7], # :cri => [1, 1, 20, 0.7], # :skill_speed => [1, 1, 20, 0.5], # :item_speed => [1, 1, 20, 0.5], # :odds => [1, 1, 5], # :maxrpexp => ["(level ** 0.25 + 2.0) * level"] # } PERSONAL_GAIN_PARAMETER = [] # ★ Insert Custom Actor Gain Tables Below Here ★ # ★ Insert Custom Actor Gain Tables Above Here ★ # ◆ Class-Specific Gain Parameter Tables ◆ # You may choose to manually specify an entire class's gain parameters. # To do so, use the same format as above GAIN_PARAMETER table but instead # use CLASS_GAIN_PARAMETER [n] (Where n = Number of class in the database) # Any parameter you do not set in this table will instead draw from the # GAIN_PARAMETER chart. Also note that class gain parameters take the highest # priority. CLASS_GAIN_PARAMETER = [] # ★ Insert Custom Class Gain Tables Below Here ★ # ★ Insert Custom Class Gain Tables Above Here ★ # ◆ AP = Attribute Points. These settings are for the AP Distrubution Screen. # VOCAB_RP appears at the top of the column which lists the AP cost of # the parameter VOCAB_RP = "Cost" # VOCAB_RP_A appears next to where it lists your current and total AP. VOCAB_RP_A = "AP" # ◆ Parameter Labels ◆ # Allows you to change the text of Hit Ratio, Evasion, Critical, Skill # Speed, Item Speed, and Odds (luck) on the distribution screen. VOCAB_PARAM = { :hit => "HIT", # Hit Ratio (Accuracy) :eva => "EVA", # Evasion :cri => "CRI", # Critical :skill_speed => "SSD", # Skill Speed :item_speed => "ISD", # Item Speed :odds => "LCK", # Odds (Luck) } # <- Do not remove this bracket. # ◆ Caption Text ◆ # Added by Mr. Anonymous. # These fields affect the text at the top of the distribution screen. # Attribute name label. AT_CAPTION = "Attribute" # AP cost/rate label. RT_CAPTION = "Rate" # Current AP spent on given attribute label. SP_CAPTION = "Spent" # Current status (right window) label. CS_CAPTION = "Current Status" # ◆ Help Window Text ◆ # Text of the menu title for the AP Distribution Screen. DISTRIBUTE_SCENE_CAPTION = "Stat Distribution - Press Q or W to switch characters." # ◆ Stat Distribution Cost When Maxed ◆ # This toggle allows you to remove the characters proceeding the amount of # points that have been spent on a skill when a growth ceiling on that stat # is unlimited (see growth tables: MAP). For example, let's say Max HP has # an umilimited ceiling of growth. Let's say you've spent 3 points in this # stat so far, so under the "Spent" column, this would normally read 3/---. # With this toggle set to true, it would instead simply read as 3. # true : Only the amount currently spent in the stat is displayed. # false : A line is drawn representing no ceiling to the stat. HIDE_MAX_COUNT_INFINITE = false # ◆ AP Gauge Colors ◆ # Allows you to change the color of the guages that appear under the stats # side bar. The color can also be determined by a numerical expression. # Example: GAUGE_START_COLOR = Color.new(255, 0, 0) <- This is red. # This is the fill color for the early phase of the guage. GAUGE_START_COLOR = 28 # This is the fill color for the late phase of the guage. (When full) GAUGE_END_COLOR = 29 # ◆ Menu Command Button & Text ◆ # When USE_MENU_DISTRIBUTE_PARAMETER_COMMAND = true, # the AP Distribution System is added to the menu under "Quit Game". # When false, it does not. (Obviously) USE_MENU_DISTRIBUTE_PARAMETER_COMMAND = false # Allows you to change the text for this button on the main command menu. VOCAB_MENU_DISTRIBUTE_PARAMETER = "Level Up" # ◆ Parameter Re-distribution ◆ # This affects whether the player can reassign the parameters that have # been increased. # true : Allows the player to reassign AP. # false : Prevents the player from unassigning AP if set to false. ENABLE_REVERSE_DISTRIBUTE = true # ◆ AP in Status Window ◆ # Added by Mr. Anonymous. # This toggle allows you to enable/disable the AP display on the status # screen. SHOW_STATUS_RP = true # This toggle allows you to adjust the position of the AP display on the # status screen. (If SHOW_STATUS_RP = true) # 0. Below Actor's Face Image # 1. Below Actor's Parameters SHOW_STATUS_RP_POS = 1 # ◆ Extra Parameters in Status Window ◆ # Added by Mr. Anonymous. # This toggle allows you to enable/disable the parameters for accuracy, # evasion, and critical below the regular paramaters (STR, DEF, SPI, AGI) SHOW_STATUS_EX_PARAMS = false # ◆ Call DistributeParameter From Actor Status Window ◆ # Added by Mr. Anonymous. # This allows you to change what key/button is pressed on the status window # to shift to the DistributeParameter window. # When set to nil, this is disabled. ( CALL_DISTPARAMKEY = Input::nil ) CALL_DISTPARAMKEY = Input: # On the keyboard, button X is the A key. # ◆ Show Actor Graphic ◆ # Added by Mr. Anonymous. # This toggle allows you to enable/disable the actor sprite in the Distribute # Parameter window next to the actor name. # true = Show the sprite. # false = Do not show. SHOW_SPRITE = true end end #=============================================================================# # ★ End Customization ★ # #=============================================================================# #=================================================# # IMPORT # #=================================================# $imported = {} if $imported == nil $imported["DistributeParameter"] = true #=================================================# module KGC::DistributeParameter # Set up parameter array PARAMS = [:maxhp, :maxmp, :atk, :def, :spi, :agi, :hit, :eva, :cri, :skill_speed, :item_speed, :odds] # Parameter Increase Structure GainInfo = Struct.new("GainInfo", :rp_cost, :value, :max_count, :rp_rev, :value_rev) # # ○ Create Parameter Increase Structures # def self.create_gain_param_structs(target) params = {} target.each { |k, v| info = GainInfo.new info.rp_cost = v[0] info.value = v[1] info.max_count = v[2] info.rp_rev = v[3] info.value_rev = v[4] params[k] = info } return params end # # ○ Create Parameter Increase Structures (For Individual Actors) # def self.create_gain_param_structs_for_personal(target) params = [] target.each_with_index { |gain_list, i| next if gain_list == nil params = create_gain_param_structs(gain_list) } return params end # Create Parameter Increase Structures GAIN_PARAMS = create_gain_param_structs(GAIN_PARAMETER) PERSONAL_GAIN_PARAMS = create_gain_param_structs_for_personal(PERSONAL_GAIN_PARAMETER) CLASS_GAIN_PARAMS = create_gain_param_structs_for_personal(CLASS_GAIN_PARAMETER) end #=================================================# #============================================================================== # ■ Vocab #============================================================================== module Vocab def self.hit return KGC::DistributeParameter::VOCAB_PARAM[:hit] return $data_system.terms.hit # Added 4/1/08 end def self.eva return KGC::DistributeParameter::VOCAB_PARAM[:eva] return $data_system.terms.eva # Added 4/1/08 end def self.cri return KGC::DistributeParameter::VOCAB_PARAM[:cri] return $data_system.terms.cri # Added 4/1/08 end def self.skill_speed return KGC::DistributeParameter::VOCAB_PARAM[:skill_speed] return $data_system.terms.skill_speed # Added 9/14/08 end def self.item_speed return KGC::DistributeParameter::VOCAB_PARAM[:item_speed] end def self.odds return KGC::DistributeParameter::VOCAB_PARAM[:odds] return $data_system.terms.odds # Added 9/14/08 end def self.rp return KGC::DistributeParameter::VOCAB_RP end def self.rp_a return KGC::DistributeParameter::VOCAB_RP_A end def self.distribute_parameter return KGC::DistributeParameter::VOCAB_MENU_DISTRIBUTE_PARAMETER end end #=================================================# #============================================================================== # □ KGC::Commands #============================================================================== module KGC module Commands module_function # # ○ パラメータ振り分けに関する値をチェック # def check_distribution_values (1...$data_actors.size).each { |i| actor = $game_actors actor.check_distribution_values actor.restore_distribution_values } end # # ○ RP の増減 # actor_id : アクター ID # value : 増減量 # def gain_rp(actor_id, value) actor = $game_actors[actor_id] return if actor == nil actor.gain_rp(value) end # # ○ 振り分け回数をリセット # actor_id : アクター ID # def reset_distributed_count(actor_id) actor = $game_actors[actor_id] return if actor == nil actor.clear_distribution_values actor.restore_distribution_values end # # ○ パラメータ振り分け画面の呼び出し # actor_index : アクターインデックス # def call_distribute_parameter(actor_index = 0) return if $game_temp.in_battle $game_temp.next_scene = :distribute_parameter $game_temp.next_scene_actor_index = actor_index end end end #=================================================# # INCLUDE COMMANDS # #=================================================# # Include KGC::Commands in Game_Interpreter # #=================================================# class Game_Interpreter include KGC::Commands end #=================================================# #============================================================================== # ■ Game_Battler #============================================================================== class Game_Battler # # ● 能力値に加算する値をクリア # alias clear_extra_values_KGC_DistributeParameter clear_extra_values def clear_extra_values clear_extra_values_KGC_DistributeParameter clear_distribution_values calc_distribution_values end # # ○ パラメータ振り分けに関する値をクリア # def clear_distribution_values @distributed_count = {} KGC::DistributeParameter::PARAMS.each { |param| @distributed_count[param] = 0 } end # # ○ パラメータ振り分けに関する値をチェック # def check_distribution_values last_distributed_count = @distributed_count clear_distribution_values @distributed_count = last_distributed_count if last_distributed_count != nil end # # ○ 各種修正値を計算 # def calc_distribution_values # 継承先で定義 end # # ○ 振り分けによる上昇値を取得 # param : パラメータの Symbol # def distributed_param(param) return 0 end end #=================================================# #============================================================================== # ■ Game_BattleAction #============================================================================== class Game_BattleAction # # ● 行動スピードの決定 # alias make_speed_KGC_DistributeParameter make_speed def make_speed make_speed_KGC_DistributeParameter if skill? n = [battler.distributed_param(:skill_speed), skill.speed].min @speed -= n end if item? n = [battler.distributed_param(:item_speed), item.speed].min @speed -= n end end end #=================================================# #============================================================================== # ■ Game_Actor #============================================================================== class Game_Actor < Game_Battler # # ● オブジェクト初期化 # actor_id : アクター ID # alias initialize_KGC_DistributeParameter initialize def initialize(actor_id) @actor_id = actor_id @class_id = $data_actors[actor_id].class_id initialize_KGC_DistributeParameter(actor_id) end # # ○ パラメータ増加量を取得 # def gain_parameter_list result = KGC::DistributeParameter::GAIN_PARAMS # アクター固有 list = KGC::DistributeParameter::PERSONAL_GAIN_PARAMS[self.id] result = result.merge(list) if list != nil # 職業固有 list = KGC::DistributeParameter::CLASS_GAIN_PARAMS[self.class_id] result = result.merge(list) if list != nil return result end # # ○ 各種修正値を計算 # def calc_distribution_values @rp_cost = 0 @distributed_param = {} gain_parameter_list.each { |k, v| next if v == nil cost = 0 param = 0 distributed_count(k).times { |i| cost_plus = v.rp_cost cost_plus += v.rp_rev * i if v.rp_rev != nil param_plus = v.value param_plus += v.value_rev * i if v.value_rev != nil cost += Integer(cost_plus) param += Integer(param_plus) } @rp_cost += [cost, 0].max @distributed_param[k] = param } end # # ○ 各種修正値を修復 # def restore_distribution_values calc_distribution_values self.hp = self.hp self.mp = self.mp end # # ○ 振り分けによる上昇値を取得 # param : パラメータの Symbol # def distributed_param(param) return 0 if @distributed_param == nil return 0 if @distributed_param[param] == nil return @distributed_param[param] end # # ● 基本 MaxHP の取得 # alias base_maxhp_KGC_DistributeParameter base_maxhp def base_maxhp n = base_maxhp_KGC_DistributeParameter + distributed_param(:maxhp) return n end # # ● 基本 MaxMP の取得 # alias base_maxmp_KGC_DistributeParameter base_maxmp def base_maxmp n = base_maxmp_KGC_DistributeParameter + distributed_param(:maxmp) return n end # # ● 基本攻撃力の取得 # alias base_atk_KGC_DistributeParameter base_atk def base_atk n = base_atk_KGC_DistributeParameter + distributed_param(:atk) return n end # # ● 基本防御力の取得 # alias base_def_KGC_DistributeParameter base_def def base_def n = base_def_KGC_DistributeParameter + distributed_param(:def) return n end # # ● 基本精神力の取得 # alias base_spi_KGC_DistributeParameter base_spi def base_spi n = base_spi_KGC_DistributeParameter + distributed_param(:spi) return n end # # ● 基本敏捷性の取得 # alias base_agi_KGC_DistributeParameter base_agi def base_agi n = base_agi_KGC_DistributeParameter + distributed_param(:agi) return n end # # ● 命中率の取得 # alias hit_KGC_DistributeParameter hit def hit n = hit_KGC_DistributeParameter + distributed_param(:hit) return n end # # ● 回避率の取得 # alias eva_KGC_DistributeParameter eva def eva n = eva_KGC_DistributeParameter + distributed_param(:eva) return n end # # ● クリティカル率の取得 # alias cri_KGC_DistributeParameter cri def cri n = cri_KGC_DistributeParameter + distributed_param(:cri) return n end # # ● 狙われやすさの取得 # alias odds_KGC_DistributeParameter odds def odds n = odds_KGC_DistributeParameter + distributed_param(:odds) return n end # # ○ MaxRP の取得 # def maxrp n = Integer(eval(KGC::DistributeParameter::MAXRP_EXP)) return [n + maxrp_plus, 0].max end # # ○ MaxRP 補正値の取得 # def maxrp_plus @maxrp_plus = 0 if @maxrp_plus == nil return @maxrp_plus end # # ○ RP の取得 # def rp return [maxrp - @rp_cost, 0].max end # # ○ 振り分け回数の取得 # param : 振り分け先パラメータ (Symbol) # def distributed_count(param) clear_distribution_values if @distributed_count == nil @distributed_count[param] = 0 if @distributed_count[param] == nil return @distributed_count[param] end # # ○ RP の増減 # value : 増減量 # def gain_rp(value) @maxrp_plus = maxrp_plus + value end # # ○ 振り分け回数の増減 # param : 振り分け先パラメータ (Symbol) # value : 増減量 # def gain_distributed_count(param, value = 1) n = distributed_count(param) @distributed_count[param] += value if n.is_a?(Integer) end # # ○ RP 振り分けによる成長効果適用 # param : 振り分け先パラメータ (Symbol) # reverse : 逆加算のときは true # def rp_growth_effect(param, reverse = false) gain = gain_parameter_list[param] return if gain == nil # 無効なパラメータ if reverse return if distributed_count(param) == 0 # 逆加算不可 else return unless can_distribute?(param) end gain_distributed_count(param, reverse ? -1 : 1) restore_distribution_values end # # ○ パラメータ振り分け可否判定 # param : 振り分け先パラメータ (Symbol) # def can_distribute?(param) gain = gain_parameter_list[param] return false if gain == nil # 無効なパラメータ return false if self.rp < distribute_cost(param) # RP 不足 if gain.max_count > 0 return false if gain.max_count <= distributed_count(param) # 回数上限 end return true end # # ○ パラメータ振り分けコスト計算 # param : 振り分け先パラメータ (Symbol) # def distribute_cost(param) gain = gain_parameter_list[param] return 0 if gain == nil # 無効なパラメータ n = gain.rp_cost if gain.rp_rev != nil count = distributed_count(param) count = [count, gain.max_count - 1].min if gain.max_count > 0 n += gain.rp_rev * count end return [Integer(n), 0].max end # # ○ パラメータ振り分け時の増加量計算 # param : 振り分け先パラメータ (Symbol) # def distribute_gain(param) gain = gain_parameter_list[param] return 0 if gain == nil # 無効なパラメータ n = gain.value if gain.value_rev != nil count = distributed_count(param) count = [count, gain.max_count - 1].min if gain.max_count > 0 n += gain.value_rev * count end return Integer(n) end end #=================================================# #============================================================================== # ■ Window_Base #============================================================================== class Window_Base < Window # # ○ RP の文字色を取得 # actor : アクター # def rp_color(actor) return (actor.rp == 0 ? knockout_color : normal_color) end # # ○ 振り分けゲージの色 1 の取得 # def distribute_gauge_color1 color = KGC::DistributeParameter::GAUGE_START_COLOR return (color.is_a?(Integer) ? text_color(color) : color) end # # ○ 振り分けゲージの色 2 の取得 # def distribute_gauge_color2 color = KGC::DistributeParameter::GAUGE_END_COLOR return (color.is_a?(Integer) ? text_color(color) : color) end # # ○ RP の描画 # actor : アクター # x : 描画先 X 座標 # y : 描画先 Y 座標 # width : 幅 # def draw_actor_rp(actor, x, y, width = 120) self.contents.font.color = system_color self.contents.draw_text(x, y, 40, WLH, Vocab::rp_a) self.contents.font.color = rp_color(actor) xr = x + width if width < 120 self.contents.draw_text(xr - 40, y, 40, WLH, actor.rp, 2) else self.contents.draw_text(xr - 90, y, 40, WLH, actor.rp, 2) self.contents.font.color = normal_color self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2) self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxrp, 2) end self.contents.font.color = normal_color end # # ○ 振り分けゲージの描画 # actor : アクター # param : パラメータ # x : 描画先 X 座標 # y : 描画先 Y 座標 # width : 幅 # def draw_actor_distribute_gauge(actor, param, x, y, width = 120) gain = actor.gain_parameter_list[param] return if gain == nil || gain.max_count <= 0 gw = width * actor.distributed_count(param) / gain.max_count gc1 = distribute_gauge_color1 gc2 = distribute_gauge_color2 self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color) self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2) end #============================================================================= # Added by Mr. Anonymous ( 4/1/08 ) # Sets up the initial parameters and the entended/extra parameters. #============================================================================= if KGC::DistributeParameter::SHOW_STATUS_EX_PARAMS alias draw_actor_parameter_KGC_DistributeParameter draw_actor_parameter def draw_actor_parameter(actor, x, y, type) draw_actor_parameter_KGC_DistributeParameter(actor, x, y, type) case type when 4 parameter_name = Vocab::hit parameter_value = actor.hit when 5 parameter_name = Vocab::eva parameter_value = actor.eva when 6 parameter_name = Vocab::cri parameter_value = actor.cri when 7 parameter_name = Vocab::odds parameter_value = actor.odds end self.contents.font.color = system_color self.contents.draw_text(x, y, 120, WLH, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2) end end end #=================================================# #============================================================================== # ■ Window_Command #============================================================================== class Window_Command < Window_Selectable unless method_defined?(:add_command) # # ○ コマンドを追加 # 追加した位置を返す # def add_command(command) @commands << command @item_max = @commands.size item_index = @item_max - 1 refresh_command draw_item(item_index) return item_index end # # ○ コマンドをリフレッシュ # def refresh_command buf = self.contents.clone self.height = [self.height, row_max * WLH + 32].max create_contents self.contents.blt(0, 0, buf, buf.rect) buf.dispose end # # ○ コマンドを挿入 # def insert_command(index, command) @commands.insert(index, command) @item_max = @commands.size refresh_command refresh end # # ○ コマンドを削除 # def remove_command(command) @commands.delete(command) @item_max = @commands.size refresh end end end #=================================================# #============================================================================== # ■ Window_Status #============================================================================== # Added by Mr. Anonymous ( 4/1/08 ) # Checks SHOW_STATUS_RP's value, if true RP is added to Status Window. #============================================================================== if KGC::DistributeParameter::SHOW_STATUS_RP class Window_Status < Window_Base # # ● Draw RP in Status Window # x : Width X - 128 (beneath actor face) # y : Hight Y (On row + Window_Status Definition) # alias draw_basic_info_KGC_DistributeParameter draw_basic_info def draw_basic_info(x, y) # Run original process draw_basic_info_KGC_DistributeParameter(x, y) # Checks SHOW_STATUS_RP_POS, if 0, RP is shown beneath face of actor. if KGC::DistributeParameter::SHOW_STATUS_RP_POS == 0 draw_actor_rp(@actor, x - 129, y + WLH * 4) end # If 1, RP is shown under parameters. (Centered) if KGC::DistributeParameter::SHOW_STATUS_RP_POS == 1 draw_actor_rp(@actor, x - 80, y + WLH * 14 - 6) end end # # ● Draw Extra (Normally Hidden) Parameters in Status Window # x : Width X - 128 (beneath actor face) # y : Hight Y (On row + Window_Status Definition) # Added by Mr. Anonymous ( 4/1/08 ) # alias draw_parameters_KCG_DistributeParameter draw_parameters def draw_parameters(x, y) # Run original process draw_parameters_KCG_DistributeParameter(x, y) if KGC::DistributeParameter::SHOW_STATUS_EX_PARAMS draw_actor_parameter(@actor, x, y + WLH * 4, 4) draw_actor_parameter(@actor, x, y + WLH * 5, 5) draw_actor_parameter(@actor, x, y + WLH * 6, 6) draw_actor_parameter(@actor, x, y + WLH * 7, 7) end end end end #=================================================# #============================================================================== # □ Window_DistributeParameterActor # # 振り分け画面で、アクターの情報を表示するウィンドウです。 #============================================================================== class Window_DistributeParameterActor < Window_Base # # ● オブジェクト初期化 # x : ウィンドウの X 座標 # y : ウィンドウの Y 座標 # actor : アクター # def initialize(x, y, actor) super(x, y, Graphics.width, WLH + 32) @actor = actor refresh end # # ● リフレッシュ # def refresh self.contents.clear draw_actor_name(@actor, 32, 0) draw_actor_level(@actor, 264, 0) draw_actor_rp(@actor, 372, 0) # Include actor class # Added by Mr. Anonymous ( 4/1/08 ) draw_actor_class(@actor, 152, 0) # Method for displaying actor's sprite # Added by Mr. Anonymous ( 4/1/08 ) if KGC::DistributeParameter::SHOW_SPRITE draw_actor_graphic(@actor, 14, 31) end end end #=================================================# #============================================================================== # □ Window_DistributeParameterList # # 振り分け画面で、成長させるパラメータを選択するウィンドウです。 #============================================================================== class Window_DistributeParameterList < Window_Selectable # # ● オブジェクト初期化 # actor : アクター # def initialize(actor) off_h = (WLH + 32) * 2 super(0, off_h, Graphics.width / 2 + 80, Graphics.height - off_h) @actor = actor refresh self.index = 0 end # # ○ 選択中のパラメータの Symbol を取得 # def parameter_symbol return @data[self.index] end # # ● 1 ページに表示できる行数の取得 # def page_row_max return super - 1 end # # ● 項目を描画する矩形の取得 # index : 項目番号 # def item_rect(index) rect = super(index) rect.y += WLH return rect end # # ● カーソルを 1 ページ後ろに移動 # def cursor_pagedown return if Input.repeat?(Input::R) super end # # ● カーソルを 1 ページ前に移動 # def cursor_pageup return if Input.repeat?(Input::L) super end # # ● リフレッシュ # def refresh @data = [] gain_params = @actor.gain_parameter_list KGC::DistributeParameter::PARAMS.each { |param| next if gain_params[param] == nil @data << param } @item_max = @data.size + 1 create_contents @item_max -= 1 draw_caption @item_max.times { |i| draw_item(i, @actor.can_distribute?(@data)) } end # # ○ Draw Captions # Editted by Mr. Anonymous # def draw_caption self.contents.font.color = system_color # This is shown at the top of the column that lists the stats. self.contents.draw_text( 4, 0, 96, WLH, KGC::DistributeParameter::AT_CAPTION) self.contents.draw_text(120, 0, 40, WLH, Vocab.rp, 2) # This is shown at the top of the column that lists the number of stat points # you will gain from buying the next point of the parameter. self.contents.draw_text(170, 0, 60, WLH, KGC::DistributeParameter::RT_CAPTION, 2) # This is shown at the top of the column that lists the current and max # points you have in each parameter. self.contents.draw_text(240, 0, 80, WLH, KGC::DistributeParameter::SP_CAPTION, 2) self.contents.font.color = normal_color end # # ○ 項目の描画 # index : 項目番号 # enabled : 有効フラグ # def draw_item(index, enabled = true) rect = item_rect(index) self.contents.clear_rect(rect) item = @data[index] if item != nil draw_parameter(rect.x, rect.y, @data[index], enabled) end end # # ○ 能力値の描画 # x : 描画先 X 座標 # y : 描画先 Y 座標 # type : 能力値の種類 # enabled : 有効フラグ # def draw_parameter(x, y, type, enabled) case type when :maxhp name = Vocab.hp when :maxmp name = Vocab.mp when :atk name = Vocab.atk when :def name = Vocab.def when :spi name = Vocab.spi when :agi name = Vocab.agi when :hit name = Vocab.hit when :eva name = Vocab.eva when :cri name = Vocab.cri when :skill_speed name = Vocab.skill_speed when :item_speed name = Vocab.item_speed when :odds name = Vocab.odds else return end self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 4, y, 96, WLH, name) gain = @actor.gain_parameter_list[type] value = @actor.distribute_cost(type) self.contents.draw_text(x + 120, y, 40, WLH, value, 2) value = sprintf("%+d", @actor.distribute_gain(type)) self.contents.draw_text(x + 190, y, 40, WLH, value, 2) if gain.max_count > 0 value = sprintf("%3d/%3d", @actor.distributed_count(type), gain.max_count) else value = sprintf("%3d%s", @actor.distributed_count(type), KGC::DistributeParameter::HIDE_MAX_COUNT_INFINITE ? "" : "/---") end self.contents.draw_text(x + 236, y, 80, WLH, value, 2) self.contents.font.color = normal_color end end #=================================================# #============================================================================== # □ Window_DistributeParameterStatus # # 振り分け画面で、アクターのステータスを表示するウィンドウです。 #============================================================================== class Window_DistributeParameterStatus < Window_Base # # ● オブジェクト初期化 # actor : アクター # def initialize(actor) dx = Graphics.width / 2 + 80 off_h = (WLH + 32) * 2 super(dx, off_h, Graphics.width - dx, Graphics.height - off_h) @actor = actor refresh end # # ● Refresh # def refresh original_height = self.height self.height = WLH * (existing_params.size + 1) + 32 create_contents self.height = original_height self.contents.font.color = system_color # Editted by Mr. Anonymous # This allows you to change the text that appears on top of the right panel # which contains current parameter changes. self.contents.draw_text(0, 0, width - 32, WLH, KGC::DistributeParameter::CS_CAPTION, 1) self.contents.font.color = normal_color dy = WLH existing_params.each { |param| draw_parameter(0, dy, param) dy += WLH } end # # ○ 存在するパラメータの一覧 # def existing_params result = [] gain_params = @actor.gain_parameter_list KGC::DistributeParameter::PARAMS.each { |param| next if gain_params[param] == nil result << param } return result end # # ○ 能力値の描画 # x : 描画先 X 座標 # y : 描画先 Y 座標 # type : 能力値の種類 # def draw_parameter(x, y, type) case type when :maxhp name = Vocab.hp value = @actor.maxhp when :maxmp name = Vocab.mp value = @actor.maxmp when :atk name = Vocab.atk value = @actor.atk when :def name = Vocab.def value = @actor.def when :spi name = Vocab.spi value = @actor.spi when :agi name = Vocab.agi value = @actor.agi when :hit name = Vocab.hit value = @actor.hit when :eva name = Vocab.eva value = @actor.eva when :cri name = Vocab.cri value = @actor.cri when :skill_speed name = Vocab.skill_speed value = @actor.distributed_param(type) when :item_speed name = Vocab.item_speed value = @actor.distributed_param(type) when :odds name = Vocab.odds value = @actor.odds else return end draw_actor_distribute_gauge(@actor, type, x + 106, y, 48) self.contents.font.color = system_color self.contents.draw_text(x + 4, y, 96, WLH, name) self.contents.font.color = normal_color self.contents.draw_text(x + 106, y, 48, WLH, value, 2) end end #=================================================# #============================================================================== # ■ Scene_Map #============================================================================== class Scene_Map < Scene_Base # # ● 画面切り替えの実行 # alias update_scene_change_KGC_DistributeParameter update_scene_change def update_scene_change return if $game_player.moving? # プレイヤーの移動中? if $game_temp.next_scene == :distribute_parameter call_distribute_parameter return end update_scene_change_KGC_DistributeParameter end # # ○ パラメータ振り分け画面への切り替え # def call_distribute_parameter $game_temp.next_scene = nil $scene = Scene_DistributeParameter.new( $game_temp.next_scene_actor_index, 0, Scene_DistributeParameter::HOST_MAP) end end #=================================================# #============================================================================== # ■ Scene_Menu #============================================================================== class Scene_Menu < Scene_Base if KGC::DistributeParameter::USE_MENU_DISTRIBUTE_PARAMETER_COMMAND # # ● コマンドウィンドウの作成 # alias create_command_window_KGC_DistributeParameter create_command_window def create_command_window create_command_window_KGC_DistributeParameter return if $imported["CustomMenuCommand"] @__command_distribute_parameter_index = @command_window.add_command(Vocab.distribute_parameter) if @command_window.oy > 0 @command_window.oy -= Window_Base::WLH end @command_window.index = @menu_index end end # # ● コマンド選択の更新 # alias update_command_selection_KGC_DistributeParameter update_command_selection def update_command_selection call_distribute_parameter_flag = false if Input.trigger?(Input::C) case @command_window.index when @__command_distribute_parameter_index # パラメータ振り分け call_distribute_parameter_flag = true end end # パラメータ振り分け画面に移行 if call_distribute_parameter_flag if $game_party.members.size == 0 Sound.play_buzzer return end Sound.play_decision start_actor_selection return end update_command_selection_KGC_DistributeParameter end # # ● アクター選択の更新 # alias update_actor_selection_KGC_DistributeParameter update_actor_selection def update_actor_selection if Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when @__command_distribute_parameter_index # パラメータ振り分け $scene = Scene_DistributeParameter.new( @status_window.index, @__command_distribute_parameter_index, Scene_DistributeParameter::HOST_MENU) return end end update_actor_selection_KGC_DistributeParameter end end #=================================================# #============================================================================== # □ Scene_DistributeParameter # # パラメータ振り分け画面の処理を行うクラスです。 #============================================================================== class Scene_DistributeParameter < Scene_Base # # ○ 定数 # HOST_MENU = 0 # 呼び出し元 : メニュー HOST_MAP = 1 # 呼び出し元 : マップ # # ● オブジェクト初期化 # actor_index : アクターインデックス # menu_index : コマンドのカーソル初期位置 # host_scene : 呼び出し元 (0..メニュー 1..マップ) # def initialize(actor_index = 0, menu_index = 0, host_scene = HOST_MENU) @actor_index = actor_index @menu_index = menu_index @host_scene = host_scene end # # ● 開始処理 # def start super create_menu_background @actor = $game_party.members[@actor_index] create_windows end # # ○ ウィンドウ作成 # def create_windows @help_window = Window_Help.new @help_window.set_text(KGC::DistributeParameter::DISTRIBUTE_SCENE_CAPTION) dy = @help_window.height @actor_window = Window_DistributeParameterActor.new(0, dy, @actor) @parameter_window = Window_DistributeParameterList.new(@actor) @status_window = Window_DistributeParameterStatus.new(@actor) end # # ● 終了処理 # def terminate super dispose_menu_background @help_window.dispose @actor_window.dispose @parameter_window.dispose @status_window.dispose end # # ○ 元の画面へ戻る # def return_scene case @host_scene when HOST_MENU $scene = Scene_Menu.new(@menu_index) when HOST_MAP $scene = Scene_Map.new end end # # ● フレーム更新 # def update super update_menu_background update_window if @parameter_window.active update_parameter_list end end # # ○ ウィンドウ更新 # def update_window @help_window.update @actor_window.update @parameter_window.update @status_window.update end # # ○ ウィンドウ再描画 # def refresh_window @actor_window.refresh @parameter_window.refresh @status_window.refresh Graphics.frame_reset end # # ○ 次のアクターの画面に切り替え # def next_actor @actor_index += 1 @actor_index %= $game_party.members.size $scene = Scene_DistributeParameter.new(@actor_index, @menu_index, @host_scene) end # # ○ 前のアクターの画面に切り替え # def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size $scene = Scene_DistributeParameter.new(@actor_index, @menu_index, @host_scene) end # # ○ フレーム更新 (パラメータウィンドウがアクティブの場合) # def update_parameter_list @status_window.oy = @parameter_window.oy if Input.trigger?(Input:: cool.gif Sound.play_cancel return_scene elsif input_growth? # 加算 param = @parameter_window.parameter_symbol unless @actor.can_distribute?(param) Sound.play_buzzer return end Input.repeat?(Input::C) ? Sound.play_decision : Sound.play_cursor @actor.rp_growth_effect(param) refresh_window elsif input_reverse_growth? # 減算 param = @parameter_window.parameter_symbol if @actor.distributed_count(param) == 0 Sound.play_buzzer return end Input.repeat?(Input::A) ? Sound.play_decision : Sound.play_cursor @actor.rp_growth_effect(param, true) refresh_window elsif Input.trigger?(Input::R) Sound.play_cursor next_actor elsif Input.trigger?(Input::L) Sound.play_cursor prev_actor end end # # ○ 加算入力 # def input_growth? if KGC::DistributeParameter::ENABLE_REVERSE_DISTRIBUTE return Input.repeat?(Input::C) || Input.repeat?(Input::RIGHT) else return Input.trigger?(Input::C) end end # # ○ 減算入力 # def input_reverse_growth? if KGC::DistributeParameter::ENABLE_REVERSE_DISTRIBUTE return Input.repeat?(Input::A) || Input.repeat?(Input::LEFT) else return false end end end #=================================================# #============================================================================== # ■ Scene_Status #============================================================================== # Added by Mr. Anonymous #============================================================================== class Scene_Status < Scene_Base # # ● Update Actor # alias update_KGC_DistributeParameter update def update # If the key assigned for calling distribute parameter from the status # screen is assigned and pressed, called the DistributeParameter scene. if KGC::DistributeParameter::CALL_DISTPARAMKEY != nil && Input.trigger?(KGC::DistributeParameter::CALL_DISTPARAMKEY) Sound.play_decision $scene = Scene_DistributeParameter.new(@actor_index) end # Run original process update_KGC_DistributeParameter end end #=================================================# #============================================================================== # ■ Scene_File #============================================================================== class Scene_File < Scene_Base # # ● Read Saved Data # file : 読み込み用ファイルオブジェクト (オープン済み) # alias read_save_data_KGC_DistributeParameter read_save_data def read_save_data(file) read_save_data_KGC_DistributeParameter(file) KGC::Commands.check_distribution_values Graphics.frame_reset end end Хотя я видел и аналогичный скрипт. Попробую и другой найти. Скрипт лучше в код выкладывать. А то много всяких блюющих смайлов. |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37848
|
Скрипт лучше в код выкладывать. А то много всяких блюющих смайлов. Черт. И правда. Но я терь боюсь подсветку врубать, ибо... Ибо не надо. |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37849
|
SaretOdin-Sol пишет:
Злодей, это то что тебе нужно. Похоже это оно!! Спасибо брат! Наверное... |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37851
|
123th, здесь всё просто
Зачем изобретать велосипед, если ты собираешься лишь ездить на нём? Не проще ли воспользоваться уже готовой моделью? К тому же, не стоит забывать о том, что написание подобного ивента отнимает время, которое можно было бы вложить во что-нибудь другое, не реализуемое скриптами, связанное с более творческим процессом Хотя чисто из спортивного интереса можно и сделать. |
Последнее редактирование: 13 года 11 мес. назад от Avatosius.
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37852
|
Удалите пожалуйста, интернет завис - получился даблпост.
|
Последнее редактирование: 13 года 11 мес. назад от Avatosius. Причина: даблпост
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37855
|
Есть скрипт. Просто тогда увеличивается размер обзора карты, не более.
Иначе пришлось бы перерисовывать абсолютно всё, иначе это было бы что-то вроде "Похождения четырёх квадратиков". Согласен, можно сделать и ивентом Но, я полагаю, это не особо принципиально. |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37856
|
Теперь возник вопрос. Есть ли скрипт который отслеживает левел ап и позволяет выполнить какую-нибудь команду когда уровень одного из героев изменяется?
|
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37857
|
Приведи пример.
Я прост не понял, какую команду нужно выполнить после левел апа? |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37858
|
SaretOdin-Sol пишет:
Приведи пример. Ну например после повышения уровня будет выполняться скрипт:Я прост не понял, какую команду нужно выполнить после левел апа? $scene = Scene_Points.new |
Администратор запретил публиковать записи гостям.
|
Где взять скрипт мечты всех мейкеристов? 13 года 11 мес. назад #37859
|
Ну, на ВХ я скриптец то нашел...
А вот аналогичный на ХР пока что найти не могу... |
Администратор запретил публиковать записи гостям.
|
|
Время создания страницы: 1.629 секунд