设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 16287|回复: 18

[原创发布] 不存在的脚本陈列室

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2015-1-5
帖子
139
发表于 2015-10-24 18:59:05 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 MonsterJohnCN 于 2015-12-27 06:11 编辑

评分

参与人数 1星屑 +66 梦石 +3 收起 理由
余烬之中 + 66 + 3 图书馆收录(原创脚本部分)

查看全部评分

实力跳票,根本停不下来…… | bgpCore.js | 《下一站》2号DEMO | 插件开发无限延期中……正在研制适用性更强的普适模板,不再输出单体插件……

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2015-1-5
帖子
139
 楼主| 发表于 2015-10-24 18:59:46 | 显示全部楼层
本帖最后由 MonsterJohnCN 于 2015-10-25 02:38 编辑

JAVASCRIPT 代码复制
  1. //=============================================================================
  2. // Actor Stepping Animation
  3. // by Shaz
  4. // Last Updated: 2015.10.21
  5. //=============================================================================
  6.  
  7. /*:
  8.  * @plugindesc Allows party leader/followers to have stepping anim on map
  9.  * @author Shaz
  10.  *
  11.  * @help This plugin does not provide plugin commands.
  12.  *
  13.  * Add <stepanim> to the note box of an Actor to turn on stepping animation
  14.  * for the actor's sprite on the map, as the party leader or a follower.
  15.  *
  16.  */
  17.  
  18. /*:ch
  19.  * @plugindesc
  20.  * 允许一个队伍中的某个角色在地图中显示步行动画。
  21.  *
  22.  * @author
  23.  * Shaz
  24.  *
  25.  * @help
  26.  * 在角色的备注(note)盒子中添加“<stepanim>”(不含双引号)来让这个角色自动
  27.  * 播放走路动画。
  28.  */
  29.  
  30. (function() {
  31.     var _Game_Player_update = Game_Player.prototype.update;                     // 用_Game_Player_update指向原始的队伍主要角色的更新函数,类似RUBY的alias
  32.     Game_Player.prototype.update = function(sceneActive) {                      // 追加用于本插件的队伍主要角色更新函数
  33.         _Game_Player_update.call(this, sceneActive);                                // 调用原始的队伍主要角色更新函数,类似RUBY的super
  34.         this.setStepAnime($gameParty.leader().actor().meta.stepanim || false);      // 【?】更新角色队伍中本角色的动画状态
  35.     };
  36.  
  37.     var _Game_Follower_update = Game_Follower.prototype.update;                 // 用_Game_Follower_update指向原始的队伍附属角色的更新函数,类似RUBY的alias
  38.     Game_Follower.prototype.update = function() {                               // 追加用于本插件的队伍附属角色更新函数
  39.         _Game_Follower_update.call(this);                                           // 调用原始的队伍附属角色更新函数,类似RUBY的super
  40.         this.setStepAnime(this.actor().actor().meta.stepanim || false);             // 【?】更新角色队伍中本角色的动画状态
  41.     };
  42. })();
实力跳票,根本停不下来…… | bgpCore.js | 《下一站》2号DEMO | 插件开发无限延期中……正在研制适用性更强的普适模板,不再输出单体插件……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2015-1-5
帖子
139
 楼主| 发表于 2015-10-24 19:01:23 | 显示全部楼层
本帖最后由 MonsterJohnCN 于 2015-10-25 02:38 编辑

JAVASCRIPT 代码复制
  1. //=============================================================================
  2. // AltMenuScreen.js
  3. //=============================================================================
  4.  
  5. /*:
  6.  * @plugindesc Alternative menu screen layout.
  7.  * @author Yoji Ojima
  8.  *
  9.  * @help This plugin does not provide plugin commands.
  10.  */
  11.  
  12. /*:ja
  13.  * @plugindesc メニュー画面のレイアウトを変更します。
  14.  * @author Yoji Ojima
  15.  *
  16.  * @help このプラグインには、プラグインコマンドはありません。
  17.  */
  18.  
  19. /*:ch
  20.  * @plugindesc
  21.  * 修改菜单界面的布局方式。
  22.  *
  23.  * @author
  24.  * Yoji Ojima
  25.  *
  26.  * @help
  27.  * 启用本插件后,会将ESC菜单的纵向排版变为横向排版。
  28.  */
  29.  
  30. (function() {
  31.  
  32.     var _Scene_Menu_create = Scene_Menu.prototype.create;                       // 用_Scene_Menu_create指向原始的创建菜单函数
  33.     Scene_Menu.prototype.create = function() {                                  // 追加用于本插件的创建菜单函数
  34.         _Scene_Menu_create.call(this);                                              // 调用原始的创建菜单函数
  35.         this._statusWindow.x = 0;                                                   // 设置状态窗口的X坐标为0
  36.         this._statusWindow.y = this._commandWindow.height;                          // 设置状态窗口的Y坐标为指令窗口的高度
  37.         this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;            // 设置金币窗口的X坐标为 游戏窗口的宽度 - 金币窗口的宽度
  38.     };
  39.  
  40.     Window_MenuCommand.prototype.windowWidth = function() {                     // 重定义指令窗口的宽度
  41.         return Graphics.boxWidth;                                                   // 返回游戏窗口宽度
  42.     };
  43.  
  44.     Window_MenuCommand.prototype.maxCols = function() {                         // 重定义指令窗口的选项的最大列数
  45.         return 4;                                                                   // 返回 4
  46.     };
  47.  
  48.     Window_MenuCommand.prototype.numVisibleRows = function() {                  // 重定义指令窗口的选项的可见的行数
  49.         return 2;                                                                   // 返回 葵花宝典
  50.     };
  51.  
  52.     Window_MenuStatus.prototype.windowWidth = function() {                      // 重定义状态窗口的宽度
  53.         return Graphics.boxWidth;                                                   // 返回游戏窗口宽度
  54.     };
  55.  
  56.     Window_MenuStatus.prototype.windowHeight = function() {                     // 重定义状态窗口的高度
  57.         var h1 = this.fittingHeight(1);                                             // 【?】适配行数为1的项目的行高
  58.         var h2 = this.fittingHeight(2);                                             // 【?】适配行数为2的项目的行高
  59.         return Graphics.boxHeight - h1 - h2;                                        // 返回 游戏窗口高度 - 【?】 - 【?】
  60.     };
  61.  
  62.     Window_MenuStatus.prototype.maxCols = function() {                          // 重定义状态窗口的内容的最大列数
  63.         return 4;                                                                   // 返回 蜜汁肥皂
  64.     };
  65.  
  66.     Window_MenuStatus.prototype.numVisibleRows = function() {                   // 重定义状态窗口的内容的可见行数
  67.         return 1;                                                                   // 返回 辣条
  68.     };
  69.  
  70.     Window_MenuStatus.prototype.drawItemImage = function(index) {               // 重定义状态窗口的项目图片绘制函数
  71.         var actor = $gameParty.members()[index];                                    // 将玩家队伍中排序为index的角色保存到actor中
  72.         var rect = this.itemRectForText(index);                                     // 【?】获取用于绘制文字的区域并保存到rect中
  73.         var w = Math.min(rect.width, 144);                                          // 设置宽度为rect的宽度和144中较小的一个
  74.         var h = Math.min(rect.height, 144);                                         // 设置高度为rect的高度和144中较小的一个
  75.         var lineHeight = this.lineHeight();                                         // 获取状态窗口的行高并保存到lineHeight中
  76.         this.changePaintOpacity(actor.isBattleMember());                            // 【?】改变绘制功能的透明度
  77.         this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h);         // 绘制角色脸图
  78.         this.changePaintOpacity(true);                                              // 【?】恢复绘制功能的透明度
  79.     };
  80.  
  81.     Window_MenuStatus.prototype.drawItemStatus = function(index) {              // 重定义状态窗口的项目属性绘制函数
  82.         var actor = $gameParty.members()[index];                                    // 将玩家队伍中排序为index的角色保存到actor中
  83.         var rect = this.itemRectForText(index);                                     // 【?】获取用于绘制文字的区域并保存到rect中
  84.         var x = rect.x;                                                             // 获取用于绘制文字的区域的X坐标
  85.         var y = rect.y;                                                             // 获取用于绘制文字的区域的Y坐标
  86.         var width = rect.width;                                                     // 获取用于绘制文字的区域的宽度
  87.         var bottom = y + rect.height;                                               // 获取用于绘制文字的区域的底部Y坐标
  88.         var lineHeight = this.lineHeight();                                         // 获取状态窗口的行高
  89.         this.drawActorName(actor, x, y + lineHeight * 0, width);                    // 绘制角色姓名
  90.         this.drawActorLevel(actor, x, y + lineHeight * 1, width);                   // 绘制角色等级
  91.         this.drawActorClass(actor, x, bottom - lineHeight * 4, width);              // 绘制角色职业
  92.         this.drawActorHp(actor, x, bottom - lineHeight * 3, width);                 // 绘制角色生命值
  93.         this.drawActorMp(actor, x, bottom - lineHeight * 2, width);                 // 绘制角色魔法值
  94.         this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);              // 【?】绘制角色状态图标
  95.     };
  96.  
  97.     var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;   // 用_Window_MenuActor_initialize指向原始的菜单角色初始化函数
  98.     Window_MenuActor.prototype.initialize = function() {                        // 追加用于本插件的菜单角色初始化函数
  99.         _Window_MenuActor_initialize.call(this);                                    // 调用原始的菜单角色初始化函数
  100.         this.y = this.fittingHeight(2);                                             // 【?】适配项目数为2的行高
  101.     };
  102.  
  103. })();
实力跳票,根本停不下来…… | bgpCore.js | 《下一站》2号DEMO | 插件开发无限延期中……正在研制适用性更强的普适模板,不再输出单体插件……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2015-1-5
帖子
139
 楼主| 发表于 2015-10-24 19:51:27 | 显示全部楼层
本帖最后由 MonsterJohnCN 于 2015-10-25 02:38 编辑

JAVASCRIPT 代码复制
  1. //=============================================================================
  2. // AltMenuScreen2.js
  3. //=============================================================================
  4.  
  5. /*:
  6.  * @plugindesc Alternative menu screen layout.
  7.  * @author Yoji Ojima, Sasuke KANNAZUKI
  8.  *
  9.  * @param backGroundBitmap
  10.  * @desc background bitmap file at img/pictures.
  11.  * @default
  12.  *
  13.  * @param maxColsMenu
  14.  * @desc max column at menu window
  15.  * @default 4
  16.  *
  17.  * @param commandRows
  18.  * @desc number of visible rows at command window
  19.  * @default 2
  20.  *
  21.  * @param isDisplayStatus
  22.  * @desc whether display status or not. (1 = yes, 0 = no)
  23.  * @default 0
  24.  *
  25.  * @help This plugin does not provide plugin commands.
  26.  *  The differences with AltMenuscreen are follows:
  27.  *   - windows are transparent
  28.  *   - it can set the menu's background bitmap.
  29.  *   - picture is actors' original
  30.  *
  31.  * Actor' note:
  32.  * <stand_picture:filename> set actor's standing picture at menu.
  33.  *   put file at img/pictures.
  34.  *
  35.  * preferred size of actor's picture:
  36.  * width: 174px(maxColsMenu=4), 240px(maxColsMenu=3)
  37.  * height: 408px(commandRows=2), 444px(commandRows=1)
  38.  */
  39.  
  40. /*:ja
  41.  * @plugindesc レイアウトの異なるメニュー画面
  42.  * @author Yoji Ojima, 神無月サスケ
  43.  *
  44.  * @param backGroundBitmap
  45.  * @desc 背景にするビットマップファイルです。
  46.  * img/pictures に置いてください。
  47.  * @default
  48.  *
  49.  * @param maxColsMenu
  50.  * @desc アクターを表示するウィンドウの1画面の登録最大数です。
  51.  * @default 4
  52.  *
  53.  * @param commandRows
  54.  * @desc コマンドウィンドウの行数です。
  55.  * @default 2
  56.  *
  57.  * @param isDisplayStatus
  58.  * @desc ステータスを表示するかしないかを選びます。(1 = yes, 0 = no)
  59.  * @default 0
  60.  *
  61.  * @help このプラグインには、プラグインコマンドはありません。
  62.  *
  63.  *  AltMenuscreen との違いは以下です:
  64.  *  - ウィンドウが透明です
  65.  *  - 背景ビットマップを付けることが出来ます。
  66.  *  - アクターに立ち絵を利用します。
  67.  *
  68.  * アクターのメモに以下のように書いてください:
  69.  * <stand_picture:ファイル名> ファイル名が、そのアクターの立ち絵になります。
  70.  *   ファイルは img/pictures に置いてください。
  71.  *
  72.  * 望ましいアクター立ち絵のサイズ:
  73.  * 幅:3列:240px, 4列:174px
  74.  * 高さ: コマンドウィンドウ 1行:444px 2行:408px
  75.  *
  76.  */
  77.  
  78. /*:ch
  79.  * @plugindesc
  80.  * 通过填写参数来定制你的ESC菜单布局。
  81.  *
  82.  * @author
  83.  * Yoji Ojima, Sasuke KANNAZUKI
  84.  *
  85.  * @param backGroundBitmap
  86.  * @desc 背景图片(Bitmap),将背景图片保存在img/pictures。
  87.  * @default
  88.  *
  89.  * @param maxColsMenu
  90.  * @desc 菜单最大列数,菜单窗口的最大列数
  91.  * @default 4
  92.  *
  93.  * @param commandRows
  94.  * @desc 指令行数,在指令窗口内可见的指令行数
  95.  * @default 2
  96.  *
  97.  * @param isDisplayStatus
  98.  * @desc 是否显示角色状态,选择是否显示角色状态属性(1 = 显示,0 = 不显示)
  99.  * @default 0
  100.  *
  101.  * @help
  102.  * 本插件与AltMenuScreen插件的不同有以下几点:
  103.  * - 窗口是透明的
  104.  * - 可以自己设定窗口背景图
  105.  * - 可定制角色的菜单显示图(默认为脸图)
  106.  *   - 在角色的备注内填写<stand_picture:filename>,即可设置角色的菜单显示图
  107.  *   - 注意图片应当放置在img/pictures目录下
  108.  *   - filename不含后缀
  109.  *
  110.  * 角色的菜单显示图的最佳尺寸:
  111.  * - 菜单最大列数为4时,宽度为174像素。
  112.  * - 菜单最大列数为3时,宽度为240像素。
  113.  * - 指令选项行数为2时,高度为408像素。
  114.  * - 指令选项行数为1时,高度为444像素。
  115.  */
  116.  
  117. (function() {
  118.  
  119.     // set parameters                                                                   // 设置参数
  120.     var parameters = PluginManager.parameters('AltMenuScreen2');                        // 获取插件管理器中AltMenuScreen2的参数列表,保存到parameters中
  121.     var backGroundBitmap = parameters['backGroundBitmap'] || '';                        // 获取“背景图片(参数)”内容,默认为空
  122.     var maxColsMenuWnd = Number(parameters['maxColsMenu'] || 4);                        // 获取“菜单最大列数(参数)”内容,默认为4
  123.     var rowsCommandWnd = Number(parameters['commandRows'] || 2);                        // 获取“指令行数(参数)”内容,默认为2
  124.     var isDisplayStatus = !!Number(parameters['isDisplayStatus']);                      // 获取“是否显示角色状态(参数)”内容,默认为【?】
  125.  
  126.     var _Scene_Menu_create = Scene_Menu.prototype.create;                               // 用_Scene_Menu_create指向原始的创建菜单函数
  127.     Scene_Menu.prototype.create = function() {                                          // 追加用于本插件的创建菜单函数
  128.         _Scene_Menu_create.call(this);                                                      // 调用原始的创建菜单函数
  129.         this._statusWindow.x = 0;                                                           // 设置状态窗口的X坐标为0
  130.         this._statusWindow.y = this._commandWindow.height;                                  // 设置状态窗口的Y坐标为指令窗口的高度
  131.         this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;                    // 设置金币窗口的X坐标为游戏窗口的宽度 - 金币窗口的宽度
  132.         // make transparent for all windows at menu scene.                                  // 注释:设置ESC菜单界面内的所有窗口的透明度为0
  133.         this._statusWindow.opacity = 0;                                                     // 设置状态窗口的透明度为0
  134.         this._goldWindow.opacity = 0;                                                       // 设置金币窗口的透明度为0
  135.         this._commandWindow.opacity = 0;                                                    // 设置指令窗口的透明度为0
  136.     };
  137.  
  138.     // load bitmap that set in plugin parameters                                        // 注释:载入“背景图片”参数所指向的图片
  139.     var _Scene_Menu_createBackground = Scene_Menu.prototype.createBackground;           // 用_Scene_Menu_createBackground指向原始的创建背景函数
  140.     Scene_Menu.prototype.createBackground = function(){                                 // 追加用于本插件的创建背景函数
  141.         if(backGroundBitmap){                                                               // 如果“背景图片”参数有内容
  142.             this._backgroundSprite = new Sprite();                                              // 为本场景创建一个新的背景图精灵
  143.             this._backgroundSprite.bitmap = ImageManager.loadPicture(backGroundBitmap);         // 调用图片管理器,为精灵的Bitmap设值,调用的图片路径为参数的地址
  144.             this.addChild(this._backgroundSprite);                                              // 为本场景添加背景图精灵
  145.             return;                                                                             // 结束本次函数运行
  146.         }
  147.         // if background file is invalid, it does original process.                         // 注释:如果背景文件不存在,则调用原始的创建背景函数
  148.         _Scene_Menu_createBackground.call(this);                                            // 调用原始的创建背景函数
  149.     };
  150.  
  151.     Window_MenuCommand.prototype.windowWidth = function() {                             // 重定义指令窗口的宽度
  152.         return Graphics.boxWidth;                                                           // 返回游戏窗口宽度
  153.     };
  154.  
  155.     Window_MenuCommand.prototype.maxCols = function() {                                 // 重定义指令窗口项目的最大列数
  156.         return 4;                                                                           // 返回⑨
  157.     };
  158.  
  159.     Window_MenuCommand.prototype.numVisibleRows = function() {                          // 重定义指令窗口项目的可见行数
  160.         return rowsCommandWnd;                                                              // 返回“指令行数(参数)”
  161.     };
  162.  
  163.     Window_MenuStatus.prototype.windowWidth = function() {                              // 重定义状态窗口的宽度
  164.         return Graphics.boxWidth;                                                           // 返回游戏窗口宽度
  165.     };
  166.  
  167.     Window_MenuStatus.prototype.windowHeight = function() {                             // 重定义状态窗口的高度
  168.         var h1 = this.fittingHeight(1);                                                     // 【?】自动适配1行项目的高度
  169.         var h2 = this.fittingHeight(rowsCommandWnd);                                        // 【?】自动适配“指令行数(参数)”行项目的高度
  170.         return Graphics.boxHeight - h1 - h2;                                                // 返回游戏窗口高度-【?】-【?】
  171.     };
  172.  
  173.     Window_MenuStatus.prototype.maxCols = function() {                                  // 重定义状态窗口的最大列数
  174.         return maxColsMenuWnd;                                                              // 返回“指令列数(参数)”
  175.     };
  176.  
  177.     Window_MenuStatus.prototype.numVisibleRows = function() {                           // 重定义状态窗口的可见行数
  178.         return 1;                                                                           // 返回奥特曼变身器
  179.     };
  180.  
  181.     Window_MenuStatus.prototype.drawItemImage = function(index) {                       // 重定义状态窗口的项目图片绘制函数
  182.         var actor = $gameParty.members()[index];                                            // 获取角色队伍中排序为index的角色
  183.         var rect = this.itemRectForText(index);                                             // 获取排序为index的项目图片绘制区域
  184.         // load stand_picture                                                               // 注释:读取标准角色图
  185.         var bitmapName = $dataActors[actor.actorId()].meta.stand_picture;                   // 【?】读取当前角色的标准角色图名字
  186.         var bitmap = bitmapName ? ImageManager.loadPicture(bitmapName) : null;              // 如果角色图名字不为空,则载入角色图,否则不载入图片
  187.         var w = Math.min(rect.width, (bitmapName ? bitmap.width : 144));                    // 如果角色图名字不为空,则读取项目图片绘制区域或角色图的宽度中较小的一个,如果没有角色图,则认为角色图宽度为144
  188.         var h = Math.min(rect.height, (bitmapName ? bitmap.height : 144));                  // 如果角色图名字不为空,则读取项目图片绘制区域或角色图的高度中较小的一个,如果没有角色图,则认为角色图高度为144
  189.         var lineHeight = this.lineHeight();                                                 // 读取状态窗口的行高
  190.         this.changePaintOpacity(actor.isBattleMember());                                    // 【?】改变绘制功能的透明度
  191.         if(bitmap){                                                                         // 如果存在角色图
  192.             var sx = (bitmap.width > w) ? (bitmap.width - w) / 2 : 0;                           // 一套算法,用于计算出适配角色图的区域坐标
  193.             var sy = (bitmap.height > h) ? (bitmap.height - h) / 2 : 0;                         // ...
  194.             var dx = (bitmap.width > rect.width) ? rect.x :                                     // ...
  195.                 rect.x + (rect.width - bitmap.width) / 2;                                       // ...
  196.             var dy = (bitmap.height > rect.height) ? rect.y :                                   // ...
  197.                 rect.y + (rect.height - bitmap.height) / 2;                                     // ...
  198.             this.contents.blt(bitmap, sx, sy, w, h, dx, dy);                                    // ...
  199.         } else { // when bitmap is not set, do the original process.                        // 如果不存在角色图,则调用原始的状态窗口的项目图片绘制函数
  200.             this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h);                 // 为当前角色绘制角色图(脸图)
  201.         }
  202.         this.changePaintOpacity(true);                                                      // 【?】恢复绘制功能的透明度
  203.     };
  204.  
  205.     Window_MenuStatus.prototype.drawItemStatus = function(index) {                      // 重定义状态窗口的项目属性绘制函数
  206.         if(!isDisplayStatus){                                                               // 如果“是否显示角色状态(参数)”为否
  207.             return;                                                                             // 结束本次调用
  208.         }
  209.         var actor = $gameParty.members()[index];                                            // 读取角色队伍中排序为index的角色
  210.         var rect = this.itemRectForText(index);                                             // 读取排序为index的项目图片绘制区域
  211.         var x = rect.x;                                                                     // 获取排序为index的项目图片绘制区域的X坐标
  212.         var y = rect.y;                                                                     // 获取排序为index的项目图片绘制区域的Y坐标
  213.         var width = rect.width;                                                             // 获取排序为index的项目图片绘制区域的宽度
  214.         var bottom = y + rect.height;                                                       // 获取排序为index的项目图片绘制区域的底部坐标
  215.         var lineHeight = this.lineHeight();                                                 // 获取状态窗口的行高
  216.         this.drawActorName(actor, x, y + lineHeight * 0, width);                            // 绘制排序为index的角色姓名
  217.         this.drawActorLevel(actor, x, y + lineHeight * 1, width);                           // 绘制排序为index的角色等级
  218.         this.drawActorClass(actor, x, bottom - lineHeight * 4, width);                      // 绘制排序为index的角色职业
  219.         this.drawActorHp(actor, x, bottom - lineHeight * 3, width);                         // 绘制排序为index的角色生命值
  220.         this.drawActorMp(actor, x, bottom - lineHeight * 2, width);                         // 绘制排序为index的角色魔法值
  221.         this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);                      // 【?】绘制排序为index的角色状态图标
  222.     };
  223.  
  224.     var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;           // 用_Window_MenuActor_initialize指向原始的菜单角色初始化函数
  225.     Window_MenuActor.prototype.initialize = function() {                                // 重定义菜单角色初始化函数
  226.         _Window_MenuActor_initialize.call(this);                                            // 调用原始的菜单角色初始化函数
  227.         this.y = this.fittingHeight(2);                                                     // 【?】设置菜单角色的Y坐标为两行项目的行高
  228.     };
  229.  
  230. })();
