pedrocarsamar

Veteran
Veteran
Joined
Jun 19, 2017
Messages
30
Reaction score
14
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
22
Reaction score
20
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
71
Reaction score
21
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,718
Reaction score
9,877
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
197
Reaction score
61
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

Veteran
Veteran
Joined
Jun 19, 2017
Messages
30
Reaction score
14
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 Posts

Latest Profile Posts

Voice.gif
The Voice... They usually show up to talk to you about leaving your mark on the world, which is one of the major themes of my game... How will you be remembered by society.
The only time my brother shows me any kind of support is by liking or LOL my Facebook Comments.
I finally finished the Coliseum for my game. Love how it looks. Credits for the assets goes to Kokoro Reflections, @Starbird_Resources, and @megumi014.
Colossuem.png
Mimics! Mimics everywhere!

Forum statistics

Threads
124,514
Messages
1,164,171
Members
163,350
Latest member
Chrisanity1
Top