pedrocarsamar

Villager
Member
Joined
Jun 19, 2017
Messages
24
Reaction score
13
First Language
portuguese
Primarily Uses
RMVXA
Hello. I am creating my first enemy's troops. In these troops, there are two enemies who are primarily healers and three enemies who are primarily attackers. The problem is that the healers always heal the same ally. It doesn't matter how many times I fight against these troops, the healers will inevitably only cure the ally situated most of the right.

Why is this happening?
 
Last edited:

Mcniner

Villager
Member
Joined
Mar 22, 2022
Messages
17
Reaction score
19
First Language
English
Primarily Uses
RMMV
I really don't know why this is happening, but maybe you could try and fix it with Yanfly's Advanced Enemy AI plugin. It makes the enemies smarter, and might fix this.
 

DateMajima

Veteran
Veteran
Joined
Apr 23, 2022
Messages
63
Reaction score
20
First Language
Vietnamese
Primarily Uses
RMVXA
Hello. I am creating my first enemy's troops. In these troops, there are two enemies who are primarily healers and three enemies who are primarily attackers. The problem is that the healers always heal the same ally. I doesn't matter how many times I fight against these troops, the healers will inevitably only cure the ally situated most of the right.

Why is this happening?
Can you give me a picture of the enemies and troops?

I really don't know why this is happening, but maybe you could try and fix it with Yanfly's Advanced Enemy AI plugin. It makes the enemies smarter, and might fix this.
How can VXAce use plugin?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,277
Reaction score
9,701
First Language
German
Primarily Uses
RMMV
most likely you messed up with target rate features - that is what gives the probability of targeting each enemy on random target.


there are a few other possibilities, but we would have to see the troop and the skill data to do more than guessing.
 

Shiro-chan

Friendly Neighbourhood Neppy Maid
Veteran
Joined
Aug 7, 2018
Messages
194
Reaction score
59
First Language
German
Primarily Uses
RMVXA
Code:
##Small fixes by Lone Wolf

##Randomized Enemy Self-Targeting
# By default, enemy actions set to target a member of their own group will
# always, without exception, target the last enemy in the list, making buffs
# and healing commands essentially worthless when given to groups of enemies.
# This patch implements an extra step to keep enemies from skipping target
# selection for ally actions.

class Game_Action
  def targets_for_friends
    if item.for_user?
      [subject]
    elsif item.for_dead_friend?
      if item.for_one?
        [friends_unit.smooth_dead_target(@target_index)]
      else
        friends_unit.dead_members
      end
    elsif item.for_friend?
      if item.for_one?
        if @target_index < 0
          [friends_unit.random_target]
        else
          [friends_unit.smooth_target(@target_index)]
        end
      else
        friends_unit.alive_members
      end
    end
  end
end

This is a known never-fixed problem. Add this script into your script list, above Main but below the others. It should fix your issue. Credit goes to Lone Wolf.
 

pedrocarsamar

Villager
Member
Joined
Jun 19, 2017
Messages
24
Reaction score
13
First Language
portuguese
Primarily Uses
RMVXA
Thank you all for taking some time looking at my issue! Specially for Shiro-chan, because the Lone Wolf's script worked perfectly as intended.

Although I didn't test it, I think I might have messed up something as Andar put it. It's an old project and I make some edits in the scripts from time to time.
 

Latest Threads

Latest Profile Posts

The main game of my trilo/saga 50%OFF on Steam..... its now or never more
I swap between Ace and MZ so I can stay fresh but - what do you mean you can use subfolders in the plugin's folder for easier organization!?
Did some new music again, praise be. To the next song!
Watch Studio Blue play Numina by starlit in our latest RPG Maker Games Critique stream starting NOW!

Forum statistics

Threads
123,140
Messages
1,154,266
Members
161,475
Latest member
guihguih27
Top