实力跳票,根本停不下来…… | bgpCore.js | 《下一站》2号DEMO | 插件开发无限延期中……正在研制适用性更强的普适模板,不再输出单体插件……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
199
在线时间
248 小时
注册时间
2012-4-29
帖子
386
发表于 2015-10-24 20:52:55 | 显示全部楼层
吃惊!!   先占个楼!!
你的意思就是要打架咯?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
38
在线时间
191 小时
注册时间
2010-11-9
帖子
60
发表于 2015-10-24 23:48:31 | 显示全部楼层
果然还是看注释学js更快一些,希望能有战斗类的部分
总之支持一下
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
65
在线时间
154 小时
注册时间
2011-2-1
帖子
47
发表于 2015-10-25 00:13:23 | 显示全部楼层
出的真够快的,mv管理脚本简单了好多,不用再各种加注释无效化了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2015-1-5
帖子
139
 楼主| 发表于 2015-10-25 00:53:47 | 显示全部楼层
本帖最后由 MonsterJohnCN 于 2015-10-25 02:39 编辑

JAVASCRIPT 代码复制
  1. //=============================================================================
  2. // JumpBeginScene.js
  3. // Last Updated: 2015.10.25
  4. //=============================================================================
  5.  
  6. /*:
  7.  * @plugindesc Jump game begin scene, quickily start debug.
  8.  */
  9.  
  10. (function() {
  11.  
  12.     Scene_Title.prototype.initialize = function() {                 // 重定义标题场景初始化函数
  13.         Scene_Base.prototype.initialize.call(this);                     // 调用基础场景的初始化
  14.     };
  15.  
  16.     Scene_Title.prototype.create = function() {                     // 重定义标题场景创建函数
  17.         Scene_Base.prototype.create.call(this);                         // 调用基础场景的创建
  18.     };
  19.  
  20.     Scene_Title.prototype.start = function() {                      // 重定义标题场景开始函数
  21.         Scene_Base.prototype.start.call(this);                          // 调用基础场景的开始
  22.         DataManager.setupNewGame();                                     // 配置新游戏
  23.         SceneManager.goto(Scene_Map);                                   // 调用场景管理器,跳转到游戏地图场景
  24.     };
  25.  
  26.     Scene_Title.prototype.update = function() {                     // 重定义标题场景更新函数
  27.         Scene_Base.prototype.update.call(this);                         // 调用基础场景的更新
  28.     };
  29.  
  30.     Scene_Title.prototype.terminate = function() {                  // 重定义标题场景结束函数
  31.         Scene_Base.prototype.terminate.call(this);                      // 调用基础场景的结束
  32.     };
  33.  
  34.     Scene_Title.prototype.isBusy = function() {                     // 重定义标题场景繁忙检测函数
  35.         return false;                                                   // 返回:不忙
  36.     };
  37.  
  38. })();
