public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

[Solved] Enemies use healing spells only if there's something to heal

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: [Solved] Enemies use healing spells only if there's something to heal
  • Original author: xdan
  • Original date: August 21, 2016
  • Source thread: https://forums.rpgmakerweb.com/threads/solved-enemies-use-healing-spells-only-if-theres-something-to-heal.67167/
  • Source forum path: Game Development Engines > Ruby Game System (RGSS) Scripts > RGSS3 Scripts (RMVX Ace) > RGSS3 Script Requests

Summary

I'm surprised this hasn't been asked before. But I can't find it in the Master List. See this?   Spoiler

Archived First Post

I'm surprised this hasn't been asked before. But I can't find it in the Master List.


See this?
 

Protected download



"Experimento uses Revive." It's great to have someone reviving you. The problem is there is no dead enemy to revive. This enemy is basicly wasting a turn and losing mana for no reason. This happens with non-reviving spells too:

Protected download



"Experimento used Heal." But everyone's HP is full already. It's the same as before.


Another problem is that the target of the spell is randomized, meaning that even if there is someone to heal, the spell might get used on someone that has full HP.


It would be very nice if someone could make a script that solves this. Having enemies use healing spells only if there is someone missing HP. You could, for example, make it so that if you write <healing> in the notetag, enemies only use it if there is someone to heal and only on enemies that are missing HP. I don't know. You're the genious mind here, I'm just a casul' who can't even script.


Thank you for reading. I hope someone will make my little wish come true *_*


Have a great day ^^


Solved: Use https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-restrictions/,


https://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-targets/


and https://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-targets/ltp-conditions/


Put this in the notetags of reviving spells:

<restrict eval>
gtdm = $game_troop.dead_members.size;
return false if gtdm > 0;
return true;
</restrict eval>



And this into the notetags of healing spells:

<custom target: allies HP below 99%>
<restrict eval>
am = $game_troop.alive_members;
p = 0.99;
mh = am.select{|m| m.hp <= (m.mhp * p)};
return false if mh.size > 0;
return true;
</restrict eval>


'p' is the percentage of health the enemy needs to be at or below before the skill is enabled.

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

trhythy.png
trhythy.png
t45ty5.png
t45ty5.png
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rpg-maker-archive#rgss3-requests

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar