Is it possible to restrict a skill's usage if another actor is incapable of acting?

For example, let's say I want to make a "team combo attack" (I actually made a script request similar to this but this thread is more about me trying to wing it and make the half-assed version of what I wanted), and in order for Actor A use this attack, Actor A must have the required amount of TP to perform this action and not be dead/paralyzed/otherwise unable to act, PLUS Actor B must ALSO be in a suitable state to act (not dead/paralyzed/etc), even though they are not directly using the skill.

A simple comparison would be Vivi and Steiner in Final Fantasy IX. In order for Steiner to use his Sword Magic skills, Vivi must be in the party and must also not be dead or otherwise unable to act.

Is there any way to do this without scripts? If not, what sort of script would I need?
yes, within limits.


Any skill can call a common event, and that event can check and do a lot.


Basically you'll need two skills (or more): one that simply calls a common event, and then one or more skills that are force-actioned by the common event depending on the checked conditions. For example, if the conditions for the full skill aren't fulfilled, the common evewnt could then trigger a regular attack or a low-power-version.


The main problem with this is that common events are executed after battle actions, placing the skill use outside the regular turn sequence.


If that is no problem, then you can do it that way.
yes, within limits.

Any skill can call a common event, and that event can check and do a lot.

Basically you'll need two skills (or more): one that simply calls a common event, and then one or more skills that are force-actioned by the common event depending on the checked conditions. For example, if the conditions for the full skill aren't fulfilled, the common evewnt could then trigger a regular attack or a low-power-version.

The main problem with this is that common events are executed after battle actions, placing the skill use outside the regular turn sequence.

If that is no problem, then you can do it that way.
But I kind of need it where you can't actually select the skill unless both characters are ready to act.
http://himeworks.wordpress.com/2013/11/26/custom-use-conditions/

If a use condition is not satisfied, then the skill cannot be selected.

Custom use conditions allow you to define formulas for use conditions.

You can check whether everyone required to perform the skill is in able to use by checking things like them being in the party and able to use the skill

p.battle_members.include?($game_actors[2]) && $game_actors[2].usable?($data_skill[10])EDIT:typo:

Code:
p.battle_members.include?($game_actors[2]) && $game_actors[2].usable?($data_skills[10])
http://himeworks.wordpress.com/2013/11/26/custom-use-conditions/

If a use condition is not satisfied, then the skill cannot be selected.

Custom use conditions allow you to define formulas for use conditions.

You can check whether everyone required to perform the skill is in able to use by checking things like them being in the party and able to use the skill

p.battle_members.include?($game_actors[2]) && $game_actors[2].usable?($data_skill[10])
Well, but they wouldn't be able to USE the skill.

In this game, there's 2 party members, the knight and the mage.

If the knight initiates the team attack, then it's generally something like a magically enhanced sword attack. If the mage does, it's an enhanced spell using the mana (not actual MP drain) of the knight.

So they have completely separate pools of Team Attacks. They wouldn't be able to use each other's skills in that way.
You wanted a solution that will restrict you from using a skill. That's all that script does.
You wanted a solution that will restrict you from using a skill. That's all that script does.
Well... then it's not going to work, as it does not restrict the skill in the way I need it to...
I don't understand the problem

in order for Actor A use this attack, Actor A must have the required amount of TP to perform this action and not be dead/paralyzed/otherwise unable to act, PLUS Actor B must ALSO be in a suitable state to act (not dead/paralyzed/etc), even though they are not directly using the skill.
That's basically


1. putting a TP requirement for your skill, which can be done using the database editor


2. using a formula for the second condition


If the second actor is not in a "suitable" state to act, then the first actor can't use the skill.


That's exactly what the script does. While it requires you to know how to write the formula, that doesn't mean it doesn't do what you want.
I don't understand the problem

That's basically

1. putting a TP requirement for your skill, which can be done using the database editor

2. using a formula for the second condition

If the second actor is not in a "suitable" state to act, then the first actor can't use the skill.

