Levolpehh

Veteran
Veteran
Joined
Nov 17, 2018
Messages
86
Reaction score
84
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

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,101
Reaction score
3,159
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
84
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

After 7 months of really hard work and then 6 months of lazing around and procrastinating with adding the final touches my game is finally complete! Not bad considering that a year ago I didn't really even know about variables. Thanks to everyone who helped with questions and assets! Feels good to have a game under my belt! Ep2 (also self contained) may possibly come in the future!
I just made a breakthrough in my Battlecore problem where the Abort Battle command wouldn't work after using a Custom Action Sequence skill. It seems that Abort Battle can't be the last command in the event.
Before, the event was ordered (Dialogue -> Abort Battle). But having the message appear LAST fixed it.
(Abort Battle -> Dialogue)
"Does anyone remember the new year 2022? yeah, that was like yesterday. Wait, what do you mean by '2022 is almost over'?"
kuestsdynamisxp001.jpg


Just a glimpse of how Kuests Dynamis XP would look like.
spritesheet.png

made a simple face animation for when character's talk now. He blinks and speaks lol.

Forum statistics

Threads
126,886
Messages
1,182,062
Members
166,675
Latest member
OPOPOP
Top