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
170
Reaction score
60
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
45,552
Reaction score
16,444
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
499
Reaction score
601
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
170
Reaction score
60
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
499
Reaction score
601
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
170
Reaction score
60
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
499
Reaction score
601
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
170
Reaction score
60
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
499
Reaction score
601
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
170
Reaction score
60
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
7,726
Reaction score
5,487
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
499
Reaction score
601
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
170
Reaction score
60
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
7,726
Reaction score
5,487
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
170
Reaction score
60
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

Gnyaaaa! Invisible comments on YouTube!!!
When I learned about multithreading in C++, one of the first things was that while heap is shared, each thread has its own stack and it's impossible to access another thread's stack.
So I wrapped the variables into a static class and passed its address to another thread. And it worked.
More characters from my game )
bandicam 2023-03-31 07-42-50-549.png
ScreenShot_3_30_2023_10_5_45.pngstarted working on a new area today. It's a warped version of being inside someone's home. Also moved the face and Panic gauges to be out of the way of the map names. switching moods actively changes what you encounter. Calm is normal while anxious is all the way up to Manic.
Ads.png
Some advertisements for M

And yes kiddos smoking, alcohol and too much coffee or tea are bad for you - but in the 20's we didnt know that yet xD

Forum statistics

Threads
129,980
Messages
1,206,710
Members
171,211
Latest member
aythr1
Top