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

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
1) You gonna need to learn basic actor conditions like checking states [which is I think, actor.state?(id)]...


2) No not so stupid player will do that, trust me... else you gotta make variations to the battle flow so that you can reselect a command which is not really easy... just to fix something that is quite logical... or if you don't wanna request, use a CTB or an ATB so that commands are executed right after you select them... that will fix away all your worries...
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
1) You gonna need to learn basic actor conditions like checking states [which is I think, actor.state?(id)]...

2) No not so stupid player will do that, trust me... else you gotta make variations to the battle flow so that you can reselect a command which is not really easy... just to fix something that is quite logical... or if you don't wanna request, use a CTB or an ATB so that commands are executed right after you select them... that will fix away all your worries...
1. ...Which is why I'm asking for support since I don't know that...

2. I've yet to find a single CTB or ATB script that wasn't a buggy mess. This does not fix the problem anyway.

The only problem I'm having is that it requires both actors to have the TP needed for one of them to cast the TP skill in question. I don't want that to happen. If it can be fixed so that their usage of a TP skill does not depend on the other character's TP, and only on their state, then I have no problems.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Already told you how to check state...

You gonna need to learn basic actor conditions like checking states [which is I think, actor.state?(id)]...
so in your case, I guess it would be


!$game_party.battle_members[1].state?(1) and !$game_party.battle_members[2].state?(1)


that should return true if both actors are still alive and kicking... though that wouldn't fit on a single note line...
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Already told you how to check state...

so in your case, I guess it would be

!$game_party.battle_members[1].state?(1) and !$game_party.battle_members[2].state?(1)

that should return true if both actors are still alive and kicking... though that wouldn't fit on a single note line...
I actually need to check for three states. 1, 28 and 29.

So if I can't do that... then what?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
!$game_party.battle_members[1].state?(1) and !$game_party.battle_members[2].state?(1) and !$game_party.battle_members[1].state?(28) and !$game_party.battle_members[2].state?(28) and !$game_party.battle_members[1].state?(29) and !$game_party.battle_members[2].state?(29)

or

(assuming states array is directly accessible)

if you can't do that, you can always make it as a custom method somewhere and use that method...

like

Code:
module Push  def self.button    return !$game_party.battle_members[1].states.any?{|id| [1,28,29].include?(id)} and !$game_party.battle_members[2].states.any?{|id| [1,28,29].include?(id)}  endend
then on your condition, just use Push.button
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
!$game_party.battle_members[1].state?(1) and !$game_party.battle_members[2].state?(1) and !$game_party.battle_members[1].state?(28) and !$game_party.battle_members[2].state?(28) and !$game_party.battle_members[1].state?(29) and !$game_party.battle_members[2].state?(29)

or

(assuming states array is directly accessible)

!$game_party.battle_members[1].states.any?{|id| [1,28,29].include?(id)} and !$game_party.battle_members[2].states.any?{|id| [1,28,29].include?(id)}
Would that work with Tsukihime's script?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
As long as it supports ruby formulas, it should

if you can't do that (doesn't fit), you can always make it as a custom method somewhere and use that method...

like

Code:
module Push  def self.button    return !$game_party.battle_members[1].states.any?{|id| [1,28,29].include?(id)} and !$game_party.battle_members[2].states.any?{|id| [1,28,29].include?(id)}  endend
then on your condition, just use Push.button
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
As long as it supports ruby formulas, it should
Putting it like it was in your previous post causes it to crash here:



Crashes when opening the menu when TP condition has been met, but if you try and open the menu before you have enough TP, it doesn't crash.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Then I guess that means it doesn't support multi lines or something, so you need to do the custom method I posted


also, when you encounter an error, make it a habit to take a screenie of it or at least write down the whole error message
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Then I guess that means it doesn't support multi lines or something, so you need to do the custom method I posted

