Yanfly Custom Respond Effect, state does not appear at first try - SOLVED

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
I reduced whole problem to the bone, it is part of yanfly  Buffs & States Core  plugin


Notetag:


<Custom Respond Effect>


var BleedID1 = 63;


target.addState(BleedID1);


</Custom Respond Effect>


State 63 has 5 turns duration. 


My problem is, actor get hit, and he should receive state 63. Nothing visually happen. 


Problem is he "probably" receive it "somehow" because on second hit, he receive status ID 63 with double turns (so 10 turns) probably first one during first attack + second one. 


Second hit works fine with all turn counter, overlay, icon. But first one do not applied state correctly. 


I am missing something obvious. Something like target.refresh to display effect immediately after respond phase?
 
Last edited by a moderator:

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
417
Reaction score
182
First Language
English
Primarily Uses
RMMV
A few possible issues I can think of.  First, why do you have the var BleedID1 code for the state infliction?  I think you can just put 63 in the addState ID code.  I'm not sure if the current setup is hurting anything, but it seems inefficient.


Also, a lot of Yanfly's plugins were updated when MV upgraded to 1.3.0.  An older version may not work properly anymore, so I'd check to make sure that your plugins are as current as possible.
 

Wavelength

Pre-Merge Boot
Global Mod
Joined
Jul 22, 2014
Messages
4,617
Reaction score
3,868
First Language
English
Primarily Uses
RMVXA
I'm not sure about the use of a variable to hold the State ID without an object to call it (you could confirm whether this is the problem by using target.addState(63); and seeing if that fixes anything), but my instinct, based on the fact that it seems to be applying the state without the correct visuals is that you need to do a refresh command on the actor or his status after applying this.  Offhand I don't know the syntax for doing this, but Yanfly does use the "refresh" in a lot of his Lunatic Mode code in his Tips & Tricks videos, so you could almost definitely find it by watching some T&T's.
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
Thank you both, 


reason why I use ID is because in my real script there is some math (it can lead into few different results based on variables). Math part working without fault, but I wanted to pinpoint source of problem - which is missed state visuals, not the math part and it is not necessary to include few dozens math lines not related to problem here :).


With  target.addState(63);  it results into same problem - no visual for first state connect.


In fact, the real state effect is skipped for first state apply too (negative HP regenereation) - but it somewhere stores turns and add them to second apply (as I use add turn policy). Second try of the same state connect correctly, with effect and visual and turns counted from both cases. 


I will keep looking inside T&T' videos, I had no luck with refresh actor syntax yesterday. 


edit: I am  using last updated plugin versions, same pro RPG maker libraries.
 
Last edited by a moderator:

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
Solved. 


If I call first state from Yanfly action sequence, visuals works, If it   is called from editor traits table it works without visuals. Since it is planned to be called via action sequence (trait calling was used just for testing purposes) it is fine enough for me :). Thank you all for your time.  
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts


The main character of the book)
Things you can say about your rpg maker project but not your bf/gf: I'm not super committed but it's fun to play around with it.
putting a puzzle in my game that BSODs the player's computer if they complete it
I finally got a book out the door after seven years of nothing \^-^/ Now if I can get a game out the door too, that'd be great...

Forum statistics

Threads
94,366
Messages
920,302
Members
124,132
Latest member
voltrone
Top