Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,546
Reaction score
1,049
First Language
Polish
Primarily Uses
RMMV
As title says, I've tried this code to make messages transparent for online version, but in all of my installed browsers:
Opera, Chrome, Brave messages display with default skin window.
Code:
(function(){
    
    'use strict';
    
    Game_Message.prototype.background = function() {
        this._background = 2; //transparent
        return this._background;
})();

Then I changed a little Game_Interpreter command directly in rpg_objects.js to following:
Code:
// Show Text
Game_Interpreter.prototype.command101 = function() {
    if (!$gameMessage.isBusy()) {
        $gameMessage.setFaceImage(this._params[0], this._params[1]);
        $gameMessage.setBackground(2);
        $gameMessage.setPositionType(this._params[3]);
        while (this.nextEventCode() === 401) {  // Text data
            this._index++;
            $gameMessage.add(this.currentCommand().parameters[0]);
        }
        switch (this.nextEventCode()) {
        case 102:  // Show Choices
            this._index++;
            this.setupChoices(this.currentCommand().parameters);
            break;
        case 103:  // Input Number
            this._index++;
            this.setupNumInput(this.currentCommand().parameters);
            break;
        case 104:  // Select Item
            this._index++;
            this.setupItemChoice(this.currentCommand().parameters);
            break;
        }
        this._index++;
        this.setWaitMode('message');
    }
    return false;
};

And still nothing, what am I missing with this?
(I'd like to mention I'm running tests on localhost and each change in code is followed with Apache restart, clearing all caches and tmp files).
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
2,750
Reaction score
2,108
First Language
Portuguese - Br
Primarily Uses
RMMZ
Hi!

You can try do just that:

JavaScript:
Window_Message.prototype.updateBackground = function() {
    this._background = 2
    this.setBackgroundType(this._background);
};

For better understanding, a transparent window, is only a window with their opacity set to 0:

JavaScript:
Window_Base.prototype.setBackgroundType = function(type) {
    if (type === 0) {
        this.opacity = 255;
    } else {
        this.opacity = 0;
    }
    if (type === 1) {
        this.showBackgroundDimmer();
    } else {
        this.hideBackgroundDimmer();
    }
};
 

Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,546
Reaction score
1,049
First Language
Polish
Primarily Uses
RMMV
Ohh darn... I Forgot about Window_Base...

That solved problem, Thank you @Eliaquim .
 

Latest Threads

Latest Profile Posts

I officially declare today "test play day." I'm going to waste the whole day playing video games, which isn't a shock to anybody, but hopefully today I'll play my own and figure out what still needs fixin's.
Empty Bottles and Health Extenders are now a thing.
Also the Sling-Shot does damage to enemies now, but not a lot and you won't get gold from killing them that way.
ScreenShot_5_26_2022_11_36_32.png
added a Panic gauge to battle. it fills up according to your actions. each character has a different passive that activates once the gauge is full. also once full, a countdown starts and after each action taken, the gauges decreases. with each character, the decrease is different.
Genuinely considering making a thread informing people how to Google.

Forum statistics

Threads
122,164
Messages
1,146,959
Members
160,434
Latest member
SirBigSad
Top