Double_X

DoubleX RMMV Dynamic Settings v100a

Aug 15th, 2016 (edited)
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*============================================================================
  2.  *    ## Plugin Info                                                          
  3.  *----------------------------------------------------------------------------
  4.  *    # Plugin Name                                                          
  5.  *      DoubleX RMMV Dynamic Settings                                        
  6.  *----------------------------------------------------------------------------
  7.  *    # Terms Of Use                                                          
  8.  *      1. Commercial use's always allowed and crediting me's always optional.
  9.  *      2. You shall keep this plugin's Plugin Info part's contents intact.  
  10.  *      3. You shalln't claim that this plugin's written by anyone other than
  11.  *         DoubleX or my aliases. I always reserve the right to deny you from
  12.  *         using any of my plugins anymore if you've violated this.          
  13.  *      4. CC BY 4.0, except those conflicting with any of the above, applies
  14.  *         to this plugin, unless you've my permissions not needing follow so.
  15.  *      5. I always reserve the right to deny you from using this plugin      
  16.  *         anymore if you've violated any of the above.                      
  17.  *----------------------------------------------------------------------------
  18.  *    # Prerequisites                                                        
  19.  *      Abilities:                                                            
  20.  *      1. Little RMMV plugin development proficiency for most basic usages  
  21.  *      2. Some RMMV plugin development proficiency to fully utilize this    
  22.  *----------------------------------------------------------------------------
  23.  *    # Links                                                                
  24.  *      This plugin:                                                          
  25.  *      1. http://pastebin.com/1Lzvyy8M                                      
  26.  *      Mentioned Patreon Supporters:
  27.  *      https://www.patreon.com/posts/71738797
  28.  *----------------------------------------------------------------------------
  29.  *    # Author                                                                
  30.  *      DoubleX                                                              
  31.  *----------------------------------------------------------------------------
  32.  *    # Changelog                                                            
  33.  *      v1.00a(GMT 1400 15-8-2016):                                          
  34.  *      1. 1st version of this plugin finished                                
  35.  *============================================================================*/
  36. /*:
  37.  * @plugindesc Lets users change some system settings in game and save them
  38.  * @author DoubleX
  39.  *
  40.  * @param currencyUnit
  41.  * @desc Sets the currency unit
  42.  *       It corresponds to the currency in the system settings
  43.  *       Don't include , in its value
  44.  *       Windows showing the currency unit might need to be refreshed right
  45.  *       after changing currencyUnit
  46.  * @default G
  47.  *
  48.  * @param equipTypes
  49.  * @desc Sets the list of equip types
  50.  *       It corresponds to the equipment types in the type settings
  51.  *       Don't change this when showing equips unless you really know what
  52.  *       you're truly doing
  53.  *       Don't change anything other than the equip type names unless you
  54.  *       really know what you're truly doing
  55.  * @default , Weapon, Shield, Head, Body, Accessory
  56.  *
  57.  * @param locale
  58.  * @desc Sets the locale of the game
  59.  *       Don't include , in its value
  60.  *       Windows showing texts might have to be refreshed right after changing
  61.  *       locale
  62.  * @default en_US
  63.  *
  64.  * @param magicSkills
  65.  * @desc Sets the list of skill type ids needing chanting motions in side view
  66.  *       It corresponds to the magic skills in the system settings
  67.  *       Don't change this during the same battle unless you really know what
  68.  *       you're truly doing
  69.  * @default 1, 2
  70.  *
  71.  * @param menuCommands
  72.  * @desc Sets the enabled status of all menu commands
  73.  *       It corresponds to the menu commands in the system settings
  74.  *       The 1st, 2nd, 3rd, 4th, 5th and 6th status correspond to item, skill,
  75.  *       equip, status, formation and save
  76.  *       Setting an enabled status as anything other than false means it's
  77.  *       true
  78.  *       The menu window might need to be refreshed right after changing
  79.  *       menuCommands
  80.  * @default true, true, true, true, true, true
  81.  *
  82.  * @param optDisplayTp
  83.  * @desc Sets whether tp will be shown
  84.  *       It corresponds to the display tp in battle in the options of the
  85.  *       system settings
  86.  *       Setting it as anything other than false means it's true
  87.  *       Don't change this when showing actors' statuses unless you really
  88.  *       know what you're truly doing
  89.  * @default true
  90.  *
  91.  * @param optExtraExp
  92.  * @desc Sets whether actors outside battles can gain exp from those battles
  93.  *       It corresponds to the exp for reserve members in the options of the
  94.  *       system settings
  95.  *       Setting it as anything other than false means it's true
  96.  * @default false
  97.  *
  98.  * @param optFloorDeath
  99.  * @desc Sets whether floor damages alone can directly lead to death
  100.  *       It corresponds to the knockout by floor damage in the options of the
  101.  *       system settings
  102.  *       Setting it as anything other than false means it's true
  103.  * @default true
  104.  *
  105.  * @param optFollowers
  106.  * @desc Sets whether followers of the leading party member will be shown
  107.  *       It corresponds to the show player followers in the options of the
  108.  *       system settings
  109.  *       Setting it as anything other than false means it's true
  110.  *       Don't change this from false to true when followers could be
  111.  *       colliding with something else unless you really know what you're
  112.  *       truly doing
  113.  * @default true
  114.  *
  115.  * @param optSideView
  116.  * @desc Sets whether side view will be used
  117.  *       It corresponds to the use side view battle in the options of the
  118.  *       system settings
  119.  *       Setting it as anything other than false means it's true
  120.  *       Don't change this during the same battle unless you really know what
  121.  *       you're truly doing
  122.  * @default true
  123.  *
  124.  * @param optSlipDeath
  125.  * @desc Sets whether slip damages alone can directly lead to death
  126.  *       It corresponds to the knockout by slip damage in the options of the
  127.  *       system settings
  128.  *       Setting it as anything other than false means it's true
  129.  * @default true
  130.  *
  131.  * @param skillTypes
  132.  * @desc Sets the list of skill types
  133.  *       It corresponds to the skill types in the type settings
  134.  *       Don't change this when showing skill types unless you really know
  135.  *       what you're truly doing
  136.  *       Don't change anything other than the skill type names unless you
  137.  *       really know what you're truly doing
  138.  * @default , Magic, Special
  139.  *
  140.  * @help
  141.  * attackMotions, sounds and termscan only be edited via opening this plugin
  142.  * js file directly
  143.  *
  144.  * The default plugin file name is DoubleX RMMV Dynamic Settings v100a
  145.  * If you want to change that, you must edit the value of
  146.  * DoubleX_RMMV.Dynamic_Settings_File, which must be done via opening this
  147.  * plugin js file directly
  148.  *============================================================================
  149.  *    ## Plugin Call Info                                                    
  150.  *----------------------------------------------------------------------------
  151.  *    # Configuration manipulations                                          
  152.  *      1. $gameSystem.dynamicSettings.param                                  
  153.  *         - Returns the value of parameters shown in the plugin manager      
  154.  *         - E.g.: Without using the 2nd plugin call,                        
  155.  *                 $gameSystem.dynamicSettings.menuCommands will return      
  156.  *                 [false, false, false, false, false, false]                
  157.  *      2. $gameSystem.dynamicSettings.param = val                            
  158.  *         - Sets the value of parameters shown in the plugin manager as val  
  159.  *         - All $gameSystem.dynamicSettings.param changes will be saved      
  160.  *         - E.g.: $gameSystem.dynamicSettings.terms.messages.substitute =    
  161.  *                 '%1 protected %2!' will set the substitute message to be  
  162.  *                 '%1 protected %2!'                                        
  163.  *============================================================================
  164.  */
  165.  
  166. var DoubleX_RMMV = DoubleX_RMMV || {};
  167. DoubleX_RMMV['Dynamic Settings'] = 'v1.00a';
  168.  
  169. // The plugin file name must be the same as DoubleX_RMMV.Dynamic_Settings_File
  170. DoubleX_RMMV.Dynamic_Settings_File = 'DoubleX RMMV Dynamic Settings v100a';
  171.  
  172. DoubleX_RMMV.Dynamic_Settings = {
  173.  
  174.     /* Sets the list of attack motions in side view
  175.      * It corresponds to attack motions in the system settings
  176.      * Don't change this during the same battle unless you really know what
  177.      * you're doing
  178.      */
  179.     attackMotions: [
  180.         {
  181.             'type': 0,
  182.             'weaponImageId': 0
  183.         }, {
  184.             'type': 1,
  185.             'weaponImageId': 1
  186.         }, {
  187.             'type': 1,
  188.             'weaponImageId': 2
  189.         }, {
  190.             'type': 1,
  191.             'weaponImageId': 3
  192.         }, {
  193.             'type': 1,
  194.             'weaponImageId': 4
  195.         }, {
  196.             'type': 1,
  197.             'weaponImageId': 5
  198.         }, {
  199.             'type': 1,
  200.             'weaponImageId': 6
  201.         }, {
  202.             'type': 2,
  203.             'weaponImageId': 7
  204.         }, {
  205.             'type': 2,
  206.             'weaponImageId': 8
  207.         }, {
  208.             'type': 2,
  209.             'weaponImageId': 9
  210.         }, {
  211.             'type': 0,
  212.             'weaponImageId': 10
  213.         }, {
  214.             'type': 0,
  215.             'weaponImageId': 11
  216.         }, {
  217.             'type': 0,
  218.             'weaponImageId': 12
  219.         }
  220.     ],
  221.  
  222.     /* Sets the list of sounds
  223.      * It corresponds to sound in system settings
  224.      */
  225.     sounds: [
  226.         {
  227.             name: 'Cursor2',
  228.             pan: 0,
  229.             pitch: 100,
  230.             volume: 90
  231.         }, {
  232.             name: 'Decision1',
  233.             pan: 0,
  234.             pitch: 100,
  235.             volume: 90
  236.         }, {
  237.             name: 'Cancel2',
  238.             pan: 0,
  239.             pitch: 100,
  240.             volume: 90
  241.         }, {
  242.             name: 'Buzzer1',
  243.             pan: 0,
  244.             pitch: 100,
  245.             volume: 90
  246.         }, {
  247.             name: 'Equip1',
  248.             pan: 0,
  249.             pitch: 100,
  250.             volume: 90
  251.         }, {
  252.             name: 'Save',
  253.             pan: 0,
  254.             pitch: 100,
  255.             volume: 90
  256.         }, {
  257.             name: 'Load',
  258.             pan: 0,
  259.             pitch: 100,
  260.             volume: 90
  261.         }, {
  262.             name: 'Battle1',
  263.             pan: 0,
  264.             pitch: 100,
  265.             volume: 90
  266.         }, {
  267.             name: 'Run',
  268.             pan: 0,
  269.             pitch: 100,
  270.             volume: 90
  271.         }, {
  272.             name: 'Attack3',
  273.             pan: 0,
  274.             pitch: 100,
  275.             volume: 90
  276.         }, {
  277.             name: 'Damage4',
  278.             pan: 0,
  279.             pitch: 100,
  280.             volume: 90
  281.         }, {
  282.             name: 'Collapse1',
  283.             pan: 0,
  284.             pitch: 100,
  285.             volume: 90
  286.         }, {
  287.             name: 'Collapse2',
  288.             pan: 0,
  289.             pitch: 100,
  290.             volume: 90
  291.         }, {
  292.             name: 'Collapse3',
  293.             pan: 0,
  294.             pitch: 100,
  295.             volume: 90
  296.         }, {
  297.             name: 'Damage5',
  298.             pan: 0,
  299.             pitch: 100,
  300.             volume: 90
  301.         }, {
  302.             name: 'Collapse4',
  303.             pan: 0,
  304.             pitch: 100,
  305.             volume: 90
  306.         }, {
  307.             name: 'Recovery',
  308.             pan: 0,
  309.             pitch: 100,
  310.             volume: 90
  311.         }, {
  312.             name: 'Miss',
  313.             pan: 0,
  314.             pitch: 100,
  315.             volume: 90
  316.         }, {
  317.             name: 'Evasion1',
  318.             pan: 0,
  319.             pitch: 100,
  320.             volume: 90
  321.         }, {
  322.             name: 'Evasion2',
  323.             pan: 0,
  324.             pitch: 100,
  325.             volume: 90
  326.         }, {
  327.             name: 'Reflection',
  328.             pan: 0,
  329.             pitch: 100,
  330.             volume: 90
  331.         }, {
  332.             name: 'Shop1',
  333.             pan: 0,
  334.             pitch: 100,
  335.             volume: 90
  336.         }, {
  337.             name: 'Item3',
  338.             pan: 0,
  339.             pitch: 100,
  340.             volume: 90
  341.         }, {
  342.             name: 'Item3',
  343.             pan: 0,
  344.             pitch: 100,
  345.             volume: 90
  346.         }
  347.     ],
  348.  
  349.     /* Sets the terms in the term table
  350.      * It corresponds to the terms settings
  351.      * Windows showing those terms might need to be refreshed right after
  352.      * changing the relevant terms in the term table
  353.      */
  354.     terms: {
  355.         basic: [
  356.             'Level',
  357.             'Lv',
  358.             'HP',
  359.             'HP',
  360.             'MP',
  361.             'MP',
  362.             'TP',
  363.             'TP',
  364.             'EXP',
  365.             'EXP'
  366.         ],
  367.         commands: [
  368.             'Fight',
  369.             'Escape',
  370.             'Attack',
  371.             'Guard',
  372.             'Item',
  373.             'Skill',
  374.             'Equip',
  375.             'Status',
  376.             'Formation',
  377.             'Save',
  378.             'Game End',
  379.             'Options',
  380.             'Weapon',
  381.             'Armor',
  382.             'Key Item',
  383.             'Equip',
  384.             'Optimize',
  385.             'Clear',
  386.             'New Game',
  387.             'Continue',
  388.             null,
  389.             'To Title',
  390.             'Cancel',
  391.             null,
  392.             'Buy',
  393.             'Sell'
  394.         ],
  395.         params: [
  396.             'Max HP',
  397.             'Max MP',
  398.             'Attack',
  399.             'Defense',
  400.             'M.Attack',
  401.             'M.Defense',
  402.             'Agility',
  403.             'Luck',
  404.             'Hit',
  405.             'Evasion'
  406.         ],
  407.         messages: {
  408.             actionFailure: 'There was no effect on %1!',
  409.             actorDamage: '%1 took %2 damage!',
  410.             actorDrain: '%1 was drained of %2 %3!',
  411.             actorGain: '%1 gained %2 %3!',
  412.             actorLoss: '%1 lost %2 %3!',
  413.             actorNoDamage: '%1 took no damage!',
  414.             actorNoHit: 'Miss! %1 took no damage!',
  415.             actorRecovery: '%1 recovered %2 %3!',
  416.             alwaysDash: 'Always Dash',
  417.             bgmVolume: 'BGM Volume',
  418.             bgsVolume: 'BGS Volume',
  419.             buffAdd: "%1's %2 went up!'",
  420.             buffRemove: "%1's %2 returned to normal!",
  421.             commandRemember: 'Command Remember',
  422.             counterAttack: '%1 counterattacked!',
  423.             criticalToActor: 'A painful blow!!',
  424.             criticalToEnemy: 'An excellent hit!!',
  425.             debuffAdd: "%1's %2 went down!",
  426.             defeat: '%1 was defeated.',
  427.             emerge: '%1 emerged!',
  428.             enemyDamage: '%1 took %2 damage!',
  429.             enemyDrain: '%1 was drained of %2 %3!',
  430.             enemyGain: '%1 gained %2 %3!',
  431.             enemyLoss: '%1 lost %2 %3!',
  432.             enemyNoDamage: '%1 took no damage!',
  433.             enemyNoHit: 'Miss! %1 took no damage!',
  434.             enemyRecovery: '%1 recovered %2 %3!',
  435.             escapeFailure: 'However, it was unable to escape!',
  436.             escapeStart: '%1 has started to escape!',
  437.             evasion: '%1 evaded the attack!',
  438.             expNext: 'To Next %1',
  439.             expTotal: 'Current %1',
  440.             file: 'File',
  441.             levelUp: '%1 is now %2 %3!',
  442.             loadMessage: 'Load which file?',
  443.             magicEvasion: '%1 nullified the magic!',
  444.             magicReflection: '%1 reflected the magic!',
  445.             meVolume: 'ME Volume',
  446.             obtainExp: '%1 %2 received!',
  447.             obtainGold: '%1\\G found!',
  448.             obtainItem: '%1 found!',
  449.             obtainSkill: '%1 learned!',
  450.             partyName: "%1's Party",
  451.             possession: 'Possession',
  452.             preemptive: '%1 got the upper hand!',
  453.             saveMessage: 'Save to which file?',
  454.             seVolume: 'SE Volume',
  455.             substitute: '%1 protected %2!',
  456.             surprise: '%1 was surprised!',
  457.             useItem: '%1 uses %2!',
  458.             victory: '%1 was victorious!'
  459.         }
  460.     }
  461.  
  462. }; // DoubleX_RMMV.Dynamic_Settings
  463.  
  464. /*============================================================================
  465.  *    ## Plugin Implementations                                              
  466.  *       You need not edit this part as it's about how this plugin works      
  467.  *----------------------------------------------------------------------------
  468.  *    # Plugin Support Info:                                                  
  469.  *      1. Prerequisites                                                      
  470.  *         - Some RMMV plugin development proficiency to fully comprehend this
  471.  *           plugin                                                          
  472.  *----------------------------------------------------------------------------*/
  473.  
  474. (function(DS) {
  475.  
  476.     'use strict';
  477.  
  478.     Object.defineProperty(TextManager, 'currencyUnit', {
  479.     // Rewrite; v1.00a - v1.00a
  480.         get: function() { return $gameSystem.dynamicSettings.currencyUnit; },
  481.         configurable: true
  482.     });
  483.  
  484.     DS.SoundManager = {};
  485.     var SM = DS.SoundManager;
  486.  
  487.     // Trades a bit of time performance for a vast amount of simplicity
  488.     SM.playSystemSound = SoundManager.playSystemSound;
  489.     SoundManager.playSystemSound = function(n) { // Rewrite; v1.00a - v1.00a
  490.         // Rewritten
  491.         if ($gameSystem) {
  492.             AudioManager.playStaticSe($gameSystem.dynamicSettings.sounds[n]);
  493.         }
  494.         //
  495.     }; // SoundManager.playSystemSound
  496.  
  497.     DS.TextManager = {};
  498.     var TM = DS.TextManager;
  499.  
  500.     TM.basic = TextManager.basic;
  501.     TextManager.basic = function(basicId) { // Rewrite; v1.00a - v1.00a
  502.         // Rewritten
  503.         return $gameSystem.dynamicSettings.terms.basic[basicId] || '';
  504.         //
  505.     }; // TextManager.basic
  506.  
  507.     TM.param = TextManager.param;
  508.     TextManager.param = function(paramId) { // Rewrite; v1.00a - v1.00a
  509.         // Rewritten
  510.         return $gameSystem.dynamicSettings.terms.params[paramId] || '';
  511.         //
  512.     }; // TextManager.param
  513.  
  514.     TM.command = TextManager.command;
  515.     TextManager.command = function(commandId) { // Rewrite; v1.00a - v1.00a
  516.         // Rewritten
  517.         return $gameSystem.dynamicSettings.terms.commands[commandId] || '';
  518.         //
  519.     }; // TextManager.command
  520.  
  521.     TM.message = TextManager.message;
  522.     TextManager.message = function(messageId) { // Rewrite; v1.00a - v1.00a
  523.         // Rewritten
  524.         return $gameSystem.dynamicSettings.terms.messages[messageId] || '';
  525.         //
  526.     }; // TextManager.message
  527.  
  528.     DS.Game_System = {};
  529.     var GS = DS.Game_System;
  530.  
  531.     GS.isJapanese = Game_System.prototype.isJapanese;
  532.     Game_System.prototype.isJapanese = function() { // Rewrite; v1.00a - v1.00a
  533.         return $gameSystem.dynamicSettings.locale.match(/^ja/); // Rewritten
  534.     }; // Game_System.prototype.isJapanese
  535.  
  536.     GS.isChinese = Game_System.prototype.isChinese;
  537.     Game_System.prototype.isChinese = function() { // Rewrite; v1.00a - v1.00a
  538.         return $gameSystem.dynamicSettings.locale.match(/^zh/); // Rewritten
  539.     }; // Game_System.prototype.isChinese
  540.  
  541.     GS.isKorean = Game_System.prototype.isKorean;
  542.     Game_System.prototype.isKorean = function() { // Rewrite; v1.00a - v1.00a
  543.         return $gameSystem.dynamicSettings.locale.match(/^ko/); // Rewritten
  544.     }; // Game_System.prototype.isKorean
  545.  
  546.     GS.isCJK = Game_System.prototype.isCJK;
  547.     Game_System.prototype.isCJK = function() { // Rewrite; v1.00a - v1.00a
  548.         // Rewritten
  549.         return $gameSystem.dynamicSettings.locale.match(/^(ja|zh|ko)/);
  550.         //
  551.     }; // Game_System.prototype.isCJK
  552.  
  553.     GS.isRussian = Game_System.prototype.isRussian;
  554.     Game_System.prototype.isRussian = function() { // Rewrite; v1.00a - v1.00a
  555.         return $gameSystem.dynamicSettings.locale.match(/^ru/); // Rewritten
  556.     }; // Game_System.prototype.isRussian
  557.  
  558.     GS.isSideView = Game_System.prototype.isSideView;
  559.     Game_System.prototype.isSideView = function() { // Rewrite; v1.00a - v1.00a
  560.         return $gameSystem.dynamicSettings.optSideView; // Rewritten
  561.     }; // Game_System.prototype.isSideView
  562.  
  563.     GS.initialize = Game_System.prototype.initialize;
  564.     Game_System.prototype.initialize = function() { // Extended; v1.00a - v1.00a
  565.         GS.initialize.apply(this, arguments);
  566.         GS.initializeDynamicSettings.call(this); // Added
  567.     }; // Game_System.prototype.initialize
  568.  
  569.     /* Stores all configurations into the container being saved in save files
  570.      * Functional cohesion/Message coupling/Idempotent
  571.      */
  572.     GS.initializeDynamicSettings = function() { // New; v1.00a - v1.00a
  573.         var settings = this.dynamicSettings = {};
  574.         var ps = PluginManager.parameters(DoubleX_RMMV.Dynamic_Settings_File);
  575.         Object.keys(ps).forEach(function(param) {
  576.             settings[param] = GS.setConfig.call(this, ps[param]);
  577.         }, this);
  578.         settings.menuCommands = settings.menuCommands.map(function(enabled) {
  579.             return enabled !== 'false';
  580.         });
  581.         settings.attackMotions = DS.attackMotions, settings.sounds = DS.sounds;
  582.         settings.terms = DS.terms;
  583.     } ; // GS.initializeDynamicSettings
  584.  
  585.     /* Sets the raw configuration value into its expected data format
  586.      * (String)val: The raw configuration value
  587.      * Return: The properly formatted configuration value
  588.      * Functional cohesion/Data coupling/Referentially transparent
  589.      */
  590.     GS.setConfig = function(val) { // New; v1.00a - v1.00a
  591.         if (val.match(/.*, .*/)) return val.split(', ');
  592.         return val === 'false' ?  false : val;
  593.     }; // GS.setConfig
  594.  
  595.     DS.Game_Action = {};
  596.     var GA = DS.Game_Action;
  597.  
  598.     GA.isMagicSkill = Game_Action.prototype.isMagicSkill;
  599.     Game_Action.prototype.isMagicSkill = function() {
  600.     // Rewrite; v1.00a - v1.00a
  601.         if (this.isSkill()) {
  602.             // Rewritten
  603.             var settings = $gameSystem.dynamicSettings;
  604.             return settings.magicSkills.contains(this.item().stypeId);
  605.             //
  606.         } else {
  607.             return false;
  608.         }
  609.     }; // Game_Action.prototype.isMagicSkill
  610.  
  611.     DS.Game_Battler = {};
  612.     var GB = DS.Game_Battler;
  613.  
  614.     GB.maxSlipDamage = Game_Battler.prototype.maxSlipDamage;
  615.     Game_Battler.prototype.maxSlipDamage = function() {
  616.     // Rewrite; v1.00a - v1.00a
  617.         // Rewritten
  618.         if ($gameSystem.dynamicSettings.optSlipDeath) return this.hp;
  619.         return Math.max(this.hp - 1, 0);
  620.         //
  621.     }; // Game_Battler.prototype.maxSlipDamage
  622.  
  623.     DS.Game_Actor = {};
  624.     var GActor = DS.Game_Actor;
  625.  
  626.     GActor.equipSlots = Game_Actor.prototype.equipSlots;
  627.     Game_Actor.prototype.equipSlots = function() { // Rewrite; v1.00a - v1.00a
  628.         var slots = [], equipTypes = $gameSystem.dynamicSettings.equipTypes;
  629.         // Rewritten
  630.         for (var i = 1; i < equipTypes.length; i++) {
  631.             slots.push(i);
  632.         }
  633.         //
  634.         if (slots.length >= 2 && this.isDualWield()) {
  635.             slots[1] = 1;
  636.         }
  637.         return slots;
  638.     }; // Game_Actor.prototype.equipSlots
  639.  
  640.     GActor.benchMembersExpRate = Game_Actor.prototype.benchMembersExpRate;
  641.     Game_Actor.prototype.benchMembersExpRate = function() {
  642.     // Rewrite; v1.00a - v1.00a
  643.         return $gameSystem.dynamicSettings.optExtraExp ? 1 : 0; // Rewritten
  644.     }; // Game_Actor.prototype.benchMembersExpRate
  645.  
  646.     GActor.performAttack = Game_Actor.prototype.performAttack;
  647.     Game_Actor.prototype.performAttack = function() {
  648.     // Rewritten; v1.00a - v1.00a
  649.         var weapons = this.weapons();
  650.         var wtypeId = weapons[0] ? weapons[0].wtypeId : 0;
  651.         // Rewritten
  652.         var attackMotion = $gameSystem.dynamicSettings.attackMotions[wtypeId];
  653.         //
  654.         if (attackMotion) {
  655.             if (attackMotion.type === 0) {
  656.                 this.requestMotion('thrust');
  657.             } else if (attackMotion.type === 1) {
  658.                 this.requestMotion('swing');
  659.             } else if (attackMotion.type === 2) {
  660.                 this.requestMotion('missile');
  661.             }
  662.             this.startWeaponAnimation(attackMotion.weaponImageId);
  663.         }
  664.     }; // Game_Actor.prototype.performAttack
  665.  
  666.     GActor.maxFloorDamage = Game_Actor.prototype.maxFloorDamage;
  667.     Game_Actor.prototype.maxFloorDamage = function() {
  668.     // Rewrite; v1.00a - v1.00a
  669.         // Rewritten
  670.         var settings = $gameSystem.dynamicSettings;
  671.         return settings.optFloorDeath ? this.hp : Math.max(this.hp - 1, 0);
  672.         //
  673.     }; // Game_Actor.prototype.maxFloorDamage
  674.  
  675.     DS.Game_Followers = {};
  676.     var GF = DS.Game_Followers;
  677.  
  678.     GF.initialize = Game_Followers.prototype.initialize;
  679.     Game_Followers.prototype.initialize = function() {
  680.     // Extended; v1.00a - v1.00a
  681.         GF.initialize.apply(this, arguments);
  682.         this._visible = $gameSystem.dynamicSettings.optFollowers; // Added
  683.     }; // Game_Followers.prototype.initialize
  684.  
  685.     DS.Window_MenuCommand = {};
  686.     var WMC = DS.Window_MenuCommand;
  687.  
  688.     WMC.needsCommand = Window_MenuCommand.prototype.needsCommand;
  689.     Window_MenuCommand.prototype.needsCommand = function(name) {
  690.     // Rewrite; v1.00a - v1.00a
  691.         var flags = $gameSystem.dynamicSettings.menuCommands; // Rewritten
  692.         if (flags) {
  693.             switch (name) {
  694.             case 'item':
  695.                 return flags[0];
  696.             case 'skill':
  697.                 return flags[1];
  698.             case 'equip':
  699.                 return flags[2];
  700.             case 'status':
  701.                 return flags[3];
  702.             case 'formation':
  703.                 return flags[4];
  704.             case 'save':
  705.                 return flags[5];
  706.             }
  707.         }
  708.         return true;
  709.     }; // Window_MenuCommand.prototype.needsCommand
  710.  
  711.     DS.Window_EquipSlot = {};
  712.     var WES = DS.Window_EquipSlot;
  713.  
  714.     WES.slotName = Window_EquipSlot.prototype.slotName;
  715.     Window_EquipSlot.prototype.slotName = function(index) {
  716.     // Rewrite; v1.00a - v1.00a
  717.         // Rewritten
  718.         var slots = this._actor.equipSlots(), cfg = $gameSystem.dynamicSettings;
  719.         return this._actor ? cfg.equipTypes[slots[index]] : '';
  720.         //
  721.     }; // Window_EquipSlot.prototype.slotName
  722.  
  723.     DS.Window_SkillType = {};
  724.     var WST = DS.Window_SkillType;
  725.  
  726.     WST.makeCommandList = Window_SkillType.prototype.makeCommandList;
  727.     Window_SkillType.prototype.makeCommandList = function() {
  728.     // Rewritten; v1.00a - v1.00a
  729.         if (this._actor) {
  730.             var skillTypes = this._actor.addedSkillTypes();
  731.             skillTypes.sort(function(a, b) {
  732.                 return a - b;
  733.             });
  734.             skillTypes.forEach(function(stypeId) {
  735.                 // Rewritten
  736.                 var name = $gameSystem.dynamicSettings.skillTypes[stypeId];
  737.                 //
  738.                 this.addCommand(name, 'skill', true, stypeId);
  739.             }, this);
  740.         }
  741.     }; // Window_SkillType.prototype.makeCommandList
  742.  
  743.     DS.Window_ActorCommand = {};
  744.     var WAC = DS.Window_ActorCommand;
  745.  
  746.     WAC.addSkillCommands = Window_ActorCommand.prototype.addSkillCommands;
  747.     Window_ActorCommand.prototype.addSkillCommands = function() {
  748.     // Rewritten; v1.00a - v1.00a
  749.         var skillTypes = this._actor.addedSkillTypes();
  750.         skillTypes.sort(function(a, b) {
  751.             return a - b;
  752.         });
  753.         skillTypes.forEach(function(stypeId) {
  754.             // Rewritten
  755.             var name = $gameSystem.dynamicSettings.skillTypes[stypeId];
  756.             //
  757.             this.addCommand(name, 'skill', true, stypeId);
  758.         }, this);
  759.     }; // Window_ActorCommand.prototype.addSkillCommands
  760.  
  761.     DS.Window_BattleStatus = {};
  762.     var WBS = DS.Window_BattleStatus;
  763.  
  764.     WBS.drawGaugeArea = Window_BattleStatus.prototype.drawGaugeArea;
  765.     Window_BattleStatus.prototype.drawGaugeArea = function(rect, actor) {
  766.     // Rewrite; v1.00a - v1.00a
  767.         // Rewritten
  768.         if ($gameSystem.dynamicSettings.optDisplayTp) {
  769.             this.drawGaugeAreaWithTp(rect, actor);
  770.         } else {
  771.             this.drawGaugeAreaWithoutTp(rect, actor);
  772.         }
  773.         //
  774.     }; // Window_BattleStatus.prototype.drawGaugeArea
  775.  
  776. })(DoubleX_RMMV.Dynamic_Settings);
  777.  
  778. /*============================================================================*/
Add Comment
Please, Sign In to add comment