RMMV Is there a way to turn off the blur and darken effect in battle when not using a battleback?

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
90
Reaction score
32
First Language
English
Primarily Uses
RMMV
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?
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,647
Reaction score
15,735
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Requests. Thank you.

 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
426
Reaction score
494
First Language
French
Primarily Uses
RMMZ
Hello, you can disable the blurr effect by commenting out the pixi filter in the Spriteset_Battle prototype:
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);
};
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!
 

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
90
Reaction score
32
First Language
English
Primarily Uses
RMMV
Hello, you can disable the blurr effect by commenting out the pixi filter in the Spriteset_Battle prototype:
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);
};
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!
How much extra do I need to put in there to make it work as a plugin on its own?
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
426
Reaction score
494
First Language
French
Primarily Uses
RMMZ
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.
 

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
90
Reaction score
32
First Language
English
Primarily Uses
RMMV
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.
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
426
Reaction score
494
First Language
French
Primarily Uses
RMMZ
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:
Code:
SceneManager.snapForBackground = function() {
    this._backgroundBitmap = this.snap();
    //this._backgroundBitmap.blur();
};
Should work now.
 

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
90
Reaction score
32
First Language
English
Primarily Uses
RMMV
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:
Code:
SceneManager.snapForBackground = function() {
    this._backgroundBitmap = this.snap();
    //this._backgroundBitmap.blur();
};
Should work now.
Nope, still doing nothing.
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
426
Reaction score
494
First Language
French
Primarily Uses
RMMZ
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?
 
Last edited:

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
90
Reaction score
32
First Language
English
Primarily Uses
RMMV
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?
I wrote it in the simple notepad and then made it a js file. Did something get lost with notepad?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,165
Reaction score
1,869
First Language
English
Primarily Uses
RMMV
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).
 
  • Like
Reactions: TSR

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
426
Reaction score
494
First Language
French
Primarily Uses
RMMZ
I don't know if, say, you're using Yanfly's Battle Engine and it already modifies this method).
Good call.

I wrote it in the simple notepad and then made it a js file. Did something get lost with notepad?
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:​
Code:
(() => {

console.log('hello')

SceneManager.snapForBackground = function() {
    this._backgroundBitmap = this.snap();
    //this._backgroundBitmap.blur();
};

})();
Then launch the game and open the console with F8, see if 'hello' is writen. If yes means that the plugin work, but not the method (probably because of some other plugin using the same method as suggested @ATT_Turan). If not, then it means the plugin isn't recognized for whatever reason.
 

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
90
Reaction score
32
First Language
English
Primarily Uses
RMMV
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:​
Code:
(() => {

console.log('hello')

SceneManager.snapForBackground = function() {
    this._backgroundBitmap = this.snap();
    //this._backgroundBitmap.blur();
};

})();
Then launch the game and open the console with F8, see if 'hello' is writen. If yes means that the plugin work, but not the method (probably because of some other plugin using the same method as suggested @ATT_Turan). If not, then it means the plugin isn't recognized for whatever reason.
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.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,165
Reaction score
1,869
First Language
English
Primarily Uses
RMMV
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.
 

KaitlynKitty

Veteran
Veteran
Joined
Apr 6, 2021
Messages
90
Reaction score
32
First Language
English
Primarily Uses
RMMV
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.
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:​
Code:
(() => {

console.log('hello')

SceneManager.snapForBackground = function() {
    this._backgroundBitmap = this.snap();
    //this._backgroundBitmap.blur();
};

})();
Then launch the game and open the console with F8, see if 'hello' is writen. If yes means that the plugin work, but not the method (probably because of some other plugin using the same method as suggested @ATT_Turan). If not, then it means the plugin isn't recognized for whatever reason.
 

Latest Threads

Latest Posts

Latest Profile Posts

You thought kids rooms were messy. Look at this.
Back in the house and I'm hungry
Yoshi!
DNPwhy.gif

You're using that item wrong... TwT

Trying to get the mechanics down for a cute, story-driven board game! I think I've accomplished dice movement, item effects, and activating a space's event when you land on it. Art is WIP. Hope to open a thread about the game soon!
My entire family and I have Covid... If it's this bad with the vaccine, without must be terrible. Stay safe, everyone. This thing is a doozy.

Forum statistics

Threads
118,524
Messages
1,116,625
Members
155,539
Latest member
NecroCaticGames
Top