RMMV PIXI Filter Controler over Menu

Status
Not open for further replies.

SmeeDucks

Villager
Member
Joined
Jan 19, 2020
Messages
8
Reaction score
2
First Language
English
Primarily Uses
RMMV
I am using the PIXI filter controller by Tsukimi-neko for MV. I am trying to have the filter effect (namely the "adjustment effect for RGB modification) drawn over the menu, as well as the screen. When you use the "1: whole-screen" option it draws over the screen, until the menu is brought up, and the filter is there, but not on top of the menu. As I understand PIXI is like a container, so the window for the menu is drawn on top of the filter itself, and that's why this happens. I have tried directly modifying the javascript to draw the filter after the menu window is up, and yet it still won't draw on top. I looked on the plugin thread:
(https://forums.rpgmakerweb.com/inde...en-effects-by-pixi-mz-version-released.90368/)

and it seems other people have had the same issue. Any ideas?
 

Tsukimi-neko

Tsukimi
Veteran
Joined
Oct 25, 2017
Messages
101
Reaction score
278
First Language
Japanese
Primarily Uses
RMMV
Hello!
I assume Menu is the menu opened when you press x key.
If it is, then it is actually another scene with a screenshot sprite of the previous scene. The plugin currently only supports auto-adding filter on maps(and battles, though not completed), so you'll have to add filter to the new scene manually.

if you know some javascripts then you can use something like:
var my_filter = new PIXI.filters.SomeFilter();
SceneManager._scene.filters = [my_filter];
 

SmeeDucks

Villager
Member
Joined
Jan 19, 2020
Messages
8
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hello!
I assume Menu is the menu opened when you press x key.
If it is, then it is actually another scene with a screenshot sprite of the previous scene. The plugin currently only supports auto-adding filter on maps(and battles, though not completed), so you'll have to add filter to the new scene manually.

if you know some javascripts then you can use something like:
var my_filter = new PIXI.filters.SomeFilter();
SceneManager._scene.filters = [my_filter];
I am no an expert with Javascript, but I should be able to handle something like this. I ran out of things to try and no idea where to look, so thank you for your suggestion, I'll try and implement it later!
 

SmeeDucks

Villager
Member
Joined
Jan 19, 2020
Messages
8
Reaction score
2
First Language
English
Primarily Uses
RMMV
I am no an expert with Javascript, but I should be able to handle something like this. I ran out of things to try and no idea where to look, so thank you for your suggestion, I'll try and implement it later!
So I worked it out and I found a solution that worked for me. In rpg_scenes.js I found the windows I needed based on the headers (such as Scene_Equip) and either at the end of the .create or .initialize methods I would run this code:
JavaScript:
//I used adjustment filter, but you can use any
var my_filter = new PIXI.filters.AdjustmentFilter;
//my modifications of the filter
my_filter.saturation = (1-($gameVariables.value(60)/100)).toFixed(2);
SceneManager._scene.filters = [my_filter];

When the window is closed, the filter is closed with it, and re-run when it is open. This is a crude method to do this, and I have the above code in about 10 places, but if you need to use more than one filter you should be able to do it with switches. I didn't use this, but the code:
JavaScript:
SceneManager._scene.filters = [];

will remove all the filters, and you can probably hand it an array of filters if you want to be complex with it only removing ones based of whatever you need. If anyone reads this hope this helps, and thanks to @Tsukimi-neko for their suggestion!
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,604
Reaction score
5,069
First Language
English
Primarily Uses
RMVXA

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Do you have an audio you want me to animate? If so send me the youtube link and I’ll animate it.
Okay, so I'm working on Draft 2 of my game's script.
Will try to keep you guys posted, if you're interested!

This is vid of my new game, Crystalgazers. A demo is available on my Gamejolt

I just thought of the best achievement for my game: "'I Didn't Know You Were a Developer!' Find and enter one or more dev room(s)."
I made this animation to apply to a job, what do you think?

Forum statistics

Threads
105,590
Messages
1,014,840
Members
137,254
Latest member
WilliamSlither
Top