Gradient Wipe - old RM Transition effect, and more

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
38
Reaction score
18
First Language
English
Primarily Uses
RMMV
So I got it working in Yanfly's CTB plugin. Just did as follows in Window_CTBIcon.prototype.reduceOpacity:

this.applyGWFilter();
this._GWFilter.time = this.duration;


But when I do something similar on the Sprite_Enemy.prototype.updateCollapse method in rpg_sprites.js the effect doesn't play at all.

this.applyGWFilter("dissolveUp48", 0);
this._GWFilter.time = 64;


I've played with setting many numbers for time just to see if the effect is working at all. Am I doing something wrong? Is it something to do with the fact that Sprite_Enemy is a sprite and not a window?
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
3,194
Reaction score
1,190
First Language
Dutch
Primarily Uses
RMMV
any demo with those things and transitions on map/sprites/events?
looks really nice though.
 

Tsukimi-neko

Tsukimi
Veteran
Joined
Oct 25, 2017
Messages
101
Reaction score
285
First Language
Japanese
Primarily Uses
RMMV
So I got it working in Yanfly's CTB plugin. Just did as follows in Window_CTBIcon.prototype.reduceOpacity:

this.applyGWFilter();
this._GWFilter.time = this.duration;


But when I do something similar on the Sprite_Enemy.prototype.updateCollapse method in rpg_sprites.js the effect doesn't play at all.

this.applyGWFilter("dissolveUp48", 0);
this._GWFilter.time = 64;


I've played with setting many numbers for time just to see if the effect is working at all. Am I doing something wrong? Is it something to do with the fact that Sprite_Enemy is a sprite and not a window?

I just realize that their is version problems on PIXI, but since it works fine at other events, it seems not the problem for you.

I have an idea that the problem has something to do with "visible" and "isOpen()".
As you may know, window._windowContentsSprite is set to invisible when openness isn't 255 (rpg_core.js @ line 6833). If they're drawing to content sprite, then it make sense that it disappears in 1 frame, because it is not "open".

Could you try something like this?:
Code:
var _Window_CTBIcon_updateContents = Window_CTBIcon.prototype._updateContents;
Window_CTBIcon.prototype._updateContents = function() {
    _Window_CTBIcon_updateContents.apply(this, arguments);
    this._windowContentsSprite.visible = true;
};
(simply forcing visibility to be true)
 
Last edited:

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
38
Reaction score
18
First Language
English
Primarily Uses
RMMV
I just realize that their is version problems on PIXI, but since it works fine at other events, it seems not the problem for you.

I have an idea that the problem has something to do with "visible" and "isOpen()".
As you may know, window._windowContentsSprite is set to invisible when openness isn't 255 (rpg_core.js @ line 6833). If they're drawing to content sprite, then it make sense that it disappears in 1 frame, because it is not "open".

Could you try something like this?:
Code:
var _Window_CTBIcon_updateContents = Window_CTBIcon.prototype._updateContents;
Window_CTBIcon.prototype._updateContents = function() {
    _Window_CTBIcon_updateContents.apply(this, arguments);
    this._windowContentsSprite.visible = true;
};
(simply forcing visibility to be true)
Actually it works fine now for the CTBIcon as it inherits from window_base, which your plugin has some awesome code for. You can see in the image below it's working amazingly now.


I can't seem to figure out how to make it work for the enemy sprite, though. I'd like it to play when enemies die and play the collapse animation. i.e. the Sprite_Enemy.prototype.updateCollapse() method.

Thank you so much for your help, by the way. I know this isn't what the plugin was designed to do.
 

Tsukimi-neko

Tsukimi
Veteran
Joined
Oct 25, 2017
Messages
101
Reaction score
285
First Language
Japanese
Primarily Uses
RMMV
@Destra47
Good news! You are strong at finding solutions, I appreciate you.
for Sprite_Enemy collapsing, you can do this:

if(!this._GWFilter) this.applyGWFilter({imgName:"YourImageName", softness:0});
this._GWFilter.time = 255 * this._effectDuration / 32;

The "time" of GWFilter is just a progress of fading, for 255=show and 0=hide.
so if you don't animate time, it will remain the same for ever. Since collapse is using this._effectDuration, you can take use of it.

(p.s. the plugin should have the potential to (extend to) apply to all sprites and windows easily, but the initial design was not good enough. However, changing the design after years is also not a good idea ...)
 
Last edited:

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
38
Reaction score
18
First Language
English
Primarily Uses
RMMV
@Destra47
Good news! You are strong at finding solutions, I appreciate you.
for Sprite_Enemy collapsing, you can do this:

if(!this._GWFilter) this.applyGWFilter({imgName:"YourImageName", softness:0});
this._GWFilter.time = 255 * this._effectDuration / 32;

The "time" of GWFilter is just a progress of fading, for 255=show and 0=hide.
so if you don't animate time, it will remain the same for ever. Since collapse is using this._effectDuration, you can take use of it.

(p.s. the plugin should have the potential to (extend to) apply to all sprites and windows easily, but the initial design was not good enough. However, changing the design after years is also not a good idea ...)
That works perfectly! You're my hero!
enemyFade.PNG
 
Last edited:

Destra47

Veteran
Veteran
Joined
Jul 14, 2020
Messages
38
Reaction score
18
First Language
English
Primarily Uses
RMMV
bushy.PNG
I just wanted to let you know that adding that code to the "Sprite_Character.prototype.createHalfBodySprites()" function makes a really awesome effect when characters walk through bushes.

Thank you so much for making this plugin. It's really changed how my game looks.
 

Tsukimi-neko

Tsukimi
Veteran
Joined
Oct 25, 2017
Messages
101
Reaction score
285
First Language
Japanese
Primarily Uses
RMMV
@Destra47
That is more beautiful than the default one! Great work and I like it :)
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
450
Reaction score
74
First Language
Italian
Primarily Uses
@Tsukimi-neko

Hello Tsukimi! This script is amazing!

Please, add the possibility to use the effect for battle transition! T_T I mean, a specific command that affect only the battle transition...

It would be great!

Thank you T.T
 
Last edited:

seaotter

Veteran
Veteran
Joined
Mar 2, 2019
Messages
228
Reaction score
45
First Language
Chinese
Primarily Uses
RMMZ
@Tsukimi-neko

Hello Tsukimi! This script is amazing!

Please, add the possibility to use the effect for battle transition! T_T I mean, a specific command that affect only the battle transition...

It would be great!

Thank you T.T
mean, a specific command that affect only the battle transition...

that is very need.
 

DarkSearinox92

Veteran
Veteran
Joined
Jan 8, 2013
Messages
450
Reaction score
74
First Language
Italian
Primarily Uses
Yes, maybe differentiate the various fades. Game start menu type, transfer fade, screen fade via command etc. Having the ability to customize fades.

As it is set now, if you set the fade image, it affects ALL existing fades in the game.
 

ImaginaryVillain

High Cultist of the Sporkle
Veteran
Joined
Jun 22, 2019
Messages
825
Reaction score
4,741
First Language
Absurdism
Primarily Uses
RMMZ
One of the only two plugins I had to give up to move to MZ. +1 towards interest at seeing it ported over. :LZSwink:
 

Latest Threads

Latest Posts

Latest Profile Posts

Chilling out while toodling around someone's painstaking Minecraft recreation of Disneyland. It is mind-boggling and probably as close as I'll ever be to going.
>Testing with fonts change.
>Tries installing a plugin. Doesn't work.
>Tries changing the plugin commands. Doesn't work.
>Tries installing another plugin. Doesn't work.
>Changes a few more plugin commands. Doesn't work.
>Goes directly to the gamefont file and changes the src. Works.

YYEEEAAAAHHHAAAA

Perseverance is key, bois and girls.
What Reviews say on RPG Maker MZ?
Looking back at some sketches, and game design documents on my PC dated summer of 2015. I started development with the release of MZ, but in 2015, I felt a strong desire to make a game out of the blue. I remember feeling sad for no apparent reason, and all these ideas rushed into my head. Now that I think about it, since that day, everything has become easier to do on my PC . . . it’s very creepy.
Everything's going to be alright! We're all in this together. <3

Forum statistics

Threads
107,806
Messages
1,032,349
Members
139,952
Latest member
4kWave
Top