请选择 进入手机版 | 继续访问电脑版

江湖梦网游戏服务平台

 找回密码
 免费注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 3103|回复: 1

[搬运汉化] MV插件适配器

[复制链接]

449

帖子

41

精华

25

贡献

江湖英豪

检察者

Rank: 5Rank: 5Rank: 5

积分
7217
发表于 2020-11-30 15:38 | 显示全部楼层 |阅读模式

马上注册,享用更多精彩。

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

x
  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. XdRsData.adapter.Window_Base_initialize = Window_Base.prototype.initialize;
  119. Window_Base.prototype.initialize = function() {
  120.     const [x, y, w, h] = arguments;
  121.     if (y === undefined) XdRsData.adapter.Window_Base_initialize.call(this, x);
  122.     else XdRsData.adapter.Window_Base_initialize.call(this, new Rectangle(x, y, w, h));
  123. };
  124. Window_Base.prototype.standardFontFace = function() {
  125.     return $gameSystem.mainFontFace();
  126. };
  127. Window_Base.prototype.standardFontSize = function() {
  128.     return $gameSystem.mainFontSize();
  129. };
  130. Window_Base.prototype.standardPadding = function() {
  131.     return $gameSystem.windowPadding();
  132. };
  133. Window_Base.prototype.textPadding = function() {
  134.     return this.itemPadding();
  135. };
  136. Window_Base.prototype.textColor = function(n) {
  137.     return ColorManager.textColor(n);
  138. };
  139. //==============================================================================================================
  140. // end
  141. //==============================================================================================================
复制代码
做一个 中转或者说是适配插件 ,来让MZ尽可能的兼容MV的插件。


QQ群:135474765游戏群 [img]http://img2.17getfun.com/FhlesUf3VWxvhVFuc0qdBwYuanyt?imageMogr2/auto-orient/thumbnail/1080x%3E/format/jpg/

40

帖子

0

精华

0

贡献

江湖散人

Rank: 2Rank: 2

积分
65
发表于 2022-1-23 23:30 | 显示全部楼层
大佬  测试结果怎么样
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|手机版|Archiver|小黑屋|江湖梦网 ( 粤ICP备18126133号-1 )

GMT+8, 2024-3-28 23:38 , Processed in 0.213495 second(s), 25 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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