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
89
Reaction score
30
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,638
Reaction score
15,724
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
89
Reaction score
30
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
89
Reaction score
30
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
89
Reaction score
30
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
89
Reaction score
30
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,154
Reaction score
1,865
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
89
Reaction score
30
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,154
Reaction score
1,865
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
89
Reaction score
30
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 Profile Posts

Hi everyone! Enjoying this nice long weekend. How are you all doing? :)
I just successfully tested having events check if specific actors are in a particular party slot and then changing image to match. This will let me make scenes take into account who is in the party at the time and arrange them accordingly - this is important since I'll have extra actors beyond current party. The script used is the same from MV and is compatible with my current core plugin setup in MZ. Thank goodness.
That awkward moment when you're talking about thinking about writing a limited shop stock plugin for MZ and then find out you already wrote one...last May. My memory is so bad.
When I open my project and I'm like, hell yeah.
Some drawings I made in Lapis, one day I intend to involve them in some RPG Maker project.
* maybe two wall frames
*or some sprite flower tiara, or maybe it inspires someone to do something.
bdd19b62e539d17b3b00cc3d63034f7d.jpg

fcca5c8471b34483da8e032cfe579275.jpg

Forum statistics

Threads
118,424
Messages
1,115,848
Members
155,376
Latest member
L4TNG
Top