ActorSpecific Icon or actor characterset before their name on the Default Equip Window

Good Morning / Afternoon / Evening

I was wondering how difficult it would be to code a script that would let me place an icon before the actor's name on the Default Equipment Window... or better yet perhaps putting the character set shown there before their name. Just to add a visual touch...!

For example, Actor 1 would get icon 1 on the database before their name.

Any help is greatly appreciated!
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Equip Scene Name Icon        ║  Version: 1.00     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║  Show an icon before player name    ║    07 Feb 2023     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions:                                            ║
# ║                                                          ║
# ║    Set the icon number below from the iconset            ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Updates:                                                 ║
# ║   2023-Feb-07 - Initial publish                          ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use:                                            ║
# ║ Free for all uses in RPG Maker VX Ace - except nudity    ║
# ╚══════════════════════════════════════════════════════════╝

module R2_Equip_Icon
  Icon = 4 # from the iconset position number
end

class Window_EquipStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_icon(R2_Equip_Icon::Icon, 0, 0) if @actor
    draw_actor_name(@actor, 28, 0) if @actor
    6.times {|i| draw_item(0, line_height * (1 + i), 2 + i) }
  end
end
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Equip Scene Name Icon        ║  Version: 1.00     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║  Show an icon before player name    ║    07 Feb 2023     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions:                                            ║
# ║                                                          ║
# ║    Set the icon number below from the iconset            ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Updates:                                                 ║
# ║   2023-Feb-07 - Initial publish                          ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use:                                            ║
# ║ Free for all uses in RPG Maker VX Ace - except nudity    ║
# ╚══════════════════════════════════════════════════════════╝

module R2_Equip_Icon
  Icon = 4 # from the iconset position number
end

class Window_EquipStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_icon(R2_Equip_Icon::Icon, 0, 0) if @actor
    draw_actor_name(@actor, 28, 0) if @actor
    6.times {|i| draw_item(0, line_height * (1 + i), 2 + i) }
  end
end
This is wonderful. However I probably did not explain this in the best way.

I was thinking having a specific icon for each individual actor. Thank you so much for taking the time to help me.
How would you want to control where the data for each actor is found.
The actor notebox or in the script?

Seems you prefer scripts.
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Equip Scene Name Icon        ║  Version: 1.01     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║  Show an icon before player name    ║    07 Feb 2023     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Instructions:                                            ║
# ║                                                          ║
# ║    Set the icon number below from the iconset            ║
# ║                                                          ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Updates:                                                 ║
# ║   2023-Feb-07 - Initial publish                          ║
# ║   2023-Feb-07 - Individual actor icon                    ║
# ╚══════════════════════════════════════════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Terms of use:                                            ║
# ║ Free for all uses in RPG Maker VX Ace - except nudity    ║
# ╚══════════════════════════════════════════════════════════╝

module R2_Equip_Icon
  # Icon from the iconset position number
  Actors = { 1 => 4,
             2 => 6,
          }
  Actors.default = 0
end

class Window_EquipStatus < Window_Base
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_icon(R2_Equip_Icon::Actors[@actor.id], 0, 0) if @actor
    draw_actor_name(@actor, 28, 0) if @actor
    6.times {|i| draw_item(0, line_height * (1 + i), 2 + i) }
  end
end
How would you want to control where the data for each actor is found. The actor notebox or in the script? Seems you prefer scripts.
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗ # ║ Title: Equip Scene Name Icon ║ Version: 1.01 ║ # ║ Author: Roninator2 ║ ║ # ╠═════════════════════════════════════╬════════════════════╣ # ║ Function: ║ Date Created ║ # ║ ╠════════════════════╣ # ║ Show an icon before player name ║ 07 Feb 2023 ║ # ╚═════════════════════════════════════╩════════════════════╝ # ╔══════════════════════════════════════════════════════════╗ # ║ Instructions: ║ # ║ ║ # ║ Set the icon number below from the iconset ║ # ║ ║ # ╚══════════════════════════════════════════════════════════╝ # ╔══════════════════════════════════════════════════════════╗ # ║ Updates: ║ # ║ 2023-Feb-07 - Initial publish ║ # ║ 2023-Feb-07 - Individual actor icon ║ # ╚══════════════════════════════════════════════════════════╝ # ╔══════════════════════════════════════════════════════════╗ # ║ Terms of use: ║ # ║ Free for all uses in RPG Maker VX Ace - except nudity ║ # ╚══════════════════════════════════════════════════════════╝ module R2_Equip_Icon # Icon from the iconset position number Actors = { 1 => 4, 2 => 6, } end class Window_EquipStatus < Window_Base #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh contents.clear draw_icon(R2_Equip_Icon::Actors[@actor.id], 0, 0) if @actor draw_actor_name(@actor, 28, 0) if @actor 6.times {|i| draw_item(0, line_height * (1 + i), 2 + i) } end end

This is excellent.

Thank you so much for this.
Actually, @Roninator2 should add a default value just in case you ever forget to configure any specific actor's icon OR you don't need a specific actor to get a special icon. This would be useful if the actor would only temporarily join your team.

Ruby:
module R2_Equip_Icon
  # Icon from the iconset position number
  Actors = {
     1 => 4,
     2 => 6,
  }
  Actors.default = 0
end
add a default value
It works like that? I had no idea. Thanks

Original thread: https://forums.rpgmakerweb.com/threads/actorspecific-icon-or-actor-characterset-before-their-name-on-the-default-equip-window.154791/