实力跳票,根本停不下来…… | bgpCore.js | 《下一站》2号DEMO | 插件开发无限延期中……正在研制适用性更强的普适模板,不再输出单体插件……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2015-1-5
帖子
139
 楼主| 发表于 2015-10-25 13:09:46 | 显示全部楼层
emgame 发表于 2015-10-25 11:39
楼主我可以加一个么.
[fold=AltMenuScreen3]//========================================================= ...

正在汉化这个,今天会出
实力跳票,根本停不下来…… | bgpCore.js | 《下一站》2号DEMO | 插件开发无限延期中……正在研制适用性更强的普适模板,不再输出单体插件……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
119 小时
注册时间
2015-1-5
帖子
139
 楼主| 发表于 2015-10-25 17:13:15 | 显示全部楼层
本帖最后由 MonsterJohnCN 于 2015-10-25 17:22 编辑

JAVASCRIPT 代码复制
  1. //=============================================================================
  2. // AltMenuScreen3.js
  3. //=============================================================================
  4.  
  5. /*:
  6.  * @plugindesc Yet Another menu screen layout.
  7.  * @author Sasuke KANNAZUKI, Yoji Ojima
  8.  *
  9.  * @param bgBitmapMenu
  10.  * @desc background bitmap file at menu scene. put at img/pictures.
  11.  * @default
  12.  *
  13.  * @param bgBitmapItem
  14.  * @desc background bitmap file at item scene. put at img/pictures.
  15.  * @default
  16.  *
  17.  * @param bgBitmapSkill
  18.  * @desc background bitmap file at skill scene. put at img/pictures.
  19.  * @default
  20.  *
  21.  * @param bgBitmapEquip
  22.  * @desc background bitmap file at equip scene. put at img/pictures.
  23.  * @default
  24.  *
  25.  * @param bgBitmapStatus
  26.  * @desc background bitmap file at status scene. put at img/pictures.
  27.  * @default
  28.  *
  29.  * @param bgBitmapOptions
  30.  * @desc background bitmap file at option scene. put at img/pictures.
  31.  * @default
  32.  *
  33.  * @param bgBitmapFile
  34.  * @desc background bitmap file at save/load scene. put at img/pictures.
  35.  * @default
  36.  *
  37.  * @param bgBitmapGameEnd
  38.  * @desc background bitmap file at gameEnd scene. put at img/pictures.
  39.  * @default
  40.  *
  41.  * @param maxColsMenu
  42.  * @desc max column at menu window
  43.  * @default 4
  44.  *
  45.  * @param commandRows
  46.  * @desc number of visible rows at command window
  47.  * @default 2
  48.  *
  49.  * @param isDisplayStatus
  50.  * @desc whether display status or not. (1 = yes, 0 = no)
  51.  * @default 1
  52.  *
  53.  * @help This plugin does not provide plugin commands.
  54.  *  The differences with AltMenuscreen are follows:
  55.  *   - windows are transparent at all menu scene.
  56.  *   - it can set the background bitmap for each scenes at menu.
  57.  *   - picture is actors' original
  58.  *
  59.  * Actor' note:
  60.  * <stand_picture:filename> set actor's standing picture at menu.
  61.  *   put file at img/pictures.
  62.  *
  63.  * preferred size of actor's picture:
  64.  * width: 174px(maxColsMenu=4), 240px(maxColsMenu=3)
  65.  * height: 408px(commandRows=2), 444px(commandRows=1)
  66.  */
  67.  
  68. /*:ja
  69.  * @plugindesc レイアウトの異なるメニュー画面
  70.  * @author 神無月サスケ, Yoji Ojima
  71.  *
  72.  * @param bgBitmapMenu
  73.  * @desc メニュー背景にするビットマップファイルです。
  74.  * img/pictures に置いてください。
  75.  * @default
  76.  *
  77.  * @param bgBitmapItem
  78.  * @desc アイテム画面背景にするビットマップファイルです。
  79.  * img/pictures に置いてください。
  80.  * @default
  81.  *
  82.  * @param bgBitmapSkill
  83.  * @desc スキル画面背景にするビットマップファイルです。
  84.  * img/pictures に置いてください。
  85.  * @default
  86.  *
  87.  * @param bgBitmapEquip
  88.  * @desc 装備画面背景にするビットマップファイルです。
  89.  * img/pictures に置いてください。
  90.  * @default
  91.  *
  92.  * @param bgBitmapStatus
  93.  * @desc ステータス画面背景にするビットマップファイルです。
  94.  * img/pictures に置いてください。
  95.  * @default
  96.  *
  97.  * @param bgBitmapOptions
  98.  * @desc オプション画面背景にするビットマップファイルです。
  99.  * img/pictures に置いてください。
  100.  * @default
  101.  *
  102.  * @param bgBitmapFile
  103.  * @desc セーブ/ロード画面背景にするビットマップファイルです。
  104.  * img/pictures に置いてください。
  105.  * @default
  106.  *
  107.  * @param bgBitmapGameEnd
  108.  * @desc ゲーム終了画面背景にするビットマップファイルです。
  109.  * img/pictures に置いてください。
  110.  * @default
  111.  *
  112.  * @param maxColsMenu
  113.  * @desc アクターを表示するウィンドウの1画面の登録最大数です。
  114.  * @default 4
  115.  *
  116.  * @param commandRows
  117.  * @desc コマンドウィンドウの行数です。
  118.  * @default 2
  119.  *
  120.  * @param isDisplayStatus
  121.  * @desc ステータスを表示するかしないかを選びます。(1 = yes, 0 = no)
  122.  * @default 1
  123.  *
  124.  * @help このプラグインには、プラグインコマンドはありません。
  125.  *
  126.  *  AltMenuscreen との違いは以下です:
  127.  *  - メニュー画面すべてのウィンドウが透明です
  128.  *  - メニューそれぞれのシーンに背景ビットマップを付けることが出来ます。
  129.  *  - アクターに立ち絵を利用します。
  130.  *
  131.  * アクターのメモに以下のように書いてください:
  132.  * <stand_picture:ファイル名> ファイル名が、そのアクターの立ち絵になります。
  133.  *   ファイルは img/pictures に置いてください。
  134.  *
  135.  * 望ましいアクター立ち絵のサイズ:
  136.  * 幅:3列:240px, 4列:174px
  137.  * 高さ: コマンドウィンドウ 1行:444px 2行:408px
  138.  *
  139.  */
  140.  
  141. /*:ch
  142.  * @plugindesc
  143.  * 比AltMenuScreen2更厉害的ESC菜单布局插件
  144.  *
  145.  * @author
  146.  * Sasuke KANNAZUKI, Yoji Ojima
  147.  *
  148.  * @param bgBitmapMenu
  149.  * @desc 菜单界面背景图,将图片资源放在img/pictures文件夹下。
  150.  * @default
  151.  *
  152.  * @param bgBitmapItem
  153.  * @desc 物品界面背景图,将图片资源放在img/pictures文件夹下。
  154.  * @default
  155.  *
  156.  * @param bgBitmapSkill
  157.  * @desc 技能界面背景图,将图片资源放在img/pictures文件夹下。
  158.  * @default
  159.  *
  160.  * @param bgBitmapEquip
  161.  * @desc 装备界面背景图,将图片资源放在img/pictures文件夹下。
  162.  * @default
  163.  *
  164.  * @param bgBitmapStatus
  165.  * @desc 状态界面背景图,将图片资源放在img/pictures文件夹下。
  166.  * @default
  167.  *
  168.  * @param bgBitmapOptions
  169.  * @desc 设置界面背景图,将图片资源放在img/pictures文件夹下。
  170.  * @default
  171.  *
  172.  * @param bgBitmapFile
  173.  * @desc 存读档界面背景图,将图片资源放在img/pictures文件夹下。
  174.  * @default
  175.  *
  176.  * @param bgBitmapGameEnd
  177.  * @desc 游戏结束界面背景图,将图片资源放在img/pictures文件夹下。
  178.  * @default
  179.  *
  180.  * @param maxColsMenu
  181.  * @desc 菜单窗口的显示项目的最大列数。
  182.  * @default 4
  183.  *
  184.  * @param commandRows
  185.  * @desc 指令窗口的显示项目的最大行数。
  186.  * @default 2
  187.  *
  188.  * @param isDisplayStatus
  189.  * @desc 是否显示角色状态信息。(1 = 显示, 0 = 不显示)
  190.  * @default 1
  191.  *
  192.  * 本插件与AltMenuScreen插件的不同有以下几点:
  193.  * - 默认所有窗口背景图都是不可见的
  194.  * - 可以自己设定窗口背景图
  195.  * - 可定制角色的菜单显示图(默认为脸图)
  196.  *   - 在角色的备注内填写<stand_picture:filename>,即可设置角色的菜单显示图
  197.  *   - 注意图片应当放置在img/pictures目录下
  198.  *   - filename不含后缀
  199.  *
  200.  * 角色的菜单显示图的最佳尺寸:
  201.  * - 菜单最大列数为4时,宽度为174像素。
  202.  * - 菜单最大列数为3时,宽度为240像素。
  203.  * - 指令选项行数为2时,高度为408像素。
  204.  * - 指令选项行数为1时,高度为444像素。
  205.  */
  206.  
  207. (function() {
  208.  
  209.     // set parameters                                                                   // 获取参数
  210.     var parameters = PluginManager.parameters('AltMenuScreen3');                        // 获取插件管理器中AltMenuScreen3的参数列表
  211.     var bgBitmapMenu = parameters['bgBitmapMenu'] || '';                                // 获取菜单界面背景图地址,如果没有,则标记为空
  212.     var bgBitmapItem = parameters['bgBitmapItem'] || '';                                // 获取物品界面背景图地址,如果没有,则标记为空
  213.     var bgBitmapSkill = parameters['bgBitmapSkill'] || '';                              // 获取技能界面背景图地址,如果没有,则标记为空
  214.     var bgBitmapEquip = parameters['bgBitmapEquip'] || '';                              // 获取装备界面背景图地址,如果没有,则标记为空
  215.     var bgBitmapStatus = parameters['bgBitmapStatus'] || '';                            // 获取状态界面背景图地址,如果没有,则标记为空
  216.     var bgBitmapOptions = parameters['bgBitmapOptions'] || '';                          // 获取设置界面背景图地址,如果没有,则标记为空
  217.     var bgBitmapFile = parameters['bgBitmapFile'] || '';                                // 获取存读档界面背景图地址,如果没有,则标记为空
  218.     var bgBitmapGameEnd = parameters['bgBitmapGameEnd'] || '';                          // 获取游戏结束界面背景图地址,如果没有,则标记为空
  219.     var maxColsMenuWnd = Number(parameters['maxColsMenu'] || 4);                        // 菜单窗口项目最大列数
  220.     var rowsCommandWnd = Number(parameters['commandRows'] || 2);                        // 指令窗口项目最大行数
  221.     var isDisplayStatus = !!Number(parameters['isDisplayStatus']);                      // 是否显示角色状态内容
  222.  
  223.     //                                                                                  //
  224.     // make transparent windows for each scenes in menu.                                // 设置所有菜单界面中的窗口的透明度
  225.     //                                                                                  //
  226.     var _Scene_Menu_create = Scene_Menu.prototype.create;                               // 用_Scene_Menu_create指向原始的创建菜单界面函数
  227.     Scene_Menu.prototype.create = function() {                                          // 追加用于本插件的创建菜单界面函数
  228.         _Scene_Menu_create.call(this);                                                      // 调用原始的创建菜单界面函数
  229.         this._statusWindow.x = 0;                                                           // 设置状态窗口的X坐标为0
  230.         this._statusWindow.y = this._commandWindow.height;                                  // 设置状态窗口的Y坐标为指令窗口的高度
  231.         this._goldWindow.x = Graphics.boxWidth - this._goldWindow.width;                    // 设置金币窗口的X坐标为游戏窗口的宽度 - 金币窗口的宽度
  232.         // make transparent for all windows at menu scene.                                  // 注释:设置ESC菜单界面内的所有窗口的透明度为0
  233.         this._statusWindow.opacity = 0;                                                     // 设置状态窗口的透明度为0
  234.         this._goldWindow.opacity = 0;                                                       // 设置金币窗口的透明度为0
  235.         this._commandWindow.opacity = 0;                                                    // 设置指令窗口的透明度为0
  236.     };
  237.  
  238.     var _Scene_Item_create = Scene_Item.prototype.create;                               // 用_Scene_Item_create指向原始的创建物品界面函数
  239.     Scene_Item.prototype.create = function() {                                          // 追加用于本插件的创建物品界面函数
  240.         _Scene_Item_create.call(this);                                                      // 调用原始的创建物品界面函数
  241.         this._helpWindow.opacity = 0;                                                       // 设置帮助窗口的透明度为0
  242.         this._categoryWindow.opacity = 0;                                                   // 设置对话窗口的透明度为0
  243.         this._itemWindow.opacity = 0;                                                       // 设置物品窗口的透明度为0
  244.         this._actorWindow.opacity = 0;                                                      // 设置角色窗口的透明度为0
  245.     };
  246.  
  247.     var _Scene_Skill_create = Scene_Skill.prototype.create;                             // 用_Scene_Skill_create指向原始的创建技能界面函数
  248.     Scene_Skill.prototype.create = function() {                                         // 追加用于本插件的创建技能界面函数
  249.         _Scene_Skill_create.call(this);                                                     // 调用原始的创建技能界面函数
  250.         this._helpWindow.opacity = 0;                                                       // 设置帮助窗口的透明度为0
  251.         this._skillTypeWindow.opacity = 0;                                                  // 设置技能类型窗口的透明度为0
  252.         this._statusWindow.opacity = 0;                                                     // 设置状态窗口的透明度为0
  253.         this._itemWindow.opacity = 0;                                                       // 设置物品窗口的透明度为0
  254.         this._actorWindow.opacity = 0;                                                      // 设置角色窗口的透明度为0
  255.     };
  256.  
  257.     var _Scene_Equip_create = Scene_Equip.prototype.create;                             // 用_Scene_Equip_create指向原始的创建装备界面函数
  258.     Scene_Equip.prototype.create = function() {                                         // 追加用于本插件的创建装备界面函数
  259.         _Scene_Equip_create.call(this);                                                     // 调用原始的创建装备界面函数
  260.         this._helpWindow.opacity = 0;                                                       // 设置帮助窗口的透明度为0
  261.         this._statusWindow.opacity = 0;                                                     // 设置状态窗口的透明度为0
  262.         this._commandWindow.opacity = 0;                                                    // 设置指令窗口的透明度为0
  263.         this._slotWindow.opacity = 0;                                                       // 设置装备槽窗口的透明度为0
  264.         this._itemWindow.opacity = 0;                                                       // 设置物品窗口的透明度为0
  265.     };
  266.  
  267.     var _Scene_Status_create = Scene_Status.prototype.create;                           // 用_Scene_Status_create指向原始的创建状态界面函数
  268.     Scene_Status.prototype.create = function() {                                        // 追加用于本插件的创建状态界面函数
  269.         _Scene_Status_create.call(this);                                                    // 调用原始的创建状态界面函数
  270.         this._statusWindow.opacity = 0;                                                     // 设置状态窗口的透明度为0
  271.     };
  272.  
  273.     var _Scene_Options_create = Scene_Options.prototype.create;                         // 用_Scene_Options_create指向原始的创建设置界面函数
  274.     Scene_Options.prototype.create = function() {                                       // 追加用于本插件的创建设置界面函数
  275.         _Scene_Options_create.call(this);                                                   // 调用原始的创建设置界面函数
  276.         this._optionsWindow.opacity = 0;                                                    // 设置设置窗口的透明度为0 ... 设置设置是什么鬼(╯‵□′)╯︵┻━┻
  277.     };
  278.  
  279.     var _Scene_File_create = Scene_File.prototype.create;                               // 用_Scene_File_create指向原始的创建存读档界面函数
  280.     Scene_File.prototype.create = function() {                                          // 追加用于本插件的创建存读档界面函数
  281.         _Scene_File_create.call(this);                                                      // 调用原始的创建存读档界面函数
  282.         this._helpWindow.opacity = 0;                                                       // 设置帮助窗口的透明度为0
  283.         this._listWindow.opacity = 0;                                                       // 设置列表窗口的透明度为0
  284.     };
  285.  
  286.     var _Scene_GameEnd_create = Scene_GameEnd.prototype.create;                         // 用_Scene_File_create指向原始的创建游戏结束界面函数
  287.     Scene_GameEnd.prototype.create = function() {                                       // 追加用于本插件的创建游戏结束界面函数
  288.         _Scene_GameEnd_create.call(this);                                                   // 调用原始的创建游戏结束界面函数
  289.         this._commandWindow.opacity = 0;                                                    // 设置指令窗口的透明度为0
  290.     };
  291.  
  292.     //                                                                                  //
  293.     // load bitmap that set in plugin parameters                                        // 载入插件参数数据中指定的图片
  294.     //                                                                                  //
  295.     var _Scene_Menu_createBackground = Scene_Menu.prototype.createBackground;           // 用_Scene_Menu_createBackground指向原始的创建游戏菜单界面背景函数
  296.     Scene_Menu.prototype.createBackground = function(){                                 // 追加用于本插件的创建游戏菜单界面背景函数
  297.         if(bgBitmapMenu){                                                                   // 如果游戏菜单界面背景图参数不是空的
  298.             this._backgroundSprite = new Sprite();                                              // 创建一个新的背景图精灵
  299.             this._backgroundSprite.bitmap = ImageManager.loadPicture(bgBitmapMenu);             // 调用图片管理器,为背景图精灵创建游戏菜单背景图
  300.             this.addChild(this._backgroundSprite);                                              // 将背景图精灵添加到游戏菜单界面
  301.             return;                                                                             // 结束本次调用
  302.         }
  303.         // if background file is invalid, it does original process.                         // 如果游戏菜单背景图参数是空的,就执行原本的逻辑
  304.         _Scene_Menu_createBackground.call(this);                                                // 调用原始的创建游戏菜单背景函数
  305.     };
  306.  
  307.     var _Scene_Item_createBackground = Scene_Item.prototype.createBackground;           // 用_Scene_Item_createBackground指向原始的创建游戏物品界面背景函数
  308.     Scene_Item.prototype.createBackground = function(){                                 // 追加用于本插件的创建游戏物品界面背景函数
  309.         if(bgBitmapItem){                                                                   // 如果游戏物品界面背景图参数不是空的
  310.             this._backgroundSprite = new Sprite();                                              // 创建一个新的背景图精灵
  311.             this._backgroundSprite.bitmap = ImageManager.loadPicture(bgBitmapItem);             // 调用图片管理器,为背景图精灵创建物品界面背景图
  312.             this.addChild(this._backgroundSprite);                                              // 将背景图精灵添加到游戏菜单界面
  313.             return;                                                                             // 结束本次调用
  314.         }
  315.         // if background file is invalid, it does original process.                         // 如果游戏物品界面背景图参数是空的,就执行原本的逻辑
  316.         _Scene_Item_createBackground.call(this);                                                // 调用原始的创建游戏物品界面背景函数
  317.     };
  318.  
  319.     var _Scene_Skill_createBackground = Scene_Skill.prototype.createBackground;         // 用_Scene_Skill_createBackground指向原始的创建游戏技能界面背景函数
  320.     Scene_Skill.prototype.createBackground = function(){                                // 追加用于本插件的创建游戏技能界面背景函数
  321.         if(bgBitmapSkill){                                                                  // 如果游戏技能界面背景图参数不是空的
  322.             this._backgroundSprite = new Sprite();                                              // 创建一个新的背景图精灵
  323.             this._backgroundSprite.bitmap = ImageManager.loadPicture(bgBitmapSkill);            // 调用图片管理器,为背景图精灵创建技能界面背景图
  324.             this.addChild(this._backgroundSprite);                                              // 将背景图精灵添加到游戏菜单界面
  325.             return;                                                                             // 结束本次调用
  326.         }
  327.         // if background file is invalid, it does original process.                         // 如果游戏技能界面背景图参数是空的,就执行原本的逻辑
  328.         _Scene_Skill_createBackground.call(this);                                                // 调用原始的创建游戏技能界面背景函数
  329.     };
  330.  
  331.     var _Scene_Equip_createBackground = Scene_Equip.prototype.createBackground;          // 用_Scene_Equip_createBackground指向原始的创建游戏装备界面背景函数
  332.     Scene_Equip.prototype.createBackground = function(){                                 // 追加用于本插件的创建游戏装备界面背景函数
  333.         if(bgBitmapEquip){                                                                   // 如果游戏装备界面背景图参数不是空的
  334.             this._backgroundSprite = new Sprite();                                               // 创建一个新的背景图精灵
  335.             this._backgroundSprite.bitmap = ImageManager.loadPicture(bgBitmapEquip);             // 调用图片管理器,为背景图精灵创建装备界面背景图
  336.             this.addChild(this._backgroundSprite);                                               // 将背景图精灵添加到游戏菜单界面
  337.             return;                                                                              // 结束本次调用
  338.         }
  339.         // if background file is invalid, it does original process.                          // 如果游戏装备界面背景图参数是空的,就执行原本的逻辑
  340.         _Scene_Equip_createBackground.call(this);                                                 // 调用原始的创建游戏装备界面背景函数
  341.     };
  342.  
  343.     var _Scene_Status_createBackground = Scene_Status.prototype.createBackground;       // 用_Scene_Status_createBackground指向原始的创建游戏状态界面背景函数
  344.     Scene_Status.prototype.createBackground = function(){                               // 追加用于本插件的创建游戏状态界面背景函数
  345.         if(bgBitmapStatus){                                                                 // 如果游戏状态界面背景图参数不是空的
  346.             this._backgroundSprite = new Sprite();                                              // 创建一个新的背景图精灵
  347.             this._backgroundSprite.bitmap = ImageManager.loadPicture(bgBitmapStatus);           // 调用图片管理器,为背景图精灵创建状态界面背景图
  348.             this.addChild(this._backgroundSprite);                                              // 将背景图精灵添加到游戏菜单界面
  349.             return;                                                                             // 结束本次调用
  350.         }
  351.         // if background file is invalid, it does original process.s                        // 如果游戏状态界面背景图参数是空的,就执行原本的逻辑
  352.         _Scene_Status_createBackground.call(this);                                               // 调用原始的创建游戏状态界面背景函数
  353.     };
  354.  
  355.     var _Scene_Options_createBackground = Scene_Options.prototype.createBackground;     // 用_Scene_Options_createBackground指向原始的创建游戏设置界面背景函数
  356.     Scene_Options.prototype.createBackground = function(){                              // 追加用于本插件的创建游戏设置界面背景函数
  357.         if(bgBitmapOptions){                                                                // 如果游戏设置界面背景图参数不是空的
  358.             this._backgroundSprite = new Sprite();                                              // 创建一个新的背景图精灵
  359.             this._backgroundSprite.bitmap = ImageManager.loadPicture(bgBitmapOptions);          // 调用图片管理器,为背景图精灵创建设置界面背景图
  360.             this.addChild(this._backgroundSprite);                                              // 将背景图精灵添加到游戏菜单界面
  361.             return;                                                                             // 结束本次调用
  362.         }
  363.         // if background file is invalid, it does original process.                         // 如果游戏设置界面背景图参数是空的,就执行原本的逻辑
  364.         _Scene_Options_createBackground.call(this);                                              // 调用原始的创建游戏设置界面背景函数
  365.     };
  366.  
  367.     var _Scene_File_createBackground = Scene_File.prototype.createBackground;           // 用_Scene_File_createBackground指向原始的创建游戏存读档界面背景函数
  368.     Scene_File.prototype.createBackground = function(){                                 // 追加用于本插件的创建游戏存读档界面背景函数
  369.         if(bgBitmapFile){                                                                   // 如果游戏存读档界面背景图参数不是空的
  370.             this._backgroundSprite = new Sprite();                                              // 创建一个新的背景图精灵
  371.             this._backgroundSprite.bitmap = ImageManager.loadPicture(bgBitmapFile);             // 调用图片管理器,为背景图精灵创建存读档界面背景图
  372.             this.addChild(this._backgroundSprite);                                              // 将背景图精灵添加到游戏菜单界面
  373.             return;                                                                             // 结束本次调用
  374.         }
  375.         // if background file is invalid, it does original process.                         // 如果游戏存读档界面背景图参数是空的,就执行原本的逻辑
  376.         _Scene_File_createBackground.call(this);                                                 // 调用原始的创建游戏存读档界面背景函数
  377.     };
  378.  
  379.     var _Scene_GameEnd_createBackground = Scene_GameEnd.prototype.createBackground;     // 用_Scene_GameEnd_createBackground指向原始的创建游戏结束界面背景函数
  380.     Scene_GameEnd.prototype.createBackground = function(){                              // 追加用于本插件的创建游戏结束界面背景函数
  381.         if(bgBitmapGameEnd){                                                                // 如果游戏结束界面背景图参数不是空的
  382.             this._backgroundSprite = new Sprite();                                              // 创建一个新的背景图精灵
  383.             this._backgroundSprite.bitmap = ImageManager.loadPicture(bgBitmapGameEnd);          // 调用图片管理器,为背景图精灵创建结束界面背景图
  384.             this.addChild(this._backgroundSprite);                                              // 将背景图精灵添加到游戏菜单界面
  385.             return;                                                                             // 结束本次调用
  386.         }
  387.         // if background file is invalid, it does original process.                         // 如果游戏结束界面背景图参数是空的,就执行原本的逻辑
  388.         _Scene_GameEnd_createBackground.call(this);                                              // 调用原始的创建游戏结束界面背景函数
  389.     };
  390.  
  391.     //                                                                                  //
  392.     // alt menu screen processes                                                        // 修改菜单界面的实际逻辑进程
  393.     //                                                                                  //
  394.     Window_MenuCommand.prototype.windowWidth = function() {                             // 重定义指令窗口的宽度
  395.         return Graphics.boxWidth;                                                           // 返回游戏窗口宽度
  396.     };
  397.  
  398.     Window_MenuCommand.prototype.maxCols = function() {                                 // 重定义指令窗口项目的最大列数
  399.         return 4;                                                                           // 返回⑨
  400.     };
  401.  
  402.     Window_MenuCommand.prototype.numVisibleRows = function() {                          // 重定义指令窗口项目的可见行数
  403.         return rowsCommandWnd;                                                              // 返回“指令行数(参数)”
  404.     };
  405.  
  406.     Window_MenuStatus.prototype.windowWidth = function() {                              // 重定义状态窗口的宽度
  407.         return Graphics.boxWidth;                                                           // 返回游戏窗口宽度
  408.     };
  409.  
  410.     Window_MenuStatus.prototype.windowHeight = function() {                             // 重定义状态窗口的高度
  411.         var h1 = this.fittingHeight(1);                                                     // 【?】自动适配1行项目的高度
  412.         var h2 = this.fittingHeight(rowsCommandWnd);                                        // 【?】自动适配“指令行数(参数)”行项目的高度
  413.         return Graphics.boxHeight - h1 - h2;                                                // 返回游戏窗口高度-【?】-【?】
  414.     };
  415.  
  416.     Window_MenuStatus.prototype.maxCols = function() {                                  // 重定义状态窗口的最大列数
  417.         return maxColsMenuWnd;                                                              // 返回“指令列数(参数)”
  418.     };
  419.  
  420.     Window_MenuStatus.prototype.numVisibleRows = function() {                           // 重定义状态窗口的可见行数
  421.         return 1;                                                                           // 返回奥特曼变身器
  422.     };
  423.  
  424.     Window_MenuStatus.prototype.drawItemImage = function(index) {                       // 重定义状态窗口的项目图片绘制函数
  425.         var actor = $gameParty.members()[index];                                            // 获取角色队伍中排序为index的角色
  426.         var rect = this.itemRectForText(index);                                             // 获取排序为index的项目图片绘制区域
  427.         // load stand_picture                                                               // 注释:读取标准角色图
  428.         var bitmapName = $dataActors[actor.actorId()].meta.stand_picture;                   // 【?】读取当前角色的标准角色图名字
  429.         var bitmap = bitmapName ? ImageManager.loadPicture(bitmapName) : null;              // 如果角色图名字不为空,则载入角色图,否则不载入图片
  430.         var w = Math.min(rect.width, (bitmapName ? bitmap.width : 144));                    // 如果角色图名字不为空,则读取项目图片绘制区域或角色图的宽度中较小的一个,如果没有角色图,则认为角色图宽度为144
  431.         var h = Math.min(rect.height, (bitmapName ? bitmap.height : 144));                  // 如果角色图名字不为空,则读取项目图片绘制区域或角色图的高度中较小的一个,如果没有角色图,则认为角色图高度为144
  432.         var lineHeight = this.lineHeight();                                                 // 读取状态窗口的行高
  433.         this.changePaintOpacity(actor.isBattleMember());                                    // 【?】改变绘制功能的透明度
  434.         if(bitmap){                                                                         // 如果存在角色图
  435.             var sx = (bitmap.width > w) ? (bitmap.width - w) / 2 : 0;                           // 一套算法,用于计算出适配角色图的区域坐标
  436.             var sy = (bitmap.height > h) ? (bitmap.height - h) / 2 : 0;                         // ...
  437.             var dx = (bitmap.width > rect.width) ? rect.x :                                     // ...
  438.                 rect.x + (rect.width - bitmap.width) / 2;                                       // ...
  439.             var dy = (bitmap.height > rect.height) ? rect.y :                                   // ...
  440.                 rect.y + (rect.height - bitmap.height) / 2;                                     // ...
  441.             this.contents.blt(bitmap, sx, sy, w, h, dx, dy);                                    // ...
  442.         } else { // when bitmap is not set, do the original process.                        // 如果不存在角色图,则调用原始的状态窗口的项目图片绘制函数
  443.             this.drawActorFace(actor, rect.x, rect.y + lineHeight * 2.5, w, h);                 // 为当前角色绘制角色图(脸图)
  444.         }
  445.         this.changePaintOpacity(true);                                                      // 【?】恢复绘制功能的透明度
  446.     };
  447.  
  448.     Window_MenuStatus.prototype.drawItemStatus = function(index) {                      // 重定义状态窗口的项目属性绘制函数
  449.         if(!isDisplayStatus){                                                               // 如果“是否显示角色状态(参数)”为否
  450.             return;                                                                             // 结束本次调用
  451.         }
  452.         var actor = $gameParty.members()[index];                                            // 读取角色队伍中排序为index的角色
  453.         var rect = this.itemRectForText(index);                                             // 读取排序为index的项目图片绘制区域
  454.         var x = rect.x;                                                                     // 获取排序为index的项目图片绘制区域的X坐标
  455.         var y = rect.y;                                                                     // 获取排序为index的项目图片绘制区域的Y坐标
  456.         var width = rect.width;                                                             // 获取排序为index的项目图片绘制区域的宽度
  457.         var bottom = y + rect.height;                                                       // 获取排序为index的项目图片绘制区域的底部坐标
  458.         var lineHeight = this.lineHeight();                                                 // 获取状态窗口的行高
  459.         this.drawActorName(actor, x, y + lineHeight * 0, width);                            // 绘制排序为index的角色姓名
  460.         this.drawActorLevel(actor, x, y + lineHeight * 1, width);                           // 绘制排序为index的角色等级
  461.         this.drawActorClass(actor, x, bottom - lineHeight * 4, width);                      // 绘制排序为index的角色职业
  462.         this.drawActorHp(actor, x, bottom - lineHeight * 3, width);                         // 绘制排序为index的角色生命值
  463.         this.drawActorMp(actor, x, bottom - lineHeight * 2, width);                         // 绘制排序为index的角色魔法值
  464.         this.drawActorIcons(actor, x, bottom - lineHeight * 1, width);                      // 【?】绘制排序为index的角色状态图标
  465.     };
  466.  
  467.     var _Window_MenuActor_initialize = Window_MenuActor.prototype.initialize;           // 用_Window_MenuActor_initialize指向原始的菜单角色初始化函数
  468.     Window_MenuActor.prototype.initialize = function() {                                // 重定义菜单角色初始化函数
  469.         _Window_MenuActor_initialize.call(this);                                            // 调用原始的菜单角色初始化函数
  470.         this.y = this.fittingHeight(2);                                                     // 【?】设置菜单角色的Y坐标为两行项目的行高
  471.     };
  472.  
  473. })();
实力跳票,根本停不下来…… | bgpCore.js | 《下一站》2号DEMO | 插件开发无限延期中……正在研制适用性更强的普适模板,不再输出单体插件……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-3-29 04:07

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表