RMMV Problem replicating the buff effect shown in the image, on other enemies

NotAHero

Villager
Member
Joined
Mar 27, 2018
Messages
14
Reaction score
0
First Language
Portuguese - BR
Primarily Uses
RMMV
- Main Plugin (Yanfly BuffstateCore)

As shown in the image, I tried to make sure that when the enemy has a De(buff), the effect on the animation happens on the enemies too, something like: Beginning of the Battle, Character has the 'Weaken' ability and right at the beginning of the battle , the character reduces enemies' attack by 1 stage. Then shortly afterwards, the animation (Debuff) would happen to the enemies (all, in this case).

rpgmv.png

An example of a passive state I'm using, where the animation takes place on the actor:

Code:
 <Custom Battle Effect>
if (target.isStateAffected(188)){
target.startAnimation(410);}
 </Custom Battle Effect>
--------------
 <Custom Battle Effect>
if (target.isStateAffected(188)){
target.startAnimation(400);}
 </Custom Battle Effect>
------------------
<Custom Battle Effect>>
if (user.isBuffAffected(2)){
target.startAnimation(410);}
</Custom Battle Effect>>
------------------------
<Custom Battle Effect>
{user.addBuff(2, 10);}
</Custom Battle Effect>

Would anyone know how to adjust the plugin's commands to perform animation on enemies too?
 

NotAHero

Villager
Member
Joined
Mar 27, 2018
Messages
14
Reaction score
0
First Language
Portuguese - BR
Primarily Uses
RMMV

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
54
Reaction score
12
First Language
br portuguese
Primarily Uses
RMMV
"Fúria"... i woud assume youre a fellow brazilian/portuguese dev. and since youre using yanflys plugin, im assuming you have them all.

first, a passive state would not have a target when a battle starts. i believe it should be user. instead of target.

you could use a bit of code to add, remove, damage...

JavaScript:
<Custom Battle Effect>
   //get a list of alive enemies (since theyre all alive at this point.
   for(var i = 0; i < foes.aliveMembers().length; ++i){
    //while the list runs, select a member...
    var member = foes.aliveMembers()[i];
    //...and reduce stats, cause damage and whatever else you want:
    member.startAnimation(X); // change X for the id, you know the drill.
    member.addState(Y);
    member.addBuff(Z, W); //and so on...
   }
</Custom Battle Effect>
 

NotAHero

Villager
Member
Joined
Mar 27, 2018
Messages
14
Reaction score
0
First Language
Portuguese - BR
Primarily Uses
RMMV
"Fúria"... i woud assume youre a fellow brazilian/portuguese dev. and since youre using yanflys plugin, im assuming you have them all.

first, a passive state would not have a target when a battle starts. i believe it should be user. instead of target.

you could use a bit of code to add, remove, damage...

JavaScript:
<Custom Battle Effect>
   //get a list of alive enemies (since theyre all alive at this point.
   for(var i = 0; i < foes.aliveMembers().length; ++i){
    //while the list runs, select a member...
    var member = foes.aliveMembers()[i];
    //...and reduce stats, cause damage and whatever else you want:
    member.startAnimation(X); // change X for the id, you know the drill.
    member.addState(Y);
    member.addBuff(Z, W); //and so on...
   }
</Custom Battle Effect>
"Fúria"... i woud assume youre a fellow brazilian/portuguese dev
Sim" :LZSsmile: .

1) I just don' know if you get me wrong but, how can I know the character (enemy) id?

2) I found this video


where you can see the effect properly working.
All the part of "reduce state" etc.. I know hot to make work somehow, but will the animation run on the enemies?
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
54
Reaction score
12
First Language
br portuguese
Primarily Uses
RMMV
you probably meant index when asking for enemy id... ill have to check it later when i reach home.

the video is kind of messy... is that some pokemon game? i saw some skill animation over the 1st layer monsters and something about intimidation... i saw the animation playing on every one in a same line.

did you tried my example? have it worked? can you explain again what do you need done?
 

NotAHero

Villager
Member
Joined
Mar 27, 2018
Messages
14
Reaction score
0
First Language
Portuguese - BR
Primarily Uses
RMMV
Yes, I tried and got this error

erro.png

As you could see in the video, I just need an animation to run on every enemy at the start of the battle.
And yes, is a pokémon game (black white): wich at the start of the turn, the pokémon with 'Initimidate', decreases the enemies attack stat in one stage.

What I managed Do: Run the state effect, the animation effect (actor with the ability) and the debuff effect on enemies, but with no animation showing what happened to the enemies.

I tried to join your code with mine, tried it alone but got the error every time i tried.
you probably meant index when asking for enemy id... ill have to check it later when i reach home.

the video is kind of messy... is that some pokemon game? i saw some skill animation over the 1st layer monsters and something about intimidation... i saw the animation playing on every one in a same line.

did you tried my example? have it worked? can you explain again what do you need done?
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
54
Reaction score
12
First Language
br portuguese
Primarily Uses
RMMV
that image alone don't say much... when something like that happen, press F8 to open the error console.

now, can you paste here the code you put in the skill notetag?
 

NotAHero

Villager
Member
Joined
Mar 27, 2018
Messages
14
Reaction score
0
First Language
Portuguese - BR
Primarily Uses
RMMV
I already changed the formula a few times, but it's basically this

Code:
<Category: Talento>
<Foe Aura: 73>
<Custom Battle Effect>
if (user.isStateAffected(187)){
user.startAnimation(401);}
</Custom Battle Effect>
-----
<Custom Confirm Effect>
if (target.isDebuffAffected(2)){
for(var i = 0; i < foes.aliveMembers().length; ++i){
var member = foes.aliveMembers()[i];
member.startAnimation(399);
   }}
