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

Project1

 找回密码
 注册会员
搜索
查看: 21904|回复: 46

[原创发布] 【MZ】MV插件适配器 (更新:8/22)

[复制链接]

Lv5.捕梦者

梦石
0
星屑
31688
在线时间
5077 小时
注册时间
2012-11-19
帖子
4877

开拓者

发表于 2020-8-22 07:07:20 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 芯☆淡茹水 于 2020-8-22 18:54 编辑

  
   一个MZ出来之前的想法,做一个 中转或者说是适配插件 ,来让MZ尽可能的兼容MV的插件。

  该插件个人在发现有适配内容时,有空时会持续更新。

  也可以将MZ使用MV插件时,报错截图发出来,个人会视情况来更改和更新。


RUBY 代码复制
  1. //==============================================================================================================
  2. // MV -> MZ  Adapter.js
  3. //==============================================================================================================
  4. /*:
  5. * @target MZ
  6. * @plugindesc MV插件适配器.
  7. * @author 芯☆淡茹水
  8. *
  9. * @help
  10. *
  11. * 使用该插件,尽可能的将 MV系列插件 兼容到 MZ 。
  12. *
  13. * 调用 MV插件命令 方法:
  14. * 事件 - 脚本:
  15. * 第一行写标志 <MvPluginCommand>
  16. * 第二行写需要执行的MV插件命令
  17. * 第三行以及以下,依次序写该插件命令的参数。注意:一个参数就是一行 !!!
  18. *
  19. * 示例:执行MV插件命令 CommandTest , 参数依次为 5, ABC, true
  20. * 事件 - 脚本:
  21. * <MvPluginCommand>
  22. * CommandTest
  23. * 5
  24. * ABC
  25. * true
  26. *
  27. *==============================================================================================================
  28. *
  29. * @param closeSmoothing
  30. * @text 是否关闭图像平滑处理。
  31. * @type boolean
  32. * @desc 是否关闭图像平滑处理。
  33. * @default false
  34. *
  35. *
  36. */
  37. //==============================================================================================================
  38. ;var XdRsData = XdRsData || {};
  39. XdRsData.adapter = {};
  40. XdRsData.adapter.parameters = PluginManager.parameters('XdRs_MvPluginAdapter');
  41. //==============================================================================================================
  42. XdRsData.adapter.isCloseSmooth = function() {
  43.     return this.parameters['closeSmoothing'] === 'true';
  44. };
  45. //==============================================================================================================
  46. Bitmap.prototype._setDirty = function() {
  47.     this._baseTexture.update();
  48. };
  49. //==============================================================================================================
  50. DataManager.isThisGameFile = function(savefileId) {
  51.     return !!this.savefileInfo(savefileId);
  52. };
  53. DataManager.loadSavefileInfo = function(savefileId) {
  54.     return this.savefileInfo(savefileId);
  55. };
  56. DataManager.lastAccessedSavefileId = function() {
  57.     return $gameSystem.savefileId();
  58. };
  59. //==============================================================================================================
  60. BattleManager.setStatusWindow = function(window) {
  61.     // 弃用。
  62. };
  63. //==============================================================================================================
  64. XdRsData.adapter.Bitmap_initialize = Bitmap.prototype.initialize;
  65. Bitmap.prototype.initialize = function(width, height) {
  66.     XdRsData.adapter.Bitmap_initialize.call(this, width, height);
  67.     this._smooth = !XdRsData.adapter.isCloseSmooth();
  68. };
  69. //==============================================================================================================
  70. Game_Battler.prototype.startAnimation = function(animationId, mirror) {
  71.     $gameTemp.requestAnimation([this], animationId, mirror);
  72. };
  73. Game_Battler.prototype.isAnimationRequested = function() {
  74.     return false;
  75. };
  76. Game_Battler.prototype.shiftAnimation = function() {
  77.     return null;
  78. };
  79. //==============================================================================================================
  80. Game_CharacterBase.prototype.requestAnimation = function(animationId) {
  81.     $gameTemp.requestAnimation([this], animationId);
  82. };
  83. Game_CharacterBase.prototype.animationId = function() {
  84.     return 0;
  85. };
  86. //==============================================================================================================
  87. XdRsData.adapter.Game_Interpreter_command355 = Game_Interpreter.prototype.command355;
  88. Game_Interpreter.prototype.command355 = function() {
  89.     if (/<MvPluginCommand>/.test(this.currentCommand().parameters[0])) {
  90.         return this.analysisMvPluginCommand();
  91.     }
  92.     return XdRsData.adapter.Game_Interpreter_command355.call(this);
  93. };
  94. Game_Interpreter.prototype.analysisMvPluginCommand = function() {
  95.     var command = null, args = [];
  96.     if (this.nextEventCode() === 655) {
  97.         this._index++;
  98.         command = this.currentCommand().parameters[0];
  99.     }
  100.     while (this.nextEventCode() === 655) {
  101.         this._index++;
  102.         args.push(this.currentCommand().parameters[0]);
  103.     }
  104.     this.pluginCommand(command, args);
  105.     return true;
  106. };
  107. //==============================================================================================================
  108. function Sprite_Base() {
  109.     this.initialize(...arguments);
  110. }
  111. Sprite_Base.prototype = Object.create(Sprite.prototype);
  112. Sprite_Base.prototype.constructor = Sprite_Base;
  113. //==============================================================================================================
  114. Window_Base._iconWidth  = ImageManager.iconWidth;
  115. Window_Base._iconHeight = ImageManager.iconHeight;
  116. Window_Base._faceWidth  = ImageManager.faceWidth;
  117. Window_Base._faceHeight = ImageManager.faceHeight;
  118.  
  119. XdRsData.adapter.Window_Base_initialize = Window_Base.prototype.initialize;
  120. Window_Base.prototype.initialize = function() {
  121.     const [x, y, w, h] = arguments;
  122.     if (y === undefined) XdRsData.adapter.Window_Base_initialize.call(this, x);
  123.     else XdRsData.adapter.Window_Base_initialize.call(this, new Rectangle(x, y, w, h));
  124. };
  125. Window_Base.prototype.standardFontFace = function() {
  126.     return $gameSystem.mainFontFace();
  127. };
  128. Window_Base.prototype.standardFontSize = function() {
  129.     return $gameSystem.mainFontSize();
  130. };
  131. Window_Base.prototype.standardPadding = function() {
  132.     return $gameSystem.windowPadding();
  133. };
  134. Window_Base.prototype.textPadding = function() {
  135.     return this.itemPadding();
  136. };
  137. Window_Base.prototype.textColor = function(n) {
  138.     return ColorManager.textColor(n);
  139. };
  140. //==============================================================================================================
  141. // end
  142. //==============================================================================================================



