Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Prosty HUD
Autor Wiadomość
MrBoomGood 




Preferowany:
RPG Maker VX

Pomógł: 3 razy
Dołączył: 07 Kwi 2011
Posty: 292
Skąd: Katowice
  Wysłany: Sob 14 Kwi, 2012 19:30
Prosty HUD
~ Prosty HUD ~


Krótki opis:
Skrypt wyświetla nazwę aktorów / Poziom / HP / MP / tp / exp / waluty. Można zamknąć go za pomocą przełącznika wybranego przez użytkownika. Można zmienić kilka rzeczy w skrypcie.


Autor:
lilcooldude69

Tłumaczenie:
Nie tłumaczone...

Kompatybilność:
RPG Maker VX Ace

Skrypt:
Spoiler:

Kod:
#===== Rpg Makver VX ACE Script =============================
#= Simple Hud
#===== By: ==================================================
#= lilcooldude69
#===== Current Version: =====================================
#= 1.0
#===== Compatible With: =====================================
#= Rpg Maker VX ACE
#===== Description: =========================================
#= Sells items useful for 2-2 Classes
#===== Additional Comments: =================================
#=
#============================================================



module Hud_config
#Configuration
SWITCH = 1 #the number of the switched used to make it visible Example: if this is 1 then Switch 001 will turn on the hud.
EXPTERM = "Exp" #Term used for The Exp Bar
GOLD = "G" #Term used for the Gold, You may have to make adjustments below if > 1 character
OPACITY = 70 #used for the opacity of the window, Mess with this to your liking :P
#end config
end
#=====DO NOT EDIT PAST HERE UNLESS YOU KNOW WHAT YOUR DOING======#
#=================EXCLUDING WHAT WAS SAID ABOVE==================#

include Hud_config

class Window_Hud < Window_Base
#----------------------------------------------------
# * Object Initialization
#----------------------------------------------------
  def initialize
    super(0,0, 125,125)
    create_contents
    self.visible = $game_switches[SWITCH]
    @actor = $game_party.members[0]
    refresh
  end

  def exp_gauge_color1; text_color(31); end;
  def exp_gauge_color2; text_color(27); end;

#----------------------------------------------------
# * Refresh
#----------------------------------------------------
  def refresh
    self.contents.clear
    contents.clear
    draw_window_content

  end

#----------------------------------------------------
# * Draw Window Contents * Drawing of all the contents gold, hp bar, etc
#----------------------------------------------------
  def draw_window_content
    @gold = $game_party.gold
    @level = @actor.level
    @hp = @actor.hp
    @mp = @actor.mp
    @tp = @actor.tp
    @exp = @actor.exp
    draw_face(@actor.face_name, @actor.face_index, 0, 0, enable = false)
    contents.font.size = 20
    draw_actor_name(@actor, 0, 0)
    draw_actor_level(@actor, 45, 0)
    draw_actor_hp(@actor, 0, 17, 48)
    draw_exp(@actor, 0, 60, 102)
    draw_actor_mp(@actor, 55, 17, 48)
    draw_actor_tp(@actor, 0, 37, 102)
#==========Make the Adjustment here if you edited the GOLD variable to be longer than 1 Character===============
    contents.font.size = Font.default_size
    draw_currency_value(@gold, GOLD, 0, 82, 102)
    #draw_currency_value(Gold Variable, Term Variable, X-pos, Y-Pos, Width) change the width if you make the term longer than 1 char
    #example, draw_currency_value(@gold, GOLD, 0, 155, 110)
#==========Make the Adjustment here if you edited the GOLD variable to be longer than 1 Character===============
  end

#-----------------------------------------------------
# * Update * used to keep things up to date
#-----------------------------------------------------
  def update
    super
    self.visible = $game_switches[SWITCH]
    return if !self.visible
    if @level != @actor.level or @hp != @actor.hp or @mp != @actor.mp or
      @tp != @actor.tp or @exp != @actor.exp or @gold != $game_party.gold
      refresh
    end
  end

#-----------------------------------------------------
# * Custom Definition for the experience bar free to use if you like
#-----------------------------------------------------
  def draw_exp(actor, x, y, width = 124)
    s1 = @actor.max_level? ? "---------" : @actor.exp
    s2 = @actor.max_level? ? "---------" : @actor.next_level_exp - @actor.exp
    if @actor.max_level? ? draw_gauge(x, y, width, 1, exp_gauge_color1, exp_gauge_color2)
      :
    draw_gauge(x, y, width,(((actor.exp.to_f/100) / (actor.next_level_exp.to_f/100)) * 100),
      exp_gauge_color1, exp_gauge_color2)
    end
    change_color(system_color)
    draw_text(x, y, 30, line_height, EXPTERM)
    change_color(text_color(27))
    if @actor.max_level? ? draw_text(x + width - 72, y, 72, line_height, "------------", 2)
      :
      draw_text(x + width - 72, y, 72, line_height, actor.next_level_exp.to_i - actor.exp.to_i, 2)
    end
  end
end

#------------------------------------------------------
# * Scene_Map Class, For keeping it on the map
#------------------------------------------------------
class Scene_Map < Scene_Base
  alias start_window start
  alias term_window terminate
  alias update_window update
  def start
    start_window
    @winhud = Window_Hud.new     
    update
  end
  def terminate
    @winhud.dispose
    term_window
  end
  def update
    update_window
    @winhud.update
  end
end


Screeny:
Spoiler:



Demo:
Nie trzeba...
 
 
 
reshi 



Preferowany:
RPG Maker VX

Dołączył: 18 Mar 2011
Posty: 28
Wysłany: Nie 03 Cze, 2012 12:00
Fajny przyda się. Lepszy niż te inne które są na połowę ekranu chociaż ja go jeszcze zedytuje lekko ale jest ok . 11/10 :D.
 
 
Diablo 




Preferowany:
RPG Maker VX

Pomógł: 5 razy
Dołączył: 25 Lip 2010
Posty: 155
Wysłany: Nie 03 Cze, 2012 13:52
Bardzo fajny jednak nie użyje. Nie oddaje klimatu gry.
________________________



 
 
sled 




Preferowany:
RPG Maker VXAce

Pomógł: 7 razy
Dołączył: 23 Kwi 2010
Posty: 93
Skąd: Inowrocław
Wysłany: Nie 03 Cze, 2012 23:46
Bardzo fajne i co ważniejsze - w końcu coś nowego ;-) ! Mimo wszystko zgadzam się z wypowiedzią powyżej (nie oddaje klimatu) tak więc wątpię bym sam to użył lecz sam skrypcik jak wspomniałem jest dość ciekawy 6,5/10
 
 
landrynek0014 



Preferowany:
RPG Maker VXAce

Dołączył: 14 Paź 2011
Posty: 12
Wysłany: Sro 27 Cze, 2012 11:16
Nawet spoko. Przyda się kiedyś.
________________________
Projekt:The Ultima Adventure
Mapy:1%
Postacie:0%
Bronie:0%
 
 
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene