¡Bienvenido a Universo Maker!
¿Es esta la primera vez que visitas el foro? Si es así te recomendamos que te registres para tener completo acceso a todas las áreas y secciones del foro, así también podrás participar activamente en la comunidad. Si ya tienes una cuenta, conectate cuanto antes.
Iniciar Sesión Registrarme

No estás conectado. Conéctate o registrate

Ver el tema anterior Ver el tema siguiente Ir abajo Mensaje [Página 1 de 1.]

#1 Necesito ayuda con Battler HUD el Sáb Abr 28, 2012 8:41 pm

Tarima_Shadowsong

avatar
Hola a todos!!!

Bueno veran tengo un problema (o mejor dicho muchos en uno) con un battle HUD (desarrollado por "star" creo). Hasta donde puedo entender el script debería funcionar con los sistemas de batalla lateral tankentai y ATB, sin embargo cuando coloco el script... La pantalla de batalla es un desastre!!!

Les paso una imagen que podría ilustrar mejor dicha situación:
[img] [/img]

He enumerado cuales son los principales problemas que he podido identificar:

1*las imagenes que se utilizan para el HUD no cuadran del todo con las posiciones que viene por defecto, ya las he intentado recolocar pero no parecieran cambiar el problema de que la iamgen de Face se come a las imagenes de tras de ella.
2*las barras de HP y MP "deberían" reducir y/o aumentar su tamaño segun el daño que se les aplique o el uso de habilidades, sin embargo se quedan estáticos, nada de lo que haga (o le hagan a los personajes) modifica los numeros o tamaño de las barras.
3*las barras ATB se puden recolocar desde su respectivo script, sin embargo el area de seleccion del personaje continúa apareciendo como si se tratara del menú de batalla por defecto (observese la franja amarilla semi transparente).

Ahora bien el proyecto donde lo coloque tiene como scripts centrales:

-Tanketai SBS 3.4e
-ATB para Tanketai 1.2c

(El Kaduki system no lo incluí por una cuestión de gusto).

Y este es el código que utilice para el battle_HUD

Código:
#==============================================================================
# �–� Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Selectable
  # Skin File name
  BTSKIN_00 = "Btskin_main"  # Main Skin
  BTSKIN_01 = "Btskin_hp"    # HP(Gauge)
  BTSKIN_02 = "Btskin_mp"    # MP(Gauge)
  BTSKIN_04 = "Btskin_n00"    # HP(Numbers)
  BTSKIN_05 = "Btskin_n00"    # MP(Numbers)
  BTSKIN_03 = "Btskin_state"  # State
  # Skin coordinates[  x,  y]
  BTSKIN_B_XY = [-210, -13]    # �Ÿ��–座�™️
  BTSKIN_00XY = [  -40, -90]    #Main Skin
  BTSKIN_01XY = [  14,  23]    # HP(gauge)
  BTSKIN_02XY = [  14, 38]    # MP(gauge)
  BTSKIN_04XY = [ 18, 0]    # HP(numbers)
  BTSKIN_05XY = [ 22, 38]    # MP(numbers)
  BTSKIN_03XY = [3, 31]    # �‚��ƒ†�ƒ��ƒˆ�‚��‚��ƒ�
  BTSKIN_06XY = [6, 35]    # �‚��ƒ†�ƒ��ƒˆ
  # Various Settings
  BTSKIN_01GS = 2            # HP Gauge Speed (Low values are fast)
  BTSKIN_02GS = 4            # MP Gauge Speed(Low values are fast)
  BTSKIN_04SS = 8            # HP Rolling Numbers Speed(Low values are fast)
  BTSKIN_05SS = 2            # MP Rolling Numbers Speed(Low values are fast)
  BTSKIN_04NS = 4            # HP Maximum Digits
  BTSKIN_05NS = 4            # MP Maximum Digits
  BTSKIN_06WH = [22,22]      # [State Width, Height]
  BTSKIN_06SC = 2            # State Icon Scroll Speed
                              # (Values close to 1 are fast)
  # �ƒ��ƒˆ�ƒ��‚��ƒ†�ƒ��‚��‚�座�™️
  def set_xy
    @x = []
    @y = []
    for i in 0...$game_party.members.size
      x = (i * 135) + 40
      y = 3
      @x[i] = x + 176#+ STRRGSS2::ST_SX
      @y[i] = y + 16#+ STRRGSS2::ST_SY
    end
  end
  # 設�š�‡�‰€�“�“まで
  @@f = false
 
 
  #--------------------------------------------------------------------------
  # �˜… �‚��‚��ƒ��‚��‚�
  #--------------------------------------------------------------------------
  alias initialize_str33 initialize
  def initialize(f = false)
    initialize_str33
    unless @@f
      @f = @@f = true
    else
      @f = false
    end
    set_xy
    @s_sprite = []
    @s_party = []
    @s_lv = []
    @opacity = 0
    self.contents.dispose
    self.create_contents
    self.back_opacity = 0
    self.opacity = 0
    #@column_max = $game_party.actors.size
    @viewport = Viewport.new(0, 480-128, 640, 128)
    @hpgw = (Cache.system(BTSKIN_01)).width
    @mpgw = (Cache.system(BTSKIN_02)).width
    @viewport.z = self.z - 1
    @state_opacity = []
    @item_max = $game_party.members.size
    return unless @f
    for i in 0...@item_max
      draw_item(i)
    end
    update
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ��ƒ•�ƒ��ƒƒ�‚��ƒ�潰�—
  #--------------------------------------------------------------------------
  def refresh
    # :-)
  end
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ†�ƒ��ƒˆの描�”�
  #--------------------------------------------------------------------------
  def draw_actor_state(actor)
    icon = Cache.system("Iconset")
    w = actor.states.size * 24
    w = 24 if w < 1
    bitmap = Bitmap.new(w, BTSKIN_06WH[1])
    count = 0
    for state in actor.states
      icon_index = state.icon_index
      x = 24 * count
      rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
      bitmap.blt(x, 0, icon, rect)
      count += 1
    end
    return bitmap
  end
  #--------------------------------------------------------------------------
  # �—� 名�‰��œ�ˆ�
  #--------------------------------------------------------------------------
  def name_bitmap(actor)
    bitmap = Bitmap.new(10, 10)
    bitmap.font.size = 20
    bitmap.draw_text_f(-300, -80, 1000, 240, actor.name)
    return bitmap
  end
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ†�ƒ��ƒˆ�•��–�—
  #--------------------------------------------------------------------------
  def state_size(actor)
    return actor.states.size
  end
  #--------------------------------------------------------------------------
  # �—� �‚��‚��ƒ†�ƒ��œ�ˆ�
  #--------------------------------------------------------------------------
  def draw_item(index)
    return unless @f
    actor = $game_party.members[index]
    #
    @s_sprite[index] = []
    s = @s_sprite[index]
    # �ƒ��‚��ƒ��‚��‚��ƒ�
    s[0] = Sprite.new(@viewport)
    s[0].bitmap = Cache.system(BTSKIN_00)
    s[0].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_00XY[0]
    s[0].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_00XY[1]
    s[0].z = 0
    # HP
    s[1] = Sprite.new(@viewport)
    s[1].bitmap = Cache.system(BTSKIN_01)
    s[1].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_01XY[0]
    s[1].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_01XY[1]
    s[1].z = 4
    w = s[1].bitmap.width
    h = s[1].bitmap.height / 2
    s[1].src_rect.set(0, 0, w, h)
    s[2] = Sprite.new(@viewport)
    s[2].bitmap = Cache.system(BTSKIN_01)
    s[2].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_01XY[0]
    s[2].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_01XY[1]
    s[2].z = 3
    s[2].src_rect.set(0, h, w, h)
    s[11] = 96
    s[6] = Sprite_strNumbers.new(@viewport, BTSKIN_04, BTSKIN_04NS)
    s[6].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_04XY[0]
    s[6].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_04XY[1]
    s[6].z = 5
    s[13] = actor.hp
    s[6].update(s[13])
    # MP
    s[3] = Sprite.new(@viewport)
    s[3].bitmap = Cache.system(BTSKIN_02)
    s[3].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_02XY[0]
    s[3].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_02XY[1]
    s[3].z = 4
    w = s[3].bitmap.width
    h = s[3].bitmap.height / 2
    s[3].src_rect.set(0, 0, w, h)
    s[4] = Sprite.new(@viewport)
    s[4].bitmap = Cache.system(BTSKIN_02)
    s[4].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_02XY[0]
    s[4].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_02XY[1]
    s[4].z = 3
    s[4].src_rect.set(0, h, w, h)
    s[12] = 56
    s[7] = Sprite_strNumbers.new(@viewport, BTSKIN_05, BTSKIN_05NS)
    s[7].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_05XY[0]
    s[7].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_05XY[1]
    s[7].z = 5
    s[14] = actor.mp
    s[7].update(s[14])
    # �‚��ƒ†�ƒ��ƒˆ
    s[5] = Viewport.new(0, 0, BTSKIN_06WH[0], BTSKIN_06WH[1])
    s[5].rect.x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_06XY[0] + @viewport.rect.x
    s[5].rect.y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_06XY[1] + @viewport.rect.y
    s[5].z = @viewport.z + 1
    s[8] = Sprite.new(@viewport)
    s[8].bitmap = Cache.system(BTSKIN_03)
    s[8].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_03XY[0]
    s[8].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_03XY[1]
    s[8].z = -2
    s[9] = Plane.new(s[5])
    s[9].bitmap = draw_actor_state(actor)
    s[10] = state_size(actor)
    # 現�œ�の�‚��ƒ†�ƒ��‚��‚�に
    s[11] = ((@hpgw * (actor.hp / (actor.maxhp * 1.0))) + 1).truncate
    if actor.maxmp != 0
      s[12] = ((@mpgw * (actor.mp / (actor.maxmp * 1.0))) + 1).truncate
    else
      s[12] = 0
    end
    s[15] = Sprite.new(@viewport)
    s[15].bitmap = name_bitmap(actor)
    s[15].x = @x[index] + 4
    s[15].y = @y[index] + 2
    s[15].z = 0
    s[1].src_rect.width = s[11]
    s[2].src_rect.width = s[11]
    s[3].src_rect.width = s[12]
    s[4].src_rect.width = s[12]
    s[6].update(s[13])
    s[7].update(s[14])
    # 不可�–に
    for l in [0,1,2,3,4,8,9,15]
      s[l].opacity = 0
    end
    for l in [6,7]
      s[l].o = 0
    end
    # �ƒ…報�˜�†�(actor, x, y, size = 151)
    @s_lv[index] = actor.level
    @s_party[index] = [actor.name, actor.hp, actor.maxhp,
                      actor.mp, actor.maxmp, actor.states]
    #
    x = index * 161 - 20
    y = 15
    s[16] = Sprite.new
    s[16].bitmap = Cache.system("HUD_" + actor.name)
    s[16].x = @x[index] + 4 - 210
    s[16].y = @y[index] + 2 + 243
    s[16].z = 0
    end
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ–�‚��‚��‚��ƒˆ�–‹�”�
  #--------------------------------------------------------------------------
  def dispose   
    super
    return unless @f
    for i in 0...@s_sprite.size
      for l in [0,1,2,3,4,8,9,15,16]
        @s_sprite[i][l].bitmap.dispose
        @s_sprite[i][l].dispose
      end
      for l in [5,6,7]
        @s_sprite[i][l].dispose
      end
    end
    @@f = false
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–�
  #--------------------------------------------------------------------------
  def update
    super
    return unless @f
    for i in 0...@s_sprite.size
      s = @s_sprite[i]
      a = $game_party.members[i]
      m = @s_party[i]
      @state_opacity[i] = 0 if @state_opacity[i] == nil
      # 不�€��˜Ž度�‚��ƒƒ�ƒ—
      @state_opacity[i] += 8
      if @opacity < 272
        @opacity += 8
        for l in [0,1,2,3,4,15]
          s[l].opacity = @opacity
        end
        for l in [6,7]
          s[l].o = @opacity
        end
      end
      # 名�‰��›��–�
      if a.name != m[0]
        s[15].bitmap.dispose
        s[15].bitmap = name_bitmap(a)
        m[0] = a.name
      end
      # HP/MP�›��–�
      update_hp(s,a,m)
      update_mp(s,a,m)
      # �‚��ƒ†�ƒ��ƒˆ�›��–�
      if s[10] > BTSKIN_06WH[0] / 24 and (Graphics.frame_count % BTSKIN_06SC) == 0
        s[9].ox += 1
      end
      if s[10] > 0 and @state_opacity[i] < 272
        for l in [8,9]
          s[l].opacity = @state_opacity[i]
        end
      end
      if a.states != m[5]
        m[5] = a.states
        s[9].ox = 0
        s[9].bitmap.dispose
        s[9].bitmap = draw_actor_state($game_party.members[i])
        s[10] = state_size($game_party.members[i])
        @state_opacity[i] = 0
        for l in [8,9]
          s[l].opacity = @state_opacity[i]
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–� (HP)
  #--------------------------------------------------------------------------
  def update_hp(s,a,m)
    # HPく�‚‹く�‚‹
    if a.hp != s[13]
      c = 0; c = 1 if a.hp < a.maxhp / 4; c = 2 if a.hp == 0
      if s[13] > a.hp
        s[13] -= BTSKIN_04SS
        s[13] = a.hp if s[13] < a.hp
      else
        s[13] += BTSKIN_04SS
        s[13] = a.hp if s[13] > a.hp
      end
      s[6].update(s[13], c)
    end
    # HP
    if a.hp != m[1]
      s[11] = ((@hpgw * (a.hp / (a.maxhp * 1.0))) + 1).truncate
      m[1] = a.hp
    end
    sr = s[1].src_rect
    if sr.width != s[11]
      sp = BTSKIN_01GS
      sr.width = (s[11] + (s[1].src_rect.width * (sp - 1))) / sp
      sr.width = 2 if sr.width <= 1 and a.hp > 0
    end
    sr = s[2].src_rect
    sp = 2
    if sr.width != s[1].src_rect.width and (Graphics.frame_count % sp) == 0
      if sr.width < s[1].src_rect.width
        sr.width += 1
      else
        sr.width -= 1
      end
    end
    sr.width = 2 if sr.width <= 1 and a.hp > 0
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–� (MP)
  #--------------------------------------------------------------------------
  def update_mp(s,a,m)
    # MPく�‚‹く�‚‹
    if a.mp != s[14]
      c = 0; c = 1 if a.mp < a.maxmp / 4
      if s[14] > a.mp
        s[14] -= BTSKIN_05SS
        s[14] = a.mp if s[14] < a.mp
      else
        s[14] += BTSKIN_05SS
        s[14] = a.mp if s[14] > a.mp
      end
      s[7].update(s[14], c)
    end
    # MP
    if a.mp != m[3]
      if a.maxmp != 0
        s[12] = ((@mpgw * (a.mp / (a.maxmp * 1.0))) + 1).truncate
      else
        s[12] = 0
      end
      m[3] = a.mp
    end
    sr = s[3].src_rect
    if sr.width != s[12]
      sp = BTSKIN_02GS
      sr.width = (s[12] + (s[3].src_rect.width * (sp - 1))) / sp
      sr.width = 2 if sr.width <= 1 and a.mp > 0
    end
    sr = s[4].src_rect
    sp = 2
    if sr.width != s[3].src_rect.width and (Graphics.frame_count % sp) == 0
      if sr.width < s[3].src_rect.width
        sr.width += 1
      else
        sr.width -= 1
      end
    end
    sr.width = 2 if sr.width <= 1 and a.mp > 0
  end