also, when you encounter an error, make it a habit to take a screenie of it or at least write down the whole error message
Um... Where do I put that? The custom method I mean.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
make a new script then put it there...
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Just create a blank script and paste the code I posted... It's the same as when you placed Hime's script into your project...
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
2) No not so stupid player will do that, trust me... else you gotta make variations to the battle flow so that you can reselect a command which is not really easy... just to fix something that is quite logical... or if you don't wanna request, use a CTB or an ATB so that commands are executed right after you select them... that will fix away all your worries...
This is what I would recommend.


The problem is that a skill was usable when you first selected it, but then it was no longer usable when it came time to use it.


So, instead of having separate command input and action execution phases, just make it so that when you enter your input, it is executed.
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
As long as it supports ruby formulas, it should
Yeah this doesn't work at all.



The game crashes the moment I try to boot a test battle.

This is what I would recommend.

The problem is that a skill was usable when you first selected it, but then it was no longer usable when it came time to use it.

So, instead of having separate command input and action execution phases, just make it so that when you enter your input, it is executed.
But this DOESN'T FIX THE PROBLEM.

Even if I have a battle system that does this, if one character's turn comes up and they use a TP skill, putting them at 0 TP, when the next character's turn comes up, even if they have met the TP requirement for one of their skills, they won't be able to use it because it keeps trying to check the TP value of the other actor. I'm trying to tell you that I DO NOT WANT THIS TO HAPPEN.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Your skill requires both actors to be able to use their own skills.


One actor has insufficient TP, therefore, one actor can't use their skill, and therefore it can't be used.


I don't understand what the problem is, nor do I understand what you want to do, because what you're doing contradicts what it means to be able to use a skill.
 
Last edited by a moderator:

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Your skill requires both actors to be able to use their own skills.

One actor has insufficient TP, therefore, one actor can't use their skill, and therefore it can't be used.

I don't understand what the problem is, nor do I understand what you want to do, because what you're doing contradicts what it means to be able to use a skill.
...You don't seem to be understanding what I'm saying.

1. I want Actor A to be able to use a skill, provided that Actor A or Actor B are not afflicted with the death, freeze or shock states.

2. I want Actor A to only be able to use the skill in question when they have at least 10 TP.

3. I do not want Actor B's TP to be called into question. Actor B's TP does not matter when Actor A uses this skill.

It's not a hard concept to grasp...
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Then all you need to is check whether actor B has a certain state, which is what Engr. wrote...except for some reason it doesn't work. You can just copy that into the note-box.

!$game_party.battle_members[1].states.any?{|id| [1,28,29].include?(id)} && !$game_party.battle_members[2].states.any?{|id| [1,28,29].include?(id)}That assumes you always have two actors in the party, and only those two as the 2nd and 3rd actors, but I'm assuming that's what you wanted.The formula I gave you before was under the assumption that actor B needed to be able to use the skill, cause you wanted them to actually be able to use the respective skills

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.
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
@Push - go to the script and make the condition run in only 1 line (cannot show it here coz the page wraps it up), I think the break made it invalid...
 

Little Paw

Veteran
Veteran
Joined
May 5, 2013
Messages
707
Reaction score
294
First Language
English
Primarily Uses
Then all you need to is check whether actor B has a certain state, which is what Engr. wrote...except for some reason it doesn't work. You can just copy that into the note-box.

!$game_party.battle_members[1].states.any?{|id| [1,28,29].include?(id)} && !$game_party.battle_members[2].states.any?{|id| [1,28,29].include?(id)}That assumes you always have two actors in the party, and only those two as the 2nd and 3rd actors, but I'm assuming that's what you wanted.The formula I gave you before was under the assumption that actor B needed to be able to use the skill, cause you wanted them to actually be able to use the respective skills
So we had a misunderstanding...

However... it still doesn't work...

First of all... I don't know why you assumed I was working with the 2nd and 3rd actors... having [1] and [2] there causes the game to crash when I attempt to use the skill. [0] and [1] is what I needed...

But now it's like the formula does nothing. One of them was dead and the other was still able to use their TP attack.



State 1 is death, and it should prevent them from using the skill if their ally is dead... but it doesn't...
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top