I wanted to experiment with making maps that look good in the background of battles. The issue is that when I load into a battle, the maps are obscured by darkening and blurring. Is there a way to make this not happen?
MV Is there a way to turn off the blur and darken effect in battle when not using a battleback?
JS Plugin RequestsMoved to: Plugin Requests
Hello, you can disable the blurr effect by commenting out the pixi filter in the Spriteset_Battle prototype:
You can copy that in any plugin.
But keep in mind that the image in the battle background is a screen shot of the map before the battle start, and not the actual map...
Regards!
Code:
Spriteset_Battle.prototype.createBackground = function() {
//this._backgroundFilter = new PIXI.filters.BlurFilter();
this._backgroundSprite = new Sprite();
this._backgroundSprite.bitmap = SceneManager.backgroundBitmap();
//this._backgroundSprite.filters = [this._backgroundFilter];
this._baseSprite.addChild(this._backgroundSprite);
};
But keep in mind that the image in the battle background is a screen shot of the map before the battle start, and not the actual map...
Regards!
How much extra do I need to put in there to make it work as a plugin on its own?
Well, that would be a very short plugin... save as a js file in your plugin folder and install it in the plugin manager.
It's not working when I do that.
I see... You're using MV, didn't get that first, my bad. The method I gave is for MZ and don't exist in MV.
The method you're looking for in MV is:
Should work now.
The method you're looking for in MV is:
Code:
SceneManager.snapForBackground = function() {
this._backgroundBitmap = this.snap();
//this._backgroundBitmap.blur();
};
Nope, still doing nothing.
Well, of course I test my stuff before I reply and it does work. I've tested it in a blank project (MV) as I told you, the single method saved as a js file, install in the plugin manager, and work as expected.
If you're not convinced, you can test it by directly commenting out the line in the original method in manager.js in your game folder; you'll see that it do what you want.
So, it's probably your plugin part that doesn't work. What program did you use to write the method?
If you're not convinced, you can test it by directly commenting out the line in the original method in manager.js in your game folder; you'll see that it do what you want.
So, it's probably your plugin part that doesn't work. What program did you use to write the method?
I wrote it in the simple notepad and then made it a js file. Did something get lost with notepad?
It shouldn't. Make sure when you add the plugin it's at the bottom of your list so that it overwrites anything else you might be using (I don't know if, say, you're using Yanfly's Battle Engine and it already modifies this method).
Good call.
Hello, if you did it with notepad, then it shouldn't be a problem as said above.
To be sure the code is read you can put the method in a self invoking function. Then add something to the console log to check if the plugin is at least working:
To be sure the code is read you can put the method in a self invoking function. Then add something to the console log to check if the plugin is at least working:
Code:
(() => {
console.log('hello')
SceneManager.snapForBackground = function() {
this._backgroundBitmap = this.snap();
//this._backgroundBitmap.blur();
};
})();
I finally got back around to this. It does seem to be logging the "hello" to console.
The plugin is at the absolute lowest on the load order, so I can't imagine that some other plugin could be overwriting it.
Did you do any troubleshooting? Turning off all other plugins to see if it works, putting it in a new project to see if it works? TSR said it worked for him in a new project, so you should make sure you can duplicate that.
It turns out the issue wasn't even anything to do with the method being overwritten! The issue was that it doesn't work if a battle is processed either in an autorun or as part of the transfer event. I imagine there's something that has to be established each time the map loads for it to work, and under either of those circumstances, it doesn't have time to! Well, I just need to figure out some other way to force the player into one battle per room of the dungeon.
Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-turn-off-the-blur-and-darken-effect-in-battle-when-not-using-a-battleback.142498/