end

#==============================================================================
# �–� Sprite_strNumber
#==============================================================================
class Sprite_strNumber < Sprite
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ–�‚��‚��‚��ƒˆ�ˆ��œŸ�Œ–
  #--------------------------------------------------------------------------
  def initialize(v, gra, n = 0)
    @n = n
    super(v)
    self.bitmap = Cache.system(gra)
    @w = self.bitmap.width/10
    @h = self.bitmap.height/3
    self.src_rect = Rect.new(@n*@w, 0, @w, @h)
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–�
  #--------------------------------------------------------------------------
  def update(n = -1, c = 0)
    @n = n
    self.src_rect.x = @n*@w
    self.src_rect.y = c*@h
  end
end
#==============================================================================
# �–� Sprite_strNumbers
#==============================================================================
class Sprite_strNumbers
  attr_accessor :x
  attr_accessor :y
  attr_accessor :z
  attr_accessor :o
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ–�‚��‚��‚��ƒˆ�ˆ��œŸ�Œ–
  #--------------------------------------------------------------------------
  def initialize(v, gra, n = 4, s = 0)
    @n = n # 桁�•�
    @x = 0
    @y = 0
    @z = 0
    @o = 255
    @sprite = []
    # �—�–“設�š
    b = Cache.system(gra)
    @s = b.width / 10 - s
    # �‚��ƒ—�ƒ��‚��ƒˆ�œ�ˆ�
    for i in 0...n
      @sprite[i] = Sprite_strNumber.new(v, gra)
    end
    update
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–�
  #--------------------------------------------------------------------------
  def update(v = 0, c = 0)
    val = []
    # �•��€��‚’�…��ˆ—に格納
    for i in 0...@n
      if (10 ** (i)) == 0
        val[i] = v % 10
      else
        val[i] = v / (10 ** (i)) % 10
      end
    end
    val = val.reverse
    # �…ˆ頭の0�‚’�–�‚Š�™️�く
    for i in 0...@n
      if val[i] == 0 and @n != i + 1
        val[i] = -1
      else
        break
      end
    end
    # �‚��ƒ—�ƒ��‚��ƒˆ�›��–�
    for i in 0...@n
      @sprite[i].update(val[i], c)
      @sprite[i].x = @x + (i * @s)
      @sprite[i].y = @y
      @sprite[i].z = @z
      @sprite[i].opacity = @o
    end
  end
  #--------------------------------------------------------------------------
  # �—� 不�€��˜Ž度の適�”�
  #--------------------------------------------------------------------------
  def o=(val)
    @o = val
    for i in 0...@n
      @sprite[i].opacity = @o
    end
  end
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ–�‚��‚��‚��ƒˆ�–‹�”�
  #--------------------------------------------------------------------------
  def dispose
    for i in 0...@sprite.size
      @sprite[i].bitmap.dispose
      @sprite[i].dispose
    end
  end
end


#==============================================================================
# �–� Bitmap
#==============================================================================
# This script controls the shadow behind actor names for *STR33g1_Battle Status.

class Bitmap
  #--------------------------------------------------------------------------
  # �—� �–‡�—縁�–�‚Š描�”�
  #--------------------------------------------------------------------------
  def draw_text_f(x, y, width, height, str, align = 0, color = Color.new(64,32,128))
    shadow = self.font.shadow
    b_color = self.font.color.dup
    font.shadow = true
    font.color = color
    draw_text(x + 1, y, width, height, str, align)
    draw_text(x - 1, y, width, height, str, align)
    draw_text(x, y + 1, width, height, str, align)
    draw_text(x, y - 1, width, height, str, align)
    font.color = b_color
    draw_text(x, y, width, height, str, align)
    font.shadow = shadow
  end
  def draw_text_f_rect(r, str, align = 0, color = Color.new(64,32,128))
    draw_text_f(r.x, r.y, r.width, r.height, str, align = 0, color)
  end
end
Tengo pocos conocimientos sobre scripts (en general) por lo que no he me he querido meter con el código y provocar algún daño mayor. Se que este script aparece en varios proyectos donde se utiliza el sistema tankentai + ATB +Kaduki, pero como no tengo (y no quiero meter) el sistema kaduki, no se si esto provoca algún tipo de error.

Me fije que en la seccion de scripts, ya se había publicado un codigo similar (o el mismo), pero la estructura es en escencia es la misma (ademas me pareció que hacia falta unas imágenes en dicho script), por lo que no lo toque para nada.

