hydramonLun Jun 25, 2012 2:56 am
Usuario Nv10
Hellos H. Maker, ahora, les traigo este gran regalo a todos los users de el RPG MAKER VX, es una recopilacion de scripts, que mas o menos tiene... unos 4 cada una, asi que sin nada mas que decir, disfrutenlos y miren bailar al perrito:
xD
Menu de Batalla Circular:
Necesario:
Pegar arriba de Main y ya esta.
Nombre del mapa:
Window Item Map:
Ventana de Estado Extendido (Y ultimo) :
Screen de la ultima:
Okas.... nos vemos para cuando haga la 2da parte de este tema
xD
Menu de Batalla Circular:
- Spoiler:
- #========================================================================== ====
# Menú Circular de Batalla
# Creado por Ziifee
#========================================================================== ====
module Zii
# Número identificador del ícon0 (Vertical x 16 + Horizontal - 1)
FIGHT = 132 # Luchar
ESCAPE = 143 # Huir
ATTACK = 1 # Atacar
GUARD = 52 # Defender
SKILL = 128 # Habilidades
ITEM = 144 # Objetos
# Dirección de rotación (Izquierda o Derecha)
TURN = "Derecha"
# ¿Usar faces en el menú? ("Faces" para usar, y "" para no usarlas)
STATUS_FACE = "Faces"
# ¿Mostrar nombre de los héroes en el menu? ("Nombres" para usar o "")
STATUS_LINE = "Nombres"
# Tamaño de las líneas (Defecto: 20)
LINE_SIZE = 14
#------------------------------------------------------------------------ --
# Configuración de dirección de rotación
#------------------------------------------------------------------------ --
def self.turn_normal?
return false if TURN == "Izquierda"
return true if TURN == "Derecha"
return true
end
#------------------------------------------------------------------------ --
# Configuración de exibición
#------------------------------------------------------------------------ --
def self.battle_face?
return true if STATUS_FACE == "Faces"
return false
end
#------------------------------------------------------------------------ --
# Configuración de exibición
#------------------------------------------------------------------------ --
def self.line_name?
return true if STATUS_LINE == "Nombres"
return false
end
end
#========================================================================== ====
# Window_Base
#========================================================================== ====
class Window_Base
def draw_face(face_name, face_index, x, y, size = 96, opacity = 255)
bitmap = Cache.face(face_name)
rect = Rect.new(0, 0, 0, 0)
rect.x = face_index % 4 * 96 + (96 - size) / 2
rect.y = face_index / 4 * 96 + (96 - size) / 2
rect.width = size
rect.height = size
self.contents.blt(x, y, bitmap, rect, opacity)
bitmap.dispose
end
def draw_actor_face(actor, x, y, size = 96, opacity = 255)
draw_face(actor.face_name, actor.face_index, x, y, size, opacity)
end
end
#========================================================================== ====
# Window_SpinCommand
#-------------------------------------------------------------------------- ----
# Esta classe comanda a rotação do menu
#========================================================================== ====
class Window_SpinCommand < Window_Base
attr_reader :index
attr_reader :help_window
def initialize(cx, cy, commands, setting = {})
@radius = setting.has_key?("R") ? setting["R"] : 40
@speed = setting.has_key?("S") ? setting["S"] : 36
@spin_back = setting.has_key?("G") ? setting["G"] : ""
@spin_line = setting.has_key?("L") ? setting["L"] : nil
x, y = cx - @radius - 28, cy - @radius - 28
width = height = @radius * 2 + 56
super(x, y, width, height)
self.opacity = 0
@index = 0
@commands = commands
@spin_right = true
@spin_count = 0
update_cursor
end
def draw_spin_graphic(i, cx, cy)
case command_kind(i)
when "icon"
draw_icon(command_pull(i), cx - 12, cy - 12, command_enabled?(i))
end
end
def refresh
set_spin
end
def draw_item(index, enabled = true)
@commands[index][3] = enabled
set_spin
end
def command_name(index = @index)
return "" if index < 0
name = @commands[index][0]
return name != nil ? name : ""
end
def command_kind(index)
result = @commands[index][1]
return result != nil ? result : ""
end
def command_pull(index)
result = @commands[index][2]
return result != nil ? result : ""
end
def command_enabled?(index)
result = @commands[index][3]
return result != nil ? result : true
end
def set_index(name)
n = -1
for i in 0...@commands.size
n = i if @commands[i][0] == name
end
@index = n if n >= 0
update_cursor
call_update_help
set_spin
end
def index=(index)
@index = index
update_cursor
call_update_help
set_spin
end
def center_x
return contents.width / 2
end
def center_y
return contents.height / 2
end
def item_max
return @commands.size
end
def set_background
return if @spin_back == ""
bitmap = Cache.system(@spin_back)
rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(12, 12, bitmap, rect)
end
def set_text
return if @spin_line == nil
y = center_y - WLH / 2 + @spin_line
self.contents.draw_text(center_x - 48, y, 96, WLH, command_name, 1)
end
def angle_size
return (Math::PI * 2 / item_max)
end
def set_spin_count
@spin_count = angle_size * 360 / @speed
set_spin(true)
end
def set_spin(spin = false)
self.contents.clear
set_background
angle = spin ? @speed * @spin_count / 360 : 0
angle = @spin_right ? angle : -angle
for i in 0...item_max
n = (i - @index) * angle_size + angle
cx = @radius * Math.sin(n) + center_x
cy = - @radius * Math.cos(n) + center_y
draw_spin_graphic(i, cx, cy)
end
set_text
end
def update
super
update_cursor
if @spin_count > 0
@spin_count -= 1
set_spin(@spin_count >= 1)
return
end
update_command
end
def command_movable?
return false if @spin_count > 0
return false if (not visible or not active)
return false if (index < 0 or index > item_max or item_max == 0)
return false if (@opening or @closing)
return true
end
def command_right
@index = (@index + 1) % item_max
@spin_right = true
set_spin_count
end
def command_left
@index = (@index - 1 + item_max) % item_max
@spin_right = false
set_spin_count
end
def update_command
if command_movable?
if Input.press?(Input::RIGHT)
Sound.play_cursor
Zii.turn_normal? ? command_right : command_left
end
if Input.press?(Input::LEFT)
Sound.play_cursor
Zii.turn_normal? ? command_left : command_right
end
end
call_update_help
end
def update_cursor
if @index < 0
self.cursor_rect.empty
else
rect = Rect.new(0, 0, 24, 24)
rect.x = center_x - rect.width / 2
rect.y = center_y - rect.height / 2 - @radius
self.cursor_rect = rect
end
end
def help_window=(help_window)
@help_window = help_window
call_update_help
end
def call_update_help
if self.active and @help_window != nil
update_help
end
end
def update_help
end
end
#========================================================================== ====
# Window_LineHelp
#========================================================================== ====
class Window_LineHelp < Window_Base
def initialize
super(-16, 0, 576, WLH + 32)
self.opacity = 0
end
def set_text(text, align = 0)
if text != @text or align != @align
self.contents.clear
back_color = Color.new(0, 0, 0, 80)
self.contents.fill_rect(0, y = 12, contents.width, WLH - y, back_color)
self.contents.font.color = normal_color
self.contents.draw_text(20, 0, self.width - 72, WLH, text, align)
@text = text
@align = align
end
end
end
#========================================================================== ====
# Window_PartyCommand
#========================================================================== ====
class Window_PartyCommand < Window_SpinCommand
def initialize
s1 = [Vocab::fight, "icon", Zii::FIGHT, true]
s2 = [Vocab::escape, "icon", Zii::ESCAPE, $game_troop.can_escape]
setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
super(72, 356, [s1, s2], setting)
self.active = false
set_spin
end
end
#========================================================================== ====
# Window_ActorCommand
#========================================================================== ====
class Window_ActorCommand < Window_SpinCommand
def initialize
s1 = [Vocab::attack, "icon", Zii::ATTACK, true]
s2 = [Vocab::skill, "icon", Zii::SKILL, true]
s3 = [Vocab::guard, "icon", Zii::GUARD, true]
s4 = [Vocab::item, "icon", Zii::ITEM, true]
setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12}
super(72, 356, [s1, s2, s3, s4], setting)
self.active = false
set_spin
end
def setup(actor)
@commands[0][2] = Zii::ATTACK
@commands[1][0] = Vocab::skill
if actor.weapons[0] != nil
n = actor.weapons[0].icon_index
@commands[0][2] = n if n > 0
end
@commands[1][0] = actor.class.skill_name if actor.class.skill_name_valid
self.index = 0
set_spin
end
end
#========================================================================== ====
# Window_BattleStatus
#========================================================================== ====
class Window_BattleStatus < Window_Selectable
def initialize
super(128, 288, 416, 128)
@column_max = 4
refresh
self.active = false
self.opacity = 0
end
def draw_neomemo7_back
@neomemo7_clear = false
for index in 0...@item_max
x = index * 96
self.contents.clear_rect(x + 72, WLH * 3, 24, 24)
next unless Zii.battle_face?
actor = $game_party.members[index]
next if actor.hp <= 0
bitmap = Cache.face(actor.face_name)
rect = Rect.new(0, 0, 22, 22)
rect.x = actor.face_index % 4 * 96 + 72
rect.y = actor.face_index / 4 * 96 + 72
self.contents.blt(x + 72, WLH * 3, bitmap, rect, 192)
end
end
def draw_item(index)
x = index * 96
rect = Rect.new(x, 0, 96, 96)
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
actor = $game_party.members[index]
draw_actor_face(actor, x + 2, 2, 92, 192) if actor.hp > 0 and Zii.battle_face?
draw_actor_state(actor, x + 72, WLH * 3)
if Zii.line_name?
self.contents.font.color = hp_color(actor)
size = Zii::LINE_SIZE
self.contents.font.size = size
self.contents.draw_text(x, WLH * 1 + 20 - size, 80, WLH, actor.name)
self.contents.font.size = 20
end
draw_actor_hp(actor, x, WLH * 2, 80)
draw_actor_mp(actor, x, WLH * 3, 70)
end
def update_cursor
if @index < 0
self.cursor_rect.empty
else
rect = Rect.new(index * 96, 0, 96, 96)
self.cursor_rect = rect
end
end
end
#========================================================================== ====
# Scene_Battle
#========================================================================== ====
class Scene_Battle < Scene_Base
alias :neomemo13_create_info_viewport :create_info_viewport
def create_info_viewport
neomemo13_create_info_viewport
@info_viewport.rect.set(0, 0, 544, 416)
@status_window.x = 128
@actor_command_window.x = 4
end
alias :neomemo13_update_info_viewport :update_info_viewport
def update_info_viewport
ox = @info_viewport.ox
neomemo13_update_info_viewport
@info_viewport.ox = ox
end
alias :neomemo13_start_party_command_selection :start_party_command_selection
def start_party_command_selection
if $game_temp.in_battle
@party_command_window.visible = true
@actor_command_window.visible = false
end
neomemo13_start_party_command_selection
end
alias :neomemo13_update_party_command_selection :update_party_command_selection
def update_party_command_selection
return unless @party_command_window.command_movable?
neomemo13_update_party_command_selection
end
alias :neomemo13_start_actor_command_selection :start_actor_command_selection
def start_actor_command_selection
neomemo13_start_actor_command_selection
@party_command_window.visible = false
@actor_command_window.visible = true
end
alias :neomemo13_update_actor_command_selection :update_actor_command_selection
def update_actor_command_selection
return unless @actor_command_window.command_movable?
neomemo13_update_actor_command_selection
end
alias :neomemo13_start_target_enemy_selection :start_target_enemy_selection
def start_target_enemy_selection
x = @info_viewport.rect.x
ox = @info_viewport.ox
neomemo13_start_target_enemy_selection
@info_viewport.rect.x = x
@info_viewport.ox = ox
@target_enemy_window.x = 544 - @target_enemy_window.width
@target_enemy_window.y = 288
@info_viewport.rect.width -= @target_enemy_window.width
end
alias :neomemo13_end_target_enemy_selection :end_target_enemy_selection
def end_target_enemy_selection
x = @info_viewport.rect.x
ox = @info_viewport.ox
@info_viewport.rect.width += @target_enemy_window.width
neomemo13_end_target_enemy_selection
@info_viewport.rect.x = x
@info_viewport.ox = ox
end
alias :neomemo13_start_target_actor_selection :start_target_actor_selection
def start_target_actor_selection
x = @info_viewport.rect.x
ox = @info_viewport.ox
neomemo13_start_target_actor_selection
@target_actor_window.y = 288
@info_viewport.rect.x = x
@info_viewport.ox = ox
@info_viewport.rect.width -= @target_actor_window.width
end
alias :neomemo13_end_target_actor_selection :end_target_actor_selection
def end_target_actor_selection
x = @info_viewport.rect.x
ox = @info_viewport.ox
@info_viewport.rect.width += @target_actor_window.width
neomemo13_end_target_actor_selection
@info_viewport.rect.x = x
@info_viewport.ox = ox
end
alias :neomemo13_start_skill_selection :start_skill_selection
def start_skill_selection
neomemo13_start_skill_selection
@skill_window.dispose if @skill_window != nil
@help_window.dispose if @help_window != nil
@help_window = Window_LineHelp.new
@skill_window = Window_Skill.new(8, 64, 528, 216, @active_battler)
@skill_window.help_window = @help_window
end
alias :neomemo13_start_item_selection :start_item_selection
def start_item_selection
neomemo13_start_item_selection
@item_window.dispose if @item_window != nil
@help_window.dispose if @help_window != nil
@help_window = Window_LineHelp.new
@item_window = Window_Item.new(8, 64, 528, 216)
@item_window.help_window = @help_window
end
end
Necesario:
Pegar arriba de Main y ya esta.
Nombre del mapa:
- Spoiler:
- #=================================================================#
#=================================================================#
# #*****************# Muestra en nombre del mapa en que #
# #*** By Falcao ***# se encuentra el jugador con efecto #
# #*****************# animado de fade. #
# RMVX #
# makerpalace.onlinegoo.com #
#=================================================================#
module Fal_map_name
#------------------------------------------------------------------
# Interruptor que desabilita la ventana de nombre
Disable_window = 50
#------------------------------------------------------------------
# Cambiar posision de muestra de la ventana, se lee de la sigiente
# manera, cambiar del 1 al 2
#
# 1 = posision frontal, es la que esta por defecto
# 2 = se muestra al lado inferir izquierdo
Change_posision = 1
#------------------------------------------------------------------
# Desabilitar nombre de mapa en mapas espesificos, por ejemplo al
# entrar a una casa no mostrar el nombre de mapa. basta con poner
# el ID del mapa entre los corchetes separando cada ID con una coma
# quiedaria asi: Mapaid_Disables = [1,2,5,9] los numeros son los
# ID de mapas especificados.
Mapaid_Disables = [ ]
#------------------------------------------------------------------
# Tiempo para desaparecer la ventana de nombre
Fade_time = 140
#------------------------------------------------------------------
end
class Window_Nmap < Window_Base
def initialize
super(185, -70, 190, 50)
self.opacity = 200
refresh
end
def refresh
self.contents.clear
self.contents.font.size = 20
data = load_data("Data/MapInfos.rvdata")
self.contents.draw_text(0, -7, 150, 32, data[$game_map.map_id].name, 2)
end
end
class Game_System
attr_accessor :fade_time
alias falcao_fading_initialize initialize
def initialize
@fade_time = 0
falcao_fading_initialize
end
end
class Scene_Map
include Fal_map_name
alias falcaoVX_Mname_main main
def main
@map_name = Window_Nmap.new
if $game_switches[Disable_window] == false
@map_name.visible = true
else
@map_name.visible = false
end
if Fal_map_name::Mapaid_Disables.include?($game_map.map_id)
@map_name.visible = false
end
if Change_posision == 2
@map_name.x = -200; @map_name.y = 300
end
falcaoVX_Mname_main
@map_name.dispose
end
alias falcaoVX_Mname_update update
def update
if $game_switches[Disable_window] == false
@map_name.visible = true
else
@map_name.visible = false
end
if Fal_map_name::Mapaid_Disables.include?($game_map.map_id)
@map_name.visible = false
end
@map_name.y += 2 if @map_name.y < 0 and Change_posision <= 1
@map_name.x += 5 if @map_name.x < -4 and Change_posision >= 2
if $game_system.fade_time == Fade_time
@map_name.y -= 3 if @map_name.y > -90 and Change_posision <= 1
@map_name.x -= 7 if @map_name.x < 20 and Change_posision >= 2
@map_name.contents_opacity -= 5
@map_name.opacity -= 5
else
$game_system.fade_time += 1
end
falcaoVX_Mname_update
end
alias falcao_transfer_player update_transfer_player
def update_transfer_player
@map_name.refresh
return unless $game_player.transfer?
@map_name.contents_opacity = 255; @map_name.opacity = 200
if Change_posision <= 1
@map_name.x = 185; @map_name.y = -70
elsif Change_posision >= 2
@map_name.x = -200; @map_name.y = 300
end
$game_system.fade_time = 0
falcao_transfer_player
end
end
Window Item Map:
- Spoiler:
- #===============================================================================
# Creado por: Northro
# Para: RPG Maker VX
# Nombre del Script: Window Item Map
# Versión del Script: 1.0
# Descripción: Este script muestra un icono que desees y la cantida de items que desees.
#===============================================================================
#===============================================================================
# Instrucciones: Pegar arriba del script "Main".
#===============================================================================
#===============================================================================
# Modulo "ItemMap"
#===============================================================================
module ItemMap
#-------------------------------------------------------------------------------
# Id de la variable que le quieres asignar el id del items
# que quieras mostrar.
#-------------------------------------------------------------------------------
Item_Variable_Id = 1
#-------------------------------------------------------------------------------
# Id de la variable que le quieres asignar el index del
# icono del items que quieras mostrar.
#-------------------------------------------------------------------------------
Item_Variable_Index = 2
#-------------------------------------------------------------------------------
# Id del interruptor que activara el script.
#-------------------------------------------------------------------------------
Item_Switch = 1
#-------------------------------------------------------------------------------
# Coordenada X de la ventana que muestra el icono y
# el items.
#-------------------------------------------------------------------------------
Item_X = 0
#-------------------------------------------------------------------------------
# Coordenada Y de la ventana que muestra el icono y
# el items.
#-------------------------------------------------------------------------------
Item_Y = 10
end
#===============================================================================
# Clase "Window_ItemMap"
#===============================================================================
class Window_ItemMap < Window_Base
def initialize
super(0, 0, 100, 64)
self.contents.font.name = "Comic Sans MS"
self.x = ItemMap::Item_X
self.y = ItemMap::Item_Y
self.windowskin = nil
refresh
end
def refresh
self.contents.clear
item_id = $game_variables[ItemMapItem_Variable_Id]
item = $data_items[item_id]
@item_number = $game_party.item_number(item)
index_id = $game_variables[ItemMapItem_Variable_Index]
draw_icon(index_id, 0, 0)
x = 30
y = -5
self.contents.font.bold = true
self.contents.font.italic = false
self.contents.font.size = 25
self.contents.font.color = Color.new(0, 0, 0, 255)
self.contents.draw_text(x + 1, y + 1, 32, 32, "X", 0)
self.contents.draw_text(x + 2, y + 2, 32, 32, "X", 0)
self.contents.draw_text(x + 3, y + 3, 32, 32, "X", 0)
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.draw_text(x, y, 32, 32, "X", 0)
x = 45
y = -5
self.contents.font.bold = false
self.contents.font.italic = true
self.contents.font.size = 20
self.contents.font.color = Color.new(0, 0, 0, 255)
self.contents.draw_text(x + 1, y + 1, 32, 32, @item_number.to_s, 0)
self.contents.draw_text(x + 2, y + 2, 32, 32, @item_number.to_s, 0)
self.contents.draw_text(x + 3, y + 3, 32, 32, @item_number.to_s, 0)
self.contents.font.color = Color.new(255, 255, 255, 255)
self.contents.draw_text(x, y, 32, 32, @item_number.to_s, 0)
end
def update
item_id = $game_variables[ItemMapItem_Variable_Id]
item = $data_items[item_id]
item_number = $game_party.item_number(item)
if item_number != @item_number
refresh
end
end
end
#===============================================================================
# Clase "Scene_Map"
#===============================================================================
class Scene_Map
alias window_itemmap_scene_map_main main
def main
@window_item = Window_ItemMap.new
@window_item.contents_opacity = 0
window_itemmap_scene_map_main
@window_item.dispose if @window_item != nil
end
alias window_itemmap_scene_map_update update
def update
switch = $game_switches[ItemMapItem_Switch]
if switch
@window_item.refresh
@window_item.contents_opacity = 255
else
@window_item.contents_opacity = 0
end
@window_item.update if @window_item != nil
window_itemmap_scene_map_update
end
def update_call_menu
if Input.trigger?(Input::B)
return if $game_map.interpreter.running?
return if $game_system.menu_disabled
$game_temp.menu_beep = true
$game_temp.next_scene = "menu"
@window_item.contents_opacity = 120
end
end
end
Ventana de Estado Extendido (Y ultimo) :
- Spoiler:
- ####################################################################
# Estado Extendido v1.0
# Por: SojaBird
# Web: http://www.nestcast.blogspot.com
# Descripción: Estado Extendido añade el aumento de los efectos de los equipos en
# la ventana de Estado.
####################################################################
# Start Setup
####################################################################
module SojaBird_ES
# Appearance Setup
X_Position = 32 # X position (default=32).
Y_Position = 285 # Y position (default=285).
Text_Width = 180 # Width of the textbox (default=180).
Alignment = 0 # Alignment of the text; [0=Left, 1=Center, 2=Right] (default=0).
# Text Setup
Effects = "Efectos"
Preemptive_Strike = "Ataque Preventivo"
Increased_Critical = "Aumento daño crítico"
Prevent_Criticals = "Prevenir Daño Crítico"
Half_MP_Cost = "La mitad de coste de maná"
Double_Experience = "Doble Experiencia"
Auto_HP_Recovery = "Recobrador de HP Automático"
end
####################################################################
# End Setup
####################################################################
class Window_Status < Window_Base
include SojaBird_ES
alias old_refresh refresh
def refresh
old_refresh
draw_extra(@actor, X_Position, Y_Position, Text_Width, Alignment)
end
def draw_extra(actor, x, y, width, p)
@TH = 13
self.contents.font.color = system_color
self.contents.draw_text(x, y, width, WLH, Effects, p)
self.contents.font.color = normal_color
self.contents.font.size = 12
self.contents.font.color.alpha = 128
self.contents.font.color.alpha = 255 if actor.fast_attack
self.contents.draw_text(x, y + @TH * 1, width, WLH, Preemptive_Strike, p)
self.contents.font.color.alpha = 128
self.contents.font.color.alpha = 255 if actor.critical_bonus
self.contents.draw_text(x, y + @TH * 2, width, WLH, Increased_Critical, p)
self.contents.font.color.alpha = 128
self.contents.font.color.alpha = 255 if actor.prevent_critical
self.contents.draw_text(x, y + @TH * 3, width, WLH, Prevent_Criticals, p)
self.contents.font.color.alpha = 128
self.contents.font.color.alpha = 255 if actor.half_mp_cost
self.contents.draw_text(x, y + @TH * 4, width, WLH, Half_MP_Cost, p)
self.contents.font.color.alpha = 128
self.contents.font.color.alpha = 255 if actor.double_exp_gain
self.contents.draw_text(x, y + @TH * 5, width, WLH, Double_Experience, p)
self.contents.font.color.alpha = 128
self.contents.font.color.alpha = 255 if actor.auto_hp_recover
self.contents.draw_text(x, y + @TH * 6, width, WLH, Auto_HP_Recovery, p)
end
end
class Game_Actor < Game_Battler
def critical_bonus
for weapon in weapons.compact
return true if weapon.critical_bonus
end
return false
end
end
Screen de la ultima:
Okas.... nos vemos para cuando haga la 2da parte de este tema