[SOLVED] Showing a Picture above Menu/Text & Battles (CRT filter)

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):
Spoiler: Plugin
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")));
}
};

Spoiler: add the following if using VisuStella Victory Aftermath
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.

Spoiler: CRT image
CRT.png

But naturally it's not showing over anything in the UI; menus, textboxes etc. Also it disappears during battle.

Spoiler: Not overlaying on Menu
Screenshot 2026-04-14 123315.png
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?
I suppose a "picture" isn't the most suitable thing to use here. You need something that digs into the scene system and adds an extra layer to all scenes… so, probably overriding something in Scene_Base to add the overlay.

I think something like this should work:

JavaScript:
SceneManager._scene.addChild(new Sprite(ImageManager.loadPicture("CRT")))

Replace "CRT" with the actual filename of your overlay.

Try it by opening the dev console with F8, switching to the Console tab, pasting it in, and pressing Enter.

Using the above method, assuming it works, it should work anywhere, but it'll disappear whenever the scene changes. So, for example, if you're in the pause menu and you go to Status, it'll disappear. If the above example works, you can figure out where to put it in a plugin so that it'll apply to all scenes.
Thank you for giving me something to look at!

I tested it, and it does work - although for some reason it doesn't preserve any transparency in the png so I might have to work that one out D:

Writing a plugin to properly utilise this (to make it change on every menu scene, battle scene, etc) might prove to be far beyond my capabilities, though (I'm not much a dab hand with java), but I can try setting up common events to manage this with script calls.
You can try putting that line in the scene create methods (change X to switch id). Add below as plugin. But yeah, don't know what would cause the transparency issue, if it works as a picture. Does the transparency fail in all scenes?

const _myEdit1_SceneMap_create = Scene_Map.prototype.create;
Scene_Map.prototype.create = function() {
_myEdit1_SceneMap_create.call(this);
if ($gameSwitches.value(X)) {
SceneManager._scene.addChild(new Sprite(ImageManager.loadPicture("CRT")));
}
};

const _myEdit1_SceneMenuBase_create = Scene_MenuBase.prototype.create;
Scene_MenuBase.prototype.create = function() {
_myEdit1_SceneMenuBase_create.call(this);
if ($gameSwitches.value(X)) {
SceneManager._scene.addChild(new Sprite(ImageManager.loadPicture("CRT")));
}
};

const _myEdit1_SceneBattle_create = Scene_Battle.prototype.create;
Scene_Battle.prototype.create = function() {
_myEdit1_SceneBattle_create.call(this);
if ($gameSwitches.value(X)) {
SceneManager._scene.addChild(new Sprite(ImageManager.loadPicture("CRT")));
}
};
Actually for the map scene you need to put it in another method, I though it was making the display objects there but try putting it for the map like:

const _myEdit1_SceneMap_createDisplayObjects = Scene_Map.prototype.createDisplayObjects;
Scene_Map.prototype.createDisplayObjects = function() {
_myEdit1_SceneMap_createDisplayObjects.call(this);
if ($gameSwitches.value(X)) {
SceneManager._scene.addChild(new Sprite(ImageManager.loadPicture("CRT")));
}
};
Transparency isn't failing at all with this method!

Haha, you ninja'd me, was just writing up about it not working on the map! 🙂 Yeah, with that change it's more or less perfect!


ONE little hang-up, and I've been looking but it's Visustella so of course it's all obfuscated...

I'm using the victory aftermath plugin and looking for an equivalent to SceneMap, SceneBattle, etc. I'm looking to see if there's one called SceneVictory/VictoryAftermath etc, but I'm not sure how that scene would be defined. I can't peek at it in the code, it seems, but is there some magic I can do to find it? Something in the Console maybe? Then I can add another chunk to the plugin to cover that scene too.

Not the end of the world if not, though, I can go without the victory plugin entirely if I have to.


Otherwise, this is completely nailed. Thanks so much, gang. You're the best as always.
Is doing it in those three scenes really sufficient? I would've thought you'd want to do it in Scene_Base. Although… I guess it does make sense that all the scenes other than map and battle would have a common superclass.

The only other think I'd change about @rpgLord69's code is to replace SceneManager._scene with this in all cases.
Aye, it seems to be covering everything I can think to test, (except the VS Victory Aftermath plugin, but that's a special case) - have tried with both SceneManager._scene and with simply this and am getting the same effect with both. I can try toggling between them if I find issues later!
@Solar_Flare Yeah I think they all use that Scene_MenuBase. Unless you want it for Title.

@Cid For that victory aftermath (it's in scene battle) use below. But I don't know if that's good code LOL, I'm not a coder. I just looked at the change index methods in the console.

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(10)) {
this.setChildIndex(mySprite, this.children.length-1);
}
};
Good shout on the Title! I forgot that one! I've added a section to the code to cover that!

This Victory puzzle intensifies, however!

I've tried your code as is, and with the Switch changed from 10 to 98 (what I'm using). No dice either way, so tried to mimic the other parts we've been using and tried this as well,