Si alguien sabe como corregir estos problemas, se los agradecería
Que tengan un buen día

#2 Re: Necesito ayuda con Battler HUD el Dom Abr 29, 2012 12:58 am

FIGO

avatar

Si hay posibilidad de que me dejes un Demo con los scripts eh imagenes en cuestion veo si te puedo ayudar...me seria más fácil, ya que las face estan fuera de posicion y no se cual es el valor z (profundidad de las imagenes) de las caras y de la imagen de los graficos del hud.

#3 Re: Necesito ayuda con Battler HUD el Dom Abr 29, 2012 7:36 am

Tarima_Shadowsong

avatar
Aqui esta el demo que me pediste FIGO.


Incluí algunos scripts que podrían causar algún conflicto asi como la estructura central que me parece esta siendo afectada.

De antemano gracias por la atención.

[url=mediafire.com ?sb9bd90j768bw9m]

#4 Re: Necesito ayuda con Battler HUD el Miér Mayo 02, 2012 5:54 am

FIGO

avatar
No se mucho de script pero hice lo mejor que pude, trade de acomodarlo , lo que pasa es que se superponian muchas cosas del ATB y del HUD, modifique un poco los valores como para que no este todo encimado.




Me falto borrar esa seleccion que hace el sobre el HUD voy a ver si puedo, porq no tengo idea de como hacerlo.
El MP no se consume en la imagen pero no se porque , como te dije no se nada de script. El hp si disminuye.

Pega este Battle HUD
Spoiler:

Código:
#==============================================================================
# �–� Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Selectable
  # Skin File name
  BTSKIN_00 = "Btskin_main"  # Main Skin
  BTSKIN_01 = "Btskin_hp"    # HP(Gauge)
  BTSKIN_02 = "Btskin_mp"    # MP(Gauge)
  BTSKIN_04 = "Btskin_n00"    # HP(Numbers)
  BTSKIN_05 = "Btskin_n00"    # MP(Numbers)
  BTSKIN_03 = "Btskin_state"  # State
  # Skin coordinates[  x,  y]
  BTSKIN_B_XY = [-180, 340]    # �Ÿ��–座�™️
  BTSKIN_00XY = [  -52, -90]    #Main Skin
  BTSKIN_01XY = [  0,  23]    # HP(gauge)
  BTSKIN_02XY = [  0, 38]    # MP(gauge)
  BTSKIN_04XY = [ 18, 10]    # HP(numbers)
  BTSKIN_05XY = [ 18, 30]    # MP(numbers)
  BTSKIN_03XY = [-33, 17]    # �‚��ƒ†�ƒ��ƒˆ�‚��‚��ƒ�
  BTSKIN_06XY = [-29, 25]    # �‚��ƒ†�ƒ��ƒˆ
  # Various Settings
  BTSKIN_01GS = 2            # HP Gauge Speed (Low values are fast)
  BTSKIN_02GS = 4            # MP Gauge Speed(Low values are fast)
  BTSKIN_04SS = 8            # HP Rolling Numbers Speed(Low values are fast)
  BTSKIN_05SS = 2            # MP Rolling Numbers Speed(Low values are fast)
  BTSKIN_04NS = 4            # HP Maximum Digits
  BTSKIN_05NS = 4            # MP Maximum Digits
  BTSKIN_06WH = [22,22]      # [State Width, Height]22-22
  BTSKIN_06SC = 2            # State Icon Scroll Speed
                              # (Values close to 1 are fast)
  # �ƒ��ƒˆ�ƒ��‚��ƒ†�ƒ��‚��‚�座�™️
  def set_xy
    @x = []
    @y = []
    for i in 0...$game_party.members.size
      x = (i * 135) + 40
      y = 3
      @x[i] = x + 176#+ STRRGSS2::ST_SX
      @y[i] = y + 16#+ STRRGSS2::ST_SY
    end
  end
  # 設�š�‡�‰€�“�“まで
  @@f = false
 
 
  #--------------------------------------------------------------------------
  # �˜… �‚��‚��ƒ��‚��‚�
  #--------------------------------------------------------------------------
  alias initialize_str33 initialize
  def initialize(f = false)
    initialize_str33
    unless @@f
      @f = @@f = true
    else
      @f = false
    end
    set_xy
    @s_sprite = []
    @s_party = []
    @s_lv = []
    @opacity = 0
    self.contents.dispose
    self.create_contents
    self.back_opacity = 0
    self.opacity = 0
    #@column_max = $game_party.actors.size
    @viewport = Viewport.new(0, 0, 544, 416)#0,480-128,640,128 ACAAAAA
    @hpgw = (Cache.system(BTSKIN_01)).width
    @mpgw = (Cache.system(BTSKIN_02)).width
    @viewport.z = self.z - 1
    @state_opacity = []
    @item_max = $game_party.members.size
    return unless @f
    for i in 0...@item_max
      draw_item(i)
    end
    update
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ��ƒ•�ƒ��ƒƒ�‚��ƒ�潰�—
  #--------------------------------------------------------------------------
  def refresh
    # :-)
  end
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ†�ƒ��ƒˆの描�”�
  #--------------------------------------------------------------------------
  def draw_actor_state(actor)
    icon = Cache.system("Iconset")
    w = actor.states.size * 24
    w = 24 if w < 1
    bitmap = Bitmap.new(w, BTSKIN_06WH[1])
    count = 0
    for state in actor.states
      icon_index = state.icon_index
      x = 24 * count
      rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
      bitmap.blt(x, 0, icon, rect)
      count += 1
    end
    return bitmap
  end
  #--------------------------------------------------------------------------
  # �—� 名�‰��œ�ˆ�
  #--------------------------------------------------------------------------
  def name_bitmap(actor)
    bitmap = Bitmap.new(10, 10)
    bitmap.font.size = 20
    bitmap.draw_text_f(-300, -80, 1000, 240, actor.name)
    return bitmap
  end
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ†�ƒ��ƒˆ�•��–�—
  #--------------------------------------------------------------------------
  def state_size(actor)
    return actor.states.size
  end
  #--------------------------------------------------------------------------
  # �—� �‚��‚��ƒ†�ƒ��œ�ˆ�
  #--------------------------------------------------------------------------
  def draw_item(index)
    return unless @f
    actor = $game_party.members[index]
    #
    @s_sprite[index] = []
    s = @s_sprite[index]
    # �ƒ��‚��ƒ��‚��‚��ƒ�
    s[0] = Sprite.new(@viewport)
    s[0].bitmap = Cache.system(BTSKIN_00)
    s[0].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_00XY[0]
    s[0].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_00XY[1]
    s[0].z = 0
    # HP
    s[1] = Sprite.new(@viewport)
    s[1].bitmap = Cache.system(BTSKIN_01)
    s[1].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_01XY[0]
    s[1].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_01XY[1]
    s[1].z = 4
    w = s[1].bitmap.width
    h = s[1].bitmap.height / 2
    s[1].src_rect.set(0, 0, w, h)
    s[2] = Sprite.new(@viewport)
    s[2].bitmap = Cache.system(BTSKIN_01)
    s[2].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_01XY[0]
    s[2].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_01XY[1]
    s[2].z = 3
    s[2].src_rect.set(0, h, w, h)
    s[11] = 96
    s[6] = Sprite_strNumbers.new(@viewport, BTSKIN_04, BTSKIN_04NS)
    s[6].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_04XY[0]
    s[6].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_04XY[1]
    s[6].z = 5
    s[13] = actor.hp
    s[6].update(s[13])
    # MP
    s[3] = Sprite.new(@viewport)
    s[3].bitmap = Cache.system(BTSKIN_02)
    s[3].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_02XY[0]
    s[3].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_02XY[1]
    s[3].z = 4
    w = s[3].bitmap.width
    h = s[3].bitmap.height / 2
    s[3].src_rect.set(0, 0, w, h)
    s[4] = Sprite.new(@viewport)
    s[4].bitmap = Cache.system(BTSKIN_02)
    s[4].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_02XY[0]
    s[4].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_02XY[1]
    s[4].z = 3
    s[4].src_rect.set(0, h, w, h)
    s[12] = 56
    s[7] = Sprite_strNumbers.new(@viewport, BTSKIN_05, BTSKIN_05NS)
    s[7].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_05XY[0]
    s[7].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_05XY[1]
    s[7].z = 5
    s[14] = actor.mp
    s[7].update(s[14])
    # �‚��ƒ†�ƒ��ƒˆ
    s[5] = Viewport.new(0, 0, BTSKIN_06WH[0], BTSKIN_06WH[1])
    s[5].rect.x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_06XY[0] + @viewport.rect.x
    s[5].rect.y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_06XY[1] + @viewport.rect.y
    s[5].z = @viewport.z + 1
    s[8] = Sprite.new(@viewport)
    s[8].bitmap = Cache.system(BTSKIN_03)
    s[8].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_03XY[0]
    s[8].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_03XY[1]
    s[8].z = -2
    s[9] = Plane.new(s[5])
    s[9].bitmap = draw_actor_state(actor)
    s[10] = state_size(actor)
    # 現�œ�の�‚��ƒ†�ƒ��‚��‚�に
    s[11] = ((@hpgw * (actor.hp / (actor.maxhp * 1.0))) + 1).truncate
    if actor.maxmp != 0
      s[12] = ((@mpgw * (actor.mp / (actor.maxmp * 1.0))) + 1).truncate
    else
      s[12] = 0
    end
    s[15] = Sprite.new(@viewport)
    s[15].bitmap = name_bitmap(actor)
    s[15].x = @x[index] + 4
    s[15].y = @y[index] + 2
    s[15].z = 0
    s[1].src_rect.width = s[11]
    s[2].src_rect.width = s[11]
    s[3].src_rect.width = s[12]
    s[4].src_rect.width = s[12]
    s[6].update(s[13])
    s[7].update(s[14])
    # 不可�–に
    for l in [0,1,2,3,4,8,9,15]
      s[l].opacity = 0
    end
    for l in [6,7]
      s[l].o = 0
    end
    # �ƒ…報�˜�†�(actor, x, y, size = 151)
    @s_lv[index] = actor.level
    @s_party[index] = [actor.name, actor.hp, actor.maxhp,
                      actor.mp, actor.maxmp, actor.states]
    #
    x = index * 161 - 20
    y = 15
    s[16] = Sprite.new
    s[16].bitmap = Cache.system("HUD_" + actor.name)
    s[16].x = @x[index] + 4 - 210 #posicion face izquierda-derecha
    s[16].y = @y[index] + 2 + 254 #posicion arriba -abajo face
    s[16].z = 0
    end
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ–�‚��‚��‚��ƒˆ�–‹�”�
  #--------------------------------------------------------------------------
  def dispose 
    super
    return unless @f
    for i in 0...@s_sprite.size
      for l in [0,1,2,3,4,8,9,15,16]
        @s_sprite[i][l].bitmap.dispose
        @s_sprite[i][l].dispose
      end
      for l in [5,6,7]
        @s_sprite[i][l].dispose
      end
    end
    @@f = false
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–�
  #--------------------------------------------------------------------------
  def update
    super
    return unless @f
    for i in 0...@s_sprite.size
      s = @s_sprite[i]
      a = $game_party.members[i]
      m = @s_party[i]
      @state_opacity[i] = 0 if @state_opacity[i] == nil
      # 不�€��˜Ž度�‚��ƒƒ�ƒ—
      @state_opacity[i] += 8
      if @opacity < 272
        @opacity += 8
        for l in [0,1,2,3,4,15]
          s[l].opacity = @opacity
        end
        for l in [6,7]
          s[l].o = @opacity
        end
      end
      # 名�‰��›��–�
      if a.name != m[0]
        s[15].bitmap.dispose
        s[15].bitmap = name_bitmap(a)
        m[0] = a.name
      end
      # HP/MP�›��–�
      update_hp(s,a,m)
      update_mp(s,a,m)
      # �‚��ƒ†�ƒ��ƒˆ�›��–�
      if s[10] > BTSKIN_06WH[0] / 24 and (Graphics.frame_count % BTSKIN_06SC) == 0
        s[9].ox += 1
      end
      if s[10] > 0 and @state_opacity[i] < 272
        for l in [8,9]
          s[l].opacity = @state_opacity[i]
        end
      end
      if a.states != m[5]
        m[5] = a.states
        s[9].ox = 0
        s[9].bitmap.dispose
        s[9].bitmap = draw_actor_state($game_party.members[i])
        s[10] = state_size($game_party.members[i])
        @state_opacity[i] = 0
        for l in [8,9]
          s[l].opacity = @state_opacity[i]
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–� (HP)
  #--------------------------------------------------------------------------
  def update_hp(s,a,m)
    # HPく�‚‹く�‚‹
    if a.hp != s[13]
      c = 0; c = 1 if a.hp < a.maxhp / 4; c = 2 if a.hp == 0
      if s[13] > a.hp
        s[13] -= BTSKIN_04SS
        s[13] = a.hp if s[13] < a.hp
      else
        s[13] += BTSKIN_04SS
        s[13] = a.hp if s[13] > a.hp
      end
      s[6].update(s[13], c)
    end
    # HP
    if a.hp != m[1]
      s[11] = ((@hpgw * (a.hp / (a.maxhp * 1.0))) + 1).truncate
      m[1] = a.hp
    end
    sr = s[1].src_rect
    if sr.width != s[11]
      sp = BTSKIN_01GS
      sr.width = (s[11] + (s[1].src_rect.width * (sp - 1))) / sp
      sr.width = 2 if sr.width <= 1 and a.hp > 0
    end
    sr = s[2].src_rect
    sp = 2
    if sr.width != s[1].src_rect.width and (Graphics.frame_count % sp) == 0
      if sr.width < s[1].src_rect.width
        sr.width += 1
      else
        sr.width -= 1
      end
    end
    sr.width = 2 if sr.width <= 1 and a.hp > 0
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–� (MP)
  #--------------------------------------------------------------------------
  def update_mp(s,a,m)
    # MPく�‚‹く�‚‹
    if a.mp != s[14]
      c = 0; c = 1 if a.mp < a.maxmp / 4
      if s[14] > a.mp
        s[14] -= BTSKIN_05SS
        s[14] = a.mp if s[14] < a.mp
      else
        s[14] += BTSKIN_05SS
        s[14] = a.mp if s[14] > a.mp
      end
      s[7].update(s[14], c)
    end
    # MP
    if a.mp != m[3]
      if a.maxmp != 0
        s[12] = ((@mpgw * (a.mp / (a.maxmp * 1.0))) + 1).truncate
      else
        s[12] = 0
      end
      m[3] = a.mp
    end
    sr = s[3].src_rect
    if sr.width != s[12]
      sp = BTSKIN_02GS
      sr.width = (s[12] + (s[3].src_rect.width * (sp - 1))) / sp
      sr.width = 2 if sr.width <= 1 and a.mp > 0
    end
    sr = s[4].src_rect
    sp = 2
    if sr.width != s[3].src_rect.width and (Graphics.frame_count % sp) == 0
      if sr.width < s[3].src_rect.width
        sr.width += 1
      else
        sr.width -= 1
      end
    end
    sr.width = 2 if sr.width <= 1 and a.mp > 0
  end
