Condition/String for Skill Learned and Skill Usable?

What is the string for an actor having learned a given skill and for an enemy having a skill included in their actions?

And, if you don't know this, but, what the string for skill usable for enemies and allies?

I know I see something like usable?($data_skills[attack_skill_id])

I'm trying to make it so that for enemy AI, battlers will stall or use Stance to try and avoid attacks in hopes of being healed at low health, and that they will only wait if one of the troop members has the states "Able to Heal" "Has Healing Moves", and the state "Healer". Able to Heal will be auto-applied whenever at least one passive HP-restoring move is usable, Has Healing Moves will be applied when at least one healing move is learned or is in the enemy actions, and Healer will be applied when the enemy strategy is changed to Healer. If any enemy has Has Healing Moves and any enemy has Healer but no enemy is Able to Heal then the enemy will not waste time stalling and will just attack, cept for a little stalling if there is more than one enemy alive.
string? string are simply, texts and stuff...


and yeah, to check for usable:


battler_object.usable?(skill_object)
Thanks.

How would I use battler_object.usable?(skill_object) in a condition?

Like say I'm referring to skill 33...

$game_actors[1].usable?($data_skills[33]) works

so self.usable?($data_skills[33]) should work, I think.

So, self.skill_learn?($data_skills[33])

but what about enemies?
Where are you putting the condition into? What script are you using to do that? Since AFAIK, there's no default option for setting action conditions for enemies/troops or whatever


anyway, if self pertains to the battler object, it will work for both actors and enemies
http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/passive-states/

http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/state-auto-apply/

http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/state-cancel/

http://victorscripts.wordpress.com/rpg-maker-vx-ace/battle-scripts/automatic-battlers/

http://victorscripts.wordpress.com/rpg-maker-vx-ace/gameplay-scripts/enemy-action-conditions/

Passive States, State Auto Apply, State Cancel, Automatic Battlers, and Enemy Action Conditions
I can't open victor's scripts here but, as I say, if self pertains to the battler, then it will work for both actors and enemies since those are both child classes of the battler class...


PS: Next time, make sure to put all relevant info into your opening post...
That's fine. I already know about his stuff. 

I wasn't quite asking for help with compatibility.

They both work normally.

Slime has Heal, conditional branch at start of battle is

$game_troop.members[1].skill_learn?($data_skills[33]), and then it returns as true.

Give it 100 mp and have a branch as 

$game_troop.members[1].usable?($data_skills[33]) and that returns as true as well.
Compatibility? I never talked about that...
Functionality, I should say.
so is this solved?
Unless you'd like to get some popcorn and a movie  🤣

It's solved.
Movie maybe, but popcorn, nah... I don't have enough cash for that right now. 😀
Ugh, skills are considered to be "useable" when you don't even know them. That works against my liking. Is there anything I can do about that?

If not, that's okay though, because I may have a workaround.
Check both conditions then... I mean both usable and learned
<passive state: 182>self.skill_learn?($data_skills[33]) || self.skill_learn?($data_skills[34]);</passive state><passive state: 183>self.usable?($data_skills[33]) || self.usable?($data_skills[34]);</passive state>and first the main character didn't have heal so he didn't have state 182 "Has Healing Moves" but had State 183 "Able to Heal" and I then gave the main character Heal and he then had both states.

I may have it so that an AI condition is that both states are applied. That could be my workaround. I just hope I don't make any mistakes forgetting that skills are "usable" even when you don't have them learned.

Original thread: https://forums.rpgmakerweb.com/threads/condition-string-for-skill-learned-and-skill-usable.25649/