Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
81
First Language
English
Primarily Uses
RMMV
Trying to make a stealth state that changes the users opacity.. can't seem to figure out how to do it. Been trying to use the <Custom Apply Effect> and <Custom Leave Effect> tags from Buffs & States core and have tried all kinds of combinations of this/user/battler/gameActor.actors(...) etc.. & .opacity/.alpha/._opacity/._alpha/.setOpacity()

...but I think I'm just misunderstanding how Yanfly's tags work tbh. I don't think this needs a plugin request thread and can be solved by finding the proper code. I can achieve this through Action Sequences but seemed silly having to attach a piece of code to every sequence to reset opacity.

If anyone could help that'd be great!
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,419
Reaction score
1,830
First Language
EN
Primarily Uses
RMMZ
The relevant property is opacity, but it's on the sprite object (Sprite_Battler), not the actor/enemy (Game_Battler). By default the sprites are set up to check their battler and update themselves; the battler does not directly have access to its "own" sprite. Yanfly's Battle Engine Core adds a battler() lookup function on Game_Battler though (or you could implement your own lookup loop), in which case you could something like:
Code:
user.battler().opacity = 128;  // 50%
Not sure whether that'll be sufficient by itself (there are other factors that alter sprite opacity) but it's worth a try~! :kaojoy:

In case it helps as a reference, here's a little plugin I wrote to adjust opacity with notetags: Cae_BattlerOpacity
 

Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
81
First Language
English
Primarily Uses
RMMV
Ahh, user.battler! I never tried that one... :kaoeh:

Thank you!
 

BlueBomber000

Veteran
Veteran
Joined
Dec 23, 2018
Messages
31
Reaction score
14
First Language
English
Primarily Uses
RMMV
I just wanted to say thanks for this, caethyril. I've been agonizing over this myself for months (most decidedly NOT a dev, over here), so I appreciate it!
 

VincentValerian

Newbie User
Member
Joined
Oct 30, 2019
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
Yo, I was wondering if there is a continuation of this. I've done this but I'm wanting to use skill 'stealth' out of battle and enter into battle with it still active and the character still in lower opacity
 

Latest Threads

Latest Posts

Latest Profile Posts

A side story is almost getting into the next stage. Almost everything in this game has real-life references.
unfinishedbuildingwip1.jpg
Everyday life is full of absurdity. This is just a reflection.
TFW you discover how the script batching works in VNMaker... after you've had the program for almost 3 years.
hAx6iQ3.gif

Writes that the characters have to climb a mountain.

Realized that I have to draw six sets of models where characters are climbing.

At least I know how to draw something. :)
I'm currently scratching my head on how to design plains. What do I even put in plains? Some trees (but not too many or it turns into a forest)? Grass? A few bushes? That's a bit dull.
I'm looking for tutorials but Google didn't seem to find much (or maybe I have the wrong keywords). I don't know how to map plains and I don't know how to learn.

Forum statistics

Threads
111,406
Messages
1,060,894
Members
144,759
Latest member
Belphegor
Top