end

#==============================================================================
# �–� Sprite_strNumber
#==============================================================================
class Sprite_strNumber < Sprite
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ–�‚��‚��‚��ƒˆ�ˆ��œŸ�Œ–
  #--------------------------------------------------------------------------
  def initialize(v, gra, n = 0)
    @n = n
    super(v)
    self.bitmap = Cache.system(gra)
    @w = self.bitmap.width/10
    @h = self.bitmap.height/3
    self.src_rect = Rect.new(@n*@w, 0, @w, @h)
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–�
  #--------------------------------------------------------------------------
  def update(n = -1, c = 0)
    @n = n
    self.src_rect.x = @n*@w
    self.src_rect.y = c*@h
  end
end
#==============================================================================
# �–� Sprite_strNumbers
#==============================================================================
class Sprite_strNumbers
  attr_accessor :x
  attr_accessor :y
  attr_accessor :z
  attr_accessor :o
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ–�‚��‚��‚��ƒˆ�ˆ��œŸ�Œ–
  #--------------------------------------------------------------------------
  def initialize(v, gra, n = 4, s = 0)
    @n = n # 桁�•�
    @x = 0
    @y = 0
    @z = 0
    @o = 255
    @sprite = []
    # �—�–“設�š
    b = Cache.system(gra)
    @s = b.width / 10 - s
    # �‚��ƒ—�ƒ��‚��ƒˆ�œ�ˆ�
    for i in 0...n
      @sprite[i] = Sprite_strNumber.new(v, gra)
    end
    update
  end
  #--------------------------------------------------------------------------
  # �—� �ƒ•�ƒ��ƒ��ƒ��›��–�
  #--------------------------------------------------------------------------
  def update(v = 0, c = 0)
    val = []
    # �•��€��‚’�…��ˆ—に格納
    for i in 0...@n
      if (10 ** (i)) == 0
        val[i] = v % 10
      else
        val[i] = v / (10 ** (i)) % 10
      end
    end
    val = val.reverse
    # �…ˆ頭の0�‚’�–�‚Š�™️�く
    for i in 0...@n
      if val[i] == 0 and @n != i + 1
        val[i] = -1
      else
        break
      end
    end
    # �‚��ƒ—�ƒ��‚��ƒˆ�›��–�
    for i in 0...@n
      @sprite[i].update(val[i], c)
      @sprite[i].x = @x + (i * @s)
      @sprite[i].y = @y
      @sprite[i].z = @z
      @sprite[i].opacity = @o
    end
  end
  #--------------------------------------------------------------------------
  # �—� 不�€��˜Ž度の適�”�
  #--------------------------------------------------------------------------
  def o=(val)
    @o = val
    for i in 0...@n
      @sprite[i].opacity = @o
    end
  end
  #--------------------------------------------------------------------------
  # �—� �‚��ƒ–�‚��‚��‚��ƒˆ�–‹�”�
  #--------------------------------------------------------------------------
  def dispose
    for i in 0...@sprite.size
      @sprite[i].bitmap.dispose
      @sprite[i].dispose
    end
  end
end


#==============================================================================
# �–� Bitmap
#==============================================================================
# This script controls the shadow behind actor names for *STR33g1_Battle Status.

class Bitmap
  #--------------------------------------------------------------------------
  # �—� �–‡�—縁�–�‚Š描�”�
  #--------------------------------------------------------------------------
  def draw_text_f(x, y, width, height, str, align = 0, color = Color.new(64,32,128))
    shadow = self.font.shadow
    b_color = self.font.color.dup
    font.shadow = true
    font.color = color
    draw_text(x + 1, y, width, height, str, align)
    draw_text(x - 1, y, width, height, str, align)
    draw_text(x, y + 1, width, height, str, align)
    draw_text(x, y - 1, width, height, str, align)
    font.color = b_color
    draw_text(x, y, width, height, str, align)
    font.shadow = shadow
  end
  def draw_text_f_rect(r, str, align = 0, color = Color.new(64,32,128))
    draw_text_f(r.x, r.y, r.width, r.height, str, align = 0, color)
  end
end

#5 Re: Necesito ayuda con Battler HUD el Miér Mayo 02, 2012 6:07 am

FIGO

avatar
Pega este ATB configurations
Spoiler:
Código:
#==============================================================================
# ■ Active Time Battle Configurations [1.2c]
#        Only for RPG Tankentai Sideview Battle System                 
#------------------------------------------------------------------------------
#  Original Script by:
#              Enu (http://rpgex.sakura.ne.jp/home/)
#  English Localization by:
#              Mr. Bubble
#  Contributors & Special Thanks:
#              Moonlight, mark paul, CrimsonSeas, Mithran
#              (See [Credits] for more information)
#==============================================================================

