hydramonLun Jun 25, 2012 9:58 pm
Usuario Nv10
EEEEEEEEEEEEEEEEE!Al fin la parte 3 de este tema, la vdd si me alcanza el tiempo, asi que pronto hare la YAPA de este post , empezemos antes de que se me acabe el tiempo
Imagen en Mensajes:
Codigo: EFS.new("nombre imagen", posición, "acción")
Script:
VideoShot (pueden poner videos en sus juegos) :
Window NameInput:
Instalación: solo remplaza Window_NameInput escribe en el modulo Main:
Código:
[/spoiler]Font.default_name = ["UmePlus Gothic", "MS UI Gothic", "MS PGothic", "MS Gothic"][/spoiler]
Barras de Enemigos:
ATB en 1 solo script (extra largo xD) :
Nos vemoshasta mi proximo aporte
Imagen en Mensajes:
Codigo: EFS.new("nombre imagen", posición, "acción")
Script:
- Spoiler:
- class EFS < Scene_Base
$face = []
$tone = nil
#===================================================================
#
#KAO GIANT IMAGE IN MESSAGE
#
#Como usar xD
#Llamar script
# EFS.new("nombreimagen",pos, accion)
# nombreimagen = nombre de la imagen
# pos= posición, 1 izquierda, 2 derecha
#acción= una de las siguientes
#
# Mostrar (la imagen se muestra en pantalla)
# EFS.new("nombre", pos, "show")
#
# Esconder (la imagen desaparece de la pantalla)
# EFS.new(" ", pos, "hide")
#
# Cambiar (la imagen se cambia por otra):
# EFS.new("nombre_de_nueva_imagen", pos, "change")
#
#===========================================
def initialize(facename,n,action)
@facename = facename
@n = n
@action = action
update
end
def update
if @action != nil
Graphics.update
#Acciones disponibles.
if @action == "show" #La imagen se desliza dentro de la pantalla.
show
elsif @action == "hide" #La imagen se desliza fuera de la pantalla. No hace falta especificar el nombre de la imagen (poner " ").
hide
elsif @action == "change" #Se cambia la imagen.
change
end
end
end
def show
$face[@n] = Sprite.new
$face[@n].bitmap = Cache.picture(@facename)
$face[@n].y = 415 - $face[@n].height
case @n
when 1
$face[@n].mirror = true
$face[@n].z = 1-@n
$face[@n].x = 0
Graphics.update
when 2
$face[@n].z = 1+@n
$face[@n].x = 300
Graphics.update
end
end
def hide
case @n
when 1
$face[@n].dispose
Graphics.update
when 2
$face[@n].dispose
Graphics.update
end
end
def change
$face[@n].bitmap = Cache.picture(@facename)
@action = nil
end
end
VideoShot (pueden poner videos en sus juegos) :
- Spoiler:
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Game_Film II - reloaded ^^
# por berka
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Rgss 1&2 v 1.1
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# -Utilização-
=begin
Fit to Screen [film]
#film = movie.avi
# it's a block !
x=0
y=0
w=544
h=416
=end
# Los videos de su juego debe estar en la carpeta Movies de tu proyecto.
#
# Para poner un video, llamar a Script con el nombre film = Nombre.avi
#
# #Básico:
#
# [film] # obligatorias!
# film = Nombre.avi # nombre del archivo de vídeo (que puede ser. Mpg)
#
# #Opcional, el orden no importa
#
# x = 12 # posición horizontal del video
# y = 1 # posición vertical del video
# w = 150 # redimencionar el largo de la pelicula
# h = 150 # redimencionar el ancho de la pelicula
#
# full = true # modo fullscreen (pantalla completa)
# vol = 750 # El volumen de reproducción de vídeo (0 a 1000)
# bass = 999 # entre 0 y 1000 volumen de bajos:de muy bajo grado
# aig = 250 # entre 0 y 1000 volumen de agudos: de muy bajo grado.
#
# # Comandos:
# Botón B o ESC para cancelar el vídeo, C o Intro para pausar / reanudar la reproducción
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
class Game_Film
def initialize(hash)
hash.has_key?(:film) ? film=hash[:film] : return
hash.has_key?() ? @x=hash[]+" " : @x="0"
hash.has_key?(:y) ? @y=hash[:y]+" " : @y="0"
hash.has_key?(:w) ? @w=hash[:w]+" " : @w=""
hash.has_key?(:h) ? @h=hash[:h]+" " : @h=""
hash.has_key?(:vol) ? @vol=hash[:vol]+" " : @vol="1000"
hash.has_key?(:bass) ? @bass=hash[:bass]+" " : @bass="1000"
hash.has_key?(:aig) ? @aig=hash[:aig]+" " : @aig="1000"
hash.has_key?(:pos) ? @pos="at pos #{hash[:pos].to_i*1000} " : @pos="at pos 0 "
@full=hash[:full] if hash.has_key?(:full)
@full&&dim_ecran !=[640,480] ? @plee="fullscreen " : @plee=""
@type=" "
@type=" type mpegvideo" if File.extname(film)==(".mpg"||".mpeg")
@type=" type avivideo" if File.extname(film)==".avi"
@nom='./Movies/'+film
(p "fichier #{@nom} non trouvé";return) if !FileTest.exist?(@nom)
@film=Win32API.new('winmm','mciSendString','ppll','v')
lecture
end
def handle
jeu="\0"*256
ini=Win32API.new('kernel32','GetPrivateProfileStringA','pppplp', 'l')
ini.call('Game','Title','',jeu,255,".\\Game.ini")
return Win32API.new('user32','FindWindowEx','llpp','l').call(0,0,nil,jeu.delete!("\0"))
end
def lecture
v,t,status,pause=version,Time.now," "*255,false
@film.call("open #{@nom} alias FILE#{@type} style child parent "+handle.to_s,0,0,0)
@film.call("put FILE window at #{@x}#{@y}#{@w}#{@h}",status,255,0)
@film.call("setaudio File volume to #{@vol}",status,255,0)
@film.call("setaudio File bass to #{@bass}",status,255,0)
@film.call("setaudio File trebble to #{@bass}",status,255,0)
@film.call("play FILE #{@plee} notify",status,255,handle)
loop{sleep(0.1)
Input.update
@film.call("status FILE mode notify",status,255,0)
break if status.unpack("aaaa")=="stop".split(//)||Input.trigger?(Input::B)
if Input.trigger?(Input::C)
if !pause;@film.call("pause FILE notify",status,255,handle);pause=true
else;@film.call("play FILE #{@plee} notify",status,255,handle);pause=false
end
end
(t=maj(t))if v=='xp'}
@film.call("close FILE notify",0,0,handle)
$scene=Scene_Map.new
end
def dim_ecran
lw=Win32API.new('user32','GetSystemMetrics','i','i')
return lw.call(0),lw.call(1)
end
def maj(t)
(Graphics.update;return Time.now)if t.sec<=Time.now.sec-9||t.min !=Time.now.min
return t
end
def version;FileTest.exist?('./Data/scripts.rvdata') ? 'vx': 'xp';end
end
Dir.open("./Filmes") rescue Dir::mkdir("./Filmes",0777)
class Game_Interpreter;def eval(script);cmd_eval(script);end;end#rmvx
class Interpreter;def eval(script);cmd_eval(script);end;end#rmxp
def cmd_eval(script)
if script.include?("[film]")
hash={}
script.gsub!("[film]"){}
list=script.split("\n")
list.each{|e|e.gsub!(" "){};f=e.split("=");hash[f[0].to_sym]=f[1] if !f[1].nil?}
Game_Film.new(hash)
else;return Kernel.eval(script)
end
end
Window NameInput:
- Spoiler:
- #==============================================================================
# ■ Window_NameInput
#------------------------------------------------------------------------------
# 名前入力画面で、文字を選択するウィンドウです。
#==============================================================================
class Window_NameInput < Window_Base
#--------------------------------------------------------------------------
# ● 文字表
#--------------------------------------------------------------------------
Alphabet = [ 'A','B','C','D','E', 'a','b','c','d','e',
'F','G','H','I','J', 'f','g','h','i','j',
'K','L','M','N','Ñ', 'k','l','m','n','ñ',
'O','P','Q','R','S', 'o','p','q','r','s',
'T','U','V','W','X', 't','u','v','w','x',
'Y','Z','¿','?','Ü', 'y','z','!','¡','ü',
'Á','É','Í','Ó','Ú', 'á','é','í','ó','ú',
'0','1','2','3','4', '5','6','7','8','9',
'+','-','*','/','=', '@','$',' ','ひらがな','OK']
HIRAGANA = [ 'あ','い','う','え','お', 'が','ぎ','ぐ','げ','ご',
'か','き','く','け','こ', 'ざ','じ','ず','ぜ','ぞ',
'さ','し','す','せ','そ', 'だ','ぢ','づ','で','ど',
'た','ち','つ','て','と', 'ば','び','ぶ','べ','ぼ',
'な','に','ぬ','ね','の', 'ぱ','ぴ','ぷ','ぺ','ぽ',
'は','ひ','ふ','へ','ほ', 'ぁ','ぃ','ぅ','ぇ','ぉ',
'ま','み','む','め','も', 'っ','ゃ','ゅ','ょ','ゎ',
'や','ゆ','よ','わ','ん', 'ー','~','・','=','☆',
'ら','り','る','れ','ろ', 'ゔ','を',' ','カタカナ','OK']
KATAKANA = [ 'ア','イ','ウ','エ','オ', 'ガ','ギ','グ','ゲ','ゴ',
'カ','キ','ク','ケ','コ', 'ザ','ジ','ズ','ゼ','ゾ',
'サ','シ','ス','セ','ソ', 'ダ','ヂ','ヅ','デ','ド',
'タ','チ','ツ','テ','ト', 'バ','ビ','ブ','ベ','ボ',
'ナ','ニ','ヌ','ネ','ノ', 'パ','ピ','プ','ペ','ポ',
'ハ','ヒ','フ','ヘ','ホ', 'ァ','ィ','ゥ','ェ','ォ',
'マ','ミ','ム','メ','モ', 'ッ','ャ','ュ','ョ','ヮ',
'ヤ','ユ','ヨ','ワ','ン', 'ー','~','・','=','☆',
'ラ','リ','ル','レ','ロ', 'ヴ','ヲ',' ','ABC','OK']
TABLE = [HIRAGANA, KATAKANA, Alphabet] #se usa el Hiragana, katakana y español
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# mode : 初期入力モード (0 = ひらがな、1 = カタカナ、2 = Alphabet)
#--------------------------------------------------------------------------
def initialize(mode = 0)
super(88, 148, 368, 248)
@mode = mode
@index = 0
refresh
update_cursor
end
#--------------------------------------------------------------------------
# ● 文字の取得
#--------------------------------------------------------------------------
def character
if @index < 88
return TABLE[@mode][@index]
else
return ""
end
end
#--------------------------------------------------------------------------
# ● カーソル位置 モード切り替え判定 (かな/カナ)
#--------------------------------------------------------------------------
def is_mode_change
return (@index == 88)
end
#--------------------------------------------------------------------------
# ● カーソル位置 決定判定
#--------------------------------------------------------------------------
def is_decision
return (@index == 89)
end
#--------------------------------------------------------------------------
# ● 項目を描画する矩形の取得
# index : 項目番号
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.x = index % 10 * 32 + index % 10 / 5 * 16
rect.y = index / 10 * WLH
rect.width = 32
rect.height = WLH
return rect
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0..89
rect = item_rect(i)
rect.x += 2
rect.width -= 4
self.contents.draw_text(rect, TABLE[@mode][i], 1)
end
end
#--------------------------------------------------------------------------
# ● カーソルの更新
#--------------------------------------------------------------------------
def update_cursor
self.cursor_rect = item_rect(@index)
end
#--------------------------------------------------------------------------
# ● カーソルを下に移動
# wrap : ラップアラウンド許可
#--------------------------------------------------------------------------
def cursor_down(wrap)
if @index < 80
@index += 10
elsif wrap
@index -= 80
end
end
#--------------------------------------------------------------------------
# ● カーソルを上に移動
# wrap : ラップアラウンド許可
#--------------------------------------------------------------------------
def cursor_up(wrap)
if @index >= 10
@index -= 10
elsif wrap
@index += 80
end
end
#--------------------------------------------------------------------------
# ● カーソルを右に移動
# wrap : ラップアラウンド許可
#--------------------------------------------------------------------------
def cursor_right(wrap)
if @index % 10 < 9
@index += 1
elsif wrap
@index -= 9
end
end
#--------------------------------------------------------------------------
# ● カーソルを左に移動
# wrap : ラップアラウンド許可
#--------------------------------------------------------------------------
def cursor_left(wrap)
if @index % 10 > 0
@index -= 1
elsif wrap
@index += 9
end
end
#--------------------------------------------------------------------------
# ● カーソルを決定へ移動
#--------------------------------------------------------------------------
def cursor_to_decision
@index = 89
end
#--------------------------------------------------------------------------
# ● 次のページへ移動
#--------------------------------------------------------------------------
def cursor_pagedown
@mode = (@mode + 1) % TABLE.size
refresh
end
#--------------------------------------------------------------------------
# ● 前のページへ移動
#--------------------------------------------------------------------------
def cursor_pageup
@mode = (@mode + TABLE.size - 1) % TABLE.size
refresh
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
last_mode = @mode
last_index = @index
if Input.repeat?(Input::DOWN)
cursor_down(Input.trigger?(Input::DOWN))
end
if Input.repeat?(Input::UP)
cursor_up(Input.trigger?(Input::UP))
end
if Input.repeat?(Input::RIGHT)
cursor_right(Input.trigger?(Input::RIGHT))
end
if Input.repeat?(Input::LEFT)
cursor_left(Input.trigger?(Input::LEFT))
end
if Input.trigger?(Input::A)
cursor_to_decision
end
if Input.trigger?(Input::R)
cursor_pagedown
end
if Input.trigger?(Input::L)
cursor_pageup
end
if Input.trigger?(Input::C) and is_mode_change
cursor_pagedown
end
if @index != last_index or @mode != last_mode
Sound.play_cursor
end
update_cursor
end
end
Instalación: solo remplaza Window_NameInput escribe en el modulo Main:
Código:
[/spoiler]Font.default_name = ["UmePlus Gothic", "MS UI Gothic", "MS PGothic", "MS Gothic"][/spoiler]
Barras de Enemigos:
- Spoiler:
- #======================================================================
# Barra de enemigos de Jens009
# Version 1.2a
# Log: Julio 29, 2008
# - Version 1.0: Show Enemy Hp Bars
# Agosto 5, 2008
# - Version 1.1: Enable On/Off feature Using a $game_system instance
# : Enable On/Off feature using an in-game switch
# Agosto 8, 2008
# - Version 1.2: Add New Options
# : Change Default Window Size
# : Add Enemy States
# Febrero 1, 2010
# - Version 1.2a: Translation to spannish
#
# Credits to:
# Jens009 (Traducción al inglés y modificación)
# Puppeto4 (Alias tutorial y x buggearme para crear el script)
# VR0 (Traducción al español)
# just kidding puppeto =p
# Author\'s Note:
# 9 Metodos que hicimos alias. Vea lineas 101-121
# hay 4 que no necesitamos, pero es requisito para la ventana de enemigos
# cuando no estan presentes cuando eliges objetos o tecnicas.
#
#
# Modificacion:
# Si quieres modificar las barras, vea las lineas 34-68. Verás que cuando vés
# draw_actor_hp, lo cambiamos a draw_enemy_hp para que veas que son
# barras de enemigos.
# Verás que puedes crear barras para que sea lo correcto
#
#-----------------------------------------------------------------------------
# CONFIG:
#
# I. Activar o apagar ventana de enemigos durante el juego:
#
# hay 2 especies de interruptores que puedes usar dependiendo
# de lo que te guste.
#
# Si quieres usar script mediante interruptor:
# -pon USE_GSWITCH en \"false\" (sin comillas)
# -usa llamar script, $game_system.enemy_window = true/false
# True = Ventana de enemigos activado, False = no habrá ventana
#
# Si quieres usar interruptor del juego:
# -pon USE_GSWITCH en \"true\" (sin comillas)
# -Decide que ID del interruptor del juego vas a usarlas
# en ENEMY_WINDOW_SWITCH
# -Usa ese interruptor para mostrar ventana de HP
# True = Ventana de enemigos activado, False = no habrá ventana
#
#
# X DEFECTO, USE_GSWITCH está en false.
# So you are using a script Switch
#
# II. ALWAYS_UPDATE
# True = Siempre actualiza en todo el juego
# pero produce tanto lag.
# False = Actualizala ventana solo al final del turno
#
# III. Spacing X and Y change
# SPACING_X = cambia el Nº del eje X de la ventana
# SPACING_Y = cambia el Nº del eje Y de la ventana
# IV. COLUMNS
# COLUMNS = Muestra la cantidad de columnas, MAX = 4
# V. SHOW_STATES
# true: muestra estados a enemigos.
#======================================================================
module JCONFIG
USE_GSWITCH = false # false: usa el interruptor $game_system.enemy_hp.
# true: usa interruptor dentro del juego
ENEMY_WINDOW_SWITCH = 1 # usa el ID del interruptor para activar la
# ventana de enemigos, cuando el interruptor es activado
ALWAYS_UPDATE = true # True = Siempre actualiza
# False = Actualiza al final del turno
SPACING_X = 90 # Eje X
SPACING_Y = 44 # Eje Y
COLUMNS = 4 # x defecto, usa 4 Columnas.
SHOW_STATES = true # true muestra estados
# false oculta estados
end
#======================================================================
# Empezamos a editar Game_System
#======================================================================
class Game_System
attr_accessor :enemy_hp # Muesta HP de enemigo en batalla
alias jens009_system_initialize_enemy_hp initialize
#=============================================
# Inicialización
#=============================================
def initialize
# inicializa ventana de enemigo si es \"true\"
@enemy_hp = true
# Llama metodos anteriores
jens009_system_initialize_enemy_hp
end
end # Termina edición del sistema de juego
class Window_Base
#====================================
# Define fuente de enemigos
#====================================
def draw_enemy_name(enemy, x, y)
self.contents.font.color = normal_color
self.contents.draw_text (x, y, 120, 32, enemy.name)
end
#==========================
# Define estados de enemigos
#========================
def draw_enemy_state(enemy, x, y)
count = 0
for state in enemy.states
draw_icon(state.icon_index, x 24 * count, y)
count += 1
break if (24 * count > width - 24)
end
end
#--------------------------------------------------------------------------
# * Draw Enemy HP
# actor : actor
# x : Marcación eje X
# y : Marcación eje Y
# width : largo
#--------------------------------------------------------------------------
def draw_enemy_hp(enemy, x, y, width = 120)
draw_enemy_hp_gauge(enemy, x, y, width)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, Vocab::hp_a)
last_font_size = self.contents.font.size
xr = x + width
if width < 120
self.contents.draw_text(xr - 44, y, 44, WLH, enemy.hp, 2)
else
self.contents.draw_text(xr - 99, y, 44, WLH, enemy.hp, 2)
self.contents.font.color = normal_color
self.contents.draw_text(xr - 55, y, 11, WLH, \"/\", 2)
self.contents.draw_text(xr - 44, y, 44, WLH, enemy.maxhp, 2)
end
end
#--------------------------------------------------------------------------
# * Marcador HP
# actor : actor
# x : Marcación eje X
# y : Marcación eje Y
# width : largo
#--------------------------------------------------------------------------
def draw_enemy_hp_gauge(enemy, x, y, width = 120)
gw = width * enemy.hp / enemy.maxhp
gc1 = hp_gauge_color1
gc2 = hp_gauge_color2
self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
end
end
#=============================================#
# Window_EnemyHP #
# Clase para marcar ventana de HP de enemigos #
#=============================================#
class Window_EnemyHP < Window_Selectable
def initialize
super ( 0, 0, 545, 300)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@column_max = JCONFIG::COLUMNS
refresh
end
def refresh
self.contents.clear
for i in 0...$game_troop.members.size
enemy = $game_troop.members[i]
x = i % @column_max * (JCONFIG::SPACING_X + @spacing)
if JCONFIG::SHOW_STATES
y = (i / @column_max * (JCONFIG::SPACING_Y + WLH) )
else
y = (i / @column_max * ((JCONFIG::SPACING_Y - 34) + WLH) )
end
#========================================
# Si usas Game_Switch
#=========================================
if JCONFIG::USE_GSWITCH and $game_switches[JCONFIGENEMY_WINDOW_SWITCH]
draw_enemy_hp(enemy, x, y+20, 90)
draw_enemy_name(enemy, x, y)
if JCONFIG::SHOW_STATES
draw_enemy_state(enemy, x, y +44)
end
end
#==========================================
# Si usas interruptor de scripts
#==========================================
if JCONFIG::USE_GSWITCH == false
if $game_system.enemy_hp == true # Start check if Window Flag is On
draw_enemy_hp(enemy, x, y+20, 90)
draw_enemy_name(enemy, x, y)
if JCONFIG::SHOW_STATES
draw_enemy_state(enemy, x, y +44)
end # END CHECK
end #End flag check
end # END game switche check
end
end #End Refresh
end #End of Window_EnemyHP Class
#====================================#
# Scene_Battle #
# Nuevos metodos que pusimos alias: #
#====================================#
class Scene_Battle
alias jens009_create_info_viewport create_info_viewport
alias jens009_dispose_info_viewport dispose_info_viewport
alias jens009_start_item_selection start_item_selection
alias jens009_start_skill_selection start_skill_selection
alias jens009_end_item_selection end_item_selection
alias jens009_end_skill_selection end_skill_selection
alias jens009_process_victory process_victory
alias jens009_update_info_viewport update_info_viewport
alias jens009_start_party_command_selection start_party_command_selection
alias jens009_execute_action execute_action
alias jens009_turn_end turn_end
# Crear infos
def create_info_viewport
jens009_create_info_viewport
@enemy_window = Window_EnemyHP.new
end
# proporcionar infos
def dispose_info_viewport
jens009_dispose_info_viewport
@enemy_window.dispose
end
#=============================================
# Siempre actualizar ventana
#============================================
def update_info_viewport
if JCONFIG::ALWAYS_UPDATE == true
@enemy_window.refresh
jens009_update_info_viewport
else
jens009_update_info_viewport
end
end
#=============================================
# Actualizar solo si el turno parte y termina
#============================================
def start_party_command_selection
if JCONFIG::ALWAYS_UPDATE == true
jens009_start_party_command_selection
else
@enemy_window.visible = true
@enemy_window.refresh
jens009_start_party_command_selection
end
end
def execute_action
if JCONFIG::ALWAYS_UPDATE == true
jens009_execute_action
else
@enemy_window.visible = false
jens009_execute_action
end
end
def turn_end
if JCONFIG::ALWAYS_UPDATE == true
jens009_turn_end
else
@enemy_window.refresh
jens009_turn_end
end
end
#============================================
# TERMINA VERIFICACIÓN DE MEJORA
#===========================================
#=====================================
# Quitar ventana durante selección (ITEM-PACK)
def start_item_selection
@enemy_window.visible = false
jens009_start_item_selection
end
# Quitar ventana durante selección (Tecs.)
def start_skill_selection
@enemy_window.visible = false
jens009_start_skill_selection
end
# Visible durante selección (ITEM-PACK)
def end_item_selection
jens009_end_item_selection
@enemy_window.visible = true
end
# Visible durante selección (Tecs.)
def end_skill_selection
jens009_end_skill_selection
@enemy_window.visible = true
end
# Actualizar al ganar
def process_victory
@enemy_window.refresh
jens009_process_victory
end
#=====================================#
# Termina edición de Scene_Battle #
#=====================================#
end
# NO ES APTO PARA RPGXP NI PARA XAS
ATB en 1 solo script (extra largo xD) :
- Spoiler:
#==============================================================================
# ☆VX RGSS2 「Sistema de batalla ATB」☆
# EnDlEss DREamER
# URL:http://eiennoyumeni.hp.infoseek.co.jp/index.htm
# Creador: mitsu-evo
# Last:2010/5/24
# 汎用的なATBシステム
# ▼ 「バトルレイアウト変更」より上で「▼ 素材」に近い位置に挿入。
#==============================================================================
$ed_rgss2 = {} if $ed_rgss2 == nil
$ed_rgss2["ed_active_time_battle"] = true
#使用時は上の2行記述の「#」を消すこと。
$imported = {} if $imported == nil
# Si usas XP main (STR11c), instala:
# draw_atb_gauge(actor, rect.x, rect.y + 72, w)
# si usas cara en batalla KGC, instala
# draw_atb_gauge(actor, x, y , width)
# instalación: copie este script y peguelo en 1 TXT o directamente al RPGVX
#******************** ATB各種設定 ********************
COUNT_MAX = 1000 # ATBカウントの最大
# ATB増加スピード比率の設定
# 配列の[x]の値が下記変数と連動している。
# 配列は追加設定が可能で、イコールの後がスピード倍率。
COUNT_SPEED = []
COUNT_SPEED[0] = 2.0
COUNT_SPEED[1] = 4.0
COUNT_SPEED[2] = 6.0
COUNT_SPEED[3] = 10.0
# ATB増加スピード格納変数番号指定。
# ゲーム中に変数を変更すると増加スピードが変化
ATB_COUNT_VARIABLES = 11
# 最弱スキルの威力をデータベース「効果値」より引用する。
# 回復スキルなどで詠唱時間を無くしたい場合は「速度補正」を999などにする。
BASE_SKILL_DAMAGE = 100
# 最弱スキルに対して設定%以上の効果値ならスキル後ATBゼロになる
SKILL_ACTION_COUNT = 2000 # %(20倍)
ACTOR_ACTION_SE = "Audio/SE/Flash1" # SE de acción
ACTOR_SPELL_SE = "Audio/SE/Magic" # SE de conjuros
SPELL_WAIT_TIME = true # Espera de conjuros
BATTLE_MASSAGE_OPACITY = true # Opacidad de mensaje de batalla
ENEMY_ATB_WINDOW = false # Marcador al enemigo
SPELL_DISPOSE = 200 # 詠唱破棄に必要な精神力
SPELL_DISPOSE_DAMAGE = 0.3 # 詠唱破棄時のスキル効果値除算の値
SPELL_SPEED_UP = "詠唱倍増" # 詠唱速度が倍増する。メモ欄使用文字
SPELL_SPEED_DW = "詠唱半減" # 詠唱速度が半減する。メモ欄使用文字
# ゲージ加算のフレーム更新頻度。
# 加算処理は5フレームごとに更新。重たい場合は値を1ずつ増やして試す。
ATB_FRAME_UPDATE = 1
# 混乱&暴走時の行動を通常攻撃以外も有効にする
INPUTABLE = true
# ************************************************************
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# ● ATBゲージ増加スピード設定
#--------------------------------------------------------------------------
def atb_count_speed(value = 1)
$game_variables[ATB_COUNT_VARIABLES] = value
end
#--------------------------------------------------------------------------
# ● ATBゲージ増加スピード取得
#--------------------------------------------------------------------------
def atb_count_speed?
return COUNT_SPEED[$game_variables[ATB_COUNT_VARIABLES]]
end
end
#==============================================================================
# ■ Game_BattleAction
#==============================================================================
class Game_BattleAction
#--------------------------------------------------------------------------
# ● クリア
#--------------------------------------------------------------------------
def clear
@speed = 0
@basic = -1
# KGC様「DQ風スキル」が導入されている
if $imported["DQSkill"]
# バトラーが「かばう」スキル使用中でないなら初期化
unless hyper_guard? or damage_change? or protect_normal? or
protect_all? or guard_attack?
@target_index = -1 # かばう対象など
@skill_id = 0 # かばうスキルIDなど
@kind = 0 # スキル使用かどうか
end
else
@target_index = -1
@kind = 0
@skill_id = 0
end
@item_id = 0
@forcing = false
@value = 0
turn_end
end
#--------------------------------------------------------------------------
# ● ターン終了時の初期化
#--------------------------------------------------------------------------
def turn_end
unless guard?
# 防御中でない場合は初期化
# KGC様「DQ風スキル」が導入されている
if $imported["DQSkill"]
# バトラーが「かばう」スキル使用中でないなら初期化
unless hyper_guard? or damage_change? or protect_normal? or
protect_all? or guard_attack?
@kind = 0
end
else
@kind = 0
end
@basic = -1
end
if $imported["DQSkill"]
# スキルにDQ風スキルが含まれていて実行中の場合はスキルID初期化を行なわない。
unless hyper_guard? or damage_change? or protect_normal? or
protect_all? or guard_attack?
# DQ風スキルを実行していないので初期化。
@target_index = -1 # かばう対象など
@skill_id = 0 # かばうスキルIDなど
@kind = 0 # スキル使用かどうか
end
else
@target_index = -1
@skill_id = 0
@kind = 0
end
@item_id = 0
@forcing = false
@value = 0
@spell = 0
@ss = 0
@magic_spell_now = false
@spell_ok = false
@spell_dispose = false
end
#--------------------------------------------------------------------------
# ● 行動準備
#--------------------------------------------------------------------------
def prepare
if battler.berserker? or battler.confusion? # 暴走か混乱なら
if INPUTABLE
battler.make_action
else
set_attack # 通常攻撃に変更
end
end
end
#--------------------------------------------------------------------------
# ● 待機を設定
#--------------------------------------------------------------------------
def set_wait
@kind = 0
@basic = 3
end
#--------------------------------------------------------------------------
# ● 詠唱ゲージマックス取得
#--------------------------------------------------------------------------
def spell_max
@spell_max = magic_spell_count_max if @spell_max == nil
return @spell_max
end
#--------------------------------------------------------------------------
# ● 詠唱ゲージマックス算出(詠唱ゲージ加算は1フレーム1を加算する。)
#--------------------------------------------------------------------------
def magic_spell_count_max
if @kind == 1
skill = battler.action.skill
if skill.atk_f > skill.spi_f and skill.physical_attack
@magic_spell_now = false
else
@magic_spell_now = true
battler.add_action_battler_list = false
end
end
if skill == nil
return BASE_SKILL_DAMAGE / BASE_SKILL_DAMAGE * 60
end
damage = skill.base_damage
damage = BASE_SKILL_DAMAGE if skill.base_damage <= 0
damage *= -1.0 if skill.base_damage < 0
spell_time = damage * (skill.spi_f / 100)
spell_time /= BASE_SKILL_DAMAGE
spell_time *= 6 # 1 Seg = 1/10FPS
spell_time += skill.mp_cost # Costo SP
spell_time -= skill.speed # Vel. de conjuros
spell_time = 1 if spell_time <= 0 # 詠唱時間がマイナスなら1フレームのみ詠唱時間
@spell_max = spell_time
return @spell_max = 1 unless SPELL_WAIT_TIME
return @spell_max
end
#--------------------------------------------------------------------------
# ● 詠唱カウント取得
#--------------------------------------------------------------------------
def spell
return @spell
end
#--------------------------------------------------------------------------
# ● 詠唱カウント加算
#--------------------------------------------------------------------------
def magic_spell
unless battler.movable? # 行動不能
@spell = 0
@magic_spell_now = false
@spell_ok = false
return
end
if battler.dead? # 戦闘不能
@spell = 0
@magic_spell_now = false
@spell_ok = false
return
end
if battler.silent? # 沈黙
@spell = 0
@magic_spell_now = false
@spell_ok = false
return
end
return @spell = 0 unless @magic_spell_now # 詠唱中でないなら加算しない
@spell = 0 if @spell == nil
@ss = 0 if @ss == nil
# 詠唱速度分岐
case battler.spell_speed?
when 0
@spell += (1.0 * ATB_FRAME_UPDATE) * Float($game_system.atb_count_speed?)
when 1
@spell += (2.0 * ATB_FRAME_UPDATE) * Float($game_system.atb_count_speed?)
when 2
@spell += (1.0 * ATB_FRAME_UPDATE) * Float($game_system.atb_count_speed?) if @ss == 0
@ss = @ss % 2 # 余りが0の時だけ加算。疑似的に0.5の速度
end
# 詠唱破棄なら最大値を代入して終了
@spell = spell_max if magic_spell_dispose? == true
# 詠唱ゲージが最大を超えたら発動フラグ
if @spell >= @spell_max
@spell_ok = true
else
@spell_ok = false
end
return @spell
end
#--------------------------------------------------------------------------
# ● 詠唱中かどうか
#--------------------------------------------------------------------------
def magic_spell_now?
return @magic_spell_now
end
#--------------------------------------------------------------------------
# ● 詠唱フラグ
#--------------------------------------------------------------------------
def magic_spell_now=(value = false)
@spell = 0 if value == false
return @magic_spell_now = value
end
#--------------------------------------------------------------------------
# ● 詠唱魔法発動出来るかどうか
#--------------------------------------------------------------------------
def magic_spell_ok?
return @spell_ok
end
#--------------------------------------------------------------------------
# ● 詠唱発動フラグ
#--------------------------------------------------------------------------
def magic_spell_ok=(value = true)
@spell_ok = value
return @spell_ok
end
#--------------------------------------------------------------------------
# ● 詠唱破棄フラグ取得
#--------------------------------------------------------------------------
def magic_spell_dispose?
return @spell_dispose
end
#--------------------------------------------------------------------------
# ● 詠唱破棄フラグ
#--------------------------------------------------------------------------
def magic_spell_dispose=(value = true)
@spell_dispose = value
return unless SPELL_WAIT_TIME
return @spell_dispose
end
#--------------------------------------------------------------------------
# ● マックスカウントに対する%取得メソッド value : %
#--------------------------------------------------------------------------
def max_count_par(value)
par = value
par *= COUNT_MAX
par /= 100
return par
end
#--------------------------------------------------------------------------
# ● 使用スキル別のスピード減算%取得
#--------------------------------------------------------------------------
def skill_action_subtraction_speed
skill = battler.action.skill
#if skill.atk_f > skill.spi_f and skill.physical_attack
# 精神が打撃より低く、物理属性なら全消費
return 0 if skill == nil
if skill.atk_f > skill.spi_f
return max_count_par(20)
end
damage = Float(skill.base_damage)
damage *= -1.0 if skill.base_damage < 0
# 使用スキルがベース威力に対して
return 0 if damage >= SKILL_ACTION_COUNT
damage = BASE_SKILL_DAMAGE if damage == 0 # ステート変化系ならベース威力と同等とする
base = BASE_SKILL_DAMAGE
damage /= Float(base)
damage *= 100
damage = Integer(damage)
# 上記がベース威力に対する使用スキルの威力との比較
# 算出%を÷10で百分率に
damage = max_count_par(damage / 10) + max_count_par(50)
speed = COUNT_MAX
speed -= damage
speed = 0 if skill.ignore_defense # 防御無視なら全減り
speed = 0 if damage > COUNT_MAX
return speed
end
#--------------------------------------------------------------------------
# ● 行動後のアクション別スピード減算処理
#--------------------------------------------------------------------------
Nos vemoshasta mi proximo aporte