</Custom Confirm Effect>
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
54
Reaction score
12
First Language
br portuguese
Primarily Uses
RMMV
custom confirm effect notetag is for when someone is targeted by some skill and its being confirmed as a hit (different from a miss). nobody is being targeted at this moment by any skill. its the turn zero and the battle just started.

if the effect happens every turn, then use custom turn effect notetag or the custom battle effect if only when each battle starts.

heres the codes we created, combined:

Code:
<Custom Battle Effect>
   //this is set to happen every turn zero of each battle for as long as a battler...
   //...has a state with this notetag.
   //if this effect is meant to happen every turn automatically,...
   //...change to <Custom Turn Effect>. either way, put it on a state.
   //if its meant for when a skill is used, change to <damage formula> or <Custom Execution>

   //if on a state, if an actor has it, enemies will suffer its effect. if an enemy...
   //...has it, actors will suffer the effect.
   //if its a skill, the scope should be the user itself and will happen only when the skill is used.

   //get a list of alive opponents (since theyre all alive at this point):
   for(var i = 0; i < user.opponentsUnit().aliveMembers().length; ++i){
    //while the list runs, select a member...
    var member = user.opponentsUnit().aliveMembers()[i];
    //...and reduce stats, cause damage and whatever else you want:
    member.startAnimation(401); // 401 from your code
    member.addState(Y); // or member.addDebuff(Z, W)
    member.addBuff(Z, W); //and so on...
   }
</Custom Battle Effect>
 

NotAHero

Villager
Member
Joined
Mar 27, 2018
Messages
14
Reaction score
0
First Language
Portuguese - BR
Primarily Uses
RMMV
It's working almost perfectly, but the animation is running only on the first enemy, and not the others.

enfraquecer.png

Here the formula you gave me with my settings:

Code:
<Custom Battle Effect>

for(var i = 0; i < user.opponentsUnit().aliveMembers().length; ++i){
var member = user.opponentsUnit().aliveMembers()[i];

member.startAnimation(467);
member.addDebuff(2, 5);
member.startAnimation(466);

   }
</Custom Battle Effect>
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
54
Reaction score
12
First Language
br portuguese
Primarily Uses
RMMV
i see... try like this:

Code:
<Custom Battle Effect>
   var members = user.opponentsUnit().aliveMembers();
   var extraTargets = members.length;
   while(extraTargets--){
      var member = members[extraTargets - 1];
      member.startAnimation(467);
      member.addDebuff(2, 5);
      member.startAnimation(466);
   }
</Custom Battle Effect>

also, if the animations dont work, check to see if the debuff is applied on everyone.
 
Last edited:

NotAHero

Villager
Member
Joined
Mar 27, 2018
Messages
14
Reaction score
0
First Language
Portuguese - BR
Primarily Uses
RMMV
also, if the animations dont work, check to see if the debuff is applied on everyone.
The debuff and the animation is working only on the first enemy (the color of the targets is working properly, when the animation starts), maybe is a problem with the way the animations were made, idk.

I will change the size of the animation to make it "work" on all of the targets.

By the way, you helped me a lot, thank you so much man ;)

I'll give you credit when the game is ready. :LZSsmile:
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
54
Reaction score
12
First Language
br portuguese
Primarily Uses
RMMV
ive made a test on my project and it worked...


in this test, ive made a skill that adds the state to its user (with a cracked blue ball icon) and this state makes so that every turn start, misfortune happens to the user opponents.

as im not much of a fan of the default buff and debuff, ive added a state (which does nothing, adds a flame icon and lasts 3 turns).

so, an animation plays (the default number 3, some kind of explosion) and the state is added.

the code used in the user state was:

JavaScript:
<Custom Turn Start Effect>
   for(var i = 0; i < user.opponentsUnit().aliveMembers().length; ++i){
      var member = user.opponentsUnit().aliveMembers()[i];

      member.startAnimation(3);
      member.addState(9);
   }
</Custom Turn Start Effect>

EDIT: one thing thats important noting (i just realized it as ive nerver coded a state like this before) is that you can only make one animation visible per target. this is because if you call many animations in sequence, the code will call them all at once and many may overlap or just dont be visible. this happens because theres no "wait for animation" while using codes like this (in contrast to when using yanflys action sequence packs, in which you have a command wait for animation available). one work around would be having a single custom animation well timed making all that you need.

By the way, you helped me a lot, thank you so much man ;)

I'll give you credit when the game is ready. :LZSsmile:

thanks, bro. we are a community and we grow as we help each other.
 
Last edited:

Latest Threads

Latest Profile Posts

So technically I just ate sausages that were a year old. Use by date was 12/27/2021. But since those dates are just guesses with no scientific reasoning behind them I'll prolly be fine. Guess I know soon if I'm praying to the Porcelain God.
People laughed at me when I said that Activision Blizzard would get bought up by another company if they didn't fire their execs. Now their value has dipped so much Microsoft is willing to buy the company, likely followed by some heavy terminations if they want to purify the current toxic image of Activision Blizzard.
Pro tip: don't be this person.1642536788532.png
ok hear me out here: if the only way my brain can describe things is like with colors is this normal? Like I've described a smell as "dark green and fuzzy" and a taste as "dark blue" like is this a normal thing that happens to people or am I just going insane?? o.0

Forum statistics

Threads
118,490
Messages
1,116,334
Members
155,477
Latest member
ModdedGen
Top