//=======↓本プラグインを改変した場合でも、この欄は消さないでください↓=============== // スキル強化システム 本体プラグイン // FTKR_SkillUpgradeSystem_Core.js // プラグインNo : 1 // 作成者 : フトコロ // 作成日 : 2017/02/06 // 最終更新日 : 2019/12/17 // バージョン : v1.5.4 //=======↑本プラグインを改変した場合でも、この欄は消さないでください↑=============== var Imported = Imported || {}; Imported.FTKR_SUS = true; var FTKR = FTKR || {}; FTKR.SUS = FTKR.SUS || {}; //============================================================================= /*: @plugindesc v1.5.4 Skill Enhancement System Main Plugin @author Futokoro @license MIT License @help English Help Translator: munokura This is an unofficial English translation of the plugin help, created to support global RPG Maker users. Feedback is welcome to improve translation quality (see: https://github.com/munokura/futokoro-MV-plugins ). Original plugin by Futokoro. Please check the URL below for the latest version of the plugin. URL https://github.com/futokoro/RPGMaker ----- ----------------------------------------------------------------------------- Overview ----------------------------------------------------------------------------- By implementing this plugin, you can use the skill enhancement system to enhance the performance of acquired skills. By executing the skill enhancement command, you can change (enhance) skill performance, such as skill damage and MP consumption, in the game. Skill enhancement changes the performance of the acquired skill itself. Furthermore, the skill enhancement status is recorded for each actor, and the enhancement items can be different for each actor. This allows you to create magic that can only be enhanced by characters who are skilled in magic, actors whose damage can be enhanced but whose MP consumption cannot, and actors whose MP consumption can be enhanced but whose damage cannot. ----------------------------------------------------------------------------- Setup ----------------------------------------------------------------------------- 1. Add this plugin to the "Plugin Manager." 2. FTKR_SkillExpansion.js (v1.2.x) is required to run this plugin. Please add this plugin below FTKR_SkillExpansion.js. 3. Set the plugin parameter in FTKR_SkillExpansion.js to '1' to create skill data for each actor. 4. To use the Skill Upgrade System screen to upgrade skills, you will need the separately distributed FTKR_SkillUpgradeSystem_Window.js (v1.4.x). When using FTKR_SkillUpgradeSystem_Window.js in combination, add this plugin to the Plugin Manager so that it is placed above it. ----------------------------------------------------------------------------- How to Upgrade Skills in-Game ☆important☆ ---------------------------------------------------------------------------- There are several ways to use the Skill Upgrade System in-game. 1. You can upgrade specified skills using plugin commands. Plugin Command : Changes data directly without using the Skill Upgrade System screen. : x1 - Actor ID : x2 - Skill ID of the skill you want to upgrade : x3 - Number of the upgrade type you want to upgrade : x4 - Number of times to level up : : If upgrading damage or effect, the text in parentheses is required. : If the upgrade type is not damage or effect, the text is not required, including the parentheses. : No text is required. : : x5 - Number of the damage ID or effect you want to upgrade : Count from 0, 1,... in the order they are set in the database. : This method does not incur any upgrade costs. Methods 2 and 3 require FTKR_SkillUpgradeSystem_Window.js. 2. Open the menu in-game and select "Skill Upgrade." 3. Call the "Skill Upgrade System" using the plugin command. ----------------------------------------------------------------------------- About Plugin Parameter Default Values --------------------------------------------------------------------------- Plugin parameters can operate the system with their default settings. There are no required notetags. However, the default settings are limited to the bare minimum required for system operation. Therefore, it will be difficult to use these settings to create a better game. The following explains how to customize the system. Change plugin parameters and use dedicated notetags to customize the skill enhancement system to your preferences. ----------------------------------------------------------------------------- About Enhancement Types and Enhancement Parameters ☆important☆ ---------------------------------------------------------------------------- In this plugin, "enhancement type" and "enhancement parameter" refer to the following: Enhancement Type: Refers to the following eight types of skill parameters. (*1) : The first number is the enhancement type number, and is the value specified in notetags, plugin commands, etc. 1: Damage 2: MP Cost (mpCost) 3: TP Cost (tpCost) 4: Speed (speed) 5: TP Gain (tpGain) 6: Repeats (repeats) 7: Range (scope) 8: Effects (effects) (*1) Plugin parameters Type 9 and 10 are for expansion purposes. To use them, you must modify the plugin. Enhancement parameters: These are the following eight types of parameters. 1: 'Display Icon' 2: 'Maximum Upgrade Level' 3: 'Increase Amount' 4: 'Cost Value' 5: 'Cost Type' 6: 'Format' 7: 'Not Upgrade' 8: 'Current Upgrade Level' Each upgrade type has its own upgrade parameters, which can be changed using plugin parameters or note tags. ----------------------------------------------------------------------------- About the Name of Upgraded Skills ☆important☆ ---------------------------------------------------------------------------- For upgraded skills, you can add the current upgrade level to the skill name. You can change the display format of skill names using the plugin parameter . The display format is specified as %1(+%2). %1 in the string represents the skill name, and %2 represents the total upgrade level. Example: If the skill name is "Attack" and the total enhancement level is 3, it will be displayed as "Attack (+3)." Skill names modified by this plugin will also be applied when displayed during battle or on menu screens. ----------------------------------------------------------------------------- About Setting Value Priority ☆important☆ ----------------------------------------------------------------------------- This plugin provides the following five methods for changing a single setting value. 1. Overall default settings (plugin parameters) 2. Default settings for each enhancement type (plugin parameters) 3. Setting via skill notetags 4. Setting via class notetags (*1) 5. Setting via actor notetags (*1) (*1) Some settings cannot be set using these methods. If the same setting is configured using multiple methods, the setting with the highest priority will be applied according to the following priority. High Priority: Actor > Class > Skill > Individual Type > Overall. Low Priority. For example, if you set separate maximum damage boost levels for an actor and a skill, the actor setting will be applied. ----------------------------------------------------------------------------- Skill Enhancement Cost Settings ----------------------------------------------------------------------------- You can set the enhancement cost for each skill type. The following cost types can be set: 1. Gold 2. Items 3. In-Game Variables 4. (If using YEP_JobPoints.js) JP 5. Weapons 6. Armor You can set up to three different costs for each enhancement type. However, the overall default cost, which can be set via plugin parameters, is not supported. You can only set one cost for each upgrade type and upgrade cost. To set three costs, use the skill notetag. [Available Notetags] Target: Skill : The content written between the two tags will be set. Type x1 TypeName: y1: How to write TypeName Type x2 TypeName: y2: gold - Gold : item[x] - Item with ID x : v[x] - In-game variable with ID x : weapon[x] - Weapon with ID x : armor[x] - Armor with ID x : JP - JP (Requires YEP_JobPoints) x1,x2,..: Upgrade type number y1,y2,..: Set the quantity of TypeName with the eval value. [About the eval value] The eval section allows you to use non-fixed values by entering a formula, like a damage formula. The following codes can be used: a.param - References the The User's parameters (a.atk is the The User's attack power). s[x] - References the state of switch ID x. v[x] - References the value of variable ID x. cnt - References the upgrade level of the specified upgrade type. Example: Set the costs of different upgrade types simultaneously as shown below. Type 1 gold: 100 Type 1 item[10]: 1 Type 2 v[5]: 5 The meanings between the above notetags are as follows: Line 1 - Set the first cost of Enhancement Type 1 to '100 Gold' Line 2 - Set the second cost of Enhancement Type 1 to '1 item with ID 10' Line 3 - Set the first cost of Enhancement Type 2 to '5 values of variable with ID 5' [Displayed Cost Name] The cost will be displayed on the system screen along with the cost name and required quantity. The displayed cost name will be the name set in-game. For Gold, the database system currency unit will be displayed as the cost name. For in-game variables, the variable name will be displayed as the cost name. ----------------------------------------------------------------------------- About the Maximum Skill Enhancement ----------------------------------------------------------------------------- Skill enhancement levels can be increased up to the set maximum. The maximum value determines how much a skill can be enhanced, so consider your game design carefully when setting this value. [Available Notetags] Target: Skill x: Upgrade type number (set in plugin parameters) y: Maximum level of upgrade type x Example: Target: Actor, Class x: Skill ID y: Upgrade type number (set in plugin parameters) z: Maximum level of upgrade type y Example: The following plugin command can be used to change the maximum upgrade level of a specified skill. : Changes the maximum upgrade level of the specified skill to x1. : x1 - Maximum enhancement level after change : x2 - Actor ID : x3 - Skill ID of the enhanced skill : x4 - Enhancement type number : x5 - Enhanced effect number (0, 1, 2,... from the top of the effect column) : : If the enhancement type is not an effect, the x5 (including the parentheses) is not necessary. : Note that the maximum enhancement level cannot be changed below the current enhancement level. ----------------------------------------------------------------------------- Skill Enhancement Calculation Formula ----------------------------------------------------------------------------- Skill enhancements are calculated according to a formula set for each method. (Area enhancements excluded.) The three parameters used in the calculation are the skill's "default value," the enhancement parameter's "increase amount," and the "current enhancement level." The skill's default value is the value in the RPG Maker database. However, the default value for damage is 100. The overall default calculation formula is as follows: "Buff Amount" = "Default Value" + "Increase Amount" x "Current Buff Level" For damage buffs, this buff amount is multiplied by the damage formula value. [Usable Note Tags] Target: Skill x: Buff Type Number (Plugin Parameter Number) y: Buff Amount for Buff Type x Example: x: Buff Type Number (Plugin Parameter Number) y: Enter the formula for Buff Type x. : Only the following characters are allowed: '% number', 'numbers 0-9', and '+-/*()'. : %1 - Default value, %2 - Increase amount, %3 - Enhancement level Example) Target: Actor, Class x: Skill ID y: Enhancement type number (number set in plugin parameters) z: Enhancement type y increase amount Example) ----------------------------------------------------------------------------- About Damage Enhancement ----------------------------------------------------------------------------- You can enhance the damage multiplier for skills with a "Damage Type" set to anything other than "None." Note that "Damage" here does not refer only to HP damage, but also includes MP damage, HP Recover, etc. You can also enhance each damage ID separately. Note that if the 'd.rate' code, which stores the damage multiplier, is not included in the damage calculation formula, the value will not change even if the skill is enhanced. ----------------------------------------------------------------------------- Enhancing MP and TP Cost ----------------------------------------------------------------------------- Skills with MP and TP cost settings can have their MP and TP costs enhanced. However, they can only be enhanced until their MP and TP costs reach 0. The maximum level is automatically adjusted based on the default value, increase, and calculation formula to ensure that MP and TP costs do not fall below 0. Example: For a skill that consumes 10 MP, if the increase is 1 and the calculation formula is default, MP cost will be 0 at enhancement level 10. Therefore, if the maximum level is set to 10 or higher, it will automatically be adjusted to 10. ----------------------------------------------------------------------------- Enhancing Consecutive Strikes ----------------------------------------------------------------------------- You can enhance your consecutive Strikes. However, if you have set the success rate of consecutive Strikes or damage output to a lower value, any increase above a certain level will be meaningless, so be careful with the maximum enhancement level. Example: If a skill reduces damage by 10% each time it's used multiple times, the damage will always be 0 by the 11th use, so there's no point in enhancing it more than 11 times. ----------------------------------------------------------------------------- Area Enhancement ----------------------------------------------------------------------------- If the skill's range is not all-target or the The User's, you can enhance the range. The effect of the enhanced range will vary depending on the original range. [For a 1 Enemy] When enhanced, it will affect all enemies. The maximum enhancement level is fixed at 1. [For a 1 Ally] When enhanced, it will affect all allies. The maximum enhancement level is fixed at 1. [For a 1 Ally (Collapse)] When enhanced, all allies are Collapse. The maximum enhancement level is fixed at 1. [For X random enemies] When enhanced, the value of X increases according to the enhancement amount. The enhancement amount is calculated according to the range enhancement parameter. If four or more enemies are enhanced, the skill will be executed each time. ----------------------------------------------------------------------------- Enhancing Usage Effects ----------------------------------------------------------------------------- Effects that have a numerical value set can be enhanced. To enhance an effect, you must add the enhancement code 'e.rate' to the value1 or value2 value in the tag. e.rate stores the enhancement amount for each effect. Tag Setting Example) "HP Recover" has been added to the first effect (effect ID 0). Target: The User Value1: 0 Value2: hpDamage * (0.2 + e.rate * 0.1) ⇒This changes the value of Value2 when you enhance an effect. If the enhancement setting for the effect is set to default, the recovery amount increases by 10% of damage for each level increase. [Usable Tags] : Sets the initial enhancement value for effect ID x to y. : If not set, the initial value is 0. : Sets the display on the enhancement screen for effect ID x to y. : If not set, the display is the effect name + e.rate value. If you add %1 to the y string, it will be converted to e.rate. Example) : Sets the initial enhancement value of effect ID 0 to 20. : Changes the display on the enhancement screen to "HP Drain 20%." ----------------------------------------------------------------------------- Enhances TP and Speed Gain When Performing Skills ----------------------------------------------------------------------------- Enhances TP and Speed Gain When Performing Skills. No special notes. ----------------------------------------------------------------------------- Skill Enhancement Prohibition Settings ----------------------------------------------------------------------------- You can prevent individual actors from upgrading skills. Enhancement prohibition is set using a notetag. Skills with enhancement prohibition settings will not appear in the skill selection window. [Available Notetags] Target: Skill : Prevents the skill with this notetag from being upgraded. : Prevents upgrading the skill with this notetag with upgrade types x1, x2,... Setting 0 will prevent all upgrade types. (Same as ) Applies to: Actor, Class : Prevents upgrading all skills with this notetag. The Skill Upgrade command will also not appear in the Skill menu. : Prevents upgrading all skills with the specified skill type IDs x1, x2,... : Prevents upgrading all skills with the specified skill IDs x1, x2,... [Difference between and ] Both of these tags hide skill upgrade commands, preventing the actor from upgrading skills. However, with , you can still upgrade skills by displaying the command using the plugin command . With , all skills cannot be upgraded, so the plugin command is disabled. ----------------------------------------------------------------------------- Getting Skill Upgrade Level ----------------------------------------------------------------------------- The following plugin command can be used to obtain the skill upgrade status and Reflection it in in-game variables and switches. : Stores the specified skill upgrade level in an in-game variable. : x1 - Variable ID for storing the enhancement level : x2 - Actor ID : x3 - Skill ID of the enhanced skill : x4 - Enhancement type number : x5 - Enhanced damage ID or effect number : : If the enhancement type is not damage or effect, : () and the x5 are not required. : Compares the enhancement level of the specified skill with the value of x2 and stores the result in an in-game switch. : x1 - Switch ID for storing the comparison result : x2 - Value to compare with the enhancement level : x3 - Actor ID : x4 - Skill ID of the enhanced skill : x5 - Enhancement type number : x6 - Enhanced damage ID or effect number : For Counttype, specify one of the following characters according to the comparison criteria. : CountOver: Is the upgrade level greater than x2? : CountEqual: Is the upgrade level equal to x2? : CountUnder: Is the upgrade level less than x2? : : If the upgrade type is not a damage or effect, : The "x6" (including the parentheses) is not necessary. ----------------------------------------------------------------------------- Advanced Settings ----------------------------------------------------------------------------- The following is for advanced The Users. Inadvertent changes may cause the plugin to malfunction. 1. Changing the Upgrade Type You can change the number of upgrade types from the default of 8 by changing the value of the plugin parameter . For example, setting will recognize upgrade types up to Type 3. This means that the plugin will not provide parameters for Type 4 and above. In this case, when you open the upgrade screen using FTKR_SkillUpgradeSystem_Window.js, only upgrade types up to Type 3 will be displayed. To set it to 9 or higher, you need to add processing for upgrade types from Type 9 onwards to the plugin. (Plugin modification required.) 2. Swap Upgrade Type Numbers You can swap upgrade type numbers by replacing the plugin parameter with a different Type number. For example, by default, Type 1 is "Damage" and Type 7 is "Range." By swapping all the plugin parameter values for Type 1 and Type 7, you can Type 1 will now represent "Area" and Type 7 will represent "Damage." In this case, if you open the upgrade screen using FTKR_SkillUpgradeSystem_Window.js, the display order of the "Damage" and "Area" upgrade types will also be swapped. 3. Bulk Upgrade Function *Requires FTKR_SkillUpgradeSystem_Window.js Bulk upgrade is possible by setting the plugin parameter to "all." Bulk upgrade allows you to increase the parameters of multiple upgrade types with a single upgrade level-up. Note that if you add Type 9, don't forget to change the value of the plugin parameter to 9. The name displayed as a bulk upgrade command is set using the plugin parameter . The parameters to be upgraded by bulk upgrade are specified using . Enter the upgrade type number using a comma. Please note that the bulk enhancement level is not Reflectioned in the enhancement level value added to the skill name. The only cost consumed by bulk enhancement is the cost set for bulk enhancement. Enhancement costs for parameters increased by bulk enhancement are not consumed. ----------------------------------------------------------------------------- License for this Plugin ----------------------------------------------------------------------------- This plugin is released under the MIT License. Copyright (c) 2017 Futokoro http://opensource.org/licenses/mit-license.php ---------------------------------------------------------------------------- Change History ----------------------------------------------------------------------------- v1.5.4 - 2019/12/17: Bug Fixes 1. Fixed an issue where the plugin parameters for each enhancement's cost type were not read correctly. v1.5.3 - 2018/12/07: Bug Fixes 1. Fixed an issue where some plugin commands were not executed correctly. v1.5.2 - October 21, 2017: Bug Fixes 1. Prevented an error that occurred when the enhancement cost was not set. v1.5.1 - October 19, 2017: Bug Fixes 1. Fixed an error that occurred when reducing the number of enhancement-capable parameters below 8 due to a conflict with FTKR_SEP_ShowSkillStatus.js. v1.5.0 - October 4, 2017: Traits Additions 1. Added bulk enhancement functionality. v1.4.1 - August 5, 2017: Bug Fixes 1. Added a process to set the maximum enhancement level to 0 for enhancement types that cannot be enhanced. v1.4.0 - March 16, 2017: Processing revised and new Traits added. 1. FTKR_SEP_ShowSkillStatus.js processing revised to match v1.3.0. 2. Added the Param to use JS formulas for enhancement cost values. 3. Added weapons and armor to enhancement costs. v1.3.0 - February 24, 2017: Processing revised and help text revised. 1. Processing revised to match FTKR_SkillExpansion.js v1.1.0. 2. Help text revised. v1.2.0 - February 19, 2017: FTKR_SkillExpansion.js implemented. 1. Processing revised to match FTKR_SkillExpansion.js. 2. Help text revised to match the specifications of FTKR_SkillExpansion.js. v1.1.1 - February 19, 2017: Bug Fixes 1. Fixed an error that occurred when using a skill outside of Battle. 2. Revised variable descriptions. v1.1.0 - February 15, 2017: Bug fixes, Traits additions, and plugin command additions. 1. Even if you enhance MP and TP consumption, the values consumed upon use remain the pre-enhancement values. Fixed a bug. 2. Added advanced settings for changing enhancement types and numbers. 3. Added a plugin command to change the maximum level of enhancement types. 4. Changed plugin version notation. (v1.04 is considered v1.0.4.) v1.04 - February 12, 2017: Added plugin command. 1. Added a plugin command to assign skill enhancement levels to in-game variables. 2. Added a plugin command to compare a specified value with the skill enhancement level and Reflection the result in an in-game switch. v1.03 - 2017/02/12: Bug Fixes 1. Fixed an issue where an error would occur when using a skill that the actor did not already know. v1.02 - 2017/02/10: Bug Fixes 1. Fixed an issue where, when setting multiple upgrade cost types in the skill notetag , only the upgrade type entered in the last row would be Reflectioned. 2. Fixed an issue where the values set in the skill notetags and would not be Reflectioned when upgrading a skill. v1.01 - 2017/02/08: Added notetags, added upgradeable items, and file splitting. 1. Added notetags that allow you to set the number of consecutive skill uses and the number of random enemies. 2. Added the Param to upgrade skill effects. 3. Added the Param to display up to two skill effects in the skill info window. 4. Functions and variables related to window display have been separated into separate files. v1.00 - February 6, 2017: First version created (102kB) ----------------------------------------------------------------------------- @param ---Skill Name Format--- @param Skill Name Format @desc Change the display name of the enhanced skill. %1 - Skill name, %2 - Total enhanced level @default %1(+%2) @param --Max Upgrade Type Num-- @param Max Upgrade Type Number @desc Sets the type of parameters that can be enhanced. Advanced settings @default 8 @param --Upgrade ALL-- @param Upgrade All Name @desc The display name for the bulk enrichment. @default Upgrade All @param Upgrade All Types @desc Set the reinforcement type to be reinforced in bulk. Enter the reinforcement type number separated by a comma (,). @default 1,2,3,4,5,6,7,8 @param ---Default Param--- @param Upgrade Default Name @desc Sets the default name of the enhancement item. %1 - Enhancement type skill status name @default Upgrade %1 @param Upgrade Default Limit @desc Sets the default maximum reinforcement level. @default 99 @param Upgrade Default Value @desc Sets the default value for the increase amount when strengthening. @default 1 @param Upgrade Default Cost Type @desc Sets the default cost type for enhancement: 1 - gold, 2 - item, 3 - variable @default 1 @param Upgrade Default Cost Id @desc Set the ID when the cost type is an item or variable. @param Upgrade Default Cost Value @desc Sets the default cost amount for reinforcement. @default 1 @param Upgrade Default Icon @desc Set the default value for the icon displayed in the enhancement list. @default 73 @param Upgrade Default Format @desc Set the default formula for strengthening. %1 - original parameters, %2 - increase amount when strengthening, %3 - strengthening level @default %1+(%2*%3) @param ---Upgrade Type 1--- @param Upgrade Type 1 Type @desc Set the type of Type 1 enhancement item. @default damages @param Upgrade Type 1 Icon @desc Sets the icon for Type 1 enhancement items. @param Upgrade Type 1 Limit @desc Sets the maximum enhancement level for Type 1 enhancement items. @param Upgrade Type 1 Value @desc Sets the increase amount for Type 1 enhancement items. @param Upgrade Type 1 Cost Value @desc Set the cost value for Type 1 enhancement items. @param Upgrade Type 1 Cost Type @desc Sets the cost type for Type 1 enhancement items. @param Upgrade Type 1 Cost Id @desc Set the type of Type 1 enhancement item. @param Upgrade Type 1 Format @desc Set the formula for enhancing Type 1 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @param ---Upgrade Type 2--- @param Upgrade Type 2 Type @desc Set the type of Type 2 enhancement item. @default mpCost @param Upgrade Type 2 Icon @desc Sets the icon for Type 2 enhancement items. @param Upgrade Type 2 Limit @desc Sets the maximum enhancement level for Type 2 enhancement items. @param Upgrade Type 2 Value @desc Sets the increase amount for Type 2 enhancement items. @default -1 @param Upgrade Type 2 Cost Value @desc Set the cost value for Type 2 enhancement items. @param Upgrade Type 2 Cost Type @desc Sets the cost type for Type 2 enhancement items. @param Upgrade Type 2 Cost Id @desc Set the cost ID for Type 2 enhancement items. @param Upgrade Type 2 Format @desc Set the formula for enhancing Type 2 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @param ---Upgrade Type 3--- @param Upgrade Type 3 Type @desc Set the type of Type 3 enhancement item. @default tpCost @param Upgrade Type 3 Icon @desc Sets the icon for Type 3 enhancement items. @param Upgrade Type 3 Limit @desc Sets the maximum enhancement level for Type 3 enhancement items. @param Upgrade Type 3 Value @desc Sets the increase amount for Type 3 enhancement items. @default -1 @param Upgrade Type 3 Cost Value @desc Set the cost value for Type 3 enhancement items. @param Upgrade Type 3 Cost Type @desc Sets the cost type for Type 3 enhancement items. @param Upgrade Type 3 Cost Id @desc Set the cost ID for Type 3 enhancement items. @param Upgrade Type 3 Format @desc Set the formula for enhancing Type 3 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @param ---Upgrade Type 4--- @param Upgrade Type 4 Type @desc Set the type of Type 4 enhancement item. @default speed @param Upgrade Type 4 Icon @desc Sets the icon for Type 4 enhancement items. @param Upgrade Type 4 Limit @desc Sets the maximum enhancement level for Type 4 enhancement items. @param Upgrade Type 4 Value @desc Sets the increase amount for Type 4 enhancement items. @param Upgrade Type 4 Cost Value @desc Set the cost value for Type 4 enhancement items. @param Upgrade Type 4 Cost Type @desc Sets the cost type for Type 4 enhancement items. @param Upgrade Type 4 Cost Id @desc Set the cost ID for Type 4 enhancement items. @param Upgrade Type 4 Format @desc Set the formula for enhancing Type 4 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @param ---Upgrade Type 5--- @param Upgrade Type 5 Type @desc Set the type of Type 5 enhancement item. @default tpGain @param Upgrade Type 5 Icon @desc Sets the icon for Type 5 enhancement items. @param Upgrade Type 5 Limit @desc Sets the maximum enhancement level for Type 5 enhancement items. @param Upgrade Type 5 Value @desc Sets the increase amount for Type 5 enhancement items. @param Upgrade Type 5 Cost Value @desc Set the cost value for Type 5 enhancement items. @param Upgrade Type 5 Cost Type @desc Sets the cost type for Type 5 enhancement items. @param Upgrade Type 5 Cost Id @desc Set the cost ID for Type 5 enhancement items. @param Upgrade Type 5 Format @desc Set the formula for enhancing Type 5 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @param ---Upgrade Type 6--- @param Upgrade Type 6 Type @desc Set the type of Type 6 enhancement item. @default repeats @param Upgrade Type 6 Icon @desc Sets the icon for Type 6 enhancement items. @param Upgrade Type 6 Limit @desc Sets the maximum enhancement level for Type 6 enhancement items. @param Upgrade Type 6 Value @desc Sets the increase amount for Type 6 enhancement items. @param Upgrade Type 6 Cost Value @desc Set the cost value for Type 6 enhancement items. @param Upgrade Type 6 Cost Type @desc Sets the cost type for Type 6 enhancement items. @param Upgrade Type 6 Cost Id @desc Set the cost ID for Type 6 enhancement items. @param Upgrade Type 6 Format @desc Set the formula for enhancing Type 6 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @param ---Upgrade Type 7--- @param Upgrade Type 7 Type @desc Set the type of Type 7 enhancement item. @default scope @param Upgrade Type 7 Icon @desc Sets the icon for Type 7 enhancement items. @param Upgrade Type 7 Limit @desc Sets the maximum enhancement level for Type 7 enhancement items. @default 1 @param Upgrade Type 7 Value @desc Sets the increase amount for Type 7 enhancement items. @default 1 @param Upgrade Type 7 Cost Value @desc Set the cost value for Type 7 enhancement items. @param Upgrade Type 7 Cost Type @desc Sets the cost type for Type 7 enhancement items. @param Upgrade Type 7 Cost Id @desc Set the cost ID for type 7 enhancement items. @param Upgrade Type 7 Format @desc Set the formula for enhancing Type 7 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @default %1+%3 @param ---Upgrade Type 8--- @param Upgrade Type 8 Type @desc Set the type of Type 8 enhancement item. @default effects @param Upgrade Type 8 Icon @desc Sets the icon for type 8 enhancement items. @param Upgrade Type 8 Limit @desc Sets the maximum enhancement level for Type 8 enhancement items. @param Upgrade Type 8 Value @desc Sets the increase amount for Type 8 enhancement items. @default 1 @param Upgrade Type 8 Cost Value @desc Set the cost value for Type 8 enhancement items. @param Upgrade Type 8 Cost Type @desc Sets the cost type for Type 8 enhancement items. @param Upgrade Type 8 Cost Id @desc Set the cost ID for type 8 enhancement items. @param Upgrade Type 8 Format @desc Set the formula for enhancing type 8 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @param ---Upgrade Type 9--- @param Upgrade Type 9 Type @desc Set the type of Type 9 enhancement item. @param Upgrade Type 9 Icon @desc Sets the icon for type 9 enhancement items. @param Upgrade Type 9 Limit @desc Sets the maximum enhancement level for Type 9 enhancement items. @param Upgrade Type 9 Value @desc Sets the increase amount for Type 9 enhancement items. @param Upgrade Type 9 Cost Value @desc Set the cost value for Type 9 enhancement items. @param Upgrade Type 9 Cost Type @desc Sets the cost type for Type 9 enhancement items. @param Upgrade Type 9 Cost Id @desc Sets the cost ID for type 9 enhancement items. @param Upgrade Type 9 Format @desc Set the formula for enhancing Type 9 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level @param ---Upgrade Type 10--- @param Upgrade Type 10 Type @desc Set the type of Type 10 enhancement item. @param Upgrade Type 10 Icon @desc Sets the icon for type 10 enhancement items. @param Upgrade Type 10 Limit @desc Sets the maximum enhancement level for Type 10 enhancement items. @param Upgrade Type 10 Value @desc Sets the increase amount for Type 10 enhancement items. @param Upgrade Type 10 Cost Value @desc Set the cost value for Type 10 enhancement items. @param Upgrade Type 10 Cost Type @desc Sets the cost type for Type 10 enhancement items. @param Upgrade Type 10 Cost Id @desc Sets the cost ID for type 10 enhancement items. @param Upgrade Type 10 Format @desc Set the formula for enhancing type 10 enhancement items. %1 - original parameters, %2 - increase amount when enhanced, %3 - enhancement level */ /*:ja @plugindesc v1.5.4 スキル強化システム 本体プラグイン @author Futokoro @license MIT License @help ----------------------------------------------------------------------------- 概要 ----------------------------------------------------------------------------- 本プラグインを実装することで、習得したスキルの性能を強化する スキル強化システムを利用することができます。 スキル強化コマンドを実行することで、スキルのダメージ量や、MP消費量といった スキルの性能を、ゲームの中で変化(強化)させることができます。 スキルの強化は、習得しているスキルの性能自体を変化させます。また、スキルの 強化状態はアクター毎に記録しており、強化できる項目もアクター毎に別のものに することができます。 このため、魔法が得意なキャラのみが強化できる魔法や、ダメージは強化できるが MP消費は強化できないアクター、MP消費は強化できるがダメージは強化できない アクターなど、表現することができます。 ----------------------------------------------------------------------------- 設定方法 ----------------------------------------------------------------------------- 1.「プラグインマネージャー(プラグイン管理)」に、本プラグインを追加してください。 2. 本プラグインを動作させるためには、FTKR_SkillExpansion.js(v1.2.x)が 必要です。 本プラグインは、FTKR_SkillExpansion.jsよりも下の位置になるように 追加してください。 3. FTKR_SkillExpansion.jsのプラグインパラメータを アクター毎にスキルデータを作成する '1' に設定してください。 4. スキル強化システム画面による強化を行う場合は、別途配布の FTKR_SkillUpgradeSystem_Window.js(v1.4.x)が必要です。 FTKR_SkillUpgradeSystem_Window.jsと組み合わせる場合は、 本プラグインが上になるように、プラグイン管理に追加してください。 ----------------------------------------------------------------------------- ゲーム内でスキルを強化する方法 ☆重要☆ ----------------------------------------------------------------------------- スキル強化システムをゲーム内で使用するためには、以下の方法があります。 1. プラグインコマンドによって、指定したスキルを強化できます。 プラグインコマンド :スキル強化システムの画面を使用せずに、直接データを変えます。 : x1 - アクターID : x2 - 強化したいスキルのスキルID : x3 - 強化したい強化タイプの番号 : x4 - レベルアップさせる回数 : : ダメージまたは使用効果を強化する場合は、()内の記述が必要です。 : 強化タイプがダメージまたは使用効果ではない場合は、()含めて : 記述は不要です。 : : x5 - 強化したいダメージIDまたは使用効果の番号 : データベースに設定した順に上から0,1,...と数えます :この方法では、強化するためにコストを消費しません。 以降の方法2,3は、FTKR_SkillUpgradeSystem_Window.jsが必要です。 2. ゲーム内でメニューを開き、メニューの中から「スキル強化」を選択する。 3. プラグインコマンドによって「スキル強化システム」を呼び出す。 ----------------------------------------------------------------------------- プラグインパラメータのデフォルト値について ----------------------------------------------------------------------------- プラグインパラメータは、デフォルトの状態でシステムを動作させる ことができます。また、設定が必須のノートタグはありません。 ただし、デフォルトの状態のままでは、システムの動作に必要な 最小限の設定しかしていません。そのため、より良いゲームを 作るためには、設定をそのまま使用することは難しいでしょう。 以降にシステムのカスタム方法を説明します。 プラグインパラメータの変更や、専用のノートタグを使用し、貴方の 好みに合ったスキル強化システムに変更してください。 ----------------------------------------------------------------------------- 強化タイプと強化パラメータについて ☆重要☆ ----------------------------------------------------------------------------- 本プラグインでは、「強化タイプ」と「強化パラメータ」は、以下を 意味します。 強化タイプ:以下の8種類のスキルパラメータを意味します。(*1) :先頭の番号は、強化タイプ番号で、ノートタグや :プラグインコマンド等で指定する値です。 1:'ダメージ(damage)' 2:'MP消費(mpCost)' 3:'TP消費(tpCost)' 4:'速度補正(speed)' 5:'得TP(tpGain)' 6:'連続回数(repeats)' 7:'範囲(scope)' 8:'使用効果(effects)' (*1) プラグインパラメータのType9,10は拡張用です。 使用する場合には、プラグインの改造が必要です。 強化パラメータ :以下の8種類のパラメータを意味します。 1:'表示アイコン(icon)' 2:'最大強化レベル(Limit)' 3:'上昇量(value)' 4:'コスト数量(cost value)' 5:'コストタイプ(cost type)' 6:'計算式(format)' 7:'禁止設定(notupgrade)' 8:'現在強化レベル(count)' 強化タイプ毎に、それぞれ強化パラメータが設けられており、それらは プラグインパラメータや、ノートタグによって設定を変更することができます。 ----------------------------------------------------------------------------- 強化したスキルの名称について ☆重要☆ ----------------------------------------------------------------------------- 強化したスキルに対して、現在強化レベルの値をスキル名に付加することができます。 プラグインパラメータのにて、スキル名の表示書式を変更する ことができます。 表示書式は、%1(+%2)のように指定します。 文字列の中の %1 は スキル名、%2 は 強化レベルの合計 を意味します。 例)スキル名「攻撃」、強化レベルの合計が 3 の場合、 表示は「攻撃(+3)」になります。 なお、このプラグインによって改変したスキル名は、戦闘中やメニュー画面で表示する 場合にも適用されます。 ----------------------------------------------------------------------------- 設定値の優先度について ☆重要☆ ----------------------------------------------------------------------------- 本プラグインでは、一つの設定値を変更するために、以下の5つの手段を 用意しています。 1. 全体のデフォルト設定(プラグインパラメータ) 2. 強化タイプ毎のデフォルト設定(プラグインパラメータ) 3. スキルのノートタグによる設定 4. クラスのノートタグによる設定(*1) 5. アクターのノートタグによる設定(*1) (*1)これらの手段では、設定することができない項目があります。 複数の手段によって、同種の設定が被った場合には、以下の優先度に 従い、もっとも優先度が高い設定値を適用します。 優先度大 アクター>クラス>スキル>個別タイプ>全体 優先度小 例えば、ダメージ強化の最大LVを、アクターとスキルで別に設定した 場合、アクターの設定が適用されます。 ----------------------------------------------------------------------------- スキル強化コストの設定 ----------------------------------------------------------------------------- 各スキルタイプは、強化に必要なコストを設定することができます。 コストに設定できるコストタイプは以下のとおりです。 1. お金 2. アイテム 3. ゲーム内変数 4. (YEP_JobPoints.jsを使用している場合) JP 5. 武器 6. 防具 強化タイプ毎に最大で3種類のコストを設定することができます。 ただし、プラグインパラメータで設定できる、全体のデフォルトコスト および強化タイプ毎のコストは、どちらも1種類しか設定できません。 コストを3種類設定する場合は、スキルのノートタグで設定してください。 [使用可能なノートタグ] 対象:スキル :二つのタグの間に記載した内容が設定されます Type x1 TypeName: y1 : TypeName の記述方法 Type x2 TypeName: y2 : gold - お金 : item[x] - ID x のアイテム : v[x] - ID x のゲーム内変数 : weapon[x] - ID x の武器 : armor[x] - ID x の防具 : JP - JP(YEP_JobPointsが必要) x1,x2,..:強化タイプ番号 y1,y2,..:TypeNameの数量を eval値 で設定する [eval の値について] eval部は、ダメージ計算式のように、計算式を入力することで、固定値以外の値を 使用することができます。以下のコードを使用できます。 a.param - 使用者のパラメータを参照します。(a.atk で使用者の攻撃力) s[x] - スイッチID x の状態を参照します。 v[x] - 変数ID x の値を参照します。 cnt - 指定した強化タイプの強化レベルを参照します。 例) 以下のように異なる強化タイプのコストも、同時に設定します Type 1 gold: 100 Type 1 item[10]: 1 Type 2 v[5]: 5 上記のノートタグの間の意味は、以下のとおりです。 1行目 - 強化タイプ1のコストの1番目を'100 Gold'にする 2行目 - 強化タイプ1のコストの2番目を'ID10のアイテムを1つ'にする 3行目 - 強化タイプ2のコストの1番目を'ID5の変数の値を5つ'にする [表示されるコスト名] コストは、コスト名と必要数量と合わせて、システム画面内に表示します。 その際に表示するコスト名は、ゲーム内で設定した名称です。 お金は、データベースのシステムの通貨単位をコスト名として表示します。 ゲーム内変数の場合は、変数名をコスト名として表示します。 ----------------------------------------------------------------------------- スキルの強化の最大値について ----------------------------------------------------------------------------- スキルの強化レベルは、設定した最大値まで上げることができます。 最大値は、どこまでスキルを強化させるかを決める値ですので、 貴方のゲームデザインをよく考えて、設定値を決めるようにしましょう。 [使用可能なノートタグ] 対象:スキル x:強化タイプ番号(プラグインパラメータ上の設定番号) y:強化タイプxの最大レベル 例) 対象:アクター、クラス x:スキルID y:強化タイプ番号(プラグインパラメータ上の設定番号) z:強化タイプyの最大レベル 例) 以下のプラグインコマンドにより、指定したスキルの強化レベルの最大値を 変更することができます。 :指定したスキルの最大強化レベルを、x1 に変更します。 : x1 - 変更後の最大強化レベル : x2 - アクターID : x3 - 強化したスキルのスキルID : x4 - 強化した強化タイプの番号 : x5 - 強化した使用効果の番号(使用効果欄の上から 0,1,2,...) : :強化タイプが使用効果ではない場合は、()含めてx5の記述は不要です。 :なお、現在強化レベル以下に最大強化レベルを変更することはできません。 ----------------------------------------------------------------------------- スキルの強化量の計算式について ----------------------------------------------------------------------------- スキルの強化は、各手段によって設定した計算式に従って、強化量を計算 します。(範囲の強化は除く) 計算に使われるパラメータは、スキルの「デフォルト値」と 強化パラメータの「上昇量」と「現在強化レベル」の3つです。 スキルのデフォルト値は、ツクールのデータベース上の値のことです。 ただし、ダメージについては、デフォルト値を100としています。 全体のデフォルトで設定されている計算式は、以下のとおりです。 「強化量」=「デフォルト値」+「上昇量」×「現在強化レベル」 ダメージの強化の場合、この強化量がダメージ計算式の値に掛けられます。 [使用可能なノートタグ] 対象:スキル x:強化タイプ番号(プラグインパラメータ上の設定番号) y:強化タイプxの上昇量 例) x:強化タイプ番号(プラグインパラメータ上の設定番号) y:強化タイプxの計算式を記述します。 :使用できる文字列は、'%数字','0~9の数字','+-/*()の演算記号'のみです。 : %1-デフォルト値、%2-上昇量、%3-強化レベル 例) 対象:アクター、クラス x:スキルID y:強化タイプ番号(プラグインパラメータ上の設定番号) z:強化タイプyの上昇量 例) ----------------------------------------------------------------------------- ダメージの強化について ----------------------------------------------------------------------------- 「ダメージタイプ」が「なし」以外に設定したスキルは、ダメージ倍率を 強化することができます。なお、ここでいう「ダメージ」は、HPダメージ のみを指すのではなく、MPダメージや、HP回復等も含みます。 また、設定した各ダメージID毎に、別に強化することができます。 なお、ダメージ倍率を格納している'd.rate'のコードを、ダメージ計算式に 記載していない場合、強化しても値は変わりません。 ----------------------------------------------------------------------------- MPおよびTP消費量の強化 ----------------------------------------------------------------------------- 消費MPおよび消費TPを設定したスキルは、MPおよびTP消費量を強化できます。 ただし、消費MPおよび消費TPが 0 になるまでしか強化できません。 デフォルト値と、上昇量と計算式から 消費MPおよび消費TPが 0 を 下回らないように、自動的に最大レベルは調整されます。 例) 消費MP 10 のスキルに対して、上昇量が 1 で、計算式はデフォルト の場合、強化LV10 で消費MPが 0 になるため、最大レベルを10以上 に設定していた場合は、自動的に10に調整する。 ----------------------------------------------------------------------------- 連続回数の強化 ----------------------------------------------------------------------------- 連続回数を強化できます。 ただし、連続回数の成功率や、ダメージ量を下げるような設定をしていた場合は ある一定値以上は無意味になるため、強化レベルの最大値には注意してください。 例) ダメージが連続回数1回毎に10%下がるスキルの場合、11回目で 必ず0ダメージになるため、11回以上に強化できる意味が無い。 ----------------------------------------------------------------------------- 範囲の強化 ----------------------------------------------------------------------------- スキルの範囲が、全体および使用者以外の場合、範囲を強化できます。 範囲の強化結果は、元の範囲によって異なります。 [敵単体の場合] 強化すると、敵全体になります。 最大強化レベルは1固定です。 [味方単体の場合] 強化すると、味方全体になります。 最大強化レベルは1固定です。 [味方単体(戦闘不能)の場合] 強化すると、味方全体(戦闘不能)になります。 最大強化レベルは1固定です。 [敵X体ランダムの場合] 強化すると、Xの値が強化量に従い増加します。 強化量は、範囲の強化パラメータの計算式に従います。 4体以上に強化した場合、その数の分、スキル実行を繰り返します。 ----------------------------------------------------------------------------- 使用効果の強化 ----------------------------------------------------------------------------- 内容に数値を設定する使用効果は強化することができます。 使用効果を強化するためには、タグで、value1またはvalue2の値に 強化用のコード'e.rate'を追記する必要があります。 e.rate には、各使用効果の強化量を格納しています。 タグの設定例) 使用効果の1番目(使用効果ID 0)に「HP回復」を追加済 Target: user Value1: 0 Value2: hpDamage * (0.2 + e.rate * 0.1) ⇒これにより、強化することで、Value2の値が変わります。 使用効果の強化設定がデフォルトの場合、Lv1あがる毎に、 回復量がダメージの10%ずつあがります。 [使用できるタグ] :使用効果ID x の強化値の初期値を y にする。 :設定しない場合は、初期値は 0 です。 :使用効果ID x の強化画面上に表示される内容を y にする。 :設定しない場合は、使用効果名 + e.rate値 です。 :y の文字列に %1 を入れると、その箇所を e.rate に変換します。 設定例) :使用効果ID 0 の強化値の初期値を20に設定して :強化画面上の表示を「HP吸収20%」に変えます。 ----------------------------------------------------------------------------- スキル実行時の取得TPおよび速度の強化 ----------------------------------------------------------------------------- スキル実行時の取得TPと速度を強化できます。 特に注意事項はありません。 ----------------------------------------------------------------------------- スキル強化禁止の設定 ----------------------------------------------------------------------------- スキルは、アクターに対して個別に強化させないように設定することが できます。強化禁止はノートタグで設定します。 強化禁止設定にしたスキルは、スキル選択ウィンドウに表示しません。 [使用可能なノートタグ] 対象:スキル :このノートタグを設定したスキルの強化を 禁止します。 :このノートタグを設定したスキルの 強化タイプx1,x2,...を強化禁止します。 0 を指定した場合、すべての強化タイプを 禁止します。 (と同じ意味です) 対象:アクター、クラス :このノートタグを設定した場合、すべての スキルの強化を禁止します。 また、スキルメニュー上にも、スキル強化 コマンドが表示されません。 :このノートタグを設定した場合、指定した スキルタイプIDx1,x2,...のスキルをすべて 強化禁止します。 :このノートタグを設定した場合、指定した スキルIDx1,x2,...のスキルをすべて 強化禁止します。 [の違い] これらのタグは、どちらもスキル強化コマンドが非表示になり、そのアクターは スキルの強化をすることができません。 ただし、の場合は、プラグインコマンド により、コマンドを表示させることで、スキルの強化を実行することができます。 の場合は、すべてのスキルが強化できないため、プラグインコマンド によるコマンド表示は無効になります。 ----------------------------------------------------------------------------- スキルの強化レベルの取得 ----------------------------------------------------------------------------- 以下のプラグインコマンドにより、スキルの強化状態を取得し、ゲーム内変数や スイッチに反映させることができます。 :指定したスキルの強化レベルを、ゲーム内変数に格納します。 : x1 - 強化レベルを格納する変数ID : x2 - アクターID : x3 - 強化したスキルのスキルID : x4 - 強化した強化タイプの番号 : x5 - 強化したダメージIDまたは使用効果の番号 : : 強化タイプがダメージまたは使用効果ではない場合は : ()含めてx5の記述は不要です。 :指定したスキルの強化レベルと、x2の値を比べて、ゲーム内スイッチに :結果を格納します。 : x1 - 比較結果を格納するスイッチID : x2 - 強化レベルと比較するための値 : x3 - アクターID : x4 - 強化したスキルのスキルID : x5 - 強化した強化タイプの番号 : x6 - 強化したダメージIDまたは使用効果の番号 : Counttype は比較条件に合わせて、以下の文字を指定してください。 : CountOver :強化レベルが x2 よりも大きいか : CountEqual:強化レベルが x2 と同じか : CountUnder:強化レベルが x2 よりも小さいか : : 強化タイプがダメージまたは使用効果ではない場合は : ()含めてx6の記述は不要です。 ----------------------------------------------------------------------------- 上級者向けの設定 ----------------------------------------------------------------------------- 以降は上級者向けです。不用意な変更は、プラグインの動作をおかしくさせる原因に になります。 1. 強化タイプの種類を変更する プラグインパラメータの値を変更することで 強化タイプの数をデフォルトの8種類から変えることができます。 例えば、とすることで、Type 3 までの 強化タイプを認識します。これは、プラグインの内部で、Type 4 以降の パラメータが用意されないことを意味します。 この場合、FTKR_SkillUpgradeSystem_Window.jsを使用して強化画面を開くと Type 3 までの強化タイプしか表示されません。 なお、9以上に設定するためには、Type 9 以降の強化タイプの処理をプラグインに 追加する必要があります。(要プラグイン改造) 2. 強化タイプの番号を入れ替える プラグインパラメータの内容を、別のType番号と 入れ替えることで、強化タイプの番号を入れ替えることができます。 例えば、デフォルトでType 1 が「ダメージ」、Type 7 が「範囲」ですが Type 1 と Type 7 のプラグインパラメータの内容をすべて入れ替えることで Type 1 が「範囲」、Type 7 が「ダメージ」を意味するようになります。 この場合、FTKR_SkillUpgradeSystem_Window.jsを使用して強化画面を開くと 「ダメージ」と「範囲」の強化タイプの表示順も入れ替わります。 3. 一括強化機能 ※FTKR_SkillUpgradeSystem_Window.jsが必要 プラグインパラメータの内容を "all" にすると 一括強化が可能になります。 一括強化を実行すると、一度の強化レベルアップで複数の強化タイプの パラメータを上昇させることができます。 なお、Type 9 に追加した場合は、 プラグインパラメータの値を 9 に変更することを 忘れないでください。 一括強化用のコマンドとして表示される名称は、 プラグインパラメータで設定します。 一括強化で強化されるパラメータは、で指定します。 カンマを使って強化タイプの番号を入力してください。 なお、スキル名に付加する強化レベルの値には、一括強化レベルは反映されません。 一括強化で消費するコストは、一括強化用に設定したコストのみです。 一括強化で上昇するパラメータの強化コストは消費しません。 ----------------------------------------------------------------------------- 本プラグインのライセンスについて(License) ----------------------------------------------------------------------------- 本プラグインはMITライセンスのもとで公開しています。 This plugin is released under the MIT License. Copyright (c) 2017 Futokoro http://opensource.org/licenses/mit-license.php ----------------------------------------------------------------------------- 変更来歴 ----------------------------------------------------------------------------- v1.5.4 - 2019/12/17 : 不具合修正 1. 各強化項目のコストタイプのプラグインパラメータを正しく読み取れていない不具合を修正。 v1.5.3 - 2018/12/07 : 不具合修正 1. 一部のプラグインコマンドが正しく実行できない不具合を修正。 v1.5.2 - 2017/10/21 : 不具合修正 1. 強化コストが設定されていない場合にエラーになる現象を回避。 v1.5.1 - 2017/10/19 : 不具合修正 1. 強化可能なパラメータの数を8よりも減らしたときに、 FTKR_SEP_ShowSkillStatus.jsの処理と競合してエラーになる不具合を修正。 v1.5.0 - 2017/10/04 : 機能追加 1. 一括強化機能を追加 v1.4.1 - 2017/08/05 : 不具合修正 1. 強化出来ない設定の強化タイプに対して、最大強化レベルを0にする処理を追加。 v1.4.0 - 2017/03/16 : 処理見直し、機能追加 1. FTKR_SEP_ShowSkillStatus.js v1.3.0 に合わせて処理を見直し。 2. 強化コストの値にjs計算式を使用できる機能を追加。 3. 強化コストに武器・防具を追加。 v1.3.0 - 2017/02/24 : 処理見直し、ヘルプ修正 1. FTKR_SkillExpansion.js v1.1.0 に合わせて処理を見直し。 2. ヘルプ修正 v1.2.0 - 2017/02/19 : FTKR_SkillExpansion.jsの適用 1. FTKR_SkillExpansion.jsに合わせて処理を見直し。 2. FTKR_SkillExpansion.jsの仕様に合わせてヘルプの記載内容を修正。 v1.1.1 - 2017/02/19 : 不具合修正 1. 非戦闘時にスキルを使用するとエラーになる不具合を修正 2. 変数の記述見直し v1.1.0 - 2017/02/15 : 不具合修正、機能追加、プラグインコマンド追加 1. 消費MPと消費TPを強化しても、使用時に消費する値は強化前の値になる 不具合を修正。 2. 強化タイプの種類と、番号を変更する上級者向け設定を追加。 3. 強化タイプの最大レベルを変更するプラグインコマンドを追加。 4. プラグインのバージョン表記を変更。(v1.04は、v1.0.4 とみなす) v1.04 - 2017/02/12 : プラグインコマンド追加 1. スキル強化レベルをゲーム内変数に代入するプラグインコマンドを追加。 2. 指定した値とスキル強化レベルを比較して結果をゲーム内スイッチに反映する プラグインコマンドを追加。 v1.03 - 2017/02/12 : 不具合修正 1. アクターが習得していないスキルを使用した場合にエラーになる不具合を修正。 v1.02 - 2017/02/10 : 不具合修正 1. スキルのノートタグで、複数の強化タイプのコストを 設定すると、入力した最後の行の強化タイプしか反映されない不具合を修正。 2. スキルのノートタグで設定した値が スキル強化時に反映されない不具合を修正。 v1.01 - 2017/02/08 : ノートタグ追加、強化できる項目を追加、ファイル分割 1. スキルの連続回数と敵X体ランダムの数を設定できるノートタグを追加した。 2. スキルの使用効果を強化できるように変更した。 3. スキルの使用効果を最大2つまでスキル情報ウィンドウに表示するように変更した。 4. ウィンドウ表示関係の関数や変数を別ファイルに分割した。 v1.00 - 2017/02/06 : 初版作成(102kB) ----------------------------------------------------------------------------- @param ---Skill Name Format--- @param Skill Name Format @desc 強化したスキルの表示名を変更します。 %1 - スキル名, %2 - 強化レベルの合計 @default %1(+%2) @param --Max Upgrade Type Num-- @param Max Upgrade Type Number @desc 強化可能なパラメータの種類を設定します。 上級者向け設定 @default 8 @param --Upgrade ALL-- @param Upgrade All Name @desc 一括強化の表示名。 @default 一括強化 @param Upgrade All Types @desc 一括強化の対象となる強化タイプを設定します。 カンマ(,)で区切って強化タイプの番号を入力してください。 @default 1,2,3,4,5,6,7,8 @param ---Default Param--- @param Upgrade Default Name @desc 強化項目のデフォルト名を設定します。 %1 - 強化タイプのスキルステータス名 @default %1強化 @param Upgrade Default Limit @desc 最大強化レベルのデフォルト値を設定します。 @default 99 @param Upgrade Default Value @desc 強化時の上昇量のデフォルト値を設定します。 @default 1 @param Upgrade Default Cost Type @desc 強化に必要なコストタイプのデフォルト値を設定します。 1 - gold, 2 - item, 3 - 変数 @default 1 @param Upgrade Default Cost Id @desc コストタイプをアイテムか変数にした場合のIDを設定します。 @param Upgrade Default Cost Value @desc 強化に必要なコスト数量のデフォルト値を設定します。 @default 1 @param Upgrade Default Icon @desc 強化項目リストに表示するアイコンのデフォルト値を設定します。 @default 73 @param Upgrade Default Format @desc 強化時のデフォルトの計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @default %1+(%2*%3) @param ---Upgrade Type 1--- @param Upgrade Type 1 Type @desc タイプ1の強化項目のタイプを設定します。 @default damages @param Upgrade Type 1 Icon @desc タイプ1の強化項目のアイコンを設定します。 @param Upgrade Type 1 Limit @desc タイプ1の強化項目の最大強化レベルを設定します。 @param Upgrade Type 1 Value @desc タイプ1の強化項目の上昇量を設定します。 @param Upgrade Type 1 Cost Value @desc タイプ1の強化項目のコスト数値を設定します。 @param Upgrade Type 1 Cost Type @desc タイプ1の強化項目のコストタイプを設定します。 @param Upgrade Type 1 Cost Id @desc タイプ1の強化項目のタイプを設定します。 @param Upgrade Type 1 Format @desc タイプ1の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @param ---Upgrade Type 2--- @param Upgrade Type 2 Type @desc タイプ2の強化項目のタイプを設定します。 @default mpCost @param Upgrade Type 2 Icon @desc タイプ2の強化項目のアイコンを設定します。 @param Upgrade Type 2 Limit @desc タイプ2の強化項目の最大強化レベルを設定します。 @param Upgrade Type 2 Value @desc タイプ2の強化項目の上昇量を設定します。 @default -1 @param Upgrade Type 2 Cost Value @desc タイプ2の強化項目のコスト数値を設定します。 @param Upgrade Type 2 Cost Type @desc タイプ2の強化項目のコストタイプを設定します。 @param Upgrade Type 2 Cost Id @desc タイプ2の強化項目のコストIDを設定します。 @param Upgrade Type 2 Format @desc タイプ2の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @param ---Upgrade Type 3--- @param Upgrade Type 3 Type @desc タイプ3の強化項目のタイプを設定します。 @default tpCost @param Upgrade Type 3 Icon @desc タイプ3の強化項目のアイコンを設定します。 @param Upgrade Type 3 Limit @desc タイプ3の強化項目の最大強化レベルを設定します。 @param Upgrade Type 3 Value @desc タイプ3の強化項目の上昇量を設定します。 @default -1 @param Upgrade Type 3 Cost Value @desc タイプ3の強化項目のコスト数値を設定します。 @param Upgrade Type 3 Cost Type @desc タイプ3の強化項目のコストタイプを設定します。 @param Upgrade Type 3 Cost Id @desc タイプ3の強化項目のコストIDを設定します。 @param Upgrade Type 3 Format @desc タイプ3の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @param ---Upgrade Type 4--- @param Upgrade Type 4 Type @desc タイプ4の強化項目のタイプを設定します。 @default speed @param Upgrade Type 4 Icon @desc タイプ4の強化項目のアイコンを設定します。 @param Upgrade Type 4 Limit @desc タイプ4の強化項目の最大強化レベルを設定します。 @param Upgrade Type 4 Value @desc タイプ4の強化項目の上昇量を設定します。 @param Upgrade Type 4 Cost Value @desc タイプ4の強化項目のコスト数値を設定します。 @param Upgrade Type 4 Cost Type @desc タイプ4の強化項目のコストタイプを設定します。 @param Upgrade Type 4 Cost Id @desc タイプ4の強化項目のコストIDを設定します。 @param Upgrade Type 4 Format @desc タイプ4の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @param ---Upgrade Type 5--- @param Upgrade Type 5 Type @desc タイプ5の強化項目のタイプを設定します。 @default tpGain @param Upgrade Type 5 Icon @desc タイプ5の強化項目のアイコンを設定します。 @param Upgrade Type 5 Limit @desc タイプ5の強化項目の最大強化レベルを設定します。 @param Upgrade Type 5 Value @desc タイプ5の強化項目の上昇量を設定します。 @param Upgrade Type 5 Cost Value @desc タイプ5の強化項目のコスト数値を設定します。 @param Upgrade Type 5 Cost Type @desc タイプ5の強化項目のコストタイプを設定します。 @param Upgrade Type 5 Cost Id @desc タイプ5の強化項目のコストIDを設定します。 @param Upgrade Type 5 Format @desc タイプ5の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @param ---Upgrade Type 6--- @param Upgrade Type 6 Type @desc タイプ6の強化項目のタイプを設定します。 @default repeats @param Upgrade Type 6 Icon @desc タイプ6の強化項目のアイコンを設定します。 @param Upgrade Type 6 Limit @desc タイプ6の強化項目の最大強化レベルを設定します。 @param Upgrade Type 6 Value @desc タイプ6の強化項目の上昇量を設定します。 @param Upgrade Type 6 Cost Value @desc タイプ6の強化項目のコスト数値を設定します。 @param Upgrade Type 6 Cost Type @desc タイプ6の強化項目のコストタイプを設定します。 @param Upgrade Type 6 Cost Id @desc タイプ6の強化項目のコストIDを設定します。 @param Upgrade Type 6 Format @desc タイプ6の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @param ---Upgrade Type 7--- @param Upgrade Type 7 Type @desc タイプ7の強化項目のタイプを設定します。 @default scope @param Upgrade Type 7 Icon @desc タイプ7の強化項目のアイコンを設定します。 @param Upgrade Type 7 Limit @desc タイプ7の強化項目の最大強化レベルを設定します。 @default 1 @param Upgrade Type 7 Value @desc タイプ7の強化項目の上昇量を設定します。 @default 1 @param Upgrade Type 7 Cost Value @desc タイプ7の強化項目のコスト数値を設定します。 @param Upgrade Type 7 Cost Type @desc タイプ7の強化項目のコストタイプを設定します。 @param Upgrade Type 7 Cost Id @desc タイプ7の強化項目のコストIDを設定します。 @param Upgrade Type 7 Format @desc タイプ7の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @default %1+%3 @param ---Upgrade Type 8--- @param Upgrade Type 8 Type @desc タイプ8の強化項目のタイプを設定します。 @default effects @param Upgrade Type 8 Icon @desc タイプ8の強化項目のアイコンを設定します。 @param Upgrade Type 8 Limit @desc タイプ8の強化項目の最大強化レベルを設定します。 @param Upgrade Type 8 Value @desc タイプ8の強化項目の上昇量を設定します。 @default 1 @param Upgrade Type 8 Cost Value @desc タイプ8の強化項目のコスト数値を設定します。 @param Upgrade Type 8 Cost Type @desc タイプ8の強化項目のコストタイプを設定します。 @param Upgrade Type 8 Cost Id @desc タイプ8の強化項目のコストIDを設定します。 @param Upgrade Type 8 Format @desc タイプ8の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @param ---Upgrade Type 9--- @param Upgrade Type 9 Type @desc タイプ9の強化項目のタイプを設定します。 @param Upgrade Type 9 Icon @desc タイプ9の強化項目のアイコンを設定します。 @param Upgrade Type 9 Limit @desc タイプ9の強化項目の最大強化レベルを設定します。 @param Upgrade Type 9 Value @desc タイプ9の強化項目の上昇量を設定します。 @param Upgrade Type 9 Cost Value @desc タイプ9の強化項目のコスト数値を設定します。 @param Upgrade Type 9 Cost Type @desc タイプ9の強化項目のコストタイプを設定します。 @param Upgrade Type 9 Cost Id @desc タイプ9の強化項目のコストIDを設定します。 @param Upgrade Type 9 Format @desc タイプ9の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル @param ---Upgrade Type 10--- @param Upgrade Type 10 Type @desc タイプ10の強化項目のタイプを設定します。 @param Upgrade Type 10 Icon @desc タイプ10の強化項目のアイコンを設定します。 @param Upgrade Type 10 Limit @desc タイプ10の強化項目の最大強化レベルを設定します。 @param Upgrade Type 10 Value @desc タイプ10の強化項目の上昇量を設定します。 @param Upgrade Type 10 Cost Value @desc タイプ10の強化項目のコスト数値を設定します。 @param Upgrade Type 10 Cost Type @desc タイプ10の強化項目のコストタイプを設定します。 @param Upgrade Type 10 Cost Id @desc タイプ10の強化項目のコストIDを設定します。 @param Upgrade Type 10 Format @desc タイプ10の強化項目の強化時の計算式を設定します。 %1 - 元のパラメータ, %2 - 強化時の上昇量, %3 - 強化レベル */ //============================================================================= //本プラグインはFTKR_SkillExpansion.jsが必要 if (Imported.FTKR_SEP) { //============================================================================= // プラグイン パラメータ //============================================================================= FTKR.SUS.parameters = PluginManager.parameters('FTKR_SkillUpgradeSystem_Core'); //スキル名 FTKR.SUS.susSkillNameFormat = String(FTKR.SUS.parameters['Skill Name Format'] || '%1(+%2)'); FTKR.SUS.susUpgradeDefName = String(FTKR.SUS.parameters['Upgrade Default Name'] || '強化'); FTKR.SUS.maxUtypeNum = Number(FTKR.SUS.parameters['Max Upgrade Type Number'] || 8); //強化項目のデフォルト設定用 FTKR.SUS.utypes = []; var paramType0 = { 'type': 'default', 'limit': Number(FTKR.SUS.parameters['Upgrade Default Limit'] || 99), 'value': Number(FTKR.SUS.parameters['Upgrade Default Value'] || 1), 'ctype': Number(FTKR.SUS.parameters['Upgrade Default Cost Type'] || 1), 'cost': String(FTKR.SUS.parameters['Upgrade Default Cost Value'] || 1), 'cid': Number(FTKR.SUS.parameters['Upgrade Default Cost Id'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Default Icon'] || 73), 'format': String(FTKR.SUS.parameters['Upgrade Default Calc Format'] || '%1+(%2*%3)') }; FTKR.SUS.utypes.push(paramType0); // Type 1 var paramType1 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 1 Type'] || 'damages'), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 1 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 1 Value'] || 0), 'cost': String(FTKR.SUS.parameters['Upgrade Type 1 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 1 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 1 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 1 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 1 Format'] || '') }; FTKR.SUS.utypes.push(paramType1); // Type 2 var paramType2 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 2 Type'] || 'mpCost'), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 2 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 2 Value'] || -1), 'cost': String(FTKR.SUS.parameters['Upgrade Type 2 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 2 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 2 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 2 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 2 Format'] || '') }; FTKR.SUS.utypes.push(paramType2); // Type 3 var paramType3 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 3 Type'] || 'tpCost'), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 3 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 3 Value'] || -1), 'cost': String(FTKR.SUS.parameters['Upgrade Type 3 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 3 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 3 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 3 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 3 Format'] || '') }; FTKR.SUS.utypes.push(paramType3); // Type 4 var paramType4 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 4 Type'] || 'spead'), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 4 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 4 Value'] || 0), 'cost': String(FTKR.SUS.parameters['Upgrade Type 4 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 4 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 4 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 4 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 4 Format'] || '') }; FTKR.SUS.utypes.push(paramType4); // Type 5 var paramType5 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 5 Type'] || 'tpGain'), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 5 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 5 Value'] || 0), 'cost': String(FTKR.SUS.parameters['Upgrade Type 5 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 5 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 5 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 5 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 5 Format'] || '') }; FTKR.SUS.utypes.push(paramType5); // Type 6 var paramType6 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 6 Type'] || 'repeats'), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 6 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 6 Value'] || 0), 'cost': String(FTKR.SUS.parameters['Upgrade Type 6 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 6 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 6 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 6 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 6 Format'] || '') }; FTKR.SUS.utypes.push(paramType6); // Type 7 var paramType7 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 7 Type'] || 'scope'), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 7 Limit'] || 1), 'value': Number(FTKR.SUS.parameters['Upgrade Type 7 Value'] || 1), 'cost': String(FTKR.SUS.parameters['Upgrade Type 7 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 7 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 7 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 7 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 7 Format'] || '') }; FTKR.SUS.utypes.push(paramType7); // Type 8 var paramType8 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 8 Type'] || 'effects'), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 8 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 8 Value'] || 0), 'cost': String(FTKR.SUS.parameters['Upgrade Type 8 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 8 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 8 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 8 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 8 Format'] || '') }; FTKR.SUS.utypes.push(paramType8); // Type 9 var paramType9 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 9 Type'] || ''), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 9 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 9 Value'] || 0), 'cost': String(FTKR.SUS.parameters['Upgrade Type 9 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 9 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 9 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 9 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 9 Format'] || '') }; FTKR.SUS.utypes.push(paramType9); // Type 10 var paramType10 = { 'type': String(FTKR.SUS.parameters['Upgrade Type 10 Type'] || ''), 'limit': Number(FTKR.SUS.parameters['Upgrade Type 10 Limit'] || 0), 'value': Number(FTKR.SUS.parameters['Upgrade Type 10 Value'] || 0), 'cost': String(FTKR.SUS.parameters['Upgrade Type 10 Cost Value'] || 0), 'icon': Number(FTKR.SUS.parameters['Upgrade Type 10 Icon'] || 0), 'ctype': Number(FTKR.SUS.parameters['Upgrade Type 10 Cost Type'] || 0), 'cid': Number(FTKR.SUS.parameters['Upgrade Type 10 Cost Id'] || 0), 'format': String(FTKR.SUS.parameters['Upgrade Type 10 Format'] || '') }; FTKR.SUS.utypes.push(paramType10); //All FTKR.SUS.upgradeAll = { name: String(FTKR.SUS.parameters['Upgrade All Name'] || '一括強化'), types: String(FTKR.SUS.parameters['Upgrade All Types'] || '1,2,3,4,5,6,7,8'), }; //============================================================================= // プラグイン 定数 //============================================================================= Game_BattlerBase.MAX_SUS_UPGRADE_TYPES = 10; if (FTKR.SUS.maxUtypeNum > Game_BattlerBase.MAX_SUS_UPGRADE_TYPES) { FTKR.SUS.maxUtypeNum = Game_BattlerBase.MAX_SUS_UPGRADE_TYPES; } //書き換え Window_SepTypeList.prototype.maxTypeNum = function () { return FTKR.SUS.maxUtypeNum + 1; }; //============================================================================= // TextManager //============================================================================= FTKR.SUS.TextManager_skillParam = TextManager.skillParam; TextManager.skillParam = function (type, skill, dataId) { switch (type) { case 'all': return FTKR.SUS.upgradeAll.name; default: return FTKR.SUS.TextManager_skillParam.call(this, type, skill, dataId); } }; //============================================================================= // DataManager //============================================================================= FTKR.SUS.DatabaseLoaded = false; FTKR.SUS.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded; DataManager.isDatabaseLoaded = function () { if (!FTKR.SUS.DataManager_isDatabaseLoaded.call(this)) return false; if (!FTKR.SUS.DatabaseLoaded) { DataManager.susActorNotetags($dataActors); DataManager.susActorNotetags($dataClasses); DataManager.susSkillNotetags($dataSkills); DataManager.susHideNotetags($dataActors); DataManager.susHideNotetags($dataClasses); FTKR.SUS.DatabaseLoaded = true; } return true; }; DataManager.susActorNotetags = function (group) { var note1 = /<(?:NOT UPGRADE)>/i; var note2 = /<(?:NOT UPGRADE SKILLTYPE):[ ]*(\d+(?:\s*,\s*\d+)*)>/i; var note3 = /<(?:NOT UPGRADE SKILL):[ ]*(\d+(?:\s*,\s*\d+)*)>/i; var note4 = /<(?:SUS UPGRADE SKILL)[ ](\d+)[ ](?:TYPE)[ ](\d+)[ ](?:LIMIT):[ ]*(\d+)>/i; var note5 = /<(?:SUS UPGRADE SKILL)[ ](\d+)[ ](?:TYPE)[ ](\d+)[ ](?:VALUE):[ ]*(\d+)>/i; for (var n = 1; n < group.length; n++) { var obj = group[n]; var notedata = obj.note.split(/[\r\n]+/); obj.susNotUpgrade = false; obj.susNotUpgradeSkillType = []; obj.susNotUpgradeSkill = []; obj.susUpgradeLimit = []; obj.susUpgradeValue = []; for (var t = 0; t < $dataSystem.skillTypes.length; t++) { obj.susNotUpgradeSkillType[t] = false; } for (var i = 0; i < notedata.length; i++) { var line = notedata[i]; if (line.match(note1)) { obj.susNotUpgrade = true; } else if (line.match(note2)) { var types = JSON.parse('[' + RegExp.$1.match(/\d+/g) + ']'); types.forEach(function (stype) { obj.susNotUpgradeSkillType[stype] = true; }); } else if (line.match(note3)) { var types = JSON.parse('[' + RegExp.$1.match(/\d+/g) + ']'); types.forEach(function (skill) { obj.susNotUpgradeSkill.push(skill); }); } else if (line.match(note4)) { var skill = Number(RegExp.$1); var type = Number(RegExp.$2); var limit = Number(RegExp.$3); obj.susUpgradeLimit.push({ 'skillId': skill, 'typeId': type, 'value': limit }); } else if (line.match(note5)) { var skill = Number(RegExp.$1); var type = Number(RegExp.$2); var value = Number(RegExp.$3); obj.susUpgradeValue.push({ 'skillId': skill, 'typeId': type, 'value': value }); } } } }; DataManager.susSkillNotetags = function (group) { var note1 = /<(?:NOT UPGRADE SKILL)>/i; var note2 = /<(?:NOT UPGRADE TYPE):[ ]*(\d+(?:\s*,\s*\d+)*)>/i; var note3 = /<(?:SUS UPGRADE TYPE)[ ](\d+)[ ](?:LIMIT):[ ]*(\d+)>/i; var note4 = /<(?:SUS UPGRADE TYPE)[ ](\d+)[ ](?:VALUE):[ ]*(\d+)>/i; var note5 = /<(?:SUS UPGRADE TYPE)[ ](\d+)[ ](?:FORMAT):[ ]*(.+)>/i; var note7a = /<(?:SUS UPGRADE COST)>/i; var note7b = /<\/(?:SUS UPGRADE COST)>/i; var note10 = /<(?:SUS SHOW SWITCH)[ ](\d+)[ ](?:TYPE):[ ]*(\d+(?:\s*,\s*\d+)*)>/i; var note6 = /<(?:SET SUS EFFECT)[ ](\d+)[ ](?:RATE):[ ]*(\d+)>/i; var note8 = /<(?:SET SUS EFFECT)[ ](\d+)[ ](?:DISPLAY):[ ]*(.+)>/i; for (var n = 1; n < group.length; n++) { var obj = group[n]; var notedata = obj.note.split(/[\r\n]+/); var CustomMode = 'none'; obj.susNotUpgrade = []; obj.susUpgradeLimit = []; obj.susUpgradeValue = []; obj.susUpgradeFormat = []; obj.susUpgradeCost = ''; obj.susShowSwitch = []; for (var t = 0; t < FTKR.SUS.maxUtypeNum + 1; t++) { obj.susNotUpgrade[t] = false; obj.susShowSwitch[t] = 0; } for (var i = 0; i < notedata.length; i++) { var line = notedata[i]; if (line.match(note1)) { obj.susNotUpgrade[0] = true; } else if (line.match(note2)) { var types = JSON.parse('[' + RegExp.$1.match(/\d+/g) + ']'); types.forEach(function (type) { obj.susNotUpgrade[type] = true; }); } else if (line.match(note3)) { var type = Number(RegExp.$1); var limit = Number(RegExp.$2); obj.susUpgradeLimit[type] = limit; } else if (line.match(note4)) { var type = Number(RegExp.$1); var value = Number(RegExp.$2); obj.susUpgradeValue[type] = value; } else if (line.match(note5)) { var type = Number(RegExp.$1); var fmt = String(RegExp.$2); obj.susUpgradeFormat[type] = fmt; } else if (line.match(note6)) { var dataId = Number(RegExp.$1); var rate = Number(RegExp.$2); obj.effects[dataId].rate = rate; } else if (line.match(note8)) { var dataId = Number(RegExp.$1); var display = String(RegExp.$2); obj.effects[dataId].display = display; } else if (line.match(note7a)) { var type = Number(RegExp.$1); CustomMode = 'cost'; } else if (line.match(note7b)) { CustomMode = 'none'; } else if (CustomMode === 'cost') { obj.susUpgradeCost = obj.susUpgradeCost + line + ';'; } else if (line.match(note10)) { var swId = Number(RegExp.$1); var types = JSON.parse('[' + RegExp.$2.match(/\d+/g) + ']'); types.forEach(function (type) { obj.susShowSwitch[type] = swId; }); } } } }; DataManager.susHideNotetags = function (group) { var note = /<(?:SUS COMMAND HIDE)>/i; for (var n = 1; n < group.length; n++) { var obj = group[n]; var notedata = obj.note.split(/[\r\n]+/); obj.susHide = false; for (var i = 0; i < notedata.length; i++) { var line = notedata[i]; if (line.match(note)) obj.susHide = true; } } }; //============================================================================= // Game_Actor //============================================================================= FTKR.SUS.Game_Actor_initMembers = Game_Actor.prototype.initMembers; Game_Actor.prototype.initMembers = function () { FTKR.SUS.Game_Actor_initMembers.call(this); this._udatas = []; }; Game_Actor.prototype.isSusHide = function () { return this.actor().susHide || this.currentClass().susHide ? true : false; }; Game_Actor.prototype.isRateEffects = function (code) { switch (code) { case Game_Action.EFFECT_ADD_STATE: case Game_Action.EFFECT_REMOVE_STATE: case Game_Action.EFFECT_RECOVER_HP: case Game_Action.EFFECT_RECOVER_MP: return true; } return false; }; Game_Actor.prototype.isTurnEffects = function (code) { switch (code) { case Game_Action.EFFECT_ADD_BUFF: case Game_Action.EFFECT_ADD_DEBUFF: return true; } return false; }; Game_Actor.prototype.isUpgradeEffects = function (code) { return this.isRateEffects(code) || this.isTurnEffects(code) || code === Game_Action.EFFECT_GAIN_TP; }; Game_Actor.prototype.isUpgradeTypes = function (typename) { switch (typename) { case 'damages': return 1; case 'mpCost': case 'tpCost': case 'speed': case 'tpGain': case 'repeats': return 2; case 'scope': return 3; case 'effects': return 4; case 'all': return 5; case 'default': return 0; } return undefined; }; Game_Actor.prototype.isUtypeName = function (typeId) { return FTKR.SUS.utypes[typeId].type; }; Game_Actor.prototype.isHideSkillStatus = function (typeId, sepSkill, effectNum, dataId) { return (this.matchUtype(typeId, 'damages') && !sepSkill.damages[dataId].type) || (this.matchUtype(typeId, 'effects') && (!effectNum || !this.isUpgradeEffects(sepSkill.effects[dataId].code))); }; Game_Actor.prototype.isEnabledSusUpgrade = function (skillId, typeId, dataId) { var udata = this.getSusUdata(skillId, typeId, dataId); return udata ? !this.isNotUpgrade(udata) : false; }; Game_Actor.prototype.isNotUpgrade = function (udata) { return udata.notupgrade; }; Game_Actor.prototype.isUpgradeLimit = function (udata) { return udata.limit <= udata.count; }; Game_Actor.prototype.isSusShowSwitchOn = function (udata) { return udata.sw ? $gameSwitches.value(udata.sw) : true; }; Game_Actor.prototype.canSusUpgrade = function (skillId, typeId, dataId) { var udata = this.getSusUdata(skillId, typeId, dataId); if (!udata) return false; return this.canPayUpgradeCost(udata) && !this.isUpgradeLimit(udata); }; FTKR.SUS.Game_Actor_isPayCostNg = Game_Actor.prototype.isPayCostNg; Game_Actor.prototype.isPayCostNg = function (cost) { switch (cost.type) { case 'jp': return this.jp(this._classId) < this.evalCostValue(cost); } return FTKR.SUS.Game_Actor_isPayCostNg.call(this, cost); }; Game_Actor.prototype.canPayUpgradeCost = function (udata) { return !udata.cost.filter(function (cost) { return this.isPayCostNg(cost); }, this).length; }; // 'damages'等の文字列から、該当するtypeIdを取得 Game_Actor.prototype.getSusTypeId = function (typename) { if (!typename) return false; for (var t = 1; t < FTKR.SUS.maxUtypeNum + 1; t++) { if (FTKR.SUS.utypes[t].type === typename) return t; } }; // udataを取得 Game_Actor.prototype.getSusUdata = function (skillId, typeId, dataId) { var sepSkill = this.sepSkill(skillId); if (!sepSkill) return undefined; if (!dataId) dataId = 0; if (typeId === 0) return sepSkill.udata[0]; var udatas = sepSkill.udata.filter(function (type) { return type.id === typeId; }); return udatas ? udatas[dataId] : undefined; }; // skillIdと強化タイプ名('damages'等)から、該当するスキルの強化値(uparam)を取得 Game_Actor.prototype.getSusUparam = function (skillId, typename, dataId) { var skill = $dataSkills[skillId]; if (!this.isUpgradeTypes(typename)) return undefined; if (typename === 'scope' && (skill.scope === 1 || skill.scope > 6)) { return this.getSusScope(skillId); } else { return this.getSusUparamBase(skillId, typename, -1, dataId); } }; Game_Actor.prototype.getSusUparamBase = function (skillId, typename, ucount, dataId) { var skill = $dataSkills[skillId]; if (!skill) return undefined; var udata = this.getSusUdata(skillId, this.getSusTypeId(typename), dataId); if (!udata) return undefined; ucount = ucount < 0 ? udata.count : ucount; var fmt = udata.format; var uvalue = udata.value; var result = eval(fmt.format(this.getUbasevalue(skill, typename, dataId), uvalue, ucount)); return result; }; Game_Actor.prototype.getUbasevalue = function (skill, type, dataId) { if (type === 'effects') { return skill.effects[dataId].rate; } else if (type === 'damages') { return skill.damages[dataId].rate; } else if (type === 'scope') { return Math.max(skill.scoperandom || skill.scope - 2); } else if (type === 'repeats') { return Math.max(skill.sepRepeats.count || skill.repeats); } else { return skill[type]; } }; Game_Actor.prototype.getSusScope = function (skillId) { var scope = $dataSkills[skillId].scope; var typeId = this.getSusTypeId('scope'); var udata = this.getSusUdata(skillId, typeId); return udata ? this.getSusScopeBase(scope, udata.count) : false; }; Game_Actor.prototype.getSusScopeBase = function (scope, value) { switch (scope) { case 1: case 7: case 9: return value ? scope + 1 : scope; case 3: case 4: case 5: case 6: return scope + value > 6 ? 2 : scope + value; } return scope; }; Game_Actor.prototype.setUcost = function (type, id, value, count) { return { 'type': type, 'id': id, 'value': value, 'count': count }; }; Game_Actor.prototype.getSusSkillNotetagsCost = function (skill, typeId) { var results = []; var type = false; var readCost = false; var costdata = skill.susUpgradeCost; if (costdata) { var case1 = /(?:Type)[ ](\d+)[ ](?:gold):[ ]*(.+)/i; var case2 = /(?:Type)[ ](\d+)[ ](?:item\[)(\d+)\]:[ ]*(.+)/i; var case2a = /(?:Type)[ ](\d+)[ ](?:weapon\[)(\d+)\]:[ ]*(.+)/i; var case2b = /(?:Type)[ ](\d+)[ ](?:armor\[)(\d+)\]:[ ]*(.+)/i; var case3 = /(?:Type)[ ](\d+)[ ](?:v\[)(\d+)\]:[ ]*(.+)/i; var case4 = /(?:Type)[ ](\d+)[ ](?:JP):[ ]*(.+)/i; var costs = costdata.split(';'); for (var i = 0; i < costs.length; i++) { var cost = costs[i]; if (cost.match(case1)) { type = Number(RegExp.$1); if (type === typeId) { readCost = true; results.push(this.setUcost('gold', 0, String(RegExp.$2), 0)); } } else if (cost.match(case2)) { type = Number(RegExp.$1); if (type === typeId) { readCost = true; results.push(this.setUcost('item', Number(RegExp.$2), String(RegExp.$3), 0)); } } else if (cost.match(case2a)) { type = Number(RegExp.$1); if (type === typeId) { readCost = true; results.push(this.setUcost('weapon', Number(RegExp.$2), String(RegExp.$3), 0)); } } else if (cost.match(case2b)) { type = Number(RegExp.$1); if (type === typeId) { readCost = true; results.push(this.setUcost('armor', Number(RegExp.$2), String(RegExp.$3), 0)); } } else if (cost.match(case3)) { type = Number(RegExp.$1); if (type === typeId) { readCost = true; results.push(this.setUcost('var', Number(RegExp.$2), String(RegExp.$3), 0)); } } else if (cost.match(case4)) { type = Number(RegExp.$1); if (type === typeId) { readCost = true; results.push(this.setUcost('jp', 0, String(RegExp.$2), 0)); } } } return readCost ? results : false; } }; //sepSkillに強化用のパラメータ(udata)を追加 FTKR.SUS.Game_Actor_makeSepSkill = Game_Actor.prototype.makeSepSkill; Game_Actor.prototype.makeSepSkill = function (skillId) { FTKR.SUS.Game_Actor_makeSepSkill.call(this, skillId); var sepSkill = this.sepSkill(skillId); var index = this.makeSusUdata(skillId); sepSkill.udata = this._udatas[index]; }; // udataの中身(_udatas[index][typeId])を作成し、this._udatas[index]のindexを返す Game_Actor.prototype.makeSusUdata = function (skillId) { var udatas = []; for (var t = 0; t < FTKR.SUS.maxUtypeNum + 1; t++) { var flag = this.isUpgradeTypes(this.isUtypeName(t)); if (flag === 'undefined') continue; udatas = udatas.concat(this.setSusUdata(skillId, t)); } this._udatas.push(udatas); return this._udatas.length - 1; }; Game_Actor.prototype.setSusUdata = function (skillId, typeId) { if (this.matchUtype(typeId, 'damages')) { var udatas = []; var damages = $dataSkills[skillId].damages; var len = damages.length ? damages.length : 1; for (var i = 0; i < len; i++) { var udata = this.setSusUdataBase(skillId, typeId); if (!damages[i]) udata.notupgrade = true; udatas.push(udata); } return udatas; } else if (this.matchUtype(typeId, 'effects')) { var udatas = []; var effects = $dataSkills[skillId].effects; var len = effects.length ? effects.length : 1; for (var i = 0; i < len; i++) { var udata = this.setSusUdataBase(skillId, typeId); if (!effects[i]) { udata.notupgrade = true; } else if (!this.isUpgradeEffects(effects[i].code)) { udata.notupgrade = true; } udatas.push(udata); } return udatas; } else { return this.setSusUdataBase(skillId, typeId); } }; Game_Actor.prototype.setSusUdataBase = function (skillId, typeId, uflag) { var value = this.setUpgradeSkillValue(skillId, typeId); var limit = this.setUpgradeSkillLimit(skillId, typeId, value); var udata = { 'id': typeId, 'count': 0, 'value': value, 'limit': limit, 'notupgrade': this.setNotUpgradeSkill(skillId, typeId, limit), 'cost': this.setUpgradeSkillCost(skillId, typeId), 'format': this.setUpgradeSkillFormat(skillId, typeId), 'sw': this.setShowSwitch(skillId, typeId) }; return udata; }; Game_Actor.prototype.setUpgradeSkillBase = function (lists, skillId, typeId) { for (var i in lists) { var list = lists[i]; if (list.skillId == skillId && list.typeId == typeId) return list.value; } return NaN; }; Game_Actor.prototype.setUpgradeSkillValue = function (skillId, typeId) { var result = this.setUpgradeSkillBase(this.actor().susUpgradeValue, skillId, typeId); if (result) return result; result = this.setUpgradeSkillBase(this.currentClass().susUpgradeValue, skillId, typeId); if (result) return result; result = $dataSkills[skillId].susUpgradeValue[typeId]; if (result) return result; result = FTKR.SUS.utypes[typeId].value; return result ? result : FTKR.SUS.utypes[0].value; }; Game_Actor.prototype.setUpgradeSkillLimitBase = function (skillId, typeId) { var result = this.setUpgradeSkillBase(this.actor().susUpgradeLimit, skillId, typeId); if (result > 0) return result; result = this.setUpgradeSkillBase(this.currentClass().susUpgradeLimit, skillId, typeId); if (result > 0) return result; result = $dataSkills[skillId].susUpgradeLimit[typeId]; if (result > 0) return result; result = FTKR.SUS.utypes[typeId].limit; return result > 0 ? result : FTKR.SUS.utypes[0].limit; }; Game_Actor.prototype.setUpgradeSkillLimit = function (skillId, typeId, value) { var limit = this.setUpgradeSkillLimitBase(skillId, typeId); var skill = $dataSkills[skillId]; if (skill.susNotUpgrade[typeId]) { limit = 0; } else if (this.matchUtype(typeId, 'damages') && !skill.damages[0].type) { limit = 0; } else if (this.matchUtype(typeId, 'mpCost')) { var defMpCost = skill.mpCost; if (defMpCost < Math.abs(limit * value)) limit = Math.ceil(defMpCost / Math.abs(value)); } else if (this.matchUtype(typeId, 'tpCost')) { var defTpCost = skill.tpCost; if (defTpCost < Math.abs(limit * value)) limit = Math.ceil(defTpCost / Math.abs(value)); } else if (this.matchUtype(typeId, 'scope')) { if ([1, 7, 9].contains(skill.scope)) { limit = 1; } else if ([3, 4, 5, 6].contains(skill.scope)) { return limit; } else { limit = 0; } } else if (this.matchUtype(typeId, 'effects') && !skill.effects[0]) { limit = 0; } return limit; }; Game_Actor.prototype.setNotUpgradeSkill = function (skillId, typeId, limit) { if (limit === 0) return true; var skill = $dataSkills[skillId]; return (this.actor().susNotUpgrade || this.actor().susNotUpgradeSkillType[skill.stypeId] || !this.actor().susNotUpgradeSkill.indexOf(skillId) || this.currentClass().susNotUpgrade || this.currentClass().susNotUpgradeSkillType[skill.stypeId] || !this.currentClass().susNotUpgradeSkill.indexOf(skillId) || skill.susNotUpgrade[typeId]) ? true : false; }; Game_Actor.prototype.setShowSwitch = function (skillId, typeId) { return $dataSkills[skillId].susShowSwitch[typeId]; }; Game_Actor.prototype.setUpgradeSkillCost = function (skillId, typeId) { var results = []; var result = {}; var skill = $dataSkills[skillId]; results = this.getSusSkillNotetagsCost(skill, typeId); if (results) return results; var utype = FTKR.SUS.utypes[typeId]; if (utype) { results = []; result = { value: utype.cost, type: this.convertCtype(utype.ctype), id: utype.cid, count: 0 }; if (result.value && result.type) { results.push(result); return results; } } var utype0 = FTKR.SUS.utypes[0]; if (!utype0) return false; result = { value: utype0.cost, type: this.convertCtype(utype0.ctype), id: utype0.cid, count: 0 }; results.push(result); return results; }; Game_Actor.prototype.convertCtype = function (ctype) { switch (ctype) { case 1: return 'gold'; case 2: return 'item'; case 3: return 'var'; case 4: return 'jp'; case 5: return 'weapon'; case 6: return 'armor'; default: return ''; }; }; Game_Actor.prototype.setUpgradeSkillFormat = function (skillId, typeId) { var fmt = $dataSkills[skillId].susUpgradeFormat[typeId]; if (fmt) return fmt; fmt = FTKR.SUS.utypes[typeId].format; return fmt ? fmt : FTKR.SUS.utypes[0].format; }; Game_Actor.prototype.upgradeSepSkill = function (skillId, typeId, dataId) { this.payUpgradeCost(skillId, typeId, dataId); if (this.matchUtype(typeId, 'all')) { var skill = this.getSkill(skillId); FTKR.SUS.upgradeAll.types.split(',').forEach(function (i) { i = Number(i); if (i !== typeId) { var len = this.matchUtype(i, 'damages') || this.matchUtype(i, 'effects') ? skill[FTKR.SUS.utypes[i].type].length : 1; for (var j = 0; j < len; j++) { if (this.matchUtype(i, 'damages') && skill.damages[j].type < 1) continue; if (this.canSusUpgrade(skillId, i, j)) { this.susUpgradeSepSkill(skillId, i, j); } } } }, this); } return this.susUpgradeSepSkill(skillId, typeId, dataId); }; Game_Actor.prototype.susUpgradeSepSkill = function (skillId, typeId, dataId) { var sepSkill = this.sepSkill(skillId); var udata = this.getSusUdata(skillId, typeId, dataId); if (!udata) return false; udata.count += 1; udata.cost.forEach(function (cost, i) { udata.cost[i].count += 1; }); var type = FTKR.SUS.utypes[typeId].type; var value = this.getSusUparam(skillId, type, dataId); this.setUpgradeParam(sepSkill, type, value, dataId); var fmt = FTKR.SUS.susSkillNameFormat; sepSkill.name = fmt.format($dataSkills[skillId].name, this.getSusTotalCount(sepSkill)); return true; }; Game_Actor.prototype.getSusTotalCount = function (sepSkill) { var totalcount = 0; sepSkill.udata.forEach(function (udata) { totalcount += udata.count; }, this); var typeId = this.getSusTypeId('all'); if (typeId) totalcount -= this.getSusUdata(sepSkill.id, typeId, 0).count return totalcount; }; Game_Actor.prototype.setUpgradeParam = function (sepSkill, typename, value, dataId) { if (typename == 'damages') { sepSkill.damages[dataId].rate = value; } else if (typename === 'scope' && sepSkill.scoperandom) { sepSkill.scoperandom = value; } else if (typename === 'effects') { sepSkill.effects[dataId].rate = value; } else if (typename === 'repeats') { sepSkill.sepRepeats.count = value; } else { sepSkill[typename] = value; } }; //書き換え Game_Actor.prototype.sepSkillsCount = function (cost) { return cost.count; }; FTKR.SUS.Game_Actor_paySepCost = Game_Actor.prototype.paySepCost; Game_Actor.prototype.paySepCost = function (cost) { switch (cost.type) { case 'jp': return this.gainJp(-this.evalCostValue(cost), this._classId); } return FTKR.SUS.Game_Actor_paySepCost.call(this, cost); }; Game_Actor.prototype.payUpgradeCost = function (skillId, typeId, dataId) { var udata = this.getSusUdata(skillId, typeId, dataId); udata.cost.forEach(function (arr) { return arr instanceof Object ? this.paySepCost(arr) : true; }, this); return true; }; Game_Actor.prototype.matchUtype = function (typeId, typename) { return typeId === this.getSusTypeId(typename); } //============================================================================= // Game_Interpreter //============================================================================= var _SUS_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; Game_Interpreter.prototype.pluginCommand = function (command, args) { _SUS_Game_Interpreter_pluginCommand.call(this, command, args); if (command === 'SUS') { switch (args[0]) { // システム画面上ではなく、直接プラグインコマンドで強化する。 case 'Upgrade': case 'UPGRADE': if (args[1] === 'Actor' && args[3] === 'Skill' && args[5] === 'Type' && args[7] === 'Levelup') { if ($gameActors.actor(args[2]) && Number(args[8]) > 0) { var actor = $gameActors.actor(args[2]); var dataId = 0; if (args[9] === 'dataId') dataId = Number(args[10]); for (var i = 0; i < Number(args[8]); i++) { actor.susUpgradeSepSkill(Number(args[4]), Number(args[6]), dataId); } } } break; // 指定した強化タイプの最大レベルを変更する。 case 'Set': case 'SET': if (args[1] === 'Limit' && Number(args[2]) >= 0) { if (args[3] === 'Actor' && args[5] === 'Skill' && args[7] === 'Type') { var udata = this.getSusUdata(args[4], args[6], args[8], args[9], args[10]); if (!udata) return false; udata.limit = Number(args[2]) >= udata.count ? Number(args[2]) : false; } } break; case 'Get': case 'GET': // 指定の変数に、アクター、スキル、強化タイプを指定して強化回数を代入する if (args[1] === 'Variables' && Number(args[2]) > 0) { if (args[3] === 'Actor' && args[5] === 'Skill' && args[7] === 'Type') { var udata = this.getSusUdata(args[4], args[6], args[8], args[9], args[10]); if (!udata) return false; $gameVariables.setValue(Number(args[2]), udata.count); } // 指定のスイッチを、アクター、スキル、強化タイプの強化回数が指定の値と比べてどうか判定して、結果を代入する } else if (args[1] === 'Switches' && Number(args[2]) > 0) { if (args[5] === 'Actor' && args[7] === 'Skill' && args[9] === 'Type') { var udata = this.getSusUdata(args[6], args[8], args[10], args[11], args[12]); if (!udata) return false; if (args[3] === 'CountOver') { $gameSwitches.setValue(Number(args[2]), Number(args[4]) < udata.count); } else if (args[3] === 'CountUnder') { $gameSwitches.setValue(Number(args[2]), Number(args[4]) > udata.count); } else if (args[3] === 'CountEqual') { $gameSwitches.setValue(Number(args[2]), Number(args[4]) == udata.count); } } } } } }; Game_Interpreter.prototype.getSusUdata = function (actorId, skillId, typeId, Effect, dataId) { var actor = $gameActors.actor(Number(actorId)); if (!actor) return false; skillId = Number(skillId); typeId = Number(typeId); if (!actor.sepSkill(skillId)) return false; dataId = Effect === 'dataId' ? Number(dataId) : 0; var udata = actor.getSusUdata(skillId, typeId, dataId); return udata ? udata : false; }; };//FTKR_SkillUpgradeSystem END