New account registration is temporarily disabled.

[RMMV] REMOVE BUFF AFTER A CHARACTER IS RESURRECTED?

Posts

Pages: 1
The title really doesn't make sense without context, so hear me out. I made a skill which can ONLY be used by one character and can only be USED if another specific character is dead during battle.

One character is called Zephyr, he's the one that uses the skill to get a buff.
The other character is called Yamato, he's the one that needs to be dead for the skill to be usable.

When Yamato faints during battle, Zephyr's skill becomes active and gives him a buff (atk, def etc.).

But what I cannot figure out, is how to make it so the skills' buff goes away, once Yamato is resurrected again during battle. Cause what happens right now is:
Yamato faints -> Zephyr uses skill to get buff -> resurrect Yamato -> Zephyr still has buff

Hope any of you understand what I'm trying to say here. In any case, I have no clue as to how to fix this as someone else helped set this up for me at one point in time. But this was 2 years ago or so.

Here is what is written on the Skills' note:

<Custom Requirement>
if ($gameActors.actor(1).isStateAffected(1) && !user.isStateAffected(32)) {
value = true;
} else {
value = false;
}
</Custom Requirement>


gameActors.actor(1) = Yamato
isStateAffected(1) = Knockout (obviously)
user.isStateAffected(32) = the buffs being given to Zephyr when the skill is used.


Simply put now that you know the story, how can I make it so that Zephyr loses the buff when Yamato is resurrected? Hope any of what I wrote makes sense and that anyone can help me fix this.
Thanks in advance for anyone who can offer me some help!
Marrend
Guardian of the Description Thread
21806
I'm certainly no expert on the matter, but, it seems to me that the state that is being applied to Zephyr when he uses the skill in question could have it's own custom requirement. I don't know if custom requirements can be applied to states, but, if they can, it might look like...
if($gameActors.actor(1).isStateAffected(1) {
  value = true;
} else {
  value = false;
}
...this?

*Edit: Naturally, I highly recommend referencing the instructions for the plug-in to see if this is even possible. Otherwise, I think it's possible to do this through event commands and the Troop tab. I won't go into detail with this idea unless my initial idea is somehow viable.
have you tried adding something to the damage formula for Zephyr's skill?

e.g. a.removeState(32); <rest of the damage formula>
author=Marrend
I'm certainly no expert on the matter, but, it seems to me that the state that is being applied to Zephyr when he uses the skill in question could have it's own custom requirement. I don't know if custom requirements can be applied to states, but, if they can, it might look like...
if($gameActors.actor(1).isStateAffected(1) {
  value = true;
} else {
  value = false;
}

...this?


It's from Yanfly's Skill Core plugin, so I believe this is strictly for skills and not states. The only thing the state is for, is to give all of the buffs.

I'm thinking another Custom Requirement needs to be added to the skills' note, but just to remove the effect IF Yamato is resurrected. I don't know what needs to be written specifically for it to recognize that though.

author=meteomage
have you tried adding something to the damage formula for Zephyr's skill?

e.g. a.removeState(32); <rest of the damage formula>


I have not actually, the skill has nothing in the damage formula. Cause it is a skill that applies to the user. Meaning if I were to add a.removeState(32), it would just remove the state from himself without having used it.

Unless you have another idea to make it work? I'm all ears to solutions really.
Marrend
Guardian of the Description Thread
21806
Unless you have another idea to make it work? I'm all ears to solutions really.

The other idea I had was to use a Common Event that's used in each battle that contains something like...

CONDITIONAL BRANCH: [Yamato] is [Death] Inflicted
ELSE
CHANGE STATE: [Zephyr], -[BUFF STATE]
...this.

The condition in the Troop Tab would probably have to be "Turn 1*X" (ie: from turn 0 onward) with a span of "Turn" (ie: triggers once per turn). While I'm looking this stuff up with Ace, I'm mostly sure MV would have similar functionality in it's eventing.
author=Marrend
The other idea I had was to use a Common Event that's used in each battle that contains something like...

CONDITIONAL BRANCH: [Yamato] is [Death] Inflicted
ELSE
CHANGE STATE: [Zephyr], -[BUFF STATE]

...this.


Trying to do just that, but I don't think I'm doing it right as it's not working. Though I do get the idea behind it. Let me know what you find.
I have not actually, the skill has nothing in the damage formula. Cause it is a skill that applies to the user. Meaning if I were to add a.removeState(32), it would just remove the state from himself without having used it.

Unless you have another idea to make it work? I'm all ears to solutions really.


Oh sorry, I misread it. I thought Z gets the buff automatically when Yam dies, and gets a skill to revive Yam.

Marrend's second idea should work, because I know I've done something similar except opposite and with enemies (You kill 1 enemy to remove a state from another).
author=meteomage
Marrend's second idea should work, because I know I've done something similar except opposite and with enemies (You kill 1 enemy to remove a state from another).


I tried setting it up, but it didn't work. I must be doing something wrong.
I went to the troops section and made a new event page. Set the condition to turn 1. As for the rest:


CONDITIONAL BRANCH: If [Yamato] is affected by [Death]

ELSE
CHANGE STATE: [Zephyr], -[BUFF STATE]


The span is set to "turn" just like Marrend suggested, but when Yamato is revived, the state is not going away.

Here's a screenshot to show what I have:
Marrend
Guardian of the Description Thread
21806
What that screencap reads for it's condition is "Turn 1" (ie: triggers on Turn 1), not "Turn 1*X" (ie: triggers on turn 0, and each turn afterwards). Huge difference!

*Edit: It should just be a matter of flipping where the "1" is.
author=Marrend
What that screencap reads for it's condition is "Turn 1" (ie: triggers on Turn 1), not "Turn 1*X" (ie: triggers on turn 0, and each turn afterwards). Huge difference!

*Edit: It should just be a matter of flipping where the "1" is.

Sorry about that, me just being a goofball and getting it wrong!



So I flipped the numbers, it's set to Turn 0 + 1 * X right now. The state is still not being removed after he's being revived. Everything seems fine though. I don't know what I'm doing wrong now.

Edit: I played around a bit, and also ticked "Turn End" on in the Conditions tab. Now if he gets revived, the state does get removed. Only that it happens, well, at the end of the turn. But I still can't get it to go away, once he's actually revived before the turn ends. That is what I'd like :(
Marrend
Guardian of the Description Thread
21806
I mean, I'm not 100% sure if we can be as precise as to remove the state at the exact moment Yamato is resurrected. There is a certain point that one should be happy with a result, even if it's not exactly the result one was hoping for. Though, I don't necessarily consider myself a perfectionist my any means.

However, since you're looking at "Turn End" within the state (I think you're in the state tab?), perhaps changing it to "Action End" instead would be a little better?
Yeah I was going to say something similar. Initially, I think, you'd have to make a page in the monster TROOP, and make the page a 1x+1 turn, meaning each turn that is taken, the page will kick in.
Then, you have to add a conditional branch, as stated as an IF statement:

CONDITIONAL BRANCH: If is affected by

BUT! I think you have to add more of these, a couple of them to remove the BUFF state, because I don't know if you remember how that works, but buffs are stacked. Meaning the more the buff is used during battle the buff is stacked. So you may have to add this:

ELSE

CHANGE STATE: , -
CHANGE STATE: , -
CHANGE STATE: , -

Doing it once won't do it, maybe. I'd have to see what's going on to figure it out though.
Pages: 1