EDIT: Full solution
NOTE: Using Phileas' Options Manager plugin to handle the Switches.
Change X for Switch ID and Y for name of the image in Pictures folder):
Hello! 🙂
I'm trying to add a custom CRT filter. I've tried some plugins but they're not exactly what I want, so I made a custom image to overlay.
I've got a custom option in the Options Menu to turn the CRT switch on/off, which I'm using to trigger a common event that shows this picture.
But naturally it's not showing over anything in the UI; menus, textboxes etc. Also it disappears during battle.
I have GALV's Layers plugin but that's on a per map basis. I've been using Google Fu for hours but can't find something that, ideally, would just overlay an image over the whole game when a Switch is active. I've found options for MV (which I've tried but they don't work) and a million tutorials for creating picture based menus >.<
This feels like the kind of thing that's probably been asked and solved a million times already but I'm having no luck finding my way! Could anyone advise?
NOTE: Using Phileas' Options Manager plugin to handle the Switches.
Change X for Switch ID and Y for name of the image in Pictures folder):
Code:
const _myEdit1_SceneMap_createDisplayObjects = Scene_Map.prototype.createDisplayObjects;
Scene_Map.prototype.createDisplayObjects = function() {
_myEdit1_SceneMap_createDisplayObjects.call(this);
if ($gameSwitches.value(X)) {
this.addChild(new Sprite(ImageManager.loadPicture("Y")));
}
};
const _myEdit1_SceneMenuBase_create = Scene_MenuBase.prototype.create;
Scene_MenuBase.prototype.create = function() {
_myEdit1_SceneMenuBase_create.call(this);
if ($gameSwitches.value(X)) {
this.addChild(new Sprite(ImageManager.loadPicture("Y")));
}
};
const _myEdit1_SceneBattle_create = Scene_Battle.prototype.create;
Scene_Battle.prototype.create = function() {
_myEdit1_SceneBattle_create.call(this);
if ($gameSwitches.value(X)) {
this.addChild(new Sprite(ImageManager.loadPicture("Y")));
}
};
const _myEdit1_SceneTitle_create = Scene_Title.prototype.create;
Scene_Title.prototype.create = function() {
_myEdit1_SceneTitle_create.call(this);
if ($gameSwitches.value(X)) {
this.addChild(new Sprite(ImageManager.loadPicture("Y")));
}
};
Code:
const _myEdit1_SceneBattle_createVictoryAftermathWindows = Scene_Battle.prototype.createVictoryAftermathWindows;
Scene_Battle.prototype.createVictoryAftermathWindows = function() {
const mySprite = this.getChildAt(this.children.length-1);
_myEdit1_SceneBattle_createVictoryAftermathWindows.call(this);
if ($gameSwitches.value(X)) {
this.setChildIndex(mySprite, this.children.length-1);
}
};
const _myEdit1_SceneBattle_createVictoryLevelUpWindow = Scene_Battle.prototype.createVictoryLevelUpWindow;
Scene_Battle.prototype.createVictoryLevelUpWindow = function() {
const mySprite = this.getChildAt(this.children.length-1);
_myEdit1_SceneBattle_createVictoryLevelUpWindow.call(this);
if ($gameSwitches.value(X)) {
this.setChildIndex(mySprite, this.children.length-1);
}
};
const _myEdit1_SceneBattle_createVictoryContinueWindow = Scene_Battle.prototype.createVictoryContinueWindow;
Scene_Battle.prototype.createVictoryContinueWindow = function() {
const mySprite = this.getChildAt(this.children.length-1);
_myEdit1_SceneBattle_createVictoryContinueWindow.call(this);
if ($gameSwitches.value(X)) {
this.setChildIndex(mySprite, this.children.length-1);
}
};
Hello! 🙂
I'm trying to add a custom CRT filter. I've tried some plugins but they're not exactly what I want, so I made a custom image to overlay.
I've got a custom option in the Options Menu to turn the CRT switch on/off, which I'm using to trigger a common event that shows this picture.
But naturally it's not showing over anything in the UI; menus, textboxes etc. Also it disappears during battle.
This feels like the kind of thing that's probably been asked and solved a million times already but I'm having no luck finding my way! Could anyone advise?