$imported = {} if $imported == nil
$imported["TankentaiATB"] = true

#==============================================================================
# ■ module N02
#------------------------------------------------------------------------------
#  Active Time Battle Configurations
#==============================================================================
module N02
 #--------------------------------------------------------------------------
 # ++ Battle Start ATB Gauge Settings
 #--------------------------------------------------------------------------
  # Actor initial ATB Gauge value(%).
  ATB_BASE_ACTOR = 30
  # Enemy initial ATB Gauge value(%).
  ATB_BASE_ENEMY = 30
  # Random base value(%) added to initial gauge. Applies to both actor and enemy.
  ATB_BASE_ADD = 30
 #--------------------------------------------------------------------------
 # ++ ATB Type Settings (Only applies if ATB_CUSTOMIZE = false)
 #--------------------------------------------------------------------------
  # true: Gauges are active while selecting Party Commands. (Fight and Escape)
  ATB_PARTY_COMMAND_WAIT = false
  # true: Gauges are active while selecting Actor Commands.
  ATB_COMMAND_WAIT = false
  # true: Gauges are active while selecting targets.
  ATB_TARGET_WAIT = false
  # true: Gauges are active while selecting Items/Skills.
  ATB_SELECT_WAIT = false
  # true: Gauges are active while actions are being executed/processed.
  ATB_ACTION_WAIT = false
 #--------------------------------------------------------------------------
 # ++ Gauge Control Input Settings
 #--------------------------------------------------------------------------
  # true: Pressing Shift will boost gauge speed x4.
  ATB_SHIFT_BOOST = true
  # true: Pressing Ctrl will force gauges to rise if inactive.
  ATB_CTRL_ACTIVE = true
  # true: Pressing Alt will force gauges to stop if active.
  ATB_ALT_WAIT = true
 #--------------------------------------------------------------------------
 # ++ Overall ATB Gauge Speed (Only applies if ATB_CUSTOMIZE = false)
 #--------------------------------------------------------------------------
  # 1 = Slowest; 5 = Comfortable; 10 = Average; 20 = Faster; 500 = Whoa!
  ATB_SPEED = 10
 #--------------------------------------------------------------------------
 # ++ ATB Standard Speed Calculation Settings
 #--------------------------------------------------------------------------
  # This setting determines the standard speed calculation you define below. 
  # Please note this only determines the base factor for battle speed
  # and the general "feel" of battle speed.
  # AGI will still be a factor for individual gauge speed.
  #  0: Fixed Value
  #  1: Battler with the highest AGI
  #  2: Battler with the lowest AGI
  #  3: Average AGI of all battlers
  ATB_BASE_SPEED = 3
  # Applies only if ATB_BASE_SPEED = 0; Comparative speed of battler gauges
  # will be compared to the value defined here.
  ATB_ABSOLUTE_SPEED = 50
 #--------------------------------------------------------------------------
 # ++ Pre-emptive and Surprise Attacks - Gauge Penalty Settings
 #--------------------------------------------------------------------------
  # Penalty to ATB gauge in pre-emptive and surprise attack encounters. (0~100)
  ATB_BACKATTACK = 50
 #--------------------------------------------------------------------------
 # ++ Escape Failure - Gauge Penalty Settings
 #--------------------------------------------------------------------------
  # Penalty to ATB gauge for failing to escape battle. (0~100)
  ATB_RUN_NG = 50
 #--------------------------------------------------------------------------
 # ++ Battle Turn Count Settings
 #--------------------------------------------------------------------------
  #  0: 1 Turn passes when the number of actions executed equals the number of
  #    battler's present.
  #  1: 1 Turn passes when the number of actions executed equals half the number
  #    of battlers present.
  #  2: 1 Turn passes after any battler executes an action.
  ATB_TURN_COUNT = 1
 #--------------------------------------------------------------------------
 # ++ Slip Damage (Poison/Regeneration) POP Timing Settings
 #--------------------------------------------------------------------------
  #  0: Slip damage is applied each time the afflicted battler takes action.
  #  1: Slip damage is applied to all afflicted after each turn.
  ATB_SLIP_DAMAGE = 1
 #--------------------------------------------------------------------------
 # ++ Incapacitated Gauge Reset Setting
 #--------------------------------------------------------------------------
  # Gauge reset value(%) when revived from Incapacitated state. Can be negative.
  ATB_DEAD_COUNT = 20
 #--------------------------------------------------------------------------
 # ++ Finished Action Gauge Reset Settings
 #--------------------------------------------------------------------------
  # Define gauge reset value(%) after finishing an action.
  ATB_ATTACK_RESET = 20  # Normal Attack
  ATB_GUARD_RESET  =  0  # Guard
  ATB_SKILL_RESET  =  0  # Skill
  ATB_ITEM_RESET  =  0  # Item
  ATB_NONACT_RESET = 40  # No Action
 #--------------------------------------------------------------------------
 # ++ Enemy ATB Gauge Default Display Settings
 #--------------------------------------------------------------------------
  # Determines the default visibility of enemy gauges in battle.
  # To set up gauge visibility individually for each enemy, refer to
  # Enemy ATB Gauge Individual Display Settings at the bottom of this script.
  ATB_ENEMY_ON = true
 #--------------------------------------------------------------------------
 # ++ Gauge Visibility During Actions Settings
 #--------------------------------------------------------------------------
  # Determines whether ATB gauge is visible when the actor/enemy is
  # executing an action.
  ATB_ACTION_ACTOR_OFF = true # Actor
  ATB_ACTION_ENEMY_OFF = true # Enemy
 #--------------------------------------------------------------------------
 # ++ ATB Gauge Position Settings
 #--------------------------------------------------------------------------
  # X-axis is automatically inverted for back attacks.
  #                  X-axis  Y-axis
  ATB_POSITION_ACTOR = [ 0, 5] # Actors5
  ATB_POSITION_ENEMY = [  0, -60] # Enemies0-20
  # true: Actor's ATB gauge is set according to ATB_PARTY_POSITION coordinates.
  #      (Above setting is ignored.)
  # false: Battler's ATB gauge is set according to actor's start position.
  #        ATB_POSITION_ACTOR and ATB_POSITION_ENEMY is distance the gauge is
  #        from battler's start position.
  ATB_POSITION_HPWINDOW = true
 #--------------------------------------------------------------------------
 # ++ Actor ATB Gauge Positions (Applies only if ATB_POSITION_HPWINDOW = true)
 #--------------------------------------------------------------------------
  # Individual Positions: Actor 1  Actor 2  Actor 3  Actor 4       
  #                      X  Y,    X  Y,    X  Y,    X  Y
  ATB_PARTY_POSITION = [[460,103],[477,132],[496,160],[515,190],[460,424],[460,456]]
  # Please remember to add/remove coordinates whenever you change MAX_MEMBER
  # Extra coordinates have been added, but do not adversely affect your game
  # if you use less than 6. If you use more than 6, extra coordinates must be added.
 #--------------------------------------------------------------------------
 # ++ ATB Gauge Graphic Settings
 #--------------------------------------------------------------------------
  # These settings are related to the gauge images in the System folder.
  #
  # "atb_bar": Used when waiting.
  # "act_bar": Used when charging.
  # "atb_bar_active": Displays when gauge is full.
  # "atb_bar_skin": Gauge skin.
  # It is recommended to make all 4 gauges images the same size.
  # In order for the bar skin to be utilized correctly, bar images
  # with transparent width pixels can be excluded.
  #
  # Width, in pixels, of "atb_bar" and "act_bar" images that is actually
  # utilized.  Exclude any transparent/unused pixels on the left and right sides
  # of those bar images.
  # Numbers that divide into 1000 with no remainders work best.
  ATB_WIDTH = 50
  # Gauge bars' excluded pixels.  Refers to the amount of transparent/unused
  # pixels on the left and right sides of the "atb_bar" and "act_bar" images
  # that are excluded from usage.
  ATB_SPACE = 2
 #--------------------------------------------------------------------------
 # ++ ATB Gauge (Blue Gauge) Sound Effect When Full
 #--------------------------------------------------------------------------
  #                Pitch  Vol. SE File name
  ATB_MAX_SOUND01 = [150,  70, "Decision2"]
 #--------------------------------------------------------------------------
 # ++ ACT Gauge (Red Gauge) Sound Effect When Full
 #--------------------------------------------------------------------------
  #                Pitch  Vol. SE File name
  ACT_MAX_SOUND01 = [150,  70, "Chime2"]
 #--------------------------------------------------------------------------
 # ++ Switch Actor Command Sound Effect
 #--------------------------------------------------------------------------
  #                Pitch  Vol. SE File name
  NEXT_SOUND01    = [135,  70, "Miss"]
 #--------------------------------------------------------------------------
 # ++ ATB User Customization Settings
 #--------------------------------------------------------------------------
  # In-game dynamic ATB customization can be accessed from the player's menu.
  #
  ATB_CUSTOMIZE = true
  # Name for ATB options.
  ATB_CUSTOMIZE_NAME = "ATB Options"
  # Text in Help Window at the top of ATB Options scene.
  ATB_CUSTOMIZE_HELP = "Use the directional keys to select options."
  # Menu name for ATB mode.
  ATB_MODE_NAME = "Battle Mode"
  # The three ATB modes below should be aligned properly in the editor window.
  # When a number in the ATB Mode array (0~4) is set to true, the scene
  # will be designated Active; false will designate Wait.
  #
  # [0]Party Command Selection  [1]Actor Command Selection
  # [2]Target Selection  [3]Skill/Item Selection  [4]Battle Actions
  #
  #          Mode Name        [0]    [1]    [2]    [3]    [4]
  ATB_MODE1 = ["Wait",        false,  false,  false,  false,  false,]
  ATB_MODE2 = ["Semi-Active", false,  false,  false,  false,  true,]
  ATB_MODE3 = ["Active",      true,  true,  true,  true,  true,]
  # Description in Help Window for ATB modes defined above.
  ATB_MODE1_HELP = "Gauges stop during all input and actions."
  ATB_MODE2_HELP = "Gauges are active only during actions."
  ATB_MODE3_HELP = "Gauges are always active."
  # Default mode in a New Game: [0]MODE1 [1]MODE2 [2]MODE3
  ATB_NEWGAME_MODE = 1
 
  # Battle Speed Settings 
  # Menu name for ATB speed.
  ATB_SPEED_NAME = "Battle Speed"
  # Help window comment for Battle Speed
  ATB_SPEED_HELP = "Larger numbers increase battle speed."
  # The number above (1~9) represents the speed value below respectively.
  # The speed setting above (ATB_SPEED) is ignored here.
  #
  #               [1]  [2]  [3]  [4]  [5]  [6]  [7]  [8]  [9]
  ATB_SPEED_MODE = [  1,    2,    4,    6,  10,    20,  40,  100,  500]
  # Default speed mode and cursor position for a New Game.
  ATB_NEWGAME_SPEED = 5
 #--------------------------------------------------------------------------
 # ++ ATB-Specific Force Action Settings
 #--------------------------------------------------------------------------
  # true: Force Actions consume the battler's gauge.
  # false: Force Actions does not consume the battler's gauge.
  FORCE_ACTION_CONSUME_GAUGE = false
  # true: Forced actions increase the turn count.
  # false: Forced actions will not increase turns (as in 1.1f and earlier)
  FORCE_ACTION_INCREASE_TURN = false
 #--------------------------------------------------------------------------
 # ++ Old Version Compatibility
 #--------------------------------------------------------------------------
  # It is not recommended that you edit these unless you know what they
  # are for.
  WORD_STATE_DISPLAY = N01::WORD_STATE_DISPLAY
  HP_DISPLAY = N01::HP_DISPLAY
  ACTOR_DISPLAY = N01::ACTOR_DISPLAY
  WORD_NORMAL_STATE = N01::WORD_NORMAL_STATE
  ENEMY_NON_DISPLAY = N01::ENEMY_NON_DISPLAY
  STATE_NON_DISPLAY = N01::STATE_NON_DISPLAY
