Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # TheoAllen + YEA Battle Engine | Name Icon
- # Version : 1.0
- # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
- # (This script documentation is written in informal indonesian language)
- # -----------------------------------------------------------------------------
- # Requires :
- # >> YEA - Battle Engine
- # =============================================================================
- # =============================================================================
- ($imported ||= {})[:Theo_NameIcon] = true
- # =============================================================================
- # Change Logs:
- # -----------------------------------------------------------------------------
- # 2014.02.11 - Finished script
- # =============================================================================
- =begin
- Perkenalan :
- Script ini cuman nambahin icon di samping nama battler
- Cara penggunaan :
- Pasang script ini di bawah YEA Battle Engine
- Gunakan notetag <icon: index>
- Index adalah icon index. Ganti dengan angka. Semisal
- <icon: 99>
- Terms of Service :
- Wa ngikutin ToSnya Yanfly ~
- =end
- # =============================================================================
- # Tidak ada konfigurasi
- # =============================================================================
- class RPG::BaseItem
- def icon
- return @type if @type
- note[/<icon\s*:\s*(\d+)/i]
- @type = $1.to_i
- return @type
- end
- end
- class Game_Battler
- def icon
- actor? ? actor.icon : enemy.icon
- end
- end
- class Window_BattleHelp
- # ---------------------------------------------------------------------------
- # Overwrite : Refresh Battler Name
- # ---------------------------------------------------------------------------
- def refresh_battler_name(battler)
- contents.clear
- reset_font_settings
- change_color(normal_color)
- @text = battler_name(battler) + " "
- icons = battler.state_icons + battler.buff_icons
- dy = icons.size <= 0 ? line_height / 2 : 0
- battler_icon = battler.icon
- dx = -12 if battler_icon > 0
- draw_text(0, dy, contents.width, line_height, @text, 1)
- dx = (contents.width - (icons.size * 24)) / 2
- draw_actor_icons(battler, dx, line_height, contents.width)
- return unless battler_icon > 0
- rect = text_size(@text)
- rect.width += 2
- dx = contents.width/2 + rect.width/2
- draw_icon(battler_icon, dx, dy)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment