[ACE] Battle Enemy List - No Duplicate Entries

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
Hey!

I've found this script here. The guy who posted requested the same, but nobody helped. Maybe he solved himself?

Anyway, this script create an enemy list window in battle (like classic FFs). I'm trying to make the window to not print duplicate entries.



Ex: If there are 2 blobs and 1 wolf, I would like to read:

-------------------

| Blob   x2

| Wolf       x1  

|

-------------------

Heres the script:

Code:
#==============================================================================# ** Window_EnemyList#------------------------------------------------------------------------------#  Create an Enemy List Window with Battle Status.#==============================================================================class Window_EnemyName < Window_Command  #--------------------------------------------------------------------------  # * Inicialização do objeto  #--------------------------------------------------------------------------  def initialize    super(0, 0)    self.openness = 0    self.back_opacity = 255    deactivate  end  #--------------------------------------------------------------------------  # * Aquisição da largura da janela  #--------------------------------------------------------------------------  def window_width    return 129  end  #--------------------------------------------------------------------------  # * Aquisição do número de linhas exibidas  #--------------------------------------------------------------------------  def visible_line_number    return 4  end  #--------------------------------------------------------------------------  # * Get Number of Items  #--------------------------------------------------------------------------  def item_max    $game_troop.alive_members.size  end  #--------------------------------------------------------------------------  # * Get Enemy Object  #--------------------------------------------------------------------------  def enemy    $game_troop.alive_members[@index]  end  #--------------------------------------------------------------------------  # * Get Enemy Number  #--------------------------------------------------------------------------   def make_unique_names    members.each do |enemy|      next unless enemy.alive? #     next unless enemy.letter.empty?      n = @names_count[enemy.original_name] || 0 #     enemy.letter = letter_table[n % letter_table.size]      @names_count[enemy.original_name] = n + 1    end    members.each do |enemy|      n = @names_count[enemy.original_name] || 0      enemy.plural = true if n >= 2    end  end  #--------------------------------------------------------------------------  # * Get Enemy Name Array  #    For display at start of battle. Overlapping names are removed.  #--------------------------------------------------------------------------  def enemy_names    names = []    members.each do |enemy|      next unless enemy.alive?      next unless enemy.plural?      next if names.include?(enemy.original_name)      names.push(enemy.original_name)    end    names  end  #--------------------------------------------------------------------------  # * Draw Item  #--------------------------------------------------------------------------  def draw_item(index)    change_color(normal_color)    name = $game_troop.alive_members[index].name    #if enemy.plural == true      #draw_text(item_rect_for_text(index), name)    #else      draw_text(item_rect_for_text(index), name)    #end  endend
 
Last edited by a moderator:

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
So, any suggestions here?
 

Evgenij

Veteran
Veteran
Joined
Aug 28, 2013
Messages
349
Reaction score
100
First Language
German
Primarily Uses
N/A
But how will you select the enemies then?
 

Nugem

The Hobbit
Veteran
Joined
Jun 28, 2013
Messages
93
Reaction score
0
First Language
PT-BR
Primarily Uses
But how will you select the enemies then?


I made this quick image explanation.

It's pretty much like classic Final Fantasy.

Don't mind graphics, they're just placeholders.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Okay, that's the best I can do. Looks a little strange but..err.. it's my style, yeah, very original style..
being an extreme introvert with massive anxiety... I forget this is really, REALLY frustrating for people who are the exact opposite. still, wait this out and stay home...
I hope you all are keeping safe. <3 If you need a shoulder or an ear, I have two of both and am more than willing to listen & support you! Times are weird.
My dad, super frustrated by seclusion, asking me how I live like this. I shrug. "It helps to not like what is outside."
Apparently it's not just people who are hit by corona virus. My phone has set itself to English language on its own. Not that I'm complaining... :D

Forum statistics

Threads
95,443
Messages
929,187
Members
125,685
Latest member
imnotanepicgamer
Top