Vai al contenuto

Rilevato Ad-Blocker. Per favore disabilita il tuo adblocker quando navighi su makerando.com - Non c'è nessun annuncio invasivo.

  • Chatbox

    You don't have permission to chat.
    Load More
Ally

HUD HUD ReinoRPG

Recommended Posts

Nome Script: HUD ReinoRPG
Versione: 0.6
Autore/i: LB

Informazioni:
HUD in uno stile medioevale che indica il nome del personaggio, il livello, HP, MP e le monete in possesso.

Screenshots:

282e1if.jpg


Istruzioni:
Istruzioni e script all'interno della demo.

Demo:
http://www.mediafire.com/?2zc23m7fr70gfqd

Condividi questo messaggio


Link di questo messaggio
Condividi su altri siti

Crea un account o accedi per lasciare un commento

You need to be a member in order to leave a comment

Crea un account

Iscriviti per un nuovo account nella nostra comunità. È facile!

Registra un nuovo account

Accedi

Sei già registrato? Accedi qui.

Accedi Ora

  • Contenuti simili

    • Da kaine
      Questo plugin è una sorta di fusione tra il CortiMonsterHud ed il Condition Icons(trovate i link ai rispettivi topic a fondo pagina).
      Ma allo stesso tempo è qualcosa di nuovo dato che aggiunge nuove feature.
      Ad esempio è possibile visualizzare quanti turni mancano prima che un determinato status benevolo/malevolo finisca il suo effetto.
      Un altra feature interessante, è quella di poter visualizzare a vostra discrezione, alcuni elementi e poter decidere per quanto tempo mostrarli dopo un cambiamento rilevante.
      All'interno dell'archivio trovate il file readme.html in cui è spiegato dettagliatamente il funzionamento del plugin e come configurarlo.
       
      Esempio di funzionamento:

       
       
      Autore: Aubrey The Bard
       
      Link Download:
      http://www.mediafire.com/file/i9zy47bcb852wcn/DynBattleDisplay_TvQDOUu.zip
       
      Topic CortiMonsterHud:
      http://www.makerando.com/forum/topic/499-cortimonsterhud/
       
      Topic Condition Icons:
      http://www.makerando.com/forum/topic/311-condition-icons/
    • Da Ally
      Nome Script: Melosx HUD
      Versione: 1.0
      Autore/i: Melosx
       
      Informazioni:
      HUD ad immagini che mostra face, barre PV/MP/ESP ed equip indossato. Ottimo per i vostri ABS...
       
      Istruzioni:
      Nello script della demo.
       
      Demo:
      http://www.mediafire...g04cerpxtwy62e3
       
      Script 2.0
       
       
    • Da Ally
      Nome Script: KMS Minimap
      Versione: N/D
      Autore/i: tomy, traduzione EN by Mr. Bubble

      Informazioni:
      Con lo script è possibile visualizzare l'HUD della mini mappa in cima allo schermo di gioco =)

      Screenshots:



      Istruzioni:
      Inserite lo script sotto Material.
      Istruzioni all'interno dello script.

      Script:


      #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #_/ ◆ Minimap - KMS_MiniMap ◆ VXAce ◆ #_/ ◇ Last update : 2012/01/08 (TOMY@Kamesoft) ◇ #_/ ◇ Website: http://ytomy.sakura.ne.jp/ #_/ ◇ Translated by Mr. Bubble #_/---------------------------------------------------------------------------- #_/ Adds a minimap display. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ # This script is plug-and-play, but various customization options are available. # # To complete disable the minimap on a specific map, add [NOMAP] to the # beginning of map name. You can also use the tag <minimap hide> in the notebox. #---------------------------------------------------------------------------- # Map Notetags #---------------------------------------------------------------------------- # Map notetags are added to "Note" boxes. Right-click a map and select # Map Properties to find the "Note" box for maps. # # <minimap hide> # Completely disables the minimap on a specific map. [NOMAP] can also be # added to the beginning of map names for the same effect. #---------------------------------------------------------------------------- # Event Comment Tags #---------------------------------------------------------------------------- # Since events do not have noteboxes, comment tags are used instead. Open the # event, create a new event command, go to Tab 1, and click the "Comment..." # event command. A box will open up allowing you to enter tags. # # <minimap wall> # Add this tag to an event's comment to change its minimap color to the # same as an impassable tile. # # <minimap move> # Add this tag to an event's comment to have them blink in the minimap. # # <minimap obj n> # Add this tag to an event's comment to have them blink in the minimap with # a specified color where n is the OBJ value defined in OBJECT_COLOR which # is found in the customization module below. #---------------------------------------------------------------------------- # Usage Notes #---------------------------------------------------------------------------- # Impassable events will not appear as the correct color in the minimap. # This effect is intended. If you want an event to appear as impassable # on the minimap, add the tag <minimap wall> to an event's comment. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ #============================================================================== # ★ BEGIN Setting ★ #============================================================================== module KMS_MiniMap # * Minimap Display Toggle Button # Set to nil to disable this function SWITCH_BUTTON = :Z # * Minimap Size and Position (x, y, width, height) MAP_RECT = Rect.new(364, 20, 160, 120) # * Minimap z-layer Priority # Glitchy if this value is set too high MAP_Z = 0 # * Minimap Grid Size # A size of 3 or higher is recommended GRID_SIZE = 5 # * Mini-Map Color Settings FOREGROUND_COLOR = Color.new(224, 224, 255, 160) # Foreground (passable) BACKGROUND_COLOR = Color.new( 0, 0, 160, 160) # Background (not passable) POSITION_COLOR = Color.new(255, 0, 0, 192) # Current Position color MOVE_EVENT_COLOR = Color.new(255, 160, 0, 192) # Moving event color VEHICLE_COLOR = Color.new( 96, 128, 0, 192) # Vehicle color # * Object Color Presets # Create custom color resets for events tagged with the corresponding label OBJECT_COLOR = [ Color.new( 0, 128, 0, 192), # OBJ 1 Color.new( 0, 160, 160, 192), # OBJ 2 Color.new(160, 0, 160, 192), # OBJ 3 ] # <- Do not delete this line # * Minimap Blinking Frequency # Values 5~8 are recommended BLINK_LEVEL = 7 # * Minimap Cache Setting # This script creates a cache for each map. If the number of cached # maps exceed CACHE_NUM, oldest cached maps are deleted. CACHE_NUM = 10 end #============================================================================== # ☆ END Setting ☆ #============================================================================== $imported = {} if $imported == nil $imported["KMS_MiniMap"] = true module KMS_MiniMap # ミニマップ非表示 REGEX_NO_MINIMAP_NOTE = /<(?:ミニマップ|MINIMAP)s*(?:非表示|HIDE)>/i REGEX_NO_MINIMAP_NAME = /[NOMAP]/i # 障害物 REGEX_WALL_EVENT = /<(?:ミニマップ|MINIMAP)s*(?:壁|障害物|WALL)>/i # 移動イベント REGEX_MOVE_EVENT = /<(?:ミニマップ|MINIMAP)s*(?:移動|MOVE)>/i # オブジェクト REGEX_OBJECT = /<(?:ミニマップ|MINIMAP)s+OBJ(?:ECT)?s*(d+)>/i end # ***************************************************************************** #============================================================================== # □ KMS_Commands #============================================================================== module KMS_Commands module_function #-------------------------------------------------------------------------- # ○ ミニマップを表示 #-------------------------------------------------------------------------- def self.show_minimap $game_system.minimap_show = true end #-------------------------------------------------------------------------- # ○ ミニマップを隠す #-------------------------------------------------------------------------- def self.hide_minimap $game_system.minimap_show = false end #-------------------------------------------------------------------------- # ○ ミニマップ表示状態の取得 #-------------------------------------------------------------------------- def self.minimap_showing? return $game_system.minimap_show end #-------------------------------------------------------------------------- # ○ ミニマップをリフレッシュ #-------------------------------------------------------------------------- def self.refresh_minimap return unless $scene.is_a?(Scene_Map) $game_map.refresh if $game_map.need_refresh $scene.refresh_minimap end #-------------------------------------------------------------------------- # ○ ミニマップのオブジェクトを更新 #-------------------------------------------------------------------------- def self.update_minimap_object return unless $scene.is_a?(Scene_Map) $game_map.refresh if $game_map.need_refresh $scene.update_minimap_object end end #============================================================================== # ■ Game_Interpreter #============================================================================== class Game_Interpreter # イベントコマンドから直接コマンドを叩けるようにする include KMS_Commands end #============================================================================== # ■ RPG::Map #============================================================================== class RPG::Map #-------------------------------------------------------------------------- # ○ ミニマップのキャッシュ生成 #-------------------------------------------------------------------------- def create_minimap_cache @__minimap_show = true note.each_line { |line| if line =~ KMS_MiniMap::REGEX_NO_MINIMAP_NOTE # マップ非表示 @__minimap_show = false end } end #-------------------------------------------------------------------------- # ○ ミニマップ表示 #-------------------------------------------------------------------------- def minimap_show? create_minimap_cache if @__minimap_show.nil? return @__minimap_show end end #============================================================================== # ■ RPG::MapInfo #============================================================================== class RPG::MapInfo #-------------------------------------------------------------------------- # ● マップ名取得 #-------------------------------------------------------------------------- def name return @name.gsub(/[.*]/) { "" } end #-------------------------------------------------------------------------- # ○ オリジナルマップ名取得 #-------------------------------------------------------------------------- def original_name return @name end #-------------------------------------------------------------------------- # ○ ミニマップのキャッシュ生成 #-------------------------------------------------------------------------- def create_minimap_cache @__minimap_show = !(@name =~ KMS_MiniMap::REGEX_NO_MINIMAP_NAME) end #-------------------------------------------------------------------------- # ○ ミニマップ表示 #-------------------------------------------------------------------------- def minimap_show? create_minimap_cache if @__minimap_show == nil return @__minimap_show end end #============================================================================== # ■ Game_System #============================================================================== class Game_System #-------------------------------------------------------------------------- # ○ 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :minimap_show #-------------------------------------------------------------------------- # ○ オブジェクト初期化 #-------------------------------------------------------------------------- alias initialize_KMS_MiniMap initialize def initialize initialize_KMS_MiniMap @minimap_show = true end end #============================================================================== # ■ Game_Map #============================================================================== class Game_Map #-------------------------------------------------------------------------- # ○ 定数 #-------------------------------------------------------------------------- MINIMAP_FADE_NONE = 0 # ミニマップ フェードなし MINIMAP_FADE_IN = 1 # ミニマップ フェードイン MINIMAP_FADE_OUT = 2 # ミニマップ フェードアウト #-------------------------------------------------------------------------- # ○ 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :minimap_fade #-------------------------------------------------------------------------- # ○ ミニマップを表示するか #-------------------------------------------------------------------------- def minimap_show? return $data_mapinfos[map_id].minimap_show? && @map.minimap_show? end #-------------------------------------------------------------------------- # ○ ミニマップをフェードイン #-------------------------------------------------------------------------- def fadein_minimap @minimap_fade = MINIMAP_FADE_IN end #-------------------------------------------------------------------------- # ○ ミニマップをフェードアウト #-------------------------------------------------------------------------- def fadeout_minimap @minimap_fade = MINIMAP_FADE_OUT end end #============================================================================== # ■ Game_Event #============================================================================== class Game_Event < Game_Character #-------------------------------------------------------------------------- # ○ ミニマップ用のキャッシュを作成 #-------------------------------------------------------------------------- def __create_minimap_cache @__last_page = @page @__minimap_wall_event = false @__minimap_move_event = false @__minimap_object_type = -1 @page.list.each { |cmd| # 注釈以外に到達したら離脱 break unless [108, 408].include?(cmd.code) # 正規表現判定 case cmd.parameters[0] when KMS_MiniMap::REGEX_WALL_EVENT @__minimap_wall_event = true when KMS_MiniMap::REGEX_MOVE_EVENT @__minimap_move_event = true when KMS_MiniMap::REGEX_OBJECT @__minimap_object_type = $1.to_i end } end private :__create_minimap_cache #-------------------------------------------------------------------------- # ○ グラフィックがあるか #-------------------------------------------------------------------------- def graphic_exist? return (character_name != "" || tile_id > 0) end #-------------------------------------------------------------------------- # ○ 障害物か #-------------------------------------------------------------------------- def is_minimap_wall_event? if @__minimap_wall_event.nil? || @__last_page != @page __create_minimap_cache end return @__minimap_wall_event end #-------------------------------------------------------------------------- # ○ 移動イベントか #-------------------------------------------------------------------------- def is_minimap_move_event? if @__minimap_move_event.nil? || @__last_page != @page __create_minimap_cache end return @__minimap_move_event end #-------------------------------------------------------------------------- # ○ ミニマップオブジェクトか #-------------------------------------------------------------------------- def is_minimap_object? if @__minimap_object_type.nil? || @__last_page != @page __create_minimap_cache end return @__minimap_object_type > 0 end #-------------------------------------------------------------------------- # ○ ミニマップオブジェクトタイプ #-------------------------------------------------------------------------- def minimap_object_type if @__minimap_object_type.nil? || @__last_page != @page __create_minimap_cache end return @__minimap_object_type end end #============================================================================== # □ Game_MiniMap #------------------------------------------------------------------------------ # ミニマップを扱うクラスです。 #============================================================================== class Game_MiniMap #-------------------------------------------------------------------------- # ○ 構造体 #-------------------------------------------------------------------------- Point = Struct.new(:x, :y) Size = Struct.new(:width, :height) PassageCache = Struct.new(:map_id, :table, :scan_table) #-------------------------------------------------------------------------- # ○ クラス変数 #-------------------------------------------------------------------------- @@passage_cache = [] # 通行フラグテーブルキャッシュ #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(tilemap) @map_rect = KMS_MiniMap::MAP_RECT @grid_size = [KMS_MiniMap].max @x = 0 @y = 0 @grid_num = Point.new( (@map_rect.width + @grid_size - 1) / @grid_size, (@map_rect.height + @grid_size - 1) / @grid_size ) @draw_grid_num = Point.new(@grid_num.x + 2, @grid_num.y + 2) @draw_range_begin = Point.new(0, 0) @draw_range_end = Point.new(0, 0) @tilemap = tilemap @last_x = $game_player.x @last_y = $game_player.y @showing = false @hiding = false create_sprites refresh end #-------------------------------------------------------------------------- # ○ スプライト作成 #-------------------------------------------------------------------------- def create_sprites @viewport = Viewport.new(@map_rect) @viewport.z = KMS_MiniMap::MAP_Z # ビットマップサイズ計算 @bmp_size = Size.new( (@grid_num.x + 2) * @grid_size, (@grid_num.y + 2) * @grid_size ) @buf_bitmap = Bitmap.new(@bmp_size.width, @bmp_size.height) # マップ用スプライト作成 @map_sprite = Sprite.new(@viewport) @map_sprite.x = -@grid_size @map_sprite.y = -@grid_size @map_sprite.z = 0 @map_sprite.bitmap = Bitmap.new(@bmp_size.width, @bmp_size.height) # オブジェクト用スプライト作成 @object_sprite = Sprite_MiniMapIcon.new(@viewport) @object_sprite.x = -@grid_size @object_sprite.y = -@grid_size @object_sprite.z = 1 @object_sprite.bitmap = Bitmap.new(@bmp_size.width, @bmp_size.height) # 現在位置スプライト作成 @position_sprite = Sprite_MiniMapIcon.new @position_sprite.x = @map_rect.x + @grid_num.x / 2 * @grid_size @position_sprite.y = @map_rect.y + @grid_num.y / 2 * @grid_size @position_sprite.z = @viewport.z + 2 bitmap = Bitmap.new(@grid_size, @grid_size) bitmap.fill_rect(bitmap.rect, KMS_MiniMap::POSITION_COLOR) @position_sprite.bitmap = bitmap end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- def dispose @buf_bitmap.dispose @map_sprite.bitmap.dispose @map_sprite.dispose @object_sprite.bitmap.dispose @object_sprite.dispose @position_sprite.bitmap.dispose @position_sprite.dispose @viewport.dispose end #-------------------------------------------------------------------------- # ○ 可視状態取得 #-------------------------------------------------------------------------- def visible return @map_sprite.visible end #-------------------------------------------------------------------------- # ○ 可視状態設定 #-------------------------------------------------------------------------- def visible=(value) @viewport.visible = value @map_sprite.visible = value @object_sprite.visible = value @position_sprite.visible = value end #-------------------------------------------------------------------------- # ○ 不透明度取得 #-------------------------------------------------------------------------- def opacity return @map_sprite.opacity end #-------------------------------------------------------------------------- # ○ 不透明度設定 #-------------------------------------------------------------------------- def opacity=(value) @map_sprite.opacity = value @object_sprite.opacity = value @position_sprite.opacity = value end #-------------------------------------------------------------------------- # ○ リフレッシュ #-------------------------------------------------------------------------- def refresh update_draw_range update_passage_table update_object_list update_position draw_map draw_object Graphics.frame_reset end #-------------------------------------------------------------------------- # ○ フェードイン #-------------------------------------------------------------------------- def fadein @showing = true @hiding = false end #-------------------------------------------------------------------------- # ○ フェードアウト #-------------------------------------------------------------------------- def fadeout @showing = false @hiding = true end #-------------------------------------------------------------------------- # ○ キー入力更新 #-------------------------------------------------------------------------- def update_input return if KMS_MiniMap::SWITCH_BUTTON.nil? if Input.trigger?(KMS_MiniMap::SWITCH_BUTTON) if opacity < 255 && !@showing fadein elsif opacity > 0 && !@hiding fadeout end end end #-------------------------------------------------------------------------- # ○ 描画範囲更新 #-------------------------------------------------------------------------- def update_draw_range range = [] (2).times { |i| range[i] = @draw_grid_num[i] / 2 } @draw_range_begin.x = $game_player.x - range[0] @draw_range_begin.y = $game_player.y - range[1] @draw_range_end.x = $game_player.x + range[0] @draw_range_end.y = $game_player.y + range[1] end #-------------------------------------------------------------------------- # ○ 通行可否テーブル更新 #-------------------------------------------------------------------------- def update_passage_table cache = get_passage_table_cache @passage_table = cache.table @passage_scan_table = cache.scan_table update_around_passage_table end #-------------------------------------------------------------------------- # ○ 通行可否テーブルのキャッシュを取得 #-------------------------------------------------------------------------- def get_passage_table_cache map_id = $game_map.map_id cache = @@passage_cache.find { |c| c.map_id == map_id } # キャッシュミスしたら新規作成 if cache == nil cache = PassageCache.new(map_id) cache.table = Table.new($game_map.width, $game_map.height) cache.scan_table = Table.new( ($game_map.width + @draw_grid_num.x - 1) / @draw_grid_num.x, ($game_map.height + @draw_grid_num.y - 1) / @draw_grid_num.y ) end # 直近のキャッシュは先頭に移動し、古いキャッシュは削除 @@passage_cache.unshift(cache) @@passage_cache.delete_at(KMS_MiniMap::CACHE_NUM) return cache end #-------------------------------------------------------------------------- # ○ 通行可否テーブルのキャッシュをクリア #-------------------------------------------------------------------------- def clear_passage_table_cache return if @passage_scan_table == nil table = @passage_scan_table @passage_scan_table = Table.new(table.xsize, table.ysize) end #-------------------------------------------------------------------------- # ○ 通行可否テーブルの探索 # x, y : 探索位置 #-------------------------------------------------------------------------- def scan_passage(x, y) dx = x / @draw_grid_num.x dy = y / @draw_grid_num.y # 探索済み return if @passage_scan_table[dx, dy] == 1 # マップ範囲外 return unless dx.between?(0, @passage_scan_table.xsize - 1) return unless dy.between?(0, @passage_scan_table.ysize - 1) rx = (dx * @draw_grid_num.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' />...((dx + 1) * @draw_grid_num.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> ry = (dy * @draw_grid_num.y)...((dy + 1) * @draw_grid_num.y) mw = $game_map.width - 1 mh = $game_map.height - 1 # 探索範囲内の通行テーブルを生成 rx.each { |x| next unless x.between?(0, mw) ry.each { |y| next unless y.between?(0, mh) # 通行方向フラグ作成 # (↓、←、→、↑ の順に 1, 2, 4, 8 が対応) flag = 0 [2, 4, 6, 8].each{ |d| flag |= 1 << (d / 2 - 1) if $game_map.passable?(x, y, d) } @passage_table[x, y] = flag } } @passage_scan_table[dx, dy] = 1 end #-------------------------------------------------------------------------- # ○ 周辺の通行可否テーブル更新 #-------------------------------------------------------------------------- def update_around_passage_table gx = @draw_grid_num.x gy = @draw_grid_num.y dx = $game_player.x - gx / 2 dy = $game_player.y - gy / 2 scan_passage(dx, dy) scan_passage(dx + gx, dy) scan_passage(dx, dy + gy) scan_passage(dx + gx, dy + gy) end #-------------------------------------------------------------------------- # ○ オブジェクト一覧更新 #-------------------------------------------------------------------------- def update_object_list events = $game_map.events.values # WALL @wall_events = events.find_all { |e| e.is_minimap_wall_event? } # MOVE @move_events = events.find_all { |e| e.is_minimap_move_event? } # OBJ @object_list = events.find_all { |e| e.is_minimap_object? } end #-------------------------------------------------------------------------- # ○ 位置更新 #-------------------------------------------------------------------------- def update_position # 移動量算出 pt = Point.new($game_player.x, $game_player.y) ox = ($game_player.real_x - pt.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> * @grid_size oy = ($game_player.real_y - pt.y) * @grid_size @viewport.ox = ox @viewport.oy = oy # 移動していたらマップ再描画 if pt.x != @last_x || pt.y != @last_y draw_map @last_x = pt.x @last_y = pt.y end end #-------------------------------------------------------------------------- # ○ 描画範囲内判定 #-------------------------------------------------------------------------- def in_draw_range?(x, y) rb = @draw_range_begin re = @draw_range_end return (x.between?(rb.x, re.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> && y.between?(rb.y, re.y)) end #-------------------------------------------------------------------------- # ○ マップ範囲内判定 #-------------------------------------------------------------------------- def in_map_range?(x, y) mw = $game_map.width mh = $game_map.height return (x.between?(0, mw - 1) && y.between?(0, mh - 1)) end #-------------------------------------------------------------------------- # ○ マップ描画 #-------------------------------------------------------------------------- def draw_map update_around_passage_table bitmap = @map_sprite.bitmap bitmap.fill_rect(bitmap.rect, KMS_MiniMap::BACKGROUND_COLOR) draw_map_foreground(bitmap) draw_map_move_event(bitmap) end #-------------------------------------------------------------------------- # ○ 通行可能領域の描画 #-------------------------------------------------------------------------- def draw_map_foreground(bitmap) range_x = (@draw_range_begin.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' />..(@draw_range_end.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> range_y = (@draw_range_begin.y)..(@draw_range_end.y) map_w = $game_map.width - 1 map_h = $game_map.height - 1 rect = Rect.new(0, 0, @grid_size, @grid_size) range_x.each { |x| next unless x.between?(0, map_w) range_y.each { |y| next unless y.between?(0, map_h) next if @passage_table[x, y] == 0 next if @wall_events.find { |e| e.x == x && e.y == y } # 壁 # グリッド描画サイズ算出 rect.set(0, 0, @grid_size, @grid_size) rect.x = (x - @draw_range_begin.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> * @grid_size rect.y = (y - @draw_range_begin.y) * @grid_size flag = @passage_table[x, y] if flag & 0x01 == 0 # 下通行不能 rect.height -= 1 end if flag & 0x02 == 0 # 左通行不能 rect.x += 1 rect.width -= 1 end if flag & 0x04 == 0 # 右通行不能 rect.width -= 1 end if flag & 0x08 == 0 # 上通行不能 rect.y += 1 rect.height -= 1 end bitmap.fill_rect(rect, KMS_MiniMap::FOREGROUND_COLOR) } } end #-------------------------------------------------------------------------- # ○ 移動イベントの描画 #-------------------------------------------------------------------------- def draw_map_move_event(bitmap) rect = Rect.new(0, 0, @grid_size, @grid_size) @move_events.each { |e| rect.x = (e.x - @draw_range_begin.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> * @grid_size rect.y = (e.y - @draw_range_begin.y) * @grid_size bitmap.fill_rect(rect, KMS_MiniMap::MOVE_EVENT_COLOR) } end #-------------------------------------------------------------------------- # ○ アニメーション更新 #-------------------------------------------------------------------------- def update_animation if @showing # フェードイン self.opacity += 16 if opacity == 255 @showing = false end elsif @hiding # フェードアウト self.opacity -= 16 if opacity == 0 @hiding = false self.visible = false end end end #-------------------------------------------------------------------------- # ○ オブジェクト描画 #-------------------------------------------------------------------------- def draw_object # 下準備 bitmap = @object_sprite.bitmap bitmap.clear rect = Rect.new(0, 0, @grid_size, @grid_size) # オブジェクト描画 @object_list.each { |obj| next unless in_draw_range?(obj.x, obj.y) color = KMS_MiniMap::OBJECT_COLOR[obj.minimap_object_type - 1] next if color.nil? rect.x = (obj.real_x - @draw_range_begin.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> * @grid_size rect.y = (obj.real_y - @draw_range_begin.y) * @grid_size bitmap.fill_rect(rect, color) } # 乗り物描画 $game_map.vehicles.each { |vehicle| next if vehicle.transparent rect.x = (vehicle.real_x - @draw_range_begin.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> * @grid_size rect.y = (vehicle.real_y - @draw_range_begin.y) * @grid_size bitmap.fill_rect(rect, KMS_MiniMap::VEHICLE_COLOR) } end #-------------------------------------------------------------------------- # ○ 更新 #-------------------------------------------------------------------------- def update update_input return if !visible || opacity == 0 update_draw_range update_position update_animation draw_object @map_sprite.update @object_sprite.update @position_sprite.update end end #============================================================================== # □ Sprite_MiniMapIcon #------------------------------------------------------------------------------ # ミニマップ用アイコンのクラスです。 #============================================================================== class Sprite_MiniMapIcon < Sprite DURATION_MAX = 60 #-------------------------------------------------------------------------- # ● オブジェクト初期化 # viewport : ビューポート #-------------------------------------------------------------------------- def initialize(viewport = nil) super(viewport) @duration = DURATION_MAX / 2 end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super @duration += 1 if @duration == DURATION_MAX @duration = 0 end update_effect end #-------------------------------------------------------------------------- # ○ エフェクトの更新 #-------------------------------------------------------------------------- def update_effect self.color.set(255, 255, 255, (@duration - DURATION_MAX / 2).abs * KMS_MiniMap::BLINK_LEVEL ) end end #============================================================================== # ■ Spriteset_Map #============================================================================== class Spriteset_Map attr_reader :minimap #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias initialize_KMS_MiniMap initialize def initialize initialize_KMS_MiniMap create_minimap end #-------------------------------------------------------------------------- # ○ ミニマップの作成 #-------------------------------------------------------------------------- def create_minimap return unless $game_map.minimap_show? @minimap = Game_MiniMap.new(@tilemap) @minimap.visible = $game_system.minimap_show end #-------------------------------------------------------------------------- # ● 解放 #-------------------------------------------------------------------------- alias dispose_KMS_MiniMap dispose def dispose dispose_KMS_MiniMap dispose_minimap end #-------------------------------------------------------------------------- # ○ ミニマップの解放 #-------------------------------------------------------------------------- def dispose_minimap @minimap.dispose unless @minimap.nil? end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- alias update_KMS_MiniMap update def update update_KMS_MiniMap update_minimap end #-------------------------------------------------------------------------- # ○ ミニマップ更新 #-------------------------------------------------------------------------- def update_minimap return if @minimap.nil? # 表示切替 @minimap.visible = $game_system.minimap_show # フェード判定 case $game_map.minimap_fade when Game_Map::MINIMAP_FADE_IN @minimap.fadein $game_map.minimap_fade = Game_Map::MINIMAP_FADE_NONE when Game_Map::MINIMAP_FADE_OUT @minimap.fadeout $game_map.minimap_fade = Game_Map::MINIMAP_FADE_NONE end @minimap.update end #-------------------------------------------------------------------------- # ○ ミニマップ全体をリフレッシュ #-------------------------------------------------------------------------- def refresh_minimap return if @minimap.nil? @minimap.clear_passage_table_cache @minimap.refresh end #-------------------------------------------------------------------------- # ○ ミニマップのオブジェクトを更新 #-------------------------------------------------------------------------- def update_minimap_object @minimap.update_object_list unless @minimap.nil? end end #============================================================================== # ■ Scene_Map #============================================================================== class Scene_Map #-------------------------------------------------------------------------- # ● 場所移動後の処理 #-------------------------------------------------------------------------- alias post_transfer_KMS_MiniMap post_transfer def post_transfer refresh_minimap post_transfer_KMS_MiniMap end #-------------------------------------------------------------------------- # ○ ミニマップ全体をリフレッシュ #-------------------------------------------------------------------------- def refresh_minimap @spriteset.refresh_minimap end #-------------------------------------------------------------------------- # ○ ミニマップのオブジェクトを更新 #-------------------------------------------------------------------------- def update_minimap_object @spriteset.update_minimap_object end end Note dell'Autore:
      Termini e condizioni d'uso sullo script, nel sito dell'autore:
      http://ytomy.sakura.ne.jp/tkool/rpgtech/rules.html]http://ytomy.sakura....tech/rules.html
    • Da Ally
      Nome Script: HUD su Mappa
      Versione: N/D
      Autore/i: Jet
       
      Informazioni:
      HUD che inserisce barre HP, MP etc, e da la possibilità di inserire anche picture extra nel caso voleste aggiungere altro su mappa.
       
      Screenshots:
       
       
       
      Istruzioni:
      Inserite lo script sotto Material.
       
      Nella demo comunque sono presenti (oltre che allo script) istruzioni e immagini necessarie per il corretto funzionamento dell'HUD.
       
      Script:
       

      #=============================================================================== # HUD # By Jet10985 (Jet) #=============================================================================== # This script will allow you to have a fully customizable hud displaying # multiple pictures and actor-related information. # This script has: 7 customization options. #=============================================================================== # Overwritten Methods: # None #------------------------------------------------------------------------------- # Aliased methods: # Spriteset_Map: initialize, update, dispose #=============================================================================== =begin Note: all pictures used in this HUD must be in the Graphics/Pictures folder. =end module Jet module HUD # These are the bars of the HUD. These takes highest display priority of # the entire hud. It follows this format: # :stat => ["Background", "Bar Image", "Overlay", x, y, switch] # Bars have 3 layers, drawn in this order: background, bar, overlay. # If you don't need one of these layers, leave the configuration as a "", # EX: :hp => ["Bar Back", "Hp Bar", "", 0, 10, 0] # switch is the visibility switch for the bar. 0 for none. BARS = { :hp => ["Bar Back", "HP Bar", "HP Overlay", 0, 10, 0], :mp => ["Bar Back", "MP Bar", "MP Overlay", 0, 40, 0], :tp => ["Bar Back", "TP Bar", "TP Overlay", 0, 70, 0] } # These are extra parts of the HUD which relate to the 1st actor. This # takes middle display priority in the HUD. Follow's this format: # :symbol => [x, y] # :symbol can be any of the following: # :graphic (Character Sprite) # :face (Character Face) # :name (Character name) # :class (Character class) # :nickname (Character nickname) # :level (Character Level) # :icons (Character buffs and states represented by icons) # :hp (Character hp in text along with default gauge) # :mp (Character mp in text along with default gauge) # :tp (Character tp in text along with default gauge) ACTOR_EXTRAS = { :face => [544 - 96, 0] } # This is the font used for the extra's sprite if text is drawn. ACTOR_EXTRAS_FONT = "Verdana" # This is the switch to make the extra's layer invisible ACTOR_EXTRAS_SWITCH = 0 # These are pictures displayed with the HUD. These take the lowest display # priority of the 3 sections. Follow this format: # "Picture Name" => [x, y, switch] # switch is the visiblility switch for this specific picture. PICTURES = { "Bar Back" => [250, 250, 0] } # Turning this switch on will make the entire HUD invisible. FULL_HUD_SWITCH = 1 # Do you want the HUD to follow any map shaking/scrolling/tinting? FOLLOW_MAP = true end end #=============================================================================== # DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO. #=============================================================================== ($imported ||= {})[:jet] ||= {} $imported[:jet][:HUD] = true class Spriteset_Map alias jet4856_initialize initialize def initialize(*args, &block) create_hud jet4856_initialize(*args, &block) @hudset.viewport = Jet::HUD::FOLLOW_MAP ? @viewport1 : nil end def create_hud @hudset = Spriteset_HUD.new end alias jet3745_update update def update(*args, &block) jet3745_update(*args, &block) update_hud end def update_hud if [email protected]? @hudset.visible = !$game_switches[Jet] @hudset.update end end alias jet7355_dispose dispose def dispose(*args, &block) dispose_hud jet7355_dispose(*args, &block) end def dispose_hud @hudset.dispose end end class Spriteset_HUD attr_reader :sprites, :actor attr_accessor :viewport def initialize(viewport = nil) @sprites = {} @actor = $game_party.members[0] @actor_extras = !Jet::HUD::ACTOR_EXTRAS.empty? if @actor_extras @actor_struct = Struct.new(*Jet::HUD::ACTOR_EXTRAS.keys).new Jet::HUD::ACTOR_EXTRAS.each_key {|a| @actor_struct.send("#{a}=".to_sym, (@actor.send(a) rescue true)) } end @viewport = viewport create_bars create_actor_extras if @actor_extras create_pictures @visible = 0 self.visible = !$game_switches[Jet] update end def create_bars @sprites[:bars] = {} Jet::HUD::BARS.each {|a, b| @sprites[:bars][a] = [] b[0..2].each {|c| if c == "" @sprites[:bars][a].push(Sprite.new) next end bitmap = Cache.picture(c) sprite = b.index(c) == 1 ? Sprite_Bar.new(@actor, a) : Sprite.new sprite.bitmap = bitmap sprite.x = b[3] sprite.y = b[4] @sprites[:bars][a].push(sprite) sprite.z = 1002 } } end def create_actor_extras f = Window_Base.new(0, 0, 32, 32) x = 0 - f.padding; y = 0 - f.padding width = Graphics.width + f.padding * 2 height = Graphics.height + f.padding * 2 f.dispose @sprites[:extras] = Window_Base.new(x, y, width, height) @sprites[:extras].opacity = 0 @sprites[:extras].contents.font.name = Jet::HUD::ACTOR_EXTRAS_FONT @sprites[:extras].z = 1001 Jet::HUD::ACTOR_EXTRAS.each {|a, b| @sprites[:extras].send("draw_actor_#{a}", @actor, b[0], b[1]) } end def create_pictures @sprites[:pictures] = {} Jet::HUD::PICTURES.each {|a, b| bitmap = Cache.picture(a) sprite = Sprite.new(nil) sprite.bitmap = bitmap sprite.x, sprite.y = *b[0...2] @sprites[:pictures][a] = sprite sprite.z = 1000 } end def update if @actor != $game_party.members[0] @actor = $game_party.members[0] dispose_actor_extras create_actor_extras dispose_bars create_bars end if @actor_extras do_refresh = false Jet::HUD::ACTOR_EXTRAS.each_key {|a| if @actor_struct.send(a) != (@actor.send(a) rescue true) do_refresh = true @actor_struct.send("#{a}=".to_sym, (@actor.send(a) rescue true)) end } if do_refresh dispose_actor_extras create_actor_extras end end return if !@visible update_bars update_actor_extras if @actor_extras update_pictures end def update_bars @sprites[:bars].each {|sym, a| a.each {|b| b.visible = !$game_switches[Jet][5]] b.update if b.visible b.viewport = @viewport } } end def update_actor_extras @sprites[:extras].visible = !$game_switches[Jet] @sprites[:extras].viewport = @viewport end def update_pictures @sprites[:pictures].each {|string, a| a.visible = !$game_switches[Jet][2]] a.viewport = @viewport } end def update_visibility @sprites[:pictures].each {|string, a| a.visible = @visible } @sprites[:extras].visible = @visible if @actor_extras @sprites[:bars].each {|sym, a| a.each {|b| b.visible = @visible } } end def dispose dispose_bars dispose_actor_extras if @actor_extras dispose_pictures end def dispose_bars @sprites[:bars].each_value {|a| a.each {|b| b.dispose } } end def dispose_actor_extras @sprites[:extras].dispose end def dispose_pictures @sprites[:pictures].each_value {|a| a.dispose } end def visible=(t) if @visible != t @visible = t update_visibility end end end class Sprite_Bar < Sprite def initialize(actor, type) super(nil) @actor = actor @type = type end def update begin max = @actor.send(("m" + @type.to_s).to_sym) rescue max = @actor.send(("max_" + @type.to_s).to_sym) end cur = @actor.send(@type) self.src_rect.width = (self.bitmap.width * (cur / max.to_f)).round end end Demo:http://dl.dropbox.com/u/35988679/HUD%20Demo.exe
    • Da Ally
      Nome Script: Angelo HUD
      Versione: burandon
      Autore/i: 2.5
       
      Informazioni:
      Semplice script che può essere personalizzato in vari modi (vedere le istruzioni all'interno dello script stesso) :3
       
      Screenshots:
       
       
       
      Istruzioni:
      Inserite lo script sotto Material.
      Istruzioni all'interno dello script.
       
      Script:
       

      #============================================================================== # ■ Angelo HUD v2.5 #------------------------------------------------------------------------------ #  Created by Brandon *** 8(13) customization options *** Plug N' Play! #============================================================================== #==================================================# # ▼ UPDATE LOG # #--------#--------------------------------#--------# # v1 ● first release. # # v1.2 ● not released, # # ● add HUDVISIBLESWITCH # # ● add HP, MPSWITCH # # v1.5 ● not released, # # ● add FONT NAME & SIZE # # v1.8 ● not released, # # ● add WEAPONSWITCH # # v1.9 ● not released # # ● *BUG* Lag # # ● *BUG* Texts disappea- # # rence. # # v2 ● second release # # ● fixed v1.9 *BUGS* # # ● add R, G, B _BLA & # # _BDA # # ● *BUG* Transfer Player # # crash. # # v2.1 ● third release # # ● fixed v2 *BUG* # # ● changed update method # # ● changed Scene_Map # # update and dispose # # methods. # # ● *BUG* Lag # # v2.2 ● fourth release # # ● fixed v2.1 *BUG* # # ● now HUD will only re- # # fresh when the stats # # change. # # ● improved performance # #--------#--------------------------------#--------# # v2.5 ● current release # # ● improved stability # # ● added a option to link with other Angelo# # scripts # # ● -------------------------------- # # ● added gold count if Angelo Menu is pre- # # sent. # #==================================================# # ▼ THANKS TO: # # ● King of Sadism # # ● YF # # ● Valiant # # ● Amy Pond # # ● Jet # #==================================================# #------------------------------------------------------------------------------ # ▼ Customization Options #----------------------------#------------------------------------------------- # ● HUD_VISIBLE_SWITCH # #- - - - - - - - - - - - - # # Define the switch that you want to use to turn the HUD 'ON' or 'OFF', by de- # fault it's 1. When the switch is turned 'ON' the HUD will be turned 'ON' too, # and when the switch is turned 'OFF' the HUD is turned 'OFF' too. #------------------------------#----------------------------------------------- # ● FONT_NAME & FONT_SIZE # #- - - - - - - - - - - - - - # # In FONTNAME you define the font that you want to use with the HUD information. # In FONTSIZE you define the size of the font you've decided in FONTNAME. #-------------------#---------------------------------------------------------- # ● HP_SWITCH # #- - - - - - - - -# # Define the switch that you want to use to turn the HP Display 'ON' or 'OFF', # by default it's 2. When the switch is turned 'ON' the HP Display will be # turned 'ON' too, and when the switch is turned 'OFF' the HP Display is turned # 'OFF' too. #-------------------#---------------------------------------------------------- # ● MP_SWITCH # #- - - - - - - - -# # Define the switch that you want to use to turn the MP Display 'ON' or 'OFF', # by default it's 3. When the switch is turned 'ON' the MP Display will be # turned 'ON' too, and when the switch is turned 'OFF' the MP Display is turned # 'OFF' too. #------------------------------#----------------------------------------------- # ● WEAPON_AND_NAME_SWITCH # #- - - - - - - - - - - - - - # # Define the switch that you want to use to turn the Currently Equipped Weapon # Display and Actor Name 'ON' or 'OFF', by default it's 4. When the switch is # turned 'ON' this option will be turned 'ON' too, and when the switch is # turned 'OFF' this option is turned 'OFF' too. #---------------------#-------------------------------------------------------- # ● R, G, B _BLA # #- - - - - - - - - -# # Define the amount of each color(Red, Green, Blue) presented in the lighter a- # rea of the Back of the HUD. By default it's black which means that R, G and B # are setted to '0'. #---------------------#-------------------------------------------------------- # ● R, G, B _BDA # #- - - - - - - - - -# # Define the amount of each color(Red, Green, Blue) presented in the darker a- # rea of the Back of the HUD. By default it's black which means that R, G and B # are setted to '0'. #------------------------------------------------------------------------------ # ▼ Post Scriptum #------------------------------------------------------------------------------ # ● "I want to turn all the HUD or only some part of her at the same time with # the same switch, it's possible?" #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Yes, just set the parts you wanted in the same # switch as the HUDVISIBLESWITCH. #------------------------------------------------------------------------------ # ● "Which values you recommend to use in FONTSIZE?" #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Use between 8 and 18, or the text will be too # small or too bigger. But some times it depends # on your FONTNAME. #------------------------------------------------------------------------------ # ● "Which values you recommend to use in R, G, B _BLA and _BDA?" #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # You MUST use ONLY values between 0 and 255. #------------------------------------------------------------------------------ module ANGELO HUD_VISIBLE_SWITCH = 1 FONT_NAME = "Times New Roman" FONT_SIZE = 16 HP_SWITCH = 2 MP_SWITCH = 3 WEAPON_AND_NAME_SWITCH = 4 #=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT # * * * IF YOU ARE USING OTHER ANGELO SCRIPTS, ENABLE THIS * * * #=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT ENABLE_ANGELO_LINK = false R_BLA = 0 G_BLA = 0 B_BLA = 0 R_BDA = 0 G_BDA = 0 B_BDA = 0 end #------------------------------------------------------------------------------ # !!!!DO NOT EDIT FROM HERE UNLESS YOU KNOW WHAT YOU'RE DOING!!!! #------------------------------------------------------------------------------ include ANGELO class AngeloHUD < Window_Base def initialize super(-16, -16, Graphics.width + standard_padding * 2, Graphics.height + standard_padding * 2) self.opacity = 0 $AngeloHUD = true refresh end def refresh self.contents.clear self.contents.font = Font.new(FONT_NAME, FONT_SIZE) actor = $game_party.members[0] @hp = actor.hp @mp = actor.mp @mhp = actor.mhp @mmp = actor.mmp index = 0 colorback = Color.new(R_BLA, G_BLA, B_BLA, 150) colorback2 = Color.new(R_BDA, G_BDA, B_BDA, 190) if $game_switches[HUD_VISIBLE_SWITCH] == true unless $game_switches[HP_SWITCH] == false self.contents.fill_rect(3, 364, 238, 16, colorback) self.contents.fill_rect(3, 368, 238, 8, colorback2) draw_gauge(19, 353, 200, actor.hp_rate, hp_gauge_color1, hp_gauge_color2) draw_text(40, 354, 100, 32, Vocab::hp_a) draw_current_and_max_values(90, 358, 116, actor.hp, actor.mhp, hp_color(actor), normal_color) end unless $game_switches[MP_SWITCH] == false self.contents.fill_rect(3, 395, 238, 16, colorback) self.contents.fill_rect(3, 399, 238, 8, colorback2) draw_gauge(19, 384, 200, actor.mp_rate, mp_gauge_color1, mp_gauge_color2) draw_text(40, 385, 100, 32, Vocab::mp_a) draw_current_and_max_values(90, 389, 116, actor.mp, actor.mmp, mp_color(actor), normal_color) end unless $game_switches[WEAPON_AND_NAME_SWITCH] == false self.contents.fill_rect(-64 + 85, 376, 125, 19, colorback) self.contents.fill_rect(-64 + 90, 376, 115, 19, colorback2) draw_actor_name(actor, -40 + 92, 373, 100) return unless actor.equips[index] draw_icon(actor.equips[index].icon_index, -64 + 92, 372, true)#(actor.equips[index], -64 + 92, 376, true) end end def hud_changed return true if @hp != $game_party.members[0].hp return true if @mp != $game_party.members[0].mp return true if $game_switches[HP_SWITCH] != "OFF" return true if $game_switches[MP_SWITCH] != "OFF" return true if $game_switches[WEAPON_AND_NAME_SWITCH] != "OFF" return true if $game_switches[HUD_VISIBLE_SWITCH] != "OFF" return false end end def update super refresh if hud_changed end end class Scene_Map alias hud_main create_all_windows def create_all_windows create_hud_window hud_main end def create_hud_window @hud = AngeloHUD.new if ENABLE_ANGELO_LINK && $Menu_Angelo == true @gold = Window_Gold.new @gold.opacity = 0 @gold.x = 544 - @gold.contents.width - 10 @gold.y = 375 end end end
×