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
21
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,285
Reaction score
9,703
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

Enig and Riley.png
Each area of my game acts sort of like a level of sorts. These 3 are the bosses of the first area. Called Team Outcast, there's Riley, Mary Mars McQueen (Triple M), and Enig. A trio of wanna be super heroes.
hQopibt.gif

Now with animated hair~
This could be useful...
I made a menu option that pulls a (accurate) version of the world map from my game instead of having a "traditional" world map. How did I do?

1656552400614.png

..Every time after I edit it and repost it I find a new tiny error I made. :kaodes:
1656550526125.png
Town Design is the best part of an RPG. Well, that and dungeon design

Forum statistics

Threads
123,191
Messages
1,154,715
Members
161,560
Latest member
evanjocobs
Top