end
module RPG
#==============================================================================
# * module RPG
#------------------------------------------------------------------------------
#  Skill Settings
#==============================================================================
  class Skill
 #--------------------------------------------------------------------------
 # ++ Skill Charge Time Settings
 #-------------------------------------------------------------------------- 
 # You can define how long a skill needs to be charged up before being used.
 # For magic spells with chanting time, etc.
 #
 # when 1  <- Skill ID             
 #                               
 #            A,  B, C,  D  # See descriptions below
 #  return [ 0, 50, 0, ""]       
 # end
 #
 #
 # A> Standard: Base AGI calculation used for charge time.
 #  0: Fixed Value
 #  1: Battler with the highest AGI
 #  2: Battler with the lowest AGI
 #  3: Average AGI of all battlers
 #  4: Battler's own AGI
 #
 # B> Required Gauge(%): The amount of charge time, in percent, that is needed.
 #  200% will be twice the amount the battler normally needs for full ATB gauge.
 #  10% will be 1/10 of what the battler needs for a full ATB gauge.
 #  0% is instant.
 #         
 # C> Fixed Value: Only used if Standard is set to 0. Used in charge time
 #  calculation as if the battler has the AGI of what you define.
 #
 # D> Charging ACTION Sequence: ACTION sequence that is used while charging the
 #  skill.  ACTIONS for this should be defined in the SBS Configuration script.
 #  If "", then no ACTION sequence is used while charging.
 #
 # Notetag: <charge: type, gauge%, fixed value)
 #          To assign an action sequence while charging, use
 #          <charge action: key>
 #          The charge action: notetag does not work unless there is a
 #          charge: notetag included as well.
  def charge
    # Default charge time and charging sequence for all unassigned Skill IDs.
    return [ 4, 0, 0, ""]
  end 
 #--------------------------------------------------------------------------
 # ++ Skill Gauge Reset Settings
 #--------------------------------------------------------------------------
 # Define a value(%) the gauge will reset to after executing a skill. (0~100)
 #
 # Notetag: <recharge: value%>
  def recharge
    case @id
    when 1 # Skill ID
      return 30
    end
    # Default gauge reset value for all unassigned Skill IDs.
    return N02::ATB_SKILL_RESET
  end
 #--------------------------------------------------------------------------
 # ++ ATB Union Skills Settings
 #--------------------------------------------------------------------------
 # When defining skill IDs in the square brackets, remember to use commas.
 #
 #          [98, 99],
 #
 # Here, you can specify Skill IDs that are used for combination attacks, etc. 
 # These are triggered when any of the defined combination IDs are used. 
 # For the combination to execute, all required actors must have a full ATB
 # gauge.  If an actor becomes Incapacitated before executing the union skill,
 # the attack is canceled.
 #
 # The actor who has the first ID in the array is considered the active battler. 
 # This means that damage is based and done off this actor alone.  For example,
 # Ralphrika Attack's damage is based off the actor who has skill ID 98.  When
 # any skill ID for the combination is used, all required actors will go into
 # "Prepare" mode and other actions are not possible until canceled or completed.
  def union_action
    return [
   
    [ 98,  99], # Ralphrika Attack
    [100, 101, 102, 103], # RTP Union
    [123, 124], # Antipode
    [125, 126], # Southern Cross
   
    []]
  end
end
#==============================================================================
# * module RPG
#------------------------------------------------------------------------------
#  Item Settings
#==============================================================================
class Item
 #--------------------------------------------------------------------------
 # ++ Item Charge Time Settings
 #--------------------------------------------------------------------------
 # Please refer to Skill Charge Time Settings as the same rules apply here.
 #
 # Define an amount of charge time an item requires before being used.
 #
 # Notetag: <charge: type, gauge%, fixed value)
 #          To assign an action sequence while charging, use
 #          <charge action: key>
 #          The charge action: notetag does not work unless there is a
 #          charge: notetag included as well.
  def charge
    case @id
    when 1
      return [ 4, 20, 0, ""]
    end
    # Default charge time and charging sequence for all unassigned Item IDs.
    return [ 4, 0, 0, ""]
  end
 #--------------------------------------------------------------------------
 # ++ Item Gauge Reset Settings
 #--------------------------------------------------------------------------
 # Define a value(%) the gauge will reset to after using an item. (0~100)
 #
 # Notetag: <recharge: value%>
  def recharge
    case @id
    when 1
      return 0
    end
    # Default gauge reset value for all unassigned Item IDs.
    return N02::ATB_ITEM_RESET
  end
end
#==============================================================================
# * module RPG
#------------------------------------------------------------------------------
#  State Settings
#==============================================================================
class State
 #--------------------------------------------------------------------------
 # ++ State Gauge Damage Settings
 #--------------------------------------------------------------------------
 # When afflicted by the defined state, damage will be done to the battler's
 # ATB gauge based on the battler's maximum gauge possible. (-100~-1)  If gauge
 # is damaged while charging, the action being charged is cancelled.  Gauge
 # damage is only applied once when the state is applied.  It is recommended
 # to use State Efficiency ratings as game balance for gauge damage states.
 # If a State Removal Effect in a Sideview sequence is used, the state's
 # Priority rating will be set to 0 for the duration.
 #
 # Positive values(%) will fill up gauges instead. (1~100)
 #
 # Notetag: <atb damage: value%>
  def atb_damage
#    case @id
#    when 8
#      return -100
#    end
    # Default gauge damage for all unassigned State IDs.
    return 0
  end
 #--------------------------------------------------------------------------
 # ++ State Gauge Damage Limit Settings
 #--------------------------------------------------------------------------
 # true: State Gauge Damage as defined above can cause gauges to
 #      exceed below 0.
 #
 # For example, if a battler's gauge is damaged to a negative value such as -25,
 # then battler will require 125% of its normal gauge for a full gauge.
 #
 # Notetag: <atb minus damage> OR <-atb minus damage>
 #          Prefixing with an minus sign (-) will always return false.
 #          Otherwise, using the regular tag make it true.
  def atb_minus_damage
    # Default gauge damage setting for all unassigned State IDs.
    return false
  end
 #--------------------------------------------------------------------------
 # ++ State Charge Time Bonus Settings
 #--------------------------------------------------------------------------
 # Define a value(%) that adds to all charge times when battler has a state.
 # This will only affect charge gauges (red gauges).
 #
 # Values added to the charge time are additive. This means that if
 # the charge time is 0% and the charge bonus is 15% then the total
 # charge time will be 15%. This will affect ALL actions with a charge time
 # such as skills, items, weapons, and unarmed attacks.
 #
 # Negative values decreases charge time.
 # Positive values increases charge time.
 # Charge bonus effects are cumulative and additive.
 #
 # Notetag: <charge bonus: value%>
  def charge_bonus
    # Default charge bonus for all unassigned State IDs.
    return 0
  end
