Status
Not open for further replies.

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
249
Reaction score
344
First Language
German
Primarily Uses
RMMV
Okay, so I've got an issue I need help with. Warning, I'm an absolute beginner who, for the most part, has no idea what he's doing.

The issue is with Moghunter's
RMV - Weather EX
.

I don't know the rules for posting someone else's scripts for support purposes, but just to be safe, I'll only link to the original page above where the script can be downloaded as part of his collection.

You'll probably have to do that to be able to help me, since I don't think the issue can otherwise be localized.

What I attempted was to add additional weather effects to the script, so that I have some more scrolling effects to work with, since, by default, only left to right and up to down are supported.

The first change I did was at line 244 under the Command Setup Weather part:
Code:
var mode_Real = Math.min(Math.max(mode, 0),35);
into
Code:
var mode_Real = Math.min(Math.max(mode, 0),37);
To have 2 more IDs to use, 36 and 37. I'm not sure if that's the correct way to go about.

There's also that line right in front of it:
Code:
var id_Real =  Math.min(Math.max(id, 0),$gameSystem._weatherEX_Data.length - 1);
But I've got no clue what to do with that.

The next change is at line 1482 at the Refresh Weather part:
At the original code
Code:
    case 35:
         this.setupParallax2(sprite,initial);       
        break;       
    default:
         this.setupRandom3(sprite);
        break;

I've inserted this:

Code:
    case 35:
         this.setupParallax2(sprite,initial);       
        break;       
    case 36:
         this.setupCloudParallax1(sprite,initial);       
        break;   
    case 37:
         this.setupCloudParallax2(sprite,initial);       
        break;   
    default:
         this.setupRandom3(sprite);
        break;

The next change I did was at 1612:
Into this:
Code:
    case 35:
        this.updateParallax2(sprite);
        break;
    default:
         this.updateRandom1(sprite);
        break;
I inserted this:
Code:
    case 35:
        this.updateParallax2(sprite);
        break;
    case 36:
        this.updateScroll(sprite);
        break;
    case 37:
        this.updateScroll(sprite);
        break;   
    default:
         this.updateRandom1(sprite);
        break;
    };
The this.updateScroll(sprite); is the same used for the FogXP1 and FogXP2 effect, which are the ones I'm trying to replicate as additional weathers, just with a different moving angle.

Then I've modified the script at line 2744 at "need Update Position":
I've modified this:
Code:
SpriteWeatherEX.prototype.needUpdatePosition = function() {
     if (this.mode() === 28) {return false};
     if (this.mode() === 31) {return false};
     if (this.mode() === 32) {return false};
     if (this.mode() === 33) {return false};
     if (this.mode() === 34) {return false};
     if (this.mode() === 35) {return false};
     return true;
};
to this:
Code:
SpriteWeatherEX.prototype.needUpdatePosition = function() {
     if (this.mode() === 28) {return false};
     if (this.mode() === 31) {return false};
     if (this.mode() === 32) {return false};
     if (this.mode() === 33) {return false};
     if (this.mode() === 34) {return false};
     if (this.mode() === 35) {return false};
     if (this.mode() === 36) {return false};
     if (this.mode() === 37) {return false};
     return true;
};
Since I figure if the FogXp effects I'm basing it on (32&33) don't need an update, my variants probably don't either. I'm assuming that this update position is for weather effects randomly popping up on screen.

Lastly at line 2465 I've copied the two Setup Fog XP1 & 2 parts and added my own variants underneath them:
Original:
Code:
//==============================
// * Setup Fog XP 1
//==============================
SpriteWeatherEX.prototype.setupFogXP1 = function(sprite,initial) {
     sprite._ani[1] = (this._speed + 0.1 + Math.random() * 2)  * this.speed() / 100;
     sprite._ani[2] = 0;
     sprite._sy = Math.randomInt(100);
};

//==============================
// * Setup Fog XP 2
//==============================
SpriteWeatherEX.prototype.setupFogXP2 = function(sprite,initial) {
     sprite._ani[1] = 0;
     sprite._ani[2] = (this._speed + 0.1 + Math.random() * 2)  * this.speed() / 100;
     sprite._sy = Math.randomInt(100);
};
My variants:
Code:
//==============================
// * Setup CloudParallax1
//==============================
SpriteWeatherEX.prototype.setupCloudParallax1 = function(sprite,initial) {
     sprite._ani[1] = (this._speed + 0.1 + Math.random() * 2)  * this.speed() / 100;
     sprite._ani[2] = (this._speed + 0.1 + Math.random() * 2)  * this.speed() / 100;
     sprite._sy = Math.randomInt(100);
};

//==============================
// * Setup CloudParallax2
//==============================
SpriteWeatherEX.prototype.setupCloudParallax2 = function(sprite,initial) {
     sprite._ani[1] = (this._speed + 0.1 + Math.random() * 2)  * this.speed() / 100 * (-1);
     sprite._ani[2] = (this._speed + 0.1 + Math.random() * 2)  * this.speed() / 100 * (-1);
     sprite._sy = Math.randomInt(100);
};
Using the sprite,_ani math for the Fog XP effects above has produced the exact scrolling effect I want.
But assigned to my new effects 36&37, they don't do anything, even though at the above case 36 & 37, the setupCloudParallax1 should connect to this part.

The update section for update.scroll that both the fog xp effects and mine use I left untouched like this:
Code:
//==============================
// * Update Fog 5
//==============================
SpriteWeatherEX.prototype.updateScroll = function(sprite) {
   sprite._sx -= sprite._ani[1];
   sprite._sy -= sprite._ani[2];
   sprite.origin.x = $gameMap.displayX() * $gameMap.tileWidth() + sprite._sx;
   sprite.origin.y = $gameMap.displayY() * $gameMap.tileHeight() + sprite._sy;   
};

And yet, it's not working.
when I call the effect via plugin command:
weather : 0 : 36 : 2 : 100 : 0 : Fog_01c
and
weather : 0 : 37 : 2 : 100 : 0 : Fog_01c
It only shows the Fog_01c picture as a small square in the upper left hand corner of the screen, static and unmoving.

This is what it should look like:
one.png

This is what it looks like:
two.png

I'd really appreciate it if someone could help me with this issue.
 

Anyone

Veteran
Veteran
Joined
Aug 24, 2019
Messages
249
Reaction score
344
First Language
German
Primarily Uses
RMMV
Update: The issue is resolved. The thread can be closed.
---------------------------------------------------------------

Answer:
Everything above is correct, but I missed adding entries to the tilling weather part.
Once I added entries 36 and 37 to it, the fog layer correctly adapted to the changes.

Code:
//==============================
// * is Tilling Weather
//==============================
SpriteWeatherEX.prototype.isTilingWeather = function() {
    if (this.mode() == 32) {return true};
    if (this.mode() == 33) {return true};
    if (this.mode() == 34) {return true};
    if (this.mode() == 36) {return true};
    if (this.mode() == 37) {return true};
    return false;
};
With this, and the changes above, I managed to introduce custom variants of scrolling overlay effects to the plugin.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,739
Reaction score
5,764
First Language
Dutch
Primarily Uses
RMXP

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.

Latest Threads

Latest Posts

Latest Profile Posts

welp, I literally can't continue working on ALEX now that my MZ trial is up (unless I somehow place in the jam which I don't remotely deserve to for my unfinished crap) so I am back on my bullshit
some test stuff. Empty for now. My other project (this project) needs more attention. The lagging really kicks up when I try to capture gameplay. ✨
Real-Time Battles, Pixel Filter, Animate Cursor & Menus & Windows | RPG Maker News #114

When your side job becomes more interesting than your dayjob and you think "do I quit again or finally actually do the same thing for more than five consecutive years..." I don't think I'll ever be able to say that though, I just cannot stick with one thing like you're 'supposed to'.
Does the word "research" imply that you're searching for something that had been found before?

Forum statistics

Threads
113,883
Messages
1,078,174
Members
147,971
Latest member
scp367
Top