rivelle

Villager
Member
Joined
Jan 16, 2023
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Hello!

I was trying to use it as a state that is called via a self buff skill. The state icon appears after using the skill, but the effect does not work(no barrier).

So I tried using it as a skill(adding a specific amount of barrier each skill use). It does work, BUT I want it to last only after the turn it was used: so, if in turn1 I use the skill, ended my turn, enemy uses their turn and my barrier was not broken, in my turn2, I want it to be automatically be removed.

Now I know you can specify how long the barrier lasts, the problem is that the skill I attaching it to can be used multiple times in 1 turn, so the expiration stacks on top of each other: so if I use the skill twice in 1 turn, instead of it expiring after 1 turn, it doesn’t because I used it twice, the expiry is now 2 turns.

Is there a solution to this?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,875
Reaction score
6,676
First Language
English
Primarily Uses
RMMV
Hello!

I was trying to use it as a state that is called via a self buff skill. The state icon appears after using the skill, but the effect does not work(no barrier).
Correct. If you look at the instructions for the plugin, the notetags to give barrier points are for Skills and Items, they don't work in states.

So you either put it as a notetag in the skill or use the JavaScript calls in conjunction with Buffs & States notetags.

So I tried using it as a skill(adding a specific amount of barrier each skill use). It does work, BUT I want it to last only after the turn it was used
Give the appropriate timing to your state. Reference the bottom of the Barrier Points instructions and give your state the notetag from Buffs & States Core:
Code:
<Custom Leave Effect>
user.loseBarrier(user.barrierPoints());
</Custom Leave Effect>

so if I use the skill twice in 1 turn, instead of it expiring after 1 turn, it doesn’t because I used it twice, the expiry is now 2 turns.
Give the state this notetag:
Code:
<Custom Apply Effect>
if (user.isStateAffected(stateId))
    user._stateTurns[stateId]++;
</Custom Apply Effect>
 

Latest Profile Posts

Despite OPT2 praise it still has some strange stories in it. Lady Mikka is trying to work herself to death because of guilt. Guilt over what? ¯\_(ツ)_/¯ So instead of finding a NPC to have a heart to heart with her they decide the cure is a new kimono. So when she drops dead she'll at least be well dressed. I haven't even got to the strange part yet.
Did so much work on the game today. I wish I could post it all in this status update but there is a character limit of course haha. I thought about making a topic for updates, though... maybe.
The most recent sign that I am old. I have done martial arts for over 4 decades. Never HAD to stretch out. Good, of course, but never required. Was doing some kicks in the kitchen because, why not, and I felt a pop in the back of my thigh. Now I am limping around. Gotta love getting old.
One of the biggest perks of being fluent in English is how many new and interesting recipes I am able to find and try out that I would have hardly come across if I just spoke my mothertounge :3

Forum statistics

Threads
131,682
Messages
1,222,219
Members
173,435
Latest member
TheAmplifier
Top