[ACE] Battle Enemy List - No Duplicate Entries

● ARCHIVED · READ-ONLY
Started by Nugem 4 posts View original ↗
  1. 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:

    Spoiler
    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
  2. So, any suggestions here?
  3. But how will you select the enemies then?
  4. eugene222 said:
    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.