Code:
const _myEdit1_SceneBattle_createVictoryAftermathWindows = Scene_Battle.prototype.createVictoryAftermathWindows;
Scene_Battle.prototype.createVictoryAftermathWindows = function() {
_myEdit1_SceneBattle_createVictoryAftermathWindows.call(this);
if ($gameSwitches.value(98)) {
this.addChild(new Sprite(ImageManager.loadPicture("CRT")));
}
};

I somehow didn't crash the game with my Frankenstein'd code which is new for me...

but this victory aftermath still wants to remain buttery smooth, and we can't allow this. It gets the scanlines or the plugin gets the chair.
Hmmm, it seems to work for me. If you go to console in battle and write there both in the middle of the battle and when that victory aftermath is on screen that: SceneManager._scene.children What does it say? If you have something added there after the "overlay" sprite, then it wouldn't work.
Screenshot 2026-04-14 180156.png

In battle ^



Screenshot 2026-04-14 180232.png
During Victory Aftermath ^
Ok so there's something called tinueMessage (that only seems to be there at battle end) I don't know what that is, but it seems that the method I gave you is selecting that one for the change index.
Try changing the line
const mySprite = this.getChildAt(this.children.length-1);
to have -2 instead of -1
But maybe the better way would be to save your "overlay" sprite to some property when it's created and then you could use that property to grab the correct one I think, no matter what's in the children. But anyway, you can try to swap that -2. You want the thing that says 'Sprite' to be at the end of that array when the victory aftermath is on screen.


EDIT: LMAO no wait, the line is just cut, I read it wrong

EDIT2: Yeah so ignore that brain fart I made, but for me it swaps the Sprite to the end with my code. Are you sure you wrote the correct switch and that you didn't make some error so that it wouldn't use that plugin? This is how it rearranges it for me:

[Spriteset_Battle, Sprite_Timer, WindowLayer, Window_TextPopup, Window_AutoBattleCancel, Window_VictoryRewards, Window_VictoryContinueMessage, Sprite]

EDIT3: Oh and are you using the code I gave you, instead the one you changed? (except for the switch)
Ohmygoshsobloodycloseaaaah

Haha that's okay, you get one brainfart, I bring another. For some godforsaken reason this plugin was at the top of my plugin list (the reason is I put it there but why). I brought it to the bottom.

It's working! ...for the first screen of Victory Aftermath! D: When you hit confirm it goes into the part where it shows all your stat bonuses, etc. It's not covering that!

I'm trying Console Fu (advanced Google Fu) but I'm flying blind. I've tried copying the same code but changing VictoryAftermath for VictoryRewards or VictoryLevelUp which are the terms I'm finding but that's not it - sooooo close

my failed attempt:

Code:
const _myEdit1_SceneBattle_createVictoryLevelUpWindows = Scene_Battle.prototype.createVictoryLevelUpWindows;
Scene_Battle.prototype.createVictoryLevelUpWindows = function() {
const mySprite = this.getChildAt(this.children.length-1);
_myEdit1_SceneBattle_createVictoryLevelUpWindows.call(this);
if ($gameSwitches.value(98)) {
this.setChildIndex(mySprite, this.children.length-1);
}
};
That method doesn't have the 's' in windows at the end, I think. Try and fix that. You might also need to play around with the victorycontinue window. If you can't get it to work, I can give it a look some other time.
victory-yes.gif



thank you so so so so so so so so much


EDIT: op is edited with the full script for the convenience of anyone who also needs it.
Great!

As a note, you can also use code based filters with this stuff, which include crt filter. But that'd be more "generic" than a pic based one.

EDIT: Also, you can't use the switch based condition in Title Scene. You'd have to use some property there.
Also, you can't use the switch based condition in Title Scene. You'd have to use some property there.
Switches do technically exist at the Title Scene, but… they'll be reset to 0 when you start a game. In any case, it doesn't make a lot of sense to use a switch for something controlled by the settings anyway… so, I'd recommend moving it to a property on ConfigManager.
Fortunately it appears to be working regardless! I'm using Phileas' Options Manager plugin, so however it handles it seems to be in my favour - I guess it's forcing the Switch to update even when selecting new game. I just tried turning the CRT filter on in the config, soft quitting to the Title and then starting another new game. The filter stayed on!
I've wanted this for MV for forever. All the ones I've seen don't effect the menu or title screen....

Original thread: https://forums.rpgmakerweb.com/threads/solved-showing-a-picture-above-menu-text-battles-crt-filter.183263/