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
101
Reaction score
39
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,718
Reaction score
15,847
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
451
Reaction score
535
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
101
Reaction score
39
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
451
Reaction score
535
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
101
Reaction score
39
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
451
Reaction score
535
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
101
Reaction score
39
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
451
Reaction score
535
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
101
Reaction score
39
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
4,143
Reaction score
2,528
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
451
Reaction score
535
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
101
Reaction score
39
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
4,143
Reaction score
2,528
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
101
Reaction score
39
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

Anyone else just get battle system ideas but not have a game to attach them to?
Update to the Bootleg YS Battle system. Butt-stabbing is now a thing.
If you hit a monsters back, that hit does triple damage and the monster doesn't hit you; however the monster will immediately turn to face you. Also, figured out how to make Bombs, Sling-shot, a Hammer, and a Saw if you didn't see my previous video. Also made Teleportation circles and a warp whistle.
Wow! This game may be one of the best Maker games I've ever seen! Come hang out with us while Drifty and I experience this masterpiece:LZSjoy:
The team and I are taking a 2 month break from Evergloom (now in it's second year of development) to enter a Gamejam! We work pretty well together now so hopefully we can create something cool.

We've decided on a village idle game, because of the Jam's themes!! It's exciting to be working on something new!g11.gif
New Free Music! This is an epic orchestral called "Break These Chains." I think I posted a preview of it awhile back, but now it's finally available to download and use!


I hope everyone enjoys!

Forum statistics

Threads
122,118
Messages
1,146,664
Members
160,404
Latest member
sdajbhdhavbwdhajkshd
Top