end 
#==============================================================================
# * module RPG
#------------------------------------------------------------------------------
#  Weapon Settings
#==============================================================================
class Weapon
 #--------------------------------------------------------------------------
 # ++ Weapon Charge Time Settings
 #--------------------------------------------------------------------------
 # Please refer to Skill Charge Time Settings as the same rules apply here.
 #
 # Define an amount of charge time a weapon requires before being used.
 # When wielding two weapons, average charge time between the two will be used
 # and Weapon 1's charging sequence will take precedence.
 #
 # Notetag: <charge: type, gauge%, fixed value)
 #          To assign an action sequence while charging, use
 #          <charge action: key>
 #          The charge action: notetag does not work unless there is a
 #          charge: notetag included as well.
  def charge
    case @id
    when 2 # Weapon ID
      return [ 4, 0, 0, ""]
    end
    # Default charge time and charging sequence for all unassigned Weapon IDs
    return [ 4, 0, 0, ""]
  end
 #--------------------------------------------------------------------------
 # ++ Weapon Charge Time Bonus Settings
 #--------------------------------------------------------------------------
 # Define a value(%) that adds to all charge times when holding a weapon.
 # This will only affect charge gauges (red gauges).
 #
 # Values added to the charge time are additive. This means that if
 # the charge time is 0% and the charge bonus is 15% then the total
 # charge time will be 15%. This will affect ALL actions with a charge time
 # such as skills, items, weapons, and unarmed attacks.
 #
 # Negative values decreases charge time.
 # Positive values increases charge time.
 # Charge bonus effects are cumulative and additive.
 # When wielding two weapons, average value is used.
 #
 # Notetag: <charge bonus: value%>
  def charge_bonus
    case @id
    when 1 # Weapon ID
      return 0
    end
    # Default charge time bonus for all unassigned Weapon IDs.
    return 0
  end
 #--------------------------------------------------------------------------
 # ++ Weapon Gauge Reset Settings
 #--------------------------------------------------------------------------
 # Define a value(%) the gauge will reset to after using the defined
 # equipped weapon. (0~100)
 #
 # Only takes effect after a normal attack with the equipped weapon. No effect
 # with Item and Skill use.  When wielding two weapons, average value is used.
 #
 # Notetag: <recharge: value%>
  def recharge
    case @id
    when 1 # Weapon ID
      return 20
    end
    # Default gauge reset value for all unassigned Weapon IDs.
    return N02::ATB_ATTACK_RESET
  end
 #--------------------------------------------------------------------------
 # ++ Weapon Battle Start Gauge Adjustment Settings
 #--------------------------------------------------------------------------
 # Define a value(%) that will adjust initial gauge when equipped with
 # specified weapon. (-100~100)
 #
 # Values can be negative.  Equipped items with similar effect are cumulative.
 # When wielding two weapons, average value is used.
 #
 # Notetag: <atb base: value%>
  def atb_base
    case @id
    when 1 # Weapon ID
      return 0
    end
    # Default initial gauge adjustment for all unassigned Weapons IDs.
    return 0
  end
end
#==============================================================================
# * module RPG
#------------------------------------------------------------------------------
#  Armor Settings
#==============================================================================
class Armor
 #--------------------------------------------------------------------------
 # ++ Armor Charge Time Bonus Settings
 #--------------------------------------------------------------------------
 # Define a value(%) that adds to all charge times when wearing armor.
 # This will only affect charge gauges (red gauges).
 #
 # Values added to the charge time are additive. This means that if
 # the charge time is 0% and the charge bonus is 15% then the total
 # charge time will be 15%. This will affect ALL actions with a charge time
 # such as skills, items, weapons, and unarmed attacks.
 #
 # Negative values decreases charge time.
 # Positive values increases charge time.
 # Charge bonus effects are cumulative and additive.
 #
 # Notetag: <charge bonus: value%>
  def charge_bonus
    case @id
    when 1 # Armor ID
      return 0 # Bonus
    end
    # Default charge time bonus for all unassigned Armor IDs.
    return 0
  end
 #--------------------------------------------------------------------------
 # ++ Armor Battle Start Gauge Adjustment Settings
 #--------------------------------------------------------------------------
 # Define a value(%) that will adjust initial gauge when equipped with
 # specified armor. (-100~100)
 #
 # Values can be negative.  Equipped items with similar effects are cumulative.
 #
 # Notetag: <atb base: value%>
  def atb_base
    case @id
    when 1 # Armor ID
      return 0
    end
    # Default initial gauge adjustment for all unassigned Armor IDs.
    return 0
  end
end
end
#==============================================================================
# * Game_Actor
#------------------------------------------------------------------------------
#  Actor Settings
#==============================================================================
class Game_Actor < Game_Battler
 #--------------------------------------------------------------------------
 # ++ Actor Unarmed Attack - Charge Time Settings
 #--------------------------------------------------------------------------
 # Please refer to Skill Charge Time Settings as the same rules apply here.
 #
 # Define an amount of charge time an unarmed attack requires before being used.
  def charge
    case @actor_id
    when 1 # Actor ID
      return [ 4, 0, 0, ""]
    end
    # Default charge time and battler animation for all unassigned Actor IDs.
    return [ 4, 0, 0, ""]
  end
 #--------------------------------------------------------------------------
 # ++ Actor Unarmed Attack - Gauge Reset Settings
 #--------------------------------------------------------------------------
 # Define a value(%) the gauge will reset to after an unarmed attack. (0~100)
 #
 # Only takes effect after using an unarmed normal attack. No effect with Item,
 # Skill and Weapon use.
  def recharge
    case @actor_id
    when 1 # Actor ID
      return 20
    end
    # Default gauge reset value for all unassigned Actor IDs.
    return N02::ATB_ATTACK_RESET
  end
 #--------------------------------------------------------------------------
 # ++ Actor Battle Start - ATB Gauge Settings
 #--------------------------------------------------------------------------
 # Define a value(%) the gauge will be set to at the start of battle. (0~100)
 # This will override the ATB_BASE_ACTOR default setting.
  def atb_base
    case @actor_id
    when 1 # Actor ID
      return 30
    end
    # Default battle start gauge for all unassigned Actor IDs.
    return N02::ATB_BASE_ACTOR
  end
 #--------------------------------------------------------------------------
 # ++ Actor ATB Gauge - Display Settings
 #--------------------------------------------------------------------------
 # true: Gauge is displayed in battle.
 # false: Gauge is always hidden.
  def atb_on
    case @actor_id
    when 1 # Actor ID
      return true
    end
    # Default gauge display for all unassigned Actor IDs.
    return true
  end
end 
#==============================================================================
# * Game_Enemy
#------------------------------------------------------------------------------
#  Enemy Settings
#==============================================================================
class Game_Enemy < Game_Battler
 #--------------------------------------------------------------------------
 # ++ Enemy Unarmed Attack - Charge Time Settings
 #--------------------------------------------------------------------------
 # Please refer to Skill Charge Time Settings as the same rules apply here.
 #
 # Define an amount of charge time an unarmed attack requires before being used.
 #
 # Notetag: <charge: type, gauge%, fixed value)
 #          To assign an action sequence while charging, use
 #          <charge action: key>
 #          The charge action: notetag does not work unless there is a
 #          charge: notetag included as well.
  def charge
    case @enemy_id
    when 1 # Enemy ID
      return [ 4, 20, 0, ""]
    end
    # Default charge time and battler animation for all unassigned Enemy IDs.
    return [ 4, 0, 0, ""]
  end
 #--------------------------------------------------------------------------
 # ++ Enemy Unarmed Attack - Gauge Reset Settings
 #--------------------------------------------------------------------------
 # Define a value(%) the gauge will reset to after an unarmed attack. (0~100)
 #
 # Only takes effect after using an unarmed normal attack. No effect with
 # Skill or Weapon use.
 #
 # Notetag: <recharge: value%>
  def recharge
    case @enemy_id
    when 1 # Enemy ID
      return 20
    end
    # Default gauge reset value for all unassigned Enemy IDs.
    return N02::ATB_ATTACK_RESET
  end
 #--------------------------------------------------------------------------
 # ++ Enemy Battle Start - ATB Gauge Settings
 #--------------------------------------------------------------------------
 # Define a value(%) the gauge will be set to at the start of battle. (0~100)
 # This will override the ATB_BASE_ENEMY default setting.
 #
 # Notetag: <atb base: value%>
  def atb_base
    case @enemy_id
    when 1 # Enemy ID
      return 10
    end
    # Default battle start gauge for all unassigned Enemy IDs.
    return N02::ATB_BASE_ENEMY
  end
 #--------------------------------------------------------------------------
 # ++ Enemy ATB Gauge - Individual Display Settings
 #--------------------------------------------------------------------------
 # true: Gauge is displayed in battle.
 # false: Gauge is always hidden.
 # Individual settings will override the ATB_ENEMY_ON setting.
 #
 # Notetags: <atb gauge> OR <-atb gauge>
 #          Prefixing with an minus sign (-) will always return false.
 #          Otherwise, using the regular tag will return true
  def atb_on
    case @enemy_id
    when 1 # Enemy ID
      return true unless !N02::ATB_ENEMY_ON # Idiot-proof code
    end
    # Default gauge display for all unassigned Enemy IDs.
    return N02::ATB_ENEMY_ON
  end
end
 

#6 Re: Necesito ayuda con Battler HUD el Miér Mayo 02, 2012 6:26 am

FIGO

avatar
Te explico por si necesitas modificar algo.

En la linea 145 del ATB configurations estan las posiciones de (x,y) de la barritas celestes de los personajes, solo modifique para una party de 4 como en la imagen.
En la linea 133 la posicion de las barritas sobre los enemigos (0,-60), si le pones -120 por ejemplo quedan muchos mas arriba todas las barras de enemigos.
En la 125 -126 tiene unas opciones true o false para modificar las posiciones o ignorarlas creo.

Con respecto al HUd es sencillo.
BTSKIN_B_XY = [-180, 340] # mueve todo menos las caras
BTSKIN_00XY = [ -52, -90] #Main Skin mueve el cuadro amarillo de las caras
BTSKIN_01XY = [ 0, 23] # HP(gauge)
BTSKIN_02XY = [ 0, 38] # MP(gauge)
BTSKIN_04XY = [ 18, 10] # HP(numbers)
BTSKIN_05XY = [ 18, 30] # MP(numbers)
BTSKIN_03XY = [-33, 17] # la imagen del cuadro de estado
BTSKIN_06XY = [-29, 25] # la imagen del estado adquirido

Para las caras lineas 224 y 225
s[16].x = @x[index] + 4 - 210 #posicion face izquierda-derecha(modifica el -210)
s[16].y = @y[index] + 2 + 254 #posicion arriba -abajo face(modifica el +254)

Para la seleccion transparente no se como quitarla, pero una solucion temporal es modificar el lugar del cuadrado de opciones llevandolo del lado derecho.
En el script ATB (1.2c) modifica la linea 1346 así:
@info_viewport = Viewport.new(-416,50, 544, 128)


