赞 | 16 |
VIP | 0 |
好人卡 | 0 |
积分 | 6 |
经验 | 0 |
最后登录 | 2024-11-18 |
在线时间 | 74 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 573
- 在线时间
- 74 小时
- 注册时间
- 2017-12-22
- 帖子
- 42
|
本帖最后由 无终 于 2020-2-25 12:04 编辑
修改了一下,添加了一些参数。
说明:
大部分参数不用在代码中修改了
增加了自定义声望条前景色的功能
声望值最大值可以超过最高等级线,会显示为99999/60000这样
添加了唤出菜单的指令
//============================================================================= // Salvareless Ownuse System // PrestigeSystem.js //============================================================================= //============================================================================= /*: * @plugindesc 声望插件 * @author salvareless * * @param ---菜单--- * @default * * @param Menu Name * @parent ---菜单--- * @desc 主菜单显示的文字 * 如果使用了YEP_MainMenuManager等主菜单插件,此项无效插件效果会被覆盖 * @default 声望 * * @param Title Text * @parent ---菜单--- * @desc 声望窗口最上方显示的文字 * @default 声望和货币 * * @param Prestige Text * @parent ---菜单--- * @desc 声望栏标题文字 * @default 声望系统尚未解锁 * * * @param Gold Text * @parent ---菜单--- * @desc 货币栏标题文字 * @default 货币系统尚未解锁 * * @param ---声望--- * @default * * @param Prestige Number * @parent ---声望--- * @desc 声望达到一定阶段所需要的值,使用逗号分隔 * @default 0,100,800,5000,20000,60000 * * @param Prestige Phase * @parent ---声望--- * @desc 声望阶段名称,用逗号分隔,需要和声望分隔值对应 * @default 仇恨,冷漠,中立,友善,尊敬,崇敬,崇拜 * * @param Prestige Name * @parent ---声望--- * @desc 声望显示的名称,使用逗号分隔,最大18个。 * @default 声望1,声望2,声望3,声望4,声望5,声望6,声望7,声望8,声望9,声望10,声望11,声望12,声望13,声望14,声望15,声望16,声望17,声望18 * * @param Prestige Variable * @parent ---声望--- * @desc 声望对应的变量号,最大18个 * @default 62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79 * * @param Prestige Switch * @parent ---声望--- * @desc 声望对应的开关号,最大18个 * @default 62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79 * * @param Prestige Icon * @parent ---声望--- * @desc 声望对应的图标编号,最大18个 * @default 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81 * * @param Max * @parent ---声望--- * @type number * @desc 声望最大值 * @default 60000 * * @param ---货币--- * @default * * @param Gold Name * @parent ---货币--- * @desc 货币显示的名称,使用逗号分隔,最大15个, * 已经设置货币当变量用时,大于0才会显示出来。 * @default 人民币,美元,欧元,日元,英镑,加元,港币,台币,韩元,澳元,克朗,比索,先令,卢比,第纳尔 * * @param Gold Variable * @parent ---货币--- * @desc 货币使用的变量,使用逗号分隔 * 已经设置货币当变量用时,大于0才会显示出来。 * @default 42,43,44,45,46,47,48,49,50,51,52,53,54,55,56 * * @param Gold Icon * @parent ---货币--- * @desc 货币对应的图标编号,最大15个 * @default 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47 * * * @param ---显示--- * @default * * @param Colors * @parent ---显示--- * @desc 声望名称显示的颜色 * @default #930000,#ff0000,#f75000,#00ffff,#01b468,#00db00,#006000 * * @param Unlock Text * @parent ---显示--- * @desc 声望未解锁时显示的文字 * @default ????? * * @param ---威望--- * @default * * @param Reputation Variable * @parent ---威望--- * @desc 声望界面右上角显示的威望所使用的变量 * @default 80 * * @param Reputation Text * @parent ---威望--- * @desc 声望界面右上角显示的威望所使用的文字前缀 * @default 威望: * * @help * ============================================================================ * 声望系统插件 * 作者:Salvareless 优化:无终 * ============================================================================ * * 已经设置货币当做变量使用时,大于0才会显示出来。 * 变量货币需要配合YEP_ShopMenuCore和YEP_X_MoreCurrencies才更有意义 * 不然就只能做固定的物品兑换事件 * * 参数中用来分隔的逗号必须是英文半角 * * 插件指令: * PRESTIGE OPEN 打开声望界面 * * 脚本: * SceneManager.push(Scene_Shengwang); 打开声望界面 * * * */ //========================================================================= //声明区段 //========================================================================= var PrestigeSystem = window.PrestigeSystem || {}; PrestigeSystem.parameters = PluginManager.parameters('PrestigeSystem'); PrestigeSystem.max = parseInt(PrestigeSystem.parameters['Max'] || '60000'); //最大值 PrestigeSystem.menuName = String(PrestigeSystem.parameters['Menu Name'] || '声望'); PrestigeSystem.unlockText = String(PrestigeSystem.parameters['Unlock Text'] || '?????'); PrestigeSystem.titleText = String(PrestigeSystem.parameters['Title Text'] || '声望和货币'); PrestigeSystem.preText = String(PrestigeSystem.parameters['Prestige Text'] || '声望系统尚未解锁'); PrestigeSystem.goldText = String(PrestigeSystem.parameters['Gold Text'] || '货币系统尚未解锁'); PrestigeSystem.colorString = String(PrestigeSystem.parameters['Colors'] || '#930000,#ff0000,#f75000,#00ffff,#01b468,#00db00,#006000'); PrestigeSystem.lineString = String(PrestigeSystem.parameters['Prestige Number'] || '0,100,800,5000,20000,60000'); PrestigeSystem.prePhase = String(PrestigeSystem.parameters['Prestige Phase'] || '仇恨,冷漠,中立,友善,尊敬,崇敬,崇拜'); PrestigeSystem.preName = String(PrestigeSystem.parameters['Prestige Name'] || '声望1,声望2,声望3,声望4,声望5,声望6,声望7,声望8,声望9,声望10,声望11,声望12,声望13,声望14,声望15,声望16,声望17,声望18'); PrestigeSystem.preVariable = String(PrestigeSystem.parameters['Prestige Variable'] || '62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79'); PrestigeSystem.preSwitch = String(PrestigeSystem.parameters['Prestige Switch'] || '62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79'); PrestigeSystem.preIcon = String(PrestigeSystem.parameters['Prestige Icon'] || '64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81'); PrestigeSystem.goldName = String(PrestigeSystem.parameters['Gold Name'] || '人民币,美元,欧元,日元,英镑,加元,港币,台币,韩元,澳元,克朗,比索,先令,卢比,第纳尔'); PrestigeSystem.goldVariable = String(PrestigeSystem.parameters['Gold Variable'] || '42,43,44,45,46,47,48,49,50,51,52,53,54,55,56'); PrestigeSystem.repText = String(PrestigeSystem.parameters['Reputation Text'] || '威望:'); PrestigeSystem.repVariable = String(PrestigeSystem.parameters['Reputation Variable'] || '80'); PrestigeSystem.goldIcon = String(PrestigeSystem.parameters['Gold Icon'] || '32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47'); function Window_Shengwang() { this.initialize.apply(this, arguments); }; Window_Shengwang.prototype = Object.create(Window_Selectable.prototype); Window_Shengwang.prototype.initialize = function(x, y, width, height) { Window_Selectable.prototype.initialize.call(this, x, y, width, height); }; function Scene_Shengwang() { this.initialize.apply(this, arguments); }; Scene_Shengwang.prototype = Object.create(Scene_MenuBase.prototype); Scene_Shengwang.prototype.initialize = function() { Scene_MenuBase.prototype.initialize.call(this); }; Scene_Shengwang.prototype.create = function() { Scene_MenuBase.prototype.create.call(this); this._commandWindow = new Window_Shengwang(0, 0, 816, 624); this.addWindow(this._commandWindow); }; Scene_Shengwang.prototype.update = function() { if (Input.isTriggered('escape') || Input.isTriggered('cancel')) { this._commandWindow.hide(); SceneManager.goto(Scene_Menu); }; }; // ====================================================================== // 指令读取 // ====================================================================== var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand; Game_Interpreter.prototype.pluginCommand = function (command, args) { _Game_Interpreter_pluginCommand.apply(this, arguments); if (command == 'PRESTIGE') { switch (args[0]) { case 'OPEN': SceneManager.push(Scene_Shengwang); break; } } } // ====================================================================== // 参数处理 // ====================================================================== //获取声望最大值 PrestigeSystem.getMax = function(){ return PrestigeSystem.max; } //获取菜单参数 1,主菜单 2,顶部文字 3,声望栏顶部提示 4,货币栏顶部提示 5,威望的前缀 6,未解锁时的文字 PrestigeSystem.getTitle = function(param) { var value ; switch(param){ case 1: value = PrestigeSystem.menuName.trim(); break; case 2: value = PrestigeSystem.titleText.trim(); break case 3: value = PrestigeSystem.preText.trim(); break; case 4: value = PrestigeSystem.goldText.trim(); break; case 5: value = PrestigeSystem.repText.trim(); break; case 6: value = PrestigeSystem.unlockText.trim(); break; } return value === null ? '' : value; }; //获取威望所使用的变量 PrestigeSystem.getRepV = function(){ var value = (parseInt(PrestigeSystem.repVariable.trim())); return value === null ? '' : value; } //获取颜色码 PrestigeSystem.getColor = function(param) { var values = this.getString(PrestigeSystem.colorString); return values[param]; } //获取分隔声望值标准 PrestigeSystem.getLine = function(param) { var values = this.getNumber(PrestigeSystem.lineString); return values[param]; } //获取声望等级名称 PrestigeSystem.getLv = function(param) { var values = this.getString(PrestigeSystem.prePhase); return values[param]; } //获取声望名称 PrestigeSystem.getPName = function(param) { var values = this.getString(PrestigeSystem.preName); return values[param]; } //获取变量号 PrestigeSystem.getPreV = function(param) { var values = this.getNumber(PrestigeSystem.preVariable); return values[param]; } //获取开关号 PrestigeSystem.getPreS = function(param) { var values = this.getNumber(PrestigeSystem.preSwitch); return values[param]; } //获取图标号 PrestigeSystem.getPIcon = function(param) { var values = this.getNumber(PrestigeSystem.preIcon); return values[param]; } //获取货币名称 PrestigeSystem.getGName = function(param) { var values = this.getString(PrestigeSystem.goldName); return values[param]; } //获取货币变量号 PrestigeSystem.getGV = function(param) { var values = this.getNumber(PrestigeSystem.goldVariable); return values[param]; } //获取货币图标号 PrestigeSystem.getGIcon = function(param) { var values = this.getNumber(PrestigeSystem.goldIcon); return values[param]; } //获取字符参数 PrestigeSystem.getText = function(param) { var value = param.trim(); return value === null ? '' : value; }; //获取字符串参数 PrestigeSystem.getString = function(paramNames) { var values = this.getText(paramNames).split(','); for (var i = 0; i < values.length; i++) values[i] = values[i].trim(); return values; }; //获取Int参数 PrestigeSystem.getNumber = function(paramNames) { var values = this.getString(paramNames); for (var i = 0; i < values.length; i++) values[i] = (parseInt(values[i]) || 0); return values; }; // ====================================================================== // * Scene_Menu // ====================================================================== Scene_Menu.prototype.Shengwang_createCommandWindow = Scene_Menu.prototype.createCommandWindow; Scene_Menu.prototype.createCommandWindow = function() { this.Shengwang_createCommandWindow(); this._commandWindow.setHandler('shengwang', this.command_Shengwang.bind(this)); }; Scene_Menu.prototype.command_Shengwang = function() { SceneManager.push(Scene_Shengwang); }; // ====================================================================== // * Window_MenuCommand // ====================================================================== Window_MenuCommand.prototype.Shengwang_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands; Window_MenuCommand.prototype.addOriginalCommands = function() { this.Shengwang_addOriginalCommands(); this.addCommand(PrestigeSystem.getTitle(1), 'shengwang', this.areMainCommandsEnabled()); }; //======================================================================= // 显示区段 //======================================================================= Window_Shengwang.prototype.initialize = function(x, y, width, height) { Window_Selectable.prototype.initialize.call(this, x, y, width, height); this.drawShengwangText(); }; Window_Shengwang.prototype.drawShengwangText = function() { var dy = 0; var dx = 34; //左侧文字绘制的X坐标,已经留出图标位置。 var di = 277; //中间图标显示的X坐标,左侧为0 var dxx = 311; //中间文字绘制的X坐标。已经留出图标位置。 var dii = 554; //右侧图标绘制的X坐标。 var dxxx = 588; //右侧文字绘制的X坐标,已经留出图标位置。 var dw = 230; //界面总宽 var gx = 0; this.contents.fontSize = 20; this.drawText(PrestigeSystem.getTitle(2), 0, -10, dw, 'left'); if ($gameVariables.value(PrestigeSystem.getRepV()) > 0){ this.drawText(PrestigeSystem.getTitle(5) + $gameVariables.value(PrestigeSystem.getRepV()), 0, -10 ,778, 'right'); }; this.drawText("————————————————————————————————————————————————————————————————————————————", 0, dy + 8, 784, 'left'); this.contents.fontSize = 20; //声望区段 //第一行 dy += 32; //行高变化 //左 if ($gameSwitches.value(PrestigeSystem.getPreS(0)) == true){ this.drawIcon(PrestigeSystem.getPIcon(0), 0, dy + 3); this.drawText(PrestigeSystem.getPName(0), dx, dy, dw, 'left'); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(0)), gx ,dy ,dw); //条显示的函数,第一个值为要使用的变量 }else{ this.drawText(PrestigeSystem.getTitle(3), 0, dy, dw, 'left'); }; //中 if ($gameSwitches.value(PrestigeSystem.getPreS(1)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(1)) == 0){ this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(1), di, dy + 3); this.drawText(PrestigeSystem.getPName(1), dxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(1)), gx + 277 ,dy ,dw); };}; //右 if ($gameSwitches.value(PrestigeSystem.getPreS(2)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(2)) == 0){ this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(2), dii, dy + 3); this.drawText(PrestigeSystem.getPName(2), dxxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(2)), gx + 554 ,dy ,dw); };}; //第二行 dy += 61; //行高变化 //左 if ($gameSwitches.value(PrestigeSystem.getPreS(3)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(3)) == 0){ this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(3), 0, dy + 3); this.drawText(PrestigeSystem.getPName(3), dx, dy, dw, 'left'); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(3)), gx ,dy ,dw); };}; //中 if ($gameSwitches.value(PrestigeSystem.getPreS(4)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(4)) == 0){ this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(4), di, dy + 3); this.drawText(PrestigeSystem.getPName(4), dxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(4)), gx + 277 ,dy ,dw); };}; //右 if ($gameSwitches.value(PrestigeSystem.getPreS(5)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(5)) == 0){ this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(5), dii, dy + 3); this.drawText(PrestigeSystem.getPName(5), dxxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(5)), gx + 554 ,dy ,dw); };}; //第三行 dy += 61; //行高变化 //左 if ($gameSwitches.value(PrestigeSystem.getPreS(6)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(6)) == 0){ this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(6), 0, dy + 3); this.drawText(PrestigeSystem.getPName(6), dx, dy, dw, 'left'); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(6)), gx ,dy ,dw); };}; //中 if ($gameSwitches.value(PrestigeSystem.getPreS(7)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(7)) == 0){ this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(7), di, dy + 3); this.drawText(PrestigeSystem.getPName(7), dxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(7)), gx + 277 ,dy ,dw); };}; //右 if ($gameSwitches.value(PrestigeSystem.getPreS(8)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(8)) == 0){ this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(8), dii, dy + 3); this.drawText(PrestigeSystem.getPName(8), dxxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(8)), gx + 554 ,dy ,dw); };}; //第四行 dy += 61; //行高变化 //左 if ($gameSwitches.value(PrestigeSystem.getPreS(9)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(9)) == 0){ this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(9), 0, dy + 3); this.drawText(PrestigeSystem.getPName(9), dx, dy, dw, 'left'); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(9)), gx ,dy ,dw); };}; //中 if ($gameSwitches.value(PrestigeSystem.getPreS(10)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(10)) == 0){ this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(10), di, dy + 3); this.drawText(PrestigeSystem.getPName(10), dxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(10)), gx + 277 ,dy ,dw); };}; //右 if ($gameSwitches.value(PrestigeSystem.getPreS(11)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(11)) == 0){ this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(11), dii, dy + 3); this.drawText(PrestigeSystem.getPName(11), dxxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(11)), gx + 554 ,dy ,dw); };}; //第五行 dy += 61; //行高变化 //左 if ($gameSwitches.value(PrestigeSystem.getPreS(12)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(12)) == 0){ this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(12), 0, dy + 3); this.drawText(PrestigeSystem.getPName(12), dx, dy, dw, 'left'); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(12)), gx ,dy ,dw); };}; //中 if ($gameSwitches.value(PrestigeSystem.getPreS(13)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(13)) == 0){ this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(13), di, dy + 3); this.drawText(PrestigeSystem.getPName(13), dxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(13)), gx + 277 ,dy ,dw); };}; //右 if ($gameSwitches.value(PrestigeSystem.getPreS(14)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(14)) == 0){ this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(14), dii, dy + 3); this.drawText(PrestigeSystem.getPName(14), dxxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(14)), gx + 554 ,dy ,dw); };}; //第六行 dy += 61; //行高变化 //左 if ($gameSwitches.value(PrestigeSystem.getPreS(15)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(15)) == 0){ this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(15), 0, dy + 3); this.drawText(PrestigeSystem.getPName(15), dx, dy, dw, 'left'); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(15)), gx ,dy ,dw); };}; //中 if ($gameSwitches.value(PrestigeSystem.getPreS(16)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(16)) == 0){ this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(16), di, dy + 3); this.drawText(PrestigeSystem.getPName(16), dxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(16)), gx + 277 ,dy ,dw); };}; //右 if ($gameSwitches.value(PrestigeSystem.getPreS(17)) == true){ if ($gameVariables.value(PrestigeSystem.getPreV(17)) == 0){ this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' ); } else{ this.drawIcon( PrestigeSystem.getPIcon(17), dii, dy + 3); this.drawText(PrestigeSystem.getPName(17), dxxx, dy, dw, 'left' ); this.dataMath($gameVariables.value(PrestigeSystem.getPreV(17)), gx + 554 ,dy ,dw); };}; //声望区段END dy = 387; this.drawText("————————————————————————————————————————————————————————————————————————————", 0, dy, 784, 'left'); var hi = 0; //一位X坐标,框宽加1像素的边距 var hii = 157; //二位X坐标 var hiii = 314 //三位X坐标 var hiv = 471; //四位X坐标 var hv = 628; //五位X坐标 var hw = 156; //每个框宽 //货币区段 dy = 407; //第一行 //左 if ($gameVariables.value(PrestigeSystem.getGV(0)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(0), hi, dy + 30); this.drawText(PrestigeSystem.getGName(0)+":", hi, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(0)), hi + 35, dy + 30, hw, 'left' ); } else{ this.drawText(PrestigeSystem.getTitle(4), hi, dy, 784); }; //左中 if ($gameVariables.value(PrestigeSystem.getGV(1)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(1), hii, dy + 30); this.drawText(PrestigeSystem.getGName(1)+":", hii, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(1)), hii + 35, dy + 30, hw, 'left' ); }; //中 if ($gameVariables.value(PrestigeSystem.getGV(2)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(2), hiii, dy + 30); this.drawText(PrestigeSystem.getGName(2)+":", hiii, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(2)), hiii + 35, dy + 30, hw, 'left' ); }; //右中 if ($gameVariables.value(PrestigeSystem.getGV(3)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(3), hiv, dy + 30); this.drawText(PrestigeSystem.getGName(3)+":", hiv, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(3)), hiv + 35, dy + 30, hw, 'left' ); }; //右 if ($gameVariables.value(PrestigeSystem.getGV(4)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(4), hv, dy + 30); this.drawText(PrestigeSystem.getGName(4)+":", hv, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(4)), hv + 35, dy + 30, hw, 'left' ); }; dy = 466; //第二行 //左 if ($gameVariables.value(PrestigeSystem.getGV(5)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(5), hi, dy + 30); this.drawText(PrestigeSystem.getGName(5)+":", hi, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(5)), hi + 35, dy + 30, hw, 'left' ); }; //左中 if ($gameVariables.value(PrestigeSystem.getGV(6)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(6), hii, dy + 30); this.drawText(PrestigeSystem.getGName(6)+":", hii, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(6)), hii + 35, dy + 30, hw, 'left' ); }; //中 if ($gameVariables.value(PrestigeSystem.getGV(7)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(7), hiii, dy + 30); this.drawText(PrestigeSystem.getGName(7)+":", hiii, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(7)), hiii + 35, dy + 30, hw, 'left' ); }; //右中 if ($gameVariables.value(PrestigeSystem.getGV(8)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(8), hiv, dy + 30); this.drawText(PrestigeSystem.getGName(8)+":", hiv, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(8)), hiv + 35, dy + 30, hw, 'left' ); }; //右 if ($gameVariables.value(PrestigeSystem.getGV(9)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(9), hv, dy + 30); this.drawText(PrestigeSystem.getGName(9)+":", hv, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(9)), hv + 35, dy + 30, hw, 'left' ); }; dy = 525; //第三行 //左 if ($gameVariables.value(PrestigeSystem.getGV(10)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(10), hi, dy + 30); this.drawText(PrestigeSystem.getGName(10)+":", hi, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(10)), hi + 35, dy + 30, hw, 'left' ); }; //左中 if ($gameVariables.value(PrestigeSystem.getGV(11)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(11), hii, dy + 30); this.drawText(PrestigeSystem.getGName(11)+":", hii, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(11)), hii + 35, dy + 30, hw, 'left' ); }; //中 if ($gameVariables.value(PrestigeSystem.getGV(12)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(12), hiii, dy + 30); this.drawText(PrestigeSystem.getGName(12)+":", hiii, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(12)), hiii + 35, dy + 30, hw, 'left' ); }; //右中 if ($gameVariables.value(PrestigeSystem.getGV(13)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(13), hiv, dy + 30); this.drawText(PrestigeSystem.getGName(13)+":", hiv, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(13)), hiv + 35, dy + 30, hw, 'left' ); }; //右 if ($gameVariables.value(PrestigeSystem.getGV(14)) > 0){ this.drawIcon( PrestigeSystem.getGIcon(14), hv, dy + 30); this.drawText(PrestigeSystem.getGName(14)+":", hv, dy, hw); this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(14)), hv + 35, dy + 30, hw, 'left' ); }; //货币区段END }; //条显示的函数 //Color '#ff0000' faff72 eaff56 40de5a 00e400 00ff00 000000 Window_Shengwang.prototype.dataMath = function(data, gx, dy, dw) { var v1 = data; var v2 = 1; var text = ""; var color = PrestigeSystem.getColor(0); if (v1 >= PrestigeSystem.getLine(5)){ //崇拜 if(v1 >= PrestigeSystem.getMax()){ v1 = PrestigeSystem.getMax(); }else{ v1 = data; } v2 = PrestigeSystem.getLine(5); //当前阶段的声望上限 color = PrestigeSystem.getColor(6); //设置声望条的颜色 text = PrestigeSystem.getLv(6)+":"+ v1 + "/" + v2; //赋值要显示在声望条上面的文字 }else if (v1 >= PrestigeSystem.getLine(4)){ //崇敬 v2 = PrestigeSystem.getLine(5); color = PrestigeSystem.getColor(5); text = PrestigeSystem.getLv(5)+":"+ v1 + "/" + v2; }else if (v1 >= PrestigeSystem.getLine(3)){ //尊敬 v2 = PrestigeSystem.getLine(4); color = PrestigeSystem.getColor(4); text = PrestigeSystem.getLv(4)+":"+ v1 + "/" + v2; }else if (v1 >= PrestigeSystem.getLine(2)){ //尊重 v2 = PrestigeSystem.getLine(3); color = PrestigeSystem.getColor(3); text = PrestigeSystem.getLv(3)+":"+ v1 + "/" + v2; }else if (v1 >= PrestigeSystem.getLine(1)){ //友善 v2 = PrestigeSystem.getLine(2); color = PrestigeSystem.getColor(2); text = PrestigeSystem.getLv(2)+":"+ v1 + "/" + v2; }else if (v1 < PrestigeSystem.getLine(0)){ //仇恨 v2 = v1; color = PrestigeSystem.getColor(0); text = PrestigeSystem.getLv(0)+":"+ v1; /* }else if (v1 == 0){ //为0的状态 v2 = 1; color = '#ffffff'; text = "???"; */ }else { //冷漠 v2 = PrestigeSystem.getLine(1); color = PrestigeSystem.getColor(1); var text = PrestigeSystem.getLv(1)+":"+ v1 + "/" + v2; } var rate = v1 / v2; //计算声望条的绘制比例 dy += 30; //行高变化 this.drawGauge(gx, dy, dw, rate, color); //绘制声望条 this.drawText(text, gx + 12, dy - 4 , dw, 'center'); //绘制要显示在声望条上面的文字 }; //绘制条函数 Window_Shengwang.prototype.drawGauge = function(x, y, width, rate, color) { var fillW = Math.floor(width * rate); //比例换算成彩条长度 this.contents.fillRect(x, y + 8, width, 20, '#000000'); //绘制条的黑底 this.contents.gradientFillRect(x, y + 8, fillW, 20, color, color); //绘制彩条 };
//=============================================================================
// Salvareless Ownuse System
// PrestigeSystem.js
//=============================================================================
//=============================================================================
/*:
* @plugindesc 声望插件
* @author salvareless
*
* @param ---菜单---
* @default
*
* @param Menu Name
* @parent ---菜单---
* @desc 主菜单显示的文字
* 如果使用了YEP_MainMenuManager等主菜单插件,此项无效插件效果会被覆盖
* @default 声望
*
* @param Title Text
* @parent ---菜单---
* @desc 声望窗口最上方显示的文字
* @default 声望和货币
*
* @param Prestige Text
* @parent ---菜单---
* @desc 声望栏标题文字
* @default 声望系统尚未解锁
*
*
* @param Gold Text
* @parent ---菜单---
* @desc 货币栏标题文字
* @default 货币系统尚未解锁
*
* @param ---声望---
* @default
*
* @param Prestige Number
* @parent ---声望---
* @desc 声望达到一定阶段所需要的值,使用逗号分隔
* @default 0,100,800,5000,20000,60000
*
* @param Prestige Phase
* @parent ---声望---
* @desc 声望阶段名称,用逗号分隔,需要和声望分隔值对应
* @default 仇恨,冷漠,中立,友善,尊敬,崇敬,崇拜
*
* @param Prestige Name
* @parent ---声望---
* @desc 声望显示的名称,使用逗号分隔,最大18个。
* @default 声望1,声望2,声望3,声望4,声望5,声望6,声望7,声望8,声望9,声望10,声望11,声望12,声望13,声望14,声望15,声望16,声望17,声望18
*
* @param Prestige Variable
* @parent ---声望---
* @desc 声望对应的变量号,最大18个
* @default 62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79
*
* @param Prestige Switch
* @parent ---声望---
* @desc 声望对应的开关号,最大18个
* @default 62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79
*
* @param Prestige Icon
* @parent ---声望---
* @desc 声望对应的图标编号,最大18个
* @default 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81
*
* @param Max
* @parent ---声望---
* @type number
* @desc 声望最大值
* @default 60000
*
* @param ---货币---
* @default
*
* @param Gold Name
* @parent ---货币---
* @desc 货币显示的名称,使用逗号分隔,最大15个,
* 已经设置货币当变量用时,大于0才会显示出来。
* @default 人民币,美元,欧元,日元,英镑,加元,港币,台币,韩元,澳元,克朗,比索,先令,卢比,第纳尔
*
* @param Gold Variable
* @parent ---货币---
* @desc 货币使用的变量,使用逗号分隔
* 已经设置货币当变量用时,大于0才会显示出来。
* @default 42,43,44,45,46,47,48,49,50,51,52,53,54,55,56
*
* @param Gold Icon
* @parent ---货币---
* @desc 货币对应的图标编号,最大15个
* @default 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47
*
*
* @param ---显示---
* @default
*
* @param Colors
* @parent ---显示---
* @desc 声望名称显示的颜色
* @default #930000,#ff0000,#f75000,#00ffff,#01b468,#00db00,#006000
*
* @param Unlock Text
* @parent ---显示---
* @desc 声望未解锁时显示的文字
* @default ?????
*
* @param ---威望---
* @default
*
* @param Reputation Variable
* @parent ---威望---
* @desc 声望界面右上角显示的威望所使用的变量
* @default 80
*
* @param Reputation Text
* @parent ---威望---
* @desc 声望界面右上角显示的威望所使用的文字前缀
* @default 威望:
*
* @help
* ============================================================================
* 声望系统插件
* 作者:Salvareless 优化:无终
* ============================================================================
*
* 已经设置货币当做变量使用时,大于0才会显示出来。
* 变量货币需要配合YEP_ShopMenuCore和YEP_X_MoreCurrencies才更有意义
* 不然就只能做固定的物品兑换事件
*
* 参数中用来分隔的逗号必须是英文半角
*
* 插件指令:
* PRESTIGE OPEN 打开声望界面
*
* 脚本:
* SceneManager.push(Scene_Shengwang); 打开声望界面
*
*
*
*/
//=========================================================================
//声明区段
//=========================================================================
var PrestigeSystem = window.PrestigeSystem || {};
PrestigeSystem.parameters = PluginManager.parameters('PrestigeSystem');
PrestigeSystem.max = parseInt(PrestigeSystem.parameters['Max'] || '60000'); //最大值
PrestigeSystem.menuName = String(PrestigeSystem.parameters['Menu Name'] || '声望');
PrestigeSystem.unlockText = String(PrestigeSystem.parameters['Unlock Text'] || '?????');
PrestigeSystem.titleText = String(PrestigeSystem.parameters['Title Text'] || '声望和货币');
PrestigeSystem.preText = String(PrestigeSystem.parameters['Prestige Text'] || '声望系统尚未解锁');
PrestigeSystem.goldText = String(PrestigeSystem.parameters['Gold Text'] || '货币系统尚未解锁');
PrestigeSystem.colorString = String(PrestigeSystem.parameters['Colors'] || '#930000,#ff0000,#f75000,#00ffff,#01b468,#00db00,#006000');
PrestigeSystem.lineString = String(PrestigeSystem.parameters['Prestige Number'] || '0,100,800,5000,20000,60000');
PrestigeSystem.prePhase = String(PrestigeSystem.parameters['Prestige Phase'] || '仇恨,冷漠,中立,友善,尊敬,崇敬,崇拜');
PrestigeSystem.preName = String(PrestigeSystem.parameters['Prestige Name'] || '声望1,声望2,声望3,声望4,声望5,声望6,声望7,声望8,声望9,声望10,声望11,声望12,声望13,声望14,声望15,声望16,声望17,声望18');
PrestigeSystem.preVariable = String(PrestigeSystem.parameters['Prestige Variable'] || '62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79');
PrestigeSystem.preSwitch = String(PrestigeSystem.parameters['Prestige Switch'] || '62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79');
PrestigeSystem.preIcon = String(PrestigeSystem.parameters['Prestige Icon'] || '64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81');
PrestigeSystem.goldName = String(PrestigeSystem.parameters['Gold Name'] || '人民币,美元,欧元,日元,英镑,加元,港币,台币,韩元,澳元,克朗,比索,先令,卢比,第纳尔');
PrestigeSystem.goldVariable = String(PrestigeSystem.parameters['Gold Variable'] || '42,43,44,45,46,47,48,49,50,51,52,53,54,55,56');
PrestigeSystem.repText = String(PrestigeSystem.parameters['Reputation Text'] || '威望:');
PrestigeSystem.repVariable = String(PrestigeSystem.parameters['Reputation Variable'] || '80');
PrestigeSystem.goldIcon = String(PrestigeSystem.parameters['Gold Icon'] || '32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47');
function Window_Shengwang() {
this.initialize.apply(this, arguments);
};
Window_Shengwang.prototype = Object.create(Window_Selectable.prototype);
Window_Shengwang.prototype.initialize = function(x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
};
function Scene_Shengwang() {
this.initialize.apply(this, arguments);
};
Scene_Shengwang.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Shengwang.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_Shengwang.prototype.create = function() {
Scene_MenuBase.prototype.create.call(this);
this._commandWindow = new Window_Shengwang(0, 0, 816, 624);
this.addWindow(this._commandWindow);
};
Scene_Shengwang.prototype.update = function() {
if (Input.isTriggered('escape') || Input.isTriggered('cancel')) {
this._commandWindow.hide();
SceneManager.goto(Scene_Menu);
};
};
// ======================================================================
// 指令读取
// ======================================================================
var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
_Game_Interpreter_pluginCommand.apply(this, arguments);
if (command == 'PRESTIGE') {
switch (args[0]) {
case 'OPEN':
SceneManager.push(Scene_Shengwang);
break;
}
}
}
// ======================================================================
// 参数处理
// ======================================================================
//获取声望最大值
PrestigeSystem.getMax = function(){
return PrestigeSystem.max;
}
//获取菜单参数 1,主菜单 2,顶部文字 3,声望栏顶部提示 4,货币栏顶部提示 5,威望的前缀 6,未解锁时的文字
PrestigeSystem.getTitle = function(param) {
var value ;
switch(param){
case 1:
value = PrestigeSystem.menuName.trim();
break;
case 2:
value = PrestigeSystem.titleText.trim();
break
case 3:
value = PrestigeSystem.preText.trim();
break;
case 4:
value = PrestigeSystem.goldText.trim();
break;
case 5:
value = PrestigeSystem.repText.trim();
break;
case 6:
value = PrestigeSystem.unlockText.trim();
break;
}
return value === null ? '' : value;
};
//获取威望所使用的变量
PrestigeSystem.getRepV = function(){
var value = (parseInt(PrestigeSystem.repVariable.trim()));
return value === null ? '' : value;
}
//获取颜色码
PrestigeSystem.getColor = function(param) {
var values = this.getString(PrestigeSystem.colorString);
return values[param];
}
//获取分隔声望值标准
PrestigeSystem.getLine = function(param) {
var values = this.getNumber(PrestigeSystem.lineString);
return values[param];
}
//获取声望等级名称
PrestigeSystem.getLv = function(param) {
var values = this.getString(PrestigeSystem.prePhase);
return values[param];
}
//获取声望名称
PrestigeSystem.getPName = function(param) {
var values = this.getString(PrestigeSystem.preName);
return values[param];
}
//获取变量号
PrestigeSystem.getPreV = function(param) {
var values = this.getNumber(PrestigeSystem.preVariable);
return values[param];
}
//获取开关号
PrestigeSystem.getPreS = function(param) {
var values = this.getNumber(PrestigeSystem.preSwitch);
return values[param];
}
//获取图标号
PrestigeSystem.getPIcon = function(param) {
var values = this.getNumber(PrestigeSystem.preIcon);
return values[param];
}
//获取货币名称
PrestigeSystem.getGName = function(param) {
var values = this.getString(PrestigeSystem.goldName);
return values[param];
}
//获取货币变量号
PrestigeSystem.getGV = function(param) {
var values = this.getNumber(PrestigeSystem.goldVariable);
return values[param];
}
//获取货币图标号
PrestigeSystem.getGIcon = function(param) {
var values = this.getNumber(PrestigeSystem.goldIcon);
return values[param];
}
//获取字符参数
PrestigeSystem.getText = function(param) {
var value = param.trim();
return value === null ? '' : value;
};
//获取字符串参数
PrestigeSystem.getString = function(paramNames) {
var values = this.getText(paramNames).split(',');
for (var i = 0; i < values.length; i++) values[i] = values[i].trim();
return values;
};
//获取Int参数
PrestigeSystem.getNumber = function(paramNames) {
var values = this.getString(paramNames);
for (var i = 0; i < values.length; i++) values[i] = (parseInt(values[i]) || 0);
return values;
};
// ======================================================================
// * Scene_Menu
// ======================================================================
Scene_Menu.prototype.Shengwang_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function() {
this.Shengwang_createCommandWindow();
this._commandWindow.setHandler('shengwang', this.command_Shengwang.bind(this));
};
Scene_Menu.prototype.command_Shengwang = function() {
SceneManager.push(Scene_Shengwang);
};
// ======================================================================
// * Window_MenuCommand
// ======================================================================
Window_MenuCommand.prototype.Shengwang_addOriginalCommands = Window_MenuCommand.prototype.addOriginalCommands;
Window_MenuCommand.prototype.addOriginalCommands = function() {
this.Shengwang_addOriginalCommands();
this.addCommand(PrestigeSystem.getTitle(1), 'shengwang', this.areMainCommandsEnabled());
};
//=======================================================================
// 显示区段
//=======================================================================
Window_Shengwang.prototype.initialize = function(x, y, width, height) {
Window_Selectable.prototype.initialize.call(this, x, y, width, height);
this.drawShengwangText();
};
Window_Shengwang.prototype.drawShengwangText = function() {
var dy = 0;
var dx = 34; //左侧文字绘制的X坐标,已经留出图标位置。
var di = 277; //中间图标显示的X坐标,左侧为0
var dxx = 311; //中间文字绘制的X坐标。已经留出图标位置。
var dii = 554; //右侧图标绘制的X坐标。
var dxxx = 588; //右侧文字绘制的X坐标,已经留出图标位置。
var dw = 230; //界面总宽
var gx = 0;
this.contents.fontSize = 20;
this.drawText(PrestigeSystem.getTitle(2), 0, -10, dw, 'left');
if ($gameVariables.value(PrestigeSystem.getRepV()) > 0){
this.drawText(PrestigeSystem.getTitle(5) + $gameVariables.value(PrestigeSystem.getRepV()), 0, -10 ,778, 'right');
};
this.drawText("————————————————————————————————————————————————————————————————————————————", 0, dy + 8, 784, 'left');
this.contents.fontSize = 20;
//声望区段
//第一行
dy += 32; //行高变化
//左
if ($gameSwitches.value(PrestigeSystem.getPreS(0)) == true){
this.drawIcon(PrestigeSystem.getPIcon(0), 0, dy + 3);
this.drawText(PrestigeSystem.getPName(0), dx, dy, dw, 'left');
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(0)), gx ,dy ,dw); //条显示的函数,第一个值为要使用的变量
}else{
this.drawText(PrestigeSystem.getTitle(3), 0, dy, dw, 'left');
};
//中
if ($gameSwitches.value(PrestigeSystem.getPreS(1)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(1)) == 0){
this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(1), di, dy + 3);
this.drawText(PrestigeSystem.getPName(1), dxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(1)), gx + 277 ,dy ,dw);
};};
//右
if ($gameSwitches.value(PrestigeSystem.getPreS(2)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(2)) == 0){
this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(2), dii, dy + 3);
this.drawText(PrestigeSystem.getPName(2), dxxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(2)), gx + 554 ,dy ,dw);
};};
//第二行
dy += 61; //行高变化
//左
if ($gameSwitches.value(PrestigeSystem.getPreS(3)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(3)) == 0){
this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(3), 0, dy + 3);
this.drawText(PrestigeSystem.getPName(3), dx, dy, dw, 'left');
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(3)), gx ,dy ,dw);
};};
//中
if ($gameSwitches.value(PrestigeSystem.getPreS(4)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(4)) == 0){
this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(4), di, dy + 3);
this.drawText(PrestigeSystem.getPName(4), dxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(4)), gx + 277 ,dy ,dw);
};};
//右
if ($gameSwitches.value(PrestigeSystem.getPreS(5)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(5)) == 0){
this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(5), dii, dy + 3);
this.drawText(PrestigeSystem.getPName(5), dxxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(5)), gx + 554 ,dy ,dw);
};};
//第三行
dy += 61; //行高变化
//左
if ($gameSwitches.value(PrestigeSystem.getPreS(6)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(6)) == 0){
this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(6), 0, dy + 3);
this.drawText(PrestigeSystem.getPName(6), dx, dy, dw, 'left');
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(6)), gx ,dy ,dw);
};};
//中
if ($gameSwitches.value(PrestigeSystem.getPreS(7)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(7)) == 0){
this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(7), di, dy + 3);
this.drawText(PrestigeSystem.getPName(7), dxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(7)), gx + 277 ,dy ,dw);
};};
//右
if ($gameSwitches.value(PrestigeSystem.getPreS(8)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(8)) == 0){
this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(8), dii, dy + 3);
this.drawText(PrestigeSystem.getPName(8), dxxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(8)), gx + 554 ,dy ,dw);
};};
//第四行
dy += 61; //行高变化
//左
if ($gameSwitches.value(PrestigeSystem.getPreS(9)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(9)) == 0){
this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(9), 0, dy + 3);
this.drawText(PrestigeSystem.getPName(9), dx, dy, dw, 'left');
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(9)), gx ,dy ,dw);
};};
//中
if ($gameSwitches.value(PrestigeSystem.getPreS(10)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(10)) == 0){
this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(10), di, dy + 3);
this.drawText(PrestigeSystem.getPName(10), dxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(10)), gx + 277 ,dy ,dw);
};};
//右
if ($gameSwitches.value(PrestigeSystem.getPreS(11)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(11)) == 0){
this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(11), dii, dy + 3);
this.drawText(PrestigeSystem.getPName(11), dxxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(11)), gx + 554 ,dy ,dw);
};};
//第五行
dy += 61; //行高变化
//左
if ($gameSwitches.value(PrestigeSystem.getPreS(12)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(12)) == 0){
this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(12), 0, dy + 3);
this.drawText(PrestigeSystem.getPName(12), dx, dy, dw, 'left');
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(12)), gx ,dy ,dw);
};};
//中
if ($gameSwitches.value(PrestigeSystem.getPreS(13)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(13)) == 0){
this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(13), di, dy + 3);
this.drawText(PrestigeSystem.getPName(13), dxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(13)), gx + 277 ,dy ,dw);
};};
//右
if ($gameSwitches.value(PrestigeSystem.getPreS(14)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(14)) == 0){
this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(14), dii, dy + 3);
this.drawText(PrestigeSystem.getPName(14), dxxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(14)), gx + 554 ,dy ,dw);
};};
//第六行
dy += 61; //行高变化
//左
if ($gameSwitches.value(PrestigeSystem.getPreS(15)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(15)) == 0){
this.drawText(PrestigeSystem.getTitle(6), 0, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(15), 0, dy + 3);
this.drawText(PrestigeSystem.getPName(15), dx, dy, dw, 'left');
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(15)), gx ,dy ,dw);
};};
//中
if ($gameSwitches.value(PrestigeSystem.getPreS(16)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(16)) == 0){
this.drawText(PrestigeSystem.getTitle(6), di, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(16), di, dy + 3);
this.drawText(PrestigeSystem.getPName(16), dxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(16)), gx + 277 ,dy ,dw);
};};
//右
if ($gameSwitches.value(PrestigeSystem.getPreS(17)) == true){
if ($gameVariables.value(PrestigeSystem.getPreV(17)) == 0){
this.drawText(PrestigeSystem.getTitle(6), dii, dy, dw, 'conter' );
} else{
this.drawIcon( PrestigeSystem.getPIcon(17), dii, dy + 3);
this.drawText(PrestigeSystem.getPName(17), dxxx, dy, dw, 'left' );
this.dataMath($gameVariables.value(PrestigeSystem.getPreV(17)), gx + 554 ,dy ,dw);
};};
//声望区段END
dy = 387;
this.drawText("————————————————————————————————————————————————————————————————————————————", 0, dy, 784, 'left');
var hi = 0; //一位X坐标,框宽加1像素的边距
var hii = 157; //二位X坐标
var hiii = 314 //三位X坐标
var hiv = 471; //四位X坐标
var hv = 628; //五位X坐标
var hw = 156; //每个框宽
//货币区段
dy = 407; //第一行
//左
if ($gameVariables.value(PrestigeSystem.getGV(0)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(0), hi, dy + 30);
this.drawText(PrestigeSystem.getGName(0)+":", hi, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(0)), hi + 35, dy + 30, hw, 'left' );
} else{
this.drawText(PrestigeSystem.getTitle(4), hi, dy, 784);
};
//左中
if ($gameVariables.value(PrestigeSystem.getGV(1)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(1), hii, dy + 30);
this.drawText(PrestigeSystem.getGName(1)+":", hii, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(1)), hii + 35, dy + 30, hw, 'left' );
};
//中
if ($gameVariables.value(PrestigeSystem.getGV(2)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(2), hiii, dy + 30);
this.drawText(PrestigeSystem.getGName(2)+":", hiii, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(2)), hiii + 35, dy + 30, hw, 'left' );
};
//右中
if ($gameVariables.value(PrestigeSystem.getGV(3)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(3), hiv, dy + 30);
this.drawText(PrestigeSystem.getGName(3)+":", hiv, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(3)), hiv + 35, dy + 30, hw, 'left' );
};
//右
if ($gameVariables.value(PrestigeSystem.getGV(4)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(4), hv, dy + 30);
this.drawText(PrestigeSystem.getGName(4)+":", hv, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(4)), hv + 35, dy + 30, hw, 'left' );
};
dy = 466; //第二行
//左
if ($gameVariables.value(PrestigeSystem.getGV(5)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(5), hi, dy + 30);
this.drawText(PrestigeSystem.getGName(5)+":", hi, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(5)), hi + 35, dy + 30, hw, 'left' );
};
//左中
if ($gameVariables.value(PrestigeSystem.getGV(6)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(6), hii, dy + 30);
this.drawText(PrestigeSystem.getGName(6)+":", hii, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(6)), hii + 35, dy + 30, hw, 'left' );
};
//中
if ($gameVariables.value(PrestigeSystem.getGV(7)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(7), hiii, dy + 30);
this.drawText(PrestigeSystem.getGName(7)+":", hiii, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(7)), hiii + 35, dy + 30, hw, 'left' );
};
//右中
if ($gameVariables.value(PrestigeSystem.getGV(8)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(8), hiv, dy + 30);
this.drawText(PrestigeSystem.getGName(8)+":", hiv, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(8)), hiv + 35, dy + 30, hw, 'left' );
};
//右
if ($gameVariables.value(PrestigeSystem.getGV(9)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(9), hv, dy + 30);
this.drawText(PrestigeSystem.getGName(9)+":", hv, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(9)), hv + 35, dy + 30, hw, 'left' );
};
dy = 525; //第三行
//左
if ($gameVariables.value(PrestigeSystem.getGV(10)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(10), hi, dy + 30);
this.drawText(PrestigeSystem.getGName(10)+":", hi, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(10)), hi + 35, dy + 30, hw, 'left' );
};
//左中
if ($gameVariables.value(PrestigeSystem.getGV(11)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(11), hii, dy + 30);
this.drawText(PrestigeSystem.getGName(11)+":", hii, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(11)), hii + 35, dy + 30, hw, 'left' );
};
//中
if ($gameVariables.value(PrestigeSystem.getGV(12)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(12), hiii, dy + 30);
this.drawText(PrestigeSystem.getGName(12)+":", hiii, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(12)), hiii + 35, dy + 30, hw, 'left' );
};
//右中
if ($gameVariables.value(PrestigeSystem.getGV(13)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(13), hiv, dy + 30);
this.drawText(PrestigeSystem.getGName(13)+":", hiv, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(13)), hiv + 35, dy + 30, hw, 'left' );
};
//右
if ($gameVariables.value(PrestigeSystem.getGV(14)) > 0){
this.drawIcon( PrestigeSystem.getGIcon(14), hv, dy + 30);
this.drawText(PrestigeSystem.getGName(14)+":", hv, dy, hw);
this.drawText("x " + $gameVariables.value(PrestigeSystem.getGV(14)), hv + 35, dy + 30, hw, 'left' );
};
//货币区段END
};
//条显示的函数
//Color '#ff0000' faff72 eaff56 40de5a 00e400 00ff00 000000
Window_Shengwang.prototype.dataMath = function(data, gx, dy, dw) {
var v1 = data;
var v2 = 1;
var text = "";
var color = PrestigeSystem.getColor(0);
if (v1 >= PrestigeSystem.getLine(5)){ //崇拜
if(v1 >= PrestigeSystem.getMax()){
v1 = PrestigeSystem.getMax();
}else{
v1 = data;
}
v2 = PrestigeSystem.getLine(5); //当前阶段的声望上限
color = PrestigeSystem.getColor(6); //设置声望条的颜色
text = PrestigeSystem.getLv(6)+":"+ v1 + "/" + v2; //赋值要显示在声望条上面的文字
}else if (v1 >= PrestigeSystem.getLine(4)){ //崇敬
v2 = PrestigeSystem.getLine(5);
color = PrestigeSystem.getColor(5);
text = PrestigeSystem.getLv(5)+":"+ v1 + "/" + v2;
}else if (v1 >= PrestigeSystem.getLine(3)){ //尊敬
v2 = PrestigeSystem.getLine(4);
color = PrestigeSystem.getColor(4);
text = PrestigeSystem.getLv(4)+":"+ v1 + "/" + v2;
}else if (v1 >= PrestigeSystem.getLine(2)){ //尊重
v2 = PrestigeSystem.getLine(3);
color = PrestigeSystem.getColor(3);
text = PrestigeSystem.getLv(3)+":"+ v1 + "/" + v2;
}else if (v1 >= PrestigeSystem.getLine(1)){ //友善
v2 = PrestigeSystem.getLine(2);
color = PrestigeSystem.getColor(2);
text = PrestigeSystem.getLv(2)+":"+ v1 + "/" + v2;
}else if (v1 < PrestigeSystem.getLine(0)){ //仇恨
v2 = v1;
color = PrestigeSystem.getColor(0);
text = PrestigeSystem.getLv(0)+":"+ v1;
/* }else if (v1 == 0){ //为0的状态
v2 = 1;
color = '#ffffff';
text = "???";
*/ }else { //冷漠
v2 = PrestigeSystem.getLine(1);
color = PrestigeSystem.getColor(1);
var text = PrestigeSystem.getLv(1)+":"+ v1 + "/" + v2;
}
var rate = v1 / v2; //计算声望条的绘制比例
dy += 30; //行高变化
this.drawGauge(gx, dy, dw, rate, color); //绘制声望条
this.drawText(text, gx + 12, dy - 4 , dw, 'center'); //绘制要显示在声望条上面的文字
};
//绘制条函数
Window_Shengwang.prototype.drawGauge = function(x, y, width, rate, color) {
var fillW = Math.floor(width * rate); //比例换算成彩条长度
this.contents.fillRect(x, y + 8, width, 20, '#000000'); //绘制条的黑底
this.contents.gradientFillRect(x, y + 8, fillW, 20, color, color); //绘制彩条
};
|
评分
-
查看全部评分
|