/*: * @target MZ * @plugindesc 虚無魔人 * @author やっつけ * @help 戦闘グラフィックとマップ移動を左上基準でUIエリアに収める * UIエリアはデフォルトの816*624、画面の大きさはそれ以上を想定 * あんまり極端にしないでね * UIエリア外の虚無空間はピクチャとかで隠して * 場所移動時にコモンイベント起動するプラグインとかと併用するといいかも * * ウィンドウは個別設定めんどいから全部ずらした * * 戦闘に入ると虚無空間アチャモロしちゃうから誤魔化すために画像を敷けるように * アドレス例 :img/tilesets/ * ファイル名例:World_C * * 絶対どっかでボロが出るか他プラグインと衝突するけどおこらないでね * @url https://www.yahoo.co.jp/ * @param ウィンドウ左上ずらし * @desc ウィンドウが全部左上基準になる 全部って言ったら全部 * @default 1 * @type number * @param 戦闘画面外画像アドレス * @desc 戦闘中の虚無空間に表示する画像のアドレス * @default * @type text * @param 戦闘画面外画像ファイル名 * @desc 戦闘中の虚無空間に表示する画像のファイル名 表示しない場合は空欄 * @default * @type text */ (() => { const PN = 'hidariue'; const param = PluginManager.parameters(PN); const uindouhidariue = Number(param['ウィンドウ左上ずらし']); const haikeiA = param['戦闘画面外画像アドレス']; const haikeiB = param['戦闘画面外画像ファイル名']; /* ウィンドウを全部左上にずらす */ if (uindouhidariue) { Scene_Base.prototype.createWindowLayer = function () { this._windowLayer = new WindowLayer(); this._windowLayer.x = 4; this._windowLayer.y = 4; this.addChild(this._windowLayer); }; }; /* バトルキャラクターのグラフィックを左上にずらす */ Spriteset_Battle.prototype.createBattleField = function () { const width = (Graphics.boxWidth + 8); const height = (Graphics.boxHeight + 8); const x = 0; const y = 0; this._battleField = new Sprite(); this._battleField.setFrame(0, 0, width, height); this._battleField.x = x; this._battleField.y = y - this.battleFieldOffsetY(); this._baseSprite.addChild(this._battleField); this._effectsContainer = this._battleField; }; /* 戦闘背景を右にはみ出さないように左上にずらす */ Sprite_Battleback.prototype.adjustPosition = function() { this.width = Math.floor((1000 * (Graphics.boxWidth + 8)) / 816); this.height = Math.floor((740 * (Graphics.boxHeight + 8)) / 624); this.x = ((Graphics.boxWidth + 8) - this.width) ; if ($gameSystem.isSideView()) { this.y = (Graphics.boxHeight + 8) - this.height; } else { this.y = 0; } const ratioX = this.width / this.bitmap.width; const ratioY = this.height / this.bitmap.height; const scale = Math.max(ratioX, ratioY, 1.0); this.scale.x = scale; this.scale.y = scale; }; /* 戦闘背景のさらに背景を画像にする */ Spriteset_Battle.prototype.createBackground = function() { this._backgroundFilter = new PIXI.filters.BlurFilter(); this._backgroundSprite = new Sprite(); if (haikeiB) { this._backgroundSprite.bitmap = ImageManager.loadBitmap(haikeiA,haikeiB); } else { this._backgroundSprite.bitmap = SceneManager.backgroundBitmap(); this._backgroundSprite.filters = [this._backgroundFilter]; } this._baseSprite.addChild(this._backgroundSprite); }; /* マップを左上にずらす */ Game_Map.prototype.screenTileX = function () { return Math.round(((Graphics.boxWidth + 8) / this.tileWidth()) * 16) / 16; }; Game_Map.prototype.screenTileY = function () { return Math.round(((Graphics.boxHeight + 8) / this.tileHeight()) * 16) / 16; }; })();