[VX] Ventanas de Batalla

OP
Mensajes
84
Reacciones
0
Puntos
0
Que hace el script:

:star: especificar las coordenadas de las ventanas Técnicas y objetos
:star: cambiar el ancho y largo de las ventanas Técnicas y objetos
:star: poner cuantas columnas tendrá los objeto y habilidades
:star: Cambiar las coordenadas Y de las ventanas de ayuda


Capturas:

capr_3.png

capr_2.png

capr_1.png



Script version 1.0 ( SIN ATB)

Código:
#=================================================================
#                                                Ventanas de Batalla version1.0
#                                                      Creado por :demyx09
#                                                             
#                                 Si ocupas este script Recuerda dar creditos al Creador
#=================================================================
#PEGAR ESTE SCRPT BAJO MATERIALES
#=================================================================
#Seccion Editable:
#=================================================================


VENTANA_TECNICA_X = 0
VENTANA_TECNICA_Y = 288
VENTANA_TECNICA_ANCHO = 416
VENTANA_TECNICA_LARGO = 127

VENTANA_OBJETO_X = 0
VENTANA_OBJETO_Y = 288
VENTANA_OBJETO_ANCHO = 416
VENTANA_OBJETO_LARGO = 127

VENTANA_AYUDA = 228

COLUMNAS_TECNICAS = 3
COLUMNAS_OBJETOS = 1

#=================================================================
#Fin
#=================================================================

class Scene_Battle
  def start
    super
    $game_temp.in_battle = true
    @spriteset = Spriteset_Battle.new
    @message_window = Window_BattleMessage.new
    @action_battlers = []
    create_info_viewport
  end
  def start_skill_selection
    @help_window = Window_Help_Demyx.new
    @skill_window = Window_Skill_Demyx.new(0, 0, 416, 127, @active_battler)
    @skill_window.x = VENTANA_TECNICA_X
    @skill_window.y = VENTANA_TECNICA_Y
    @skill_window.width = VENTANA_TECNICA_ANCHO
    @skill_window.height = VENTANA_TECNICA_LARGO
    @skill_window.help_window = @help_window
    @actor_command_window.active = false
  end
end
#====================================================================
class Scene_Battle 
  def start
    super
    $game_temp.in_battle = true
    @spriteset = Spriteset_Battle.new
    @message_window = Window_BattleMessage.new
    @action_battlers = []
    create_info_viewport
  end
  def start_item_selection
    @help_window = Window_Help_Demyx.new
    @item_window = Window_Item_Demyx.new(0, 0, 416, 127)
    @item_window.x = VENTANA_OBJETO_X
    @item_window.y = VENTANA_OBJETO_Y
    @item_window.width = VENTANA_OBJETO_ANCHO
    @item_window.height = VENTANA_OBJETO_LARGO
    @item_window.help_window = @help_window
    @actor_command_window.active = false
  end
  end
#==============================================================================
class Window_Skill_Demyx < Window_Selectable
 def initialize(x, y, width, height, actor)
    super(x, y, width, height)
    @actor = actor
    @column_max = COLUMNAS_TECNICAS
    self.index = 0
    refresh
  end
  def skill
    return @data[self.index]
  end
 def refresh
    @data = []
    for skill in @actor.skills
      @data.push(skill)
      if skill.id == @actor.last_skill_id
        self.index = @data.size - 1
      end
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    skill = @data[index]
    if skill != nil
      rect.width -= 4
      enabled = @actor.skill_can_use?(skill)
      draw_item_name(skill, rect.x, rect.y, enabled)
      self.contents.draw_text(rect, @actor.calc_mp_cost(skill), 2)
    end
  end
def update_help
    @help_window.set_text(skill == nil ? "" : skill.description)
  end
end
#==================================================================
class Window_Item_Demyx < Window_Selectable
def initialize(x, y, width, height)
    super(x, y, width, height)
    @column_max = COLUMNAS_OBJETOS
    self.index = 0
    refresh
  end
def item
    return @data[self.index]
  end
def include?(item)
    return false if item == nil
    if $game_temp.in_battle
      return false unless item.is_a?(RPG::Item)
    end
    return true
  end
def enable?(item)
    return $game_party.item_can_use?(item)
  end
def refresh
    @data = []
    for item in $game_party.items
      next unless include?(item)
      @data.push(item)
      if item.is_a?(RPG::Item) and item.id == $game_party.last_item_id
        self.index = @data.size - 1
      end
    end
    @data.push(nil) if include?(nil)
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
 def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    item = @data[index]
    if item != nil
      number = $game_party.item_number(item)
      enabled = enable?(item)
      rect.width -= 4
      draw_item_name(item, rect.x, rect.y, enabled)
      self.contents.draw_text(rect, sprintf(":%2d", number), 2)
    end
  end
def update_help
    @help_window.set_text(item == nil ? "" : item.description)
  end
end
#==============================================================================
class Window_Help_Demyx <Window_Base
 def initialize
    super(0, 0, 544, WLH + 32)
    self.y = VENTANA_AYUDA
    end
 def set_text(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
      @text = text
      @align = align
    end
  end
end



Actualizado aca la version CON ATB
PEGAR ESTE SCRPT BAJO MATERIALES Y DEBAJO DE TODOS LOS SCRIPT TANKENTAI


Script version 0.5 ( PARA ATB)
Código:
#=================================================================
#                                                Ventanas de Batalla version0.5
#                                        Para el 'system battle of tankentai' CON ATB
#                                                      Creado por :demyx09
#                                                             
#                                 Si ocupas este script Recuerda dar creditos al Creador
#=================================================================
#PEGAR ESTE SCRPT BAJO MATERIALES Y DEBAJO DE TODOS LOS SCRIPT TANKENTAI
#=================================================================
#Seccion Editable:
#=================================================================
#Para cambiar el ancho y largo de la ventana TECNICA vallan a la linea 37
# @skill_window = Window_Skill.new(0, 0, 416, 128, @commander)
# el ANCHO es el numero '416' y el LARGO  es el '128' 


VENTANA_TECNICA_X = 0
VENTANA_TECNICA_Y = 288

#Para cambiar el ancho y largo de la ventana  OBJETOS vallan a la linea 50
# @item_window = Window_Item.new(0, 0, 416, 128)
# el ANCHO es el numero '416' y el LARGO  es el '128' 

VENTANA_OBJETO_X = 0
VENTANA_OBJETO_Y = 288


VENTANA_AYUDA = 233

#=================================================================
#Fin
#=================================================================
class Scene_Battle
def start_skill_selection
    @help_window = Window_Help_Demyx.new 
    @help_window.visible = true
    @skill_window = Window_Skill.new(0, 0, 416, 128, @commander)
    @skill_window.x = VENTANA_TECNICA_X
    @skill_window.y = VENTANA_TECNICA_Y
    @skill_window.z = 3000
    @skill_window.help_window = @help_window
    @actor_command_window.active = false
  end
end
#=================================================================
class Scene_Battle < Scene_Base
  def start_item_selection
    @help_window = Window_Help_Demyx.new if @help_window == nil
    @help_window.visible = true
    @item_window = Window_Item.new(0, 0, 416, 128)
    @item_window.x = VENTANA_OBJETO_X
    @item_window.y = VENTANA_OBJETO_Y
    @item_window.z = 3000
    @item_window.help_window = @help_window
    @actor_command_window.active = false
  end
end
#=================================================================
class Window_Help_Demyx <Window_Base
 def initialize
    super(0, 0, 544, WLH + 32)
    self.y = VENTANA_AYUDA
    end
 def set_text(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
      @text = text
      @align = align
    end
  end
end
 
Arriba Pie