XdRs_MvPluginAdapter(8-22).rar (1.54 KB, 下载次数: 898, 售价: 1 星屑)

评分

参与人数 7+7 收起 理由
zxgo24 + 1 精品文章
beiduo + 1 精品文章
pkeasygod + 1 精品文章
2498126422 + 1 精品文章
frost_king_hw + 1 精品文章
dsif + 1 精品文章
白嫩白嫩的 + 1 精品文章

查看全部评分

xp vx va mv  va mz 各类型脚本/插件定制

Lv3.寻梦者

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
帖子
1516
发表于 2020-8-22 07:59:39 | 显示全部楼层
太强了!
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1524
在线时间
385 小时
注册时间
2012-8-28
帖子
59
发表于 2020-8-22 09:20:04 | 显示全部楼层
支持一下
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
492
在线时间
61 小时
注册时间
2018-5-20
帖子
14
发表于 2020-8-22 10:43:01 | 显示全部楼层
好厉害
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
562
在线时间
66 小时
注册时间
2019-12-7
帖子
6
发表于 2020-8-22 11:11:23 | 显示全部楼层
顶一下
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
14152
在线时间
718 小时
注册时间
2011-7-16
帖子
1428

开拓者

发表于 2020-8-22 11:24:22 | 显示全部楼层
支持大佬
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
127
在线时间
29 小时
注册时间
2020-8-21
帖子
11
发表于 2020-8-22 11:42:46 | 显示全部楼层
感谢楼主的无私奉献
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
562
在线时间
66 小时
注册时间
2019-12-7
帖子
6
发表于 2020-8-26 01:02:09 | 显示全部楼层
大佬流弊。
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
4550
在线时间
405 小时
注册时间
2008-1-18
帖子
405
发表于 2020-8-26 07:58:35 | 显示全部楼层
厉害,支持大佬
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1386
在线时间
117 小时
注册时间
2020-1-13
帖子
167
发表于 2020-8-30 15:13:08 | 显示全部楼层
支持  可以用了吗
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-3-29 17:02

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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