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

Project1

 找回密码
 注册会员
搜索
查看: 26590|回复: 52
打印 上一主题 下一主题

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

[复制链接]

Lv5.捕梦者

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

开拓者

跳转到指定楼层
1
发表于 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, 下载次数: 991, 售价: 1 星屑)
  

评分

参与人数 8+8 收起 理由
木火灵兽 + 1 精品文章
zxgo24 + 1 精品文章
beiduo + 1 精品文章
pkeasygod + 1 精品文章
2498126422 + 1 精品文章
frost_king_hw + 1 精品文章
dsif + 1 精品文章
白嫩白嫩的 + 1 精品文章

查看全部评分

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

Lv1.梦旅人

梦石
0
星屑
48
在线时间
19 小时
注册时间
2024-5-16
帖子
7
53
发表于 2025-4-27 20:34:39 | 只看该作者
支持  可以用了吗
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
12
在线时间
6 小时
注册时间
2024-5-2
帖子
9
52
发表于 2024-5-5 10:35:12 | 只看该作者
谢谢大佬分享
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
162
在线时间
57 小时
注册时间
2023-12-19
帖子
15
51
发表于 2024-4-24 07:38:35 | 只看该作者
大佬!恩人啊
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1001
在线时间
1111 小时
注册时间
2024-3-4
帖子
17
50
发表于 2024-4-18 19:42:05 | 只看该作者
支持一下
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
98
在线时间
7 小时
注册时间
2020-10-3
帖子
9
49
发表于 2024-4-18 09:32:58 | 只看该作者
支持技术大佬
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
37
在线时间
9 小时
注册时间
2024-4-9
帖子
7
48
发表于 2024-4-17 17:26:07 | 只看该作者
大佬NB啊
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2375
在线时间
438 小时
注册时间
2008-7-29
帖子
123
47
发表于 2024-1-19 16:35:21 | 只看该作者
支持  可以用了吗
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1424
在线时间
124 小时
注册时间
2018-7-31
帖子
55
46
发表于 2023-9-6 17:40:07 | 只看该作者
可以反过来么
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1040
在线时间
95 小时
注册时间
2008-2-4
帖子
84
45
发表于 2023-9-4 17:20:27 | 只看该作者
支持一下
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-7-27 17:23

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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