Soulrender

Jack Of All Trades
Veteran
Joined
Jan 12, 2019
Messages
1,545
Reaction score
1,042
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,747
Reaction score
2,105
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,545
Reaction score
1,042
First Language
Polish
Primarily Uses
RMMV
Ohh darn... I Forgot about Window_Base...

That solved problem, Thank you @Eliaquim .
 

Latest Threads

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,666
Members
160,405
Latest member
oolong_chen
Top