Kionea

Warper
Member
Joined
Sep 23, 2021
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
Basically what I'm trying to do is, I have a variable that's meant to represent stress. As it goes up I want different thresholds to inflict a set of states I've created in order, one state at a time, i.e. the character goes from nervous to scared and the nervous state is removed. Should it go down, the scared state is removed and nervous is readded.

I'm trying to use Yanfly's auto passive states to do it, but from what I understand it only applies states, not removes them, but I'm also having some trouble understanding exactly how to use it. Is there some way I can use it remove the states as well or tie them specific ranges in the variable, say scared is tied to the stress variable being between 60-80?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,250
Reaction score
1,209
First Language
English
Primarily Uses
RMMV
from what I understand it only applies states, not removes them, but I'm also having some trouble understanding exactly how to use it.
By definition, passive states are passively attached to whatever - an actor, item, skill, etc. They are neither applied nor removed. Yanfly is really good about providing thorough documentation you can read through as well as a tutorial video for each plugin.
Is there some way I can use it remove the states as well or tie them specific ranges in the variable, say scared is tied to the stress variable being between 60-80?
So you would make one passive state for every range and put them all on the actor. Then you just do, for example:
Code:
<Custom Passive Condition>
condition = $gameVariable.value(X)>=60 && $gameVariable.value(X)<=80;
</Custom Passive Condition>
and go from there.
 

Kionea

Warper
Member
Joined
Sep 23, 2021
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
So you would make one passive state for every range and put them all on the actor. Then you just do, for example:
Code:
<Custom Passive Condition>
condition = $gameVariable.value(X)>=60 && $gameVariable.value(X)<=80;
</Custom Passive Condition>
and go from there.
I don't understand the syntax here for making the custom passive condition apply to each specific passive state.

Code:
<Passive State: 12>
<Custom Passive Condition>
condition = $gameVariable.value(1)>=20 && $gameVariable.value(1)<=40;
</Custom Passive Condition>

Clearly isn't it as the state is just present automatically during play testing, but I don't see any examples in the documentation on the yanfly wiki for what this should look like.

EDIT: Okay, figured out you put the condition statement on the state's notes and it works, but the states only activate upon entering battle or switching maps.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,250
Reaction score
1,209
First Language
English
Primarily Uses
RMMV
I don't understand the syntax here for making the custom passive condition apply to each specific passive state.
X is the ID of your variable for stress or whatever. The 60 and 80 are the range you asked for as an example. You would continue to put that in each different state with the appropriate numbers.

I don't see any examples in the documentation on the yanfly wiki for what this should look like.
docu.png
Code:
<Passive State: 12>
<Custom Passive Condition>
condition = $gameVariable.value(1)>=20 && $gameVariable.value(1)<=40;
</Custom Passive Condition>

Clearly isn't it as the state is just present automatically during play testing, but I don't see any examples in the documentation on the yanfly wiki for what this should look like.
Where are you putting all of that? The documentation says the Passive State tag is an "Actor, Class, Skills, Weapon, Armor, Enemy" notetag. The thing you want the state attached to, such as your actor, as I said in my previous post.

Then the Custom Passive Condition is the notetag you would put into state 12 to control when it turns on and off.
EDIT: Okay, figured out you put the condition statement on the state's notes and it works, but the states only activate upon entering battle or switching maps.
I'm not sure what to say, it should function - I haven't needed to do it, but a quick search shows other threads where people have used them outside of battle. Make sure you set it up as I described above, check you installed and configured the plugin properly.
 

Kionea

Warper
Member
Joined
Sep 23, 2021
Messages
4
Reaction score
0
First Language
English
Primarily Uses
RMMV
I've been reading other threads, tried a few things myself, everything is set correctly as far as I can tell. States activate when the proper thresholds are reached but only after entering battle or switching maps. If anybody can give any help with this it's much appreciated.

EDIT: Resolved. For anyone that finds this thread on google or something, if you're changing the variable from an event, run this script after the event.

Code:
for (var i = 0; i <= $gameParty.members().length; i++) {

$gameParty.members()[i].refresh();

}
 
Last edited:

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
50
Reaction score
10
First Language
br portuguese
Primarily Uses
RMMV
your timing is wrong.

if yu want to check every turn, use the <turn start> (check the plugin help file for the proper name) notetag.

you probably will need to do some slightly more complex coding.

and inside the notetag, a code like this:

//replace letters X, Y, W, Z and H with the values you need if($gameVariables.value(X) == Y){ user.addState(Z); user.removeState(W); } else if($gameVariables.value(X) == H){ user.addState(W); user.removeState(Z); }

the example above is a passive state that checks a variable and applies and removes states according to its value.
 
Last edited:

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
2,250
Reaction score
1,209
First Language
English
Primarily Uses
RMMV
your timing is wrong.
if yu want to check every turn, use the <turn start> (check the plugin help file for the proper name) notetag.
He doesn't want to check during turns at all, this thread is about using passive states outside of combat.

Also, your conditionals are only looking at specific values, not ranges as the OP requested. See my first reply for some more concise state codes that work.
 

Latest Threads

Latest Posts

Latest Profile Posts

thought I'd upgrade to mz from mv cause of the nice quality of life features but ****ing hell why couldn't they allow old plugins to work in it and secondly how come in over a year since it's release has there been no mz version of something so crucial as a non grid based movement plugin. I guess I'll stick with mv. (why wasnt mz just an update to mv anyway literally nothing substantial changed..)
Something might be coming...
Hallo.png
A new day for creating :)
2021 has been the runner-up for the worst year of my life. 2015 may take that title, but '21 is pushing it. Excuses really don't justify how much of a jerk I've been this year to a lot of people.

I'm sorry. I don't intend to be a jerk forever, but I'd rather back up my intent with actions, not words.

Forum statistics

Threads
116,020
Messages
1,094,982
Members
151,337
Latest member
Laura1999
Top