查看: 33819|回复: 60

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

[复制链接]
梦石
0
星屑
34457
在线时间
5096 小时
注册时间
2012-11-19
回帖
4715

开拓者

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

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

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

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

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

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

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


[pre lang="ruby"]//==============================================================================================================
// MV -> MZ  Adapter.js
//==============================================================================================================
/*:
* @target MZ
* @plugindesc MV插件适配器.
* @author 芯☆淡茹水
*
* @help
*
* 使用该插件,尽可能的将 MV系列插件 兼容到 MZ 。
*
* 调用 MV插件命令 方法:
* 事件 - 脚本:
* 第一行写标志 <MvPluginCommand>
* 第二行写需要执行的MV插件命令
* 第三行以及以下,依次序写该插件命令的参数。注意:一个参数就是一行 !!!
*
* 示例:执行MV插件命令 CommandTest , 参数依次为 5, ABC, true
* 事件 - 脚本:
* <MvPluginCommand>
* CommandTest
* 5
* ABC
* true
*
*==============================================================================================================
*
* @param closeSmoothing
* @text 是否关闭图像平滑处理。
* @type boolean
* @desc 是否关闭图像平滑处理。
* @default false
*
*
*/
//==============================================================================================================
;var XdRsData = XdRsData || {};
XdRsData.adapter = {};
XdRsData.adapter.parameters = PluginManager.parameters('XdRs_MvPluginAdapter');
//==============================================================================================================
XdRsData.adapter.isCloseSmooth = function() {
    return this.parameters['closeSmoothing'] === 'true';
};
//==============================================================================================================
Bitmap.prototype._setDirty = function() {
    this._baseTexture.update();
};
//==============================================================================================================
DataManager.isThisGameFile = function(savefileId) {
    return !!this.savefileInfo(savefileId);
};
DataManager.loadSavefileInfo = function(savefileId) {
    return this.savefileInfo(savefileId);
};
DataManager.lastAccessedSavefileId = function() {
    return $gameSystem.savefileId();
};
//==============================================================================================================
BattleManager.setStatusWindow = function(window) {
    // 弃用。
};
//==============================================================================================================
XdRsData.adapter.Bitmap_initialize = Bitmap.prototype.initialize;
Bitmap.prototype.initialize = function(width, height) {
    XdRsData.adapter.Bitmap_initialize.call(this, width, height);
    this._smooth = !XdRsData.adapter.isCloseSmooth();
};
//==============================================================================================================
Game_Battler.prototype.startAnimation = function(animationId, mirror) {
    $gameTemp.requestAnimation([this], animationId, mirror);
};
Game_Battler.prototype.isAnimationRequested = function() {
    return false;
};
Game_Battler.prototype.shiftAnimation = function() {
    return null;
};
//==============================================================================================================
Game_CharacterBase.prototype.requestAnimation = function(animationId) {
    $gameTemp.requestAnimation([this], animationId);
};
Game_CharacterBase.prototype.animationId = function() {
    return 0;
};
//==============================================================================================================
XdRsData.adapter.Game_Interpreter_command355 = Game_Interpreter.prototype.command355;
Game_Interpreter.prototype.command355 = function() {
    if (/<MvPluginCommand>/.test(this.currentCommand().parameters[0])) {
        return this.analysisMvPluginCommand();
    }
    return XdRsData.adapter.Game_Interpreter_command355.call(this);
};
Game_Interpreter.prototype.analysisMvPluginCommand = function() {
    var command = null, args = [];
    if (this.nextEventCode() === 655) {
        this._index++;
        command = this.currentCommand().parameters[0];
    }
    while (this.nextEventCode() === 655) {
        this._index++;
        args.push(this.currentCommand().parameters[0]);
    }
    this.pluginCommand(command, args);
    return true;
};
//==============================================================================================================
function Sprite_Base() {
    this.initialize(...arguments);
}
Sprite_Base.prototype = Object.create(Sprite.prototype);
Sprite_Base.prototype.constructor = Sprite_Base;
//==============================================================================================================
Window_Base._iconWidth  = ImageManager.iconWidth;
Window_Base._iconHeight = ImageManager.iconHeight;
Window_Base._faceWidth  = ImageManager.faceWidth;
Window_Base._faceHeight = ImageManager.faceHeight;

XdRsData.adapter.Window_Base_initialize = Window_Base.prototype.initialize;
Window_Base.prototype.initialize = function() {
    const [x, y, w, h] = arguments;
    if (y === undefined) XdRsData.adapter.Window_Base_initialize.call(this, x);
    else XdRsData.adapter.Window_Base_initialize.call(this, new Rectangle(x, y, w, h));
};
Window_Base.prototype.standardFontFace = function() {
    return $gameSystem.mainFontFace();
};
Window_Base.prototype.standardFontSize = function() {
    return $gameSystem.mainFontSize();
};
Window_Base.prototype.standardPadding = function() {
    return $gameSystem.windowPadding();
};
Window_Base.prototype.textPadding = function() {
    return this.itemPadding();
};
Window_Base.prototype.textColor = function(n) {
    return ColorManager.textColor(n);
};
//==============================================================================================================
// end
//==============================================================================================================[/pre]


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

评分

参与人数 9赞 +9 收起 理由
白菜走天涯 + 1 我很赞同
木火灵兽 + 1 精品文章
zxgo24 + 1 精品文章
beiduo + 1 精品文章
pkeasygod + 1 精品文章
2498126422 + 1 精品文章
frost_king_hw + 1 精品文章
dsif + 1 精品文章
白嫩白嫩的 + 1 精品文章

查看全部评分

xp vx va mv  va mz 各类型脚本/插件定制
梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2020-8-22 07:59:39 | 显示全部楼层
太强了!
回复

使用道具 举报

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

使用道具 举报

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

使用道具 举报

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

使用道具 举报

梦石
0
星屑
15291
在线时间
720 小时
注册时间
2011-7-16
回帖
1373

开拓者

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

使用道具 举报

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

使用道具 举报

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

使用道具 举报

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

使用道具 举报

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

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部