Fijate q las imagenes de los recuadros tienen la palabra AMDOR escrita, deberias quitarla editando la imagen y ver si alguien te puede hacer el script para que aparezcan los nombres de los personajes.

SALUDOS Y JUGA UN POCO CON LOS VALORES A TU ANTOJO, (PERO HACELO EN UNA COPIA!!!!)

FIGO


#7 Re: Necesito ayuda con Battler HUD el Miér Mayo 02, 2012 8:12 pm

Tarima_Shadowsong

avatar
Gracias!!!

FIGO me siento muy agredecido por el auxilio que me brindaste, creo que me solucionaste mejor el problema de lo que yo esperaba, ahora que se donde estan los valores a modificar (y apoyado con los scripts que modificaste) puedo reacomodar la situación a mi gusto.

Muchas gracias de nuevo

P.D: je,je,je el "AMDOR" de las carátulas venía por defecto pero creo que lo borraré en photoshop y pasaré a colocar los nombres de los personajes (si no me equivoco lo lógico sería que funcionara similar al código para poner los HUD de las FACES)

#8 Re: Necesito ayuda con Battler HUD el Jue Mayo 03, 2012 2:08 am

Tarima_Shadowsong

avatar
Hola de nuevo:

Revisando un poco la estructura del script de Battle HUD, me di cuenta de algo extraño: en la línea 220-227, está definido la base de datos de donde surgen los archivos para las FACES.

Código:
    # �ƒ…報�˜�†�(actor, x, y, size = 151)
    @s_lv[index] = actor.level
    @s_party[index] = [actor.name, actor.hp, actor.maxhp,
                      actor.mp, actor.maxmp, actor.states]
    #
    x = index * 161 - 20
    y = 15
    s[16] = Sprite.new
    s[16].bitmap = Cache.system("HUD_" + actor.name)
    s[16].x = @x[index] + 4 - 210 #posicion face izquierda-derecha
    s[16].y = @y[index] + 2 + 254 #posicion arriba -abajo face
    s[16].z = 0
    end

Al principio yo creí que necesitaba recolocar los archivos de las caras de los personajes para que funcionara en el script, por lo que sólo separé las caras de la tira original que iban en la carpeta Faces, las llamé "HUD_" más el nombre y las puse en la carpeta System.

Sin embargo por lo que entiendo la orden del script pide, necesariamente, que todos los HUD de face usados, se llamen tal cual se llama el personaje descrito de lo contrario me provoca un error, va con un ejemplo:

Supongamos que el HUD de un personaje se llamó AAA por comodidad, pero en el juego lo primero que uno hace es nombrar a su personaje como se le antoje, por lo tanto digamos que su nombre va ser "Horacio"; de ser asi el nombre del personaje y el archivo HUD dejan de coincidir y provoca un error:

[img] [/img]

A lo que me gustaría llegar es si tanto tu FIGO o alguien más sabe:

*Cómo cambiar las ordenes para que la información de los HUD no tengan que ser necesariamente el nombre especifico de los personajes.( algo asi como no importa si el HUD se llama "HUD_AAA", siempre se va a referir al personaje principal "Horacio")
*O en su defecto, ¿Cómo puedo obtener la información de las faces para que aparezcan en la pantalla de batalla, sin necesidad de crear archivos de graficos separados? (En cristiano seria olvidarse de las HUD de cada personaje, para que jalara las caras definidas en el juego y que se encuentran en la carpeta faces)

La verdad la estructura de este script me confunde un poco, pero me aferro a querer entenderlo para personalizarlo lo mejor posible, si alguien más sabe como modificar esta orden se lo agradecería

#9 Re: Necesito ayuda con Battler HUD el Jue Mayo 03, 2012 4:03 am

orochii

avatar
Ésta línea
Código:
s[16].bitmap = Cache.system("HUD_" + actor.name)
Cámbiala por esto
Código:
s[16].bitmap = Cache.system("HUD_" + actor.id)
Eso debería hacer que necesite no el nombre, sino su número dentro de la base de datos. Por ejemplo, el primer héroe en la lista de héroes usaría el HUD_1.png en lugar de HUD_Amdor o así. Para permitir por ejemplo que el jugador cambie el nombre del prota libremente (que supongo es lo que quieres :P).

Salut,
Orochii Zouveleki

#10 Re: Necesito ayuda con Battler HUD el Jue Mayo 03, 2012 6:36 am

Tarima_Shadowsong

avatar
Creo que estoy a punto de resolver este problema pero falta un leve detalle más:

La sugerencia de orochii arrojó un nuevo error:

[img] [/img]

La verdad no se que significa este nuevo error, aunque por la palabra "String" tiene que ver algo con una cadena de texto.

Asi que me fije como estan estructuradas el resto de las imágenes del script y al principio del mismo parecen estar definidas en constantes:

Código:
class Window_BattleStatus < Window_Selectable
  # Skin File name
  BTSKIN_00 = "Btskin_main"  # Main Skin
  BTSKIN_01 = "Btskin_hp"    # HP(Gauge)
  BTSKIN_02 = "Btskin_mp"    # MP(Gauge)
  BTSKIN_04 = "Btskin_n00"    # HP(Numbers)
  BTSKIN_05 = "Btskin_n00"    # MP(Numbers)
  BTSKIN_03 = "Btskin_state"  # State
  # Skin coordinates[  x,  y]
  BTSKIN_B_XY = [-180, 340]    # �Ÿ��–座�™
  BTSKIN_00XY = [  -52, -90]    #Main Skin
  BTSKIN_01XY = [  0,  23]    # HP(gauge)
  BTSKIN_02XY = [  0, 38]    # MP(gauge)
  BTSKIN_04XY = [ 18, 10]    # HP(numbers)
  BTSKIN_05XY = [ 18, 30]    # MP(numbers)
  BTSKIN_03XY = [-33, 17]    # �‚��ƒ†�ƒ��ƒˆ�‚��‚��ƒ�
  BTSKIN_06XY = [-29, 25]    # �‚��ƒ†�ƒ��ƒˆ
  # Various Settings
  BTSKIN_01GS = 2            # HP Gauge Speed (Low values are fast)
  BTSKIN_02GS = 4            # MP Gauge Speed(Low values are fast)
  BTSKIN_04SS = 8            # HP Rolling Numbers Speed(Low values are fast)
  BTSKIN_05SS = 2            # MP Rolling Numbers Speed(Low values are fast)
  BTSKIN_04NS = 4            # HP Maximum Digits
  BTSKIN_05NS = 4            # MP Maximum Digits
  BTSKIN_06WH = [22,22]      # [State Width, Height]22-22
  BTSKIN_06SC = 2            # State Icon Scroll Speed
                              # (Values close to 1 are fast)
  # �ƒ��ƒˆ�ƒ��‚��ƒ†�ƒ��‚��‚�座�™

Se me ocurrió entonces crear una constante para el HUD a modificar, para evocarlo (como en el resto del script), en el momento cuando se requiera dibujar la cara:

Código:
  BTSKIN_00 = "Btskin_main"  # Main Skin
  BTSKIN_01 = "Btskin_hp"    # HP(Gauge)
  BTSKIN_02 = "Btskin_mp"    # MP(Gauge)
  BTSKIN_04 = "Btskin_n00"    # HP(Numbers)
  BTSKIN_05 = "Btskin_n00"    # MP(Numbers)
  BTSKIN_03 = "Btskin_state"  # State
  BTSKIN_04 = ("HUD_" + actor.id)
 

Código:
  # �ƒ…報�˜�†�(actor, x, y, size = 151)
    @s_lv[index] = actor.level
    @s_party[index] = [actor.name, actor.hp, actor.maxhp,
                      actor.mp, actor.maxmp, actor.states]
    #
    x = index * 161 - 20
    y = 15
    s[16] = Sprite.new
    s[16].bitmap = Cache.system(BTNSKIN_04)
    s[16].x = @x[index] + 4 - 210 #posicion face izquierda-derecha
    s[16].y = @y[index] + 2 + 254 #posicion arriba -abajo face
    s[16].z = 0
  end

Y éste fue el resultado:

[img] [/img]

Hay varias cosas que se me ocurren que pueden estar pasando:

*Aunque la sugerencia de orochii es del todo lógica (Y muy buena gracias :P), la orden sigue interpretando al "HUD_" como un objeto completo al que se le debe colocar un nombre especifico para que funcione.
*La constante que intente hacer esta incompleta (¿o mal redactada?) ya que me pide definir "actor" (Por lo que una vez mas, mis conocimeintos de script topan con una pared de hierro).
*Mi constante debería estar en algún otro lugar, donde "actor" si estuviera definido (Pero no tengo idea de donde).

Sigue al pendiente de cualquier ayuda que me puedan proporcionar y gracias de antemano.

#11 Re: Necesito ayuda con Battler HUD el Jue Mayo 03, 2012 9:49 pm

orochii

avatar
Ouuu, rayos xD, ésto me pasa por llevar un buen rato de no tocar Ruby, y para colmo meterme un rato con JavaScript xP, se me hizo un enrredo ajaja.
Bien, el error se soluciona poniendo esa misma línea así
Código:
s[16].bitmap = Cache.system("HUD_" + actor.id.to_s)

Es que en JavaScript lo convierte automáticamente xD, salut,
Orochii Zouveleki

#12 Re: Necesito ayuda con Battler HUD el Vie Mayo 04, 2012 7:51 am

Tarima_Shadowsong

avatar
De maravilla!!! Gracias orochii creo que ya no tendré problemas con este script (de momento).

Muy agradecido contigo FIGO y Orochii por al ayuda que me prestaron.

#13 Re: Necesito ayuda con Battler HUD el Vie Mayo 04, 2012 6:33 pm

FIGO

avatar

De nada..pedí lo que necesites, en este foro mientras podamos meter mano a algo lo hacemos...aunque no siempre se logra todo, pero vale el intento.

SALUDOS

FIGO

Contenido patrocinado


Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje [Página 1 de 1.]

Permisos de este foro:
No puedes responder a temas en este foro.