MV Bush opacity change

Hello! Is there a way to change the bush opacity and depth with a script?

Its depth is set by default set as 12 at rpg_objects.js (6614):

Code:
Game_CharacterBase.prototype.refreshBushDepth = function() {
    if (this.isNormalPriority() && !this.isObjectCharacter() &&
            this.isOnBush() && !this.isJumping()) {
        if (!this.isMoving()) {
            this._bushDepth = 12;
        }
    } else {
        this._bushDepth = 0;
    }
};

Is there a way to change this depth and the opacity too through a script inside and event? guess yes 😀

This was done for XP, basically it just need a conversion?
Just put this into a text editor, save it as BushDepth.js in your plugins, and add it via your plugin manager.

Change it to whatever variable you have spare, and name that variable. Then whenever you want to change the depth, just change the variable. Set the variable to 12 at the start of your game.

Code:
Game_CharacterBase.prototype.refreshBushDepth = function() {
    if (this.isNormalPriority() && !this.isObjectCharacter() &&
            this.isOnBush() && !this.isJumping()) {
        if (!this.isMoving()) {
            this._bushDepth = $gameVariables.value(50);
        }
    } else {
        this._bushDepth = 0;
    }
};
Just put this into a text editor, save it as BushDepth.js in your plugins, and add it via your plugin manager.

Change it to whatever variable you have spare, and name that variable. Then whenever you want to change the depth, just change the variable. Set the variable to 12 at the start of your game.

Code:
Game_CharacterBase.prototype.refreshBushDepth = function() {
    if (this.isNormalPriority() && !this.isObjectCharacter() &&
            this.isOnBush() && !this.isJumping()) {
        if (!this.isMoving()) {
            this._bushDepth = $gameVariables.value(50);
        }
    } else {
        this._bushDepth = 0;
    }
};


Awesome! Do you know how to make this for bush opacity too (maybe with another variable, [51])?


The reference for opacity in MV should be instead in the rpg_sprite.js (364), where is the following code:
Code:
Sprite_Character.prototype.createHalfBodySprites = function() {
    if (!this._upperBody) {
        this._upperBody = new Sprite();
        this._upperBody.anchor.x = 0.5;
        this._upperBody.anchor.y = 1;
        this.addChild(this._upperBody);
    }
    if (!this._lowerBody) {
        this._lowerBody = new Sprite();
        this._lowerBody.anchor.x = 0.5;
        this._lowerBody.anchor.y = 1;
        this._lowerBody.opacity = 128;
        this.addChild(this._lowerBody);
    }
};

But changing the line
this._lowerBody.opacity = $gameVariables.value(51);

don't make it work 🙁 .


The reference for opacity in MZ objects.js should be:
Code:
*:
 * @target MZ
 * @plugindesc Make bushes completely hide a character's lower body.
 * @help Terms of use: free to use and/or modify for any project.
 */
(alias => {
  Sprite_Character.prototype.createHalfBodySprites = function() {
    alias.apply(this, arguments);
    this._lowerBody.opacity = 0;
  }
})(Sprite_Character.prototype.createHalfBodySprites);

I've found this wonderful plugin for MZ, but it's in Japanese and it won't work in MV I guess.
Hello! Is there a way to change the bush opacity and depth with a script?

Its depth is set by default set as 12 at rpg_objects.js (6614):

Code:
Game_CharacterBase.prototype.refreshBushDepth = function() {
    if (this.isNormalPriority() && !this.isObjectCharacter() &&
            this.isOnBush() && !this.isJumping()) {
        if (!this.isMoving()) {
            this._bushDepth = 12;
        }
    } else {
        this._bushDepth = 0;
    }
};

Is there a way to change this depth and the opacity too through a script inside and event? guess yes 😀

This was done for XP, basically it just need a conversion?

Does this help at all?

Made this plugin a while ago.. not sure if it would be relevant to your request or not
Does this help at all?

Made this plugin a while ago.. not sure if it would be relevant to your request or not

The effect is similar to what I need, but I'd like to have a small plugin to just mod opacity with variable value (051), like Shaz did with Bush Depth:

Just put this into a text editor, save it as BushDepth.js in your plugins, and add it via your plugin manager.

Change it to whatever variable you have spare, and name that variable. Then whenever you want to change the depth, just change the variable. Set the variable to 12 at the start of your game.

Code:
Game_CharacterBase.prototype.refreshBushDepth = function() {
    if (this.isNormalPriority() && !this.isObjectCharacter() &&
            this.isOnBush() && !this.isJumping()) {
        if (!this.isMoving()) {
            this._bushDepth = $gameVariables.value(50);
        }
    } else {
        this._bushDepth = 0;
    }
};
Sorry for double posting, but did anyone find how to make the same for Bush opacity?
🙂
bump

please help me 😀
This is the probably the most functional plugin for manipulating bush tiles:

It has floating effects for water too, and vehicle options, colors, etc..

There's English instructions in the JS file's @Help or just translate for in depth instructions at the link.

Original thread: https://forums.rpgmakerweb.com/threads/bush-opacity-change.154225/