That's exactly what the script does. While it requires you to know how to write the formula, that doesn't mean it doesn't do what you want.
But I thought you meant that Actor B also had to have the skill in order for it to work?
I don't know what I said up there but it was just an example.
http://himeworks.wordpress.com/2013/11/26/custom-use-conditions/

If a use condition is not satisfied, then the skill cannot be selected.

Custom use conditions allow you to define formulas for use conditions.

You can check whether everyone required to perform the skill is in able to use by checking things like them being in the party and able to use the skill

p.battle_members.include?($game_actors[2]) && $game_actors[2].usable?($data_skill[10])
Okay I tried to use this, but this happened:

3aDcFEb.png


Did I do something wrong?

When I open the menu that the skill is in BEFORE I have enough TP to use it, I can open the menu just fine and it's just greyed out.

But once I have sufficient TP to use the skill, when I open the menu where the skill is, it crashes with that. I don't even get to the point of attempting to use the skill.

And yes, Actor 12 = the one trying to use the skill and Actor 13 = the one I want to check is alive. The skill in question is skill 150.
My typo. It's `$data_skills` with the `s` at the end.
My typo. It's `$data_skills` with the `s` at the end.
Awesome. Now it works just as intended. Though I still need to figure out how to get this battle system I'm using to work properly...
Okay I've been playing around with it and run into a few problems...

First of all, the restriction that they must both be capable of performing the skill (not dead) seems to work.

But it acts very strangely otherwise.

First of all, both actors must have enough TP to perform the skill. In this case, I didn't want this to happen. All I really want is to check if the other actor is dead/otherwise immobile or not.

But the biggest problem is that, if you select TP skills for both actors, but the first actor's skill causes their TP to fall below the required TP for the other actor's skill, then the other actor's turn is completely skipped.

Any idea how to fix this?
I'm going to pop this over into RGSSx Script Support
I still need help with this 🙁
My use conditions are very strict. I don't have a solution for your special case where someone is no longer able to use the skill, but because they COULD have used it before, you're still allowed to use it.


For example say you have a skill that consumes an item to use.


If you only have one of that item, and two people are trying to use the skill, should both people be allowed to execute it?
My use conditions are very strict. I don't have a solution for your special case where someone is no longer able to use the skill, but because they COULD have used it before, you're still allowed to use it.

For example say you have a skill that consumes an item to use.

If you only have one of that item, and two people are trying to use the skill, should both people be allowed to execute it?
So what do you suggest that I do?
First of all, both actors must have enough TP to perform the skill. In this case, I didn't want this to happen. All I really want is to check if the other actor is dead/otherwise immobile or not.


But the biggest problem is that, if you select TP skills for both actors, but the first actor's skill causes their TP to fall below the required TP for the other actor's skill, then the other actor's turn is completely skipped.
1) Then just check if it's still alive (does not have death state) or has any immobilization state


2) Because as a player you shouldn't use any skill that might reduce the other actor's TP to below what he needs... that's just a bad thing to do as a player... Now if it's caused by an enemy, then ur unlucky and it's one of those sudden tactic changes that you need to mid-battle... and almost all if not all normal turn based battles act like that...


You can't really do anything about it as long as it's the default turn-based battle... unless you wanna add a functionality such that if for some reason they cannot suddenly execute the skill that he needs to execute, you reshow the command selection for him... which is not a so easy thing to do...


or you can opt to do the skill cost performing right after he choose a command or right after all commands have been set, though it's still not a good idea, and can also produce things like your original problem... which is not really a problem IMO, but rather things that keep turn based battles interesting...
1) Then just check if it's still alive (does not have death state) or has any immobilization state

2) Because as a player you shouldn't use any skill that might reduce the other actor's TP to below what he needs... that's just a bad thing to do as a player...

You can't really do anything about it as long as it's the default turn-based battle... unless you wanna add a functionality such that if for some reason they cannot suddenly execute the skill that he needs to execute, you reshow the command selection for him... which is not a so easy thing to do...
1. But that's what I'm trying to do and I don't know how ._.

2. But it shouldn't matter. I do not want that to happen in the first place.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-restrict-a-skills-usage-if-another-actor-is-incapable-of-acting.21887/