Hi
Dinamic Mosters Bestiary 1.5
May be you already hear about RMVX mosters Bestiary, perhaps those are almost the same but this one has some new features and style than the others
Features - Disaplay mosters parameter like HP,MP,DEF AGI etc.
- when you deafeat a monsters is added to bestiary by itself
- Script sort 5 diferent enemy classes like amateaur, noob, boss etc. based on parameters
- Beatyful breath effects was added to enemy battler
- Display enemy power based on parameters
- easy to use
Instruction:Place the script above main then call it pressing key 'A' while you are on map, you can change deafault key of course.
CreditsBy Falcao
LicenseCan be used in comercial or non-comercial games
Script#====================================================================#
# #*****************# Dinamic bestiary V 1 Falcao script #
# #*** By Falcao ***# Permite mostrar un albun de cada #
# #*****************# mostruo que derrotas V 1.5 #
# RMVX #
# makerpalace.onlinegoo.com Date: 10/29/2009 #
#====================================================================#
#---------------------------------------------------------------------
# * Instructions
#
# Solo copiar y pegar el script encima de main luego llamarlo con
# tecla 'A' puesta por defecto. Editar el modulo de abajo a su gusto
#
# Place the script above main, then call it with key 'A' by deafault
# Edit the module below as you prefer.
#
# License: Puede ser usado en juegos comerciales o no comerciales
# This script can be used in comercial or non-comercial games
#---------------------------------------------------------------------
module Falcao
# Descripcion Para cada enemigo / Enemy desciption
# A = Id del enemigo / Enemy ID
# B = Description
Description = {
1=> 'Habita cerca de los arrollos del bosque Falcar',
2=> 'Se mata facilmente con un ataque normal, es devil al elemento agua',
3=> 'Habita en el bosque shulton, devil al elemento fuego',
4=> 'Ponsoñosa araña que habita dentro de cuevas, si pica tomar antidoto',
5=> 'Rata escurridiza, suele dejar buena experiencia',
21=> 'Habita alrededor del castillo tridan, devil a luz',
}
# Tecla que llama el script / Key to call script
# Puesdes elejir entre las siguientes / choose between the followings keys
# Z, A, S, D, Q, W, ALT
TeclaBestiary = 'A'
# Interruptor que desabilita llamar el script con la tecla especificada
# Disable script call by input key
KeyDisable_Switch = 100
# Tocar musica / play music (true o false)
PlayMusic = true
# Declaracion de arrays / Arrays declaration
$derrotados = []
$enemy_counter = []
EnemyLevel = []
# Vocabulario / Vocabulary
FalVocab = ['-No hay datos-', # No datos / No data
'Tesoro', # Tesoro 1 / Treasure 1
'Tesoro2', # tesoro 2 / Treasure 2
'None', # Sin tesoro / No treasure
'????', # Enemigo no derrotado / Enemy no defeated
'Bestiary', # Titulo / Title
'Derrotado', # Derrotado / defeated
'Clase', # Clase de enemigo / enemy class
'Power', # Energia maxima / Power
'Veces', # Veces derrotado / times defeated
'Progreso'] # Progreso / Progress
# Clases de enemigos / enemy classes
# Calculos basados en parametros / Values based on parameters(Def, atk, etc.)
EnemyLevel[1] = "Noob"
EnemyLevel[2] = "Amateaur"
EnemyLevel[3] = "King master"
EnemyLevel[4] = "Boss fighter"
EnemyLevel[5] = "Master boss"
#-----------------------------------------------------------------------------
# Cuando un enemigo es derrotado es automaticamente agregado al invetario pero
# puedes administrarlos manualmente con los siguientes comandos
# When you defeat an enemy automaticly is added, but you can add or remove
# enemies manualy with the following comands
# Falcao.add_enemy(X) Agrega enemigo X, en ves de X poner ID de enemigo
# Add enemy X, instead X put enemy ID
#
# Falcao.remove_enemy(X) remueve enemigo X, En ves de X poner ID de enemigo
# Remove Enemy X, Instead X put enemy ID
#
# Falcao.fill_bestiary Agrega todos los monstruos al bestiario
# Fill bestiary
#
# Para llamar el script manualmente llamarlo directamente asi
# To call the script manually call it
#
# $scene = Scene_Monsters.new
#
# * Creditos:
#
# Script creado por Falcao, puede ser publicado en cualquier foro siempre
# y cuando los creditos sean mencionados
#-----------------------------------------------------------------------------
def self.fill_bestiary
for enemy in $data_enemies
next if enemy == nil
unless $derrotados.include?(enemy.id)
$derrotados.push(enemy.id)
$enemy_counter.push(enemy.id)
end
end
end
def self.add_enemy(id)
unless $derrotados.include?(id)
$derrotados.push(id)
$enemy_counter.push(id)
end
end
def self.remove_enemy(id)
if $derrotados.include?(id)
$derrotados.delete(id)
$enemy_counter.push(id)
end
end
end
#--------------------------------------------------------------------------
# * Crear informacion general y parametros enemigos
#--------------------------------------------------------------------------
class Moster_Info < Window_Base
include Falcao
def initialize(x, y)
super(x, y, 385, 380)
self.opacity = 0
end
def refresh(enemy_id)
self.contents.clear
@enemigo = $data_enemies[enemy_id]
if $derrotados.include?(@enemigo.id)
contents.font.size = 20
draw_enemy_hp(0, 205)
draw_enemy_mp(0, 230)
enemy_parametros
draw_drop_item1
draw_drop_item2
else
contents.font.size = 30
contents.draw_text(100, 100, 500, 92, FalVocab[0])
end
end
def enemy_parametros
y1 = 0; y2 = 0; y3 = 0; y4 = 0
terms = $data_system.terms
param1={1=>@enemigo.maxhp,2=>@enemigo.maxmp,3=>@enemigo.spi,4=>@enemigo.exp}
name1 = {1=> terms.hp, 2=> terms.mp, 3=> terms.spi, 4=> "Exp"}
param2={1=>@enemigo.atk,2=>@enemigo.def,3=>@enemigo.agi,4=> @enemigo.gold}
name2 = {1=> terms.atk, 2=> terms.def, 3=> terms.agi, 4=> terms.gold}
param1.sort.each do |keys, values|
y1 += 25
contents.draw_text(100, y1 + 134, 92, 92, values)
end
param2.sort.each do |keys, values|
y2 += 25
contents.draw_text(300, y2 + 134, 92, 92, values)
end
name1.sort.each do |keys, values|
y3 += 25
contents.draw_text(0, y3 + 134, 102, 92, values)
end
name2.sort.each do |keys, values|
y4 += 25
contents.draw_text(200, y4 + 134, 102, 92, values)
end
end
def draw_drop_item1
item = @enemigo.drop_item1
contents.draw_text(35, 260, 92, 92, FalVocab[1])
if item.kind == 0
contents.draw_text(0, 284, 92, 92, FalVocab[3])
return
end
case item.kind
when 1; drop_item = $data_items[item.item_id]
when 2; drop_item = $data_weapons[item.item_id]
when 3; drop_item = $data_armors[item.armor_id]
end
draw_icon(drop_item.icon_index,94, 318)
contents.draw_text(0, 284, 92, 92, drop_item.name)
end
def draw_drop_item2
item = @enemigo.drop_item2
contents.draw_text(226, 260, 92, 92, FalVocab[2])
if item.kind == 0
contents.draw_text(200, 284, 92, 92, FalVocab[3])
return
end
case item.kind
when 1; drop_item = $data_items[item.item_id]
when 2; drop_item = $data_weapons[item.item_id]
when 3; drop_item = $data_armors[item.armor_id]
end
draw_icon(drop_item.icon_index,300, 318)
contents.draw_text(200, 284, 92, 92, drop_item.name)
end
def draw_enemy_hp(x, y)
self.contents.fill_rect(x, y, 102, 10, Color.new(0,0,0))
self.contents.fill_rect(x+1, y+1, 100*@enemigo.maxhp/@enemigo.maxhp, 4,
Color.new(205,255,205))
self.contents.fill_rect(x+1, y+5, 100*@enemigo.maxhp/@enemigo.maxhp, 4,
Color.new(10,220,45))
end
def draw_enemy_mp(x, y)
if @enemigo.maxmp != 0
self.contents.fill_rect(x, y, 102, 10, Color.new(0,0,0))
self.contents.fill_rect(x+1, y+1, 100*@enemigo.maxmp/@enemigo.maxmp, 4,
Color.new(180,225,245))
self.contents.fill_rect(x+1, y+5, 100*@enemigo.maxmp/@enemigo.maxmp, 4,
Color.new(20,160,225))
else
self.contents.fill_rect(x, y, 102, 10, Color.new(0,0,0))
end
end
end
#--------------------------------------------------------------------------
# * Objeto creador de las descripciones y el progreso en porcentaje
#--------------------------------------------------------------------------
class Moster_Description < Window_Base
include Falcao
def initialize(x, y, ancho = 544, alto = 56)
super(x, y, ancho, alto)
@tiempo = 0
@scroll = 0
end
def set_texto(texto)
self.contents.clear
self.contents.draw_text(0, -4, 92, 32, texto)
for i in 0...$derrotados.size
number = i + 1
end
texto2 = "#{FalVocab[10]} #{number * 100/$all_mosnters}%" rescue texto2 =
"#{FalVocab[10]} 0 %"
self.contents.draw_text(0, 24, self.width, 32, texto2)
end
def refresh(enemy_id)
self.contents.clear
@enemigo = $data_enemies[enemy_id]
if $derrotados.include?(@enemigo.id)
draw_descriptions
else
self.contents.draw_text(-130, -4, 600, 32 , FalVocab[0],1)
end
end
def draw_descriptions
if Description.has_key?(@enemigo.id)
Description.each do |id, value|
if id == @enemigo.id
cx = contents.text_size(value).width
scroll_text(value)
self.contents.draw_text(@scroll, -4, cx + 10, 32 , value)
end
end
else
text = [" ",
" ",
"Description no available ",
"Falcao script Bestiary V 1.5 "
]
scroll_text(text,false)
cx = contents.text_size(text).width
self.contents.draw_text(@scroll, -4, cx + 10, 32, text )
end
end
def scroll_text(texto, result_ok=true)
cx = contents.text_size(texto).width
if cx > 350
@tiempo += 1
if @tiempo > 60
@scroll -= 1 if @result == nil
if @scroll == -cx
@result = true
end
end
end
if @result
result_ok ? @scroll += 10 : @scroll = 0
if @scroll >= 0
@scroll = 0; @tiempo = 0
@result = nil
end
end
if Input.press?(Input::UP) or Input.press?(Input::DOWN)
@scroll = 0; @tiempo = 0; @result = nil
end
end
end
#--------------------------------------------------------------------------
# * Objeto que dibuja el indice de los enemigos con su nombre
#--------------------------------------------------------------------------
class Monster_indice < Window_Selectable
def initialize(y)
super(0, y, 160, 334)
@column_max = 1
refresh
self.index = 0
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_enemies.size
@data.push($data_enemies[i])
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 26)
for i in 0...@item_max
draw_item(i)
$all_mosnters = i + 1
end
end
end
def draw_item(index)
enemy = @data[index]
self.contents.font.color = normal_color
x, y = 4, index * 24
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
opacity = self.contents.font.color == normal_color ? 255 : 128
if $derrotados.include?(index+1)
contents.draw_text(x, y, 212, 24, enemy.name)
else
contents.draw_text(x, y, 212, 24, Falcao::FalVocab[4])
end
end
end
#--------------------------------------------------------------------------
# * Objeto que dibuja el Power y el conteo de mostruos derrotados
#--------------------------------------------------------------------------
class Adicional_Data < Window_Base
include Falcao
attr_accessor :number
attr_accessor :counter
def initialize
super(0, 0, 160, 334)
@number = 0.0
@counter = 0.0
@color = [Color.new(180,225,245), Color.new(20,160,225)]
end
def refresh(enemy_id)
self.contents.clear
@enemigo = $data_enemies[enemy_id]
if $derrotados.include?(@enemigo.id)
draw_enemy_counter
draw_enemy_power(0,186)
contents.font.color = Color.new(255, 140, 0)
contents.draw_text(30, 0, 212, 24, @enemigo.name)
else
contents.font.color = normal_color
self.contents.draw_text(2, 50, 600, 32 , FalVocab[0])
end
end
def draw_enemy_counter
i = 0
for c in $enemy_counter
if c == @enemigo.id
i += 1
number = i
end
end
contents.font.color = normal_color
contents.draw_text(0, 40, 212, 24, FalVocab[6])
contents.draw_text(80, 70, 212, 24, number.to_s)
contents.draw_text(0, 70, 212, 24, FalVocab[9])
end
def get_power(enemy)
add = 0
number1 = enemy.spi + enemy.agi
number2 = enemy.atk + enemy.def
case enemy.maxhp
when 1...400
add = 60
when 400...1000
add = 100
when 1000...10000
add = 140
when 10000...999999
add = 200
end
@number = number1 + number2 + add
@counter = @number
@number = 1
end
def draw_enemy_power(x,y)
case @counter
when 1...150
value = 150; add = 1; level = EnemyLevel[1]
@color = [Color.new(180,225,245), Color.new(20,160,225)]
when 150...350
value = 350; add = 3; level = EnemyLevel[2]
@color = [Color.new(255, 120, 0), Color.new(255, 80, 50)]
when 350...600
value = 600; add = 6; level = EnemyLevel[3]
@color = [Color.new(205,255,205), Color.new(10,220,45)]
when 600...1000
value = 1000; add = 10; level = EnemyLevel[4]
@color = [Color.new(255,255,100), Color.new(255,200,0) ]
when 1000...4196
value = 3996; add = 20; level = EnemyLevel[5]
@color = [Color.new(255,255,100), Color.new(255,200,0) ]
end
@number = @counter if @number >= @counter
@number += add if @number < @counter
contents.font.color = Color.new(255, 140, 0)
contents.draw_text(30, 120, 212, 24, FalVocab[7])
contents.font.color = normal_color
contents.draw_text(0, 150, 212, 24, level)
self.contents.fill_rect(x, y, 128, 14, Color.new(0,0,0))
self.contents.fill_rect(x+1, y+1, 126*@number/value, 6, @color[0])
self.contents.fill_rect(x+1, y+7, 126*@number/value, 6, @color[1])
contents.draw_text(0, 210, 212, 24, FalVocab[8])
contents.draw_text(80, 210, 212, 24, @number.to_s)
end
end
#--------------------------------------------------------------------------
# * Clase que agrega los enemigos al bestiario automaticamente
#--------------------------------------------------------------------------
class Game_Enemy < Game_Battler
alias falcao_collapse perform_collapse
def perform_collapse
falcao_collapse
unless $derrotados.include?(enemy.id)
$derrotados.push(enemy.id)
end
if $game_temp.in_battle and dead?
$enemy_counter.push(enemy.id)
end
end
end
#--------------------------------------------------------------------------
# * Clase que define la fuente del bestiario
#--------------------------------------------------------------------------
class Font
alias falcaoBest_font initialize
def initialize
falcaoBest_font
if $scene.is_a?(Scene_Monsters)
self.name = "Georgia"
self.size = 20
end
end
end
#--------------------------------------------------------------------------
# * Aqui se crea la scene que organiza todo en conjunto
#--------------------------------------------------------------------------
class Scene_Monsters < Scene_Base
def start
super
@spriteset = Spriteset_Bestiary.new
@mostruos_index = Monster_indice.new(84)
@info_mosters = Moster_Info.new(160,56)
@help = Moster_Description.new(160,0, 386)
@title = Moster_Description.new(0,0, 160, 84)
@title.set_texto(Falcao::FalVocab[5])
@info_mosters.refresh(@mostruos_index.index + 1)
@help.refresh(@mostruos_index.index + 1)
@extra_data = Adicional_Data.new
@extra_data.y = 84
@extra_data.visible = false
@moster_graphic = Sprite.new
@moster_graphic.bitmap = Cache.battler("",0)
@moster_graphic.z = 99
@moster_graphic.y = 65
@time = 0
if Falcao::PlayMusic
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
$game_system.battle_bgm.play
end
create_enemy_graphics
end
def terminate
super
@mostruos_index.dispose
@info_mosters.dispose
@help.dispose
@spriteset.dispose
@title.dispose
@moster_graphic.dispose
end
def update
super
@spriteset.update
@mostruos_index.update
@help.refresh(@mostruos_index.index + 1)
animate_graphic
if Input.press?(Input::DOWN) or Input.press?(Input::UP)
@info_mosters.refresh(@mostruos_index.index + 1)
create_enemy_graphics
if @extra_data.visible
@extra_data.get_power($data_enemies[@mostruos_index.index + 1])
end
end
if Input.trigger?(Input::C) and @extra_data.visible == false
Sound.play_decision
@extra_data.get_power($data_enemies[@mostruos_index.index + 1])
@extra_data.refresh(@mostruos_index.index + 1)
@extra_data.visible = true
@mostruos_index.y = 600
end
if @extra_data.visible
if @extra_data.number < @extra_data.counter
@extra_data.refresh(@mostruos_index.index + 1)
end
end
if Input.trigger?(Input::B)
if @extra_data.visible
Sound.play_cancel
@extra_data.visible = false
@mostruos_index.y = 84
else
Sound.play_cancel
if Falcao::PlayMusic
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Map.new
end
end
end
def create_enemy_graphics
enemy = $data_enemies[@mostruos_index.index + 1]
if $derrotados.include?(enemy.id)
@moster_graphic.bitmap = Cache.battler(enemy.battler_name,
enemy.battler_hue)
cw = @moster_graphic.width
@moster_graphic.x = 360 - cw / 2
@moster_graphic.visible = true
else
@moster_graphic.visible = false
end
end
def animate_graphic
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@moster_graphic.zoom_x = 1
@moster_graphic.zoom_y = 1
@time = 0
end
h = 240; @time += 1
if @time < 40
if @moster_graphic.height <= h
@moster_graphic.zoom_x += 0.002
@moster_graphic.zoom_y += 0.002
elsif @moster_graphic.height > h
@moster_graphic.zoom_x += 0.001
@moster_graphic.zoom_y += 0.001
end
elsif @time > 40
if @moster_graphic.height <= h
@moster_graphic.zoom_x -= 0.002
@moster_graphic.zoom_y -= 0.002
elsif @moster_graphic.height > h
@moster_graphic.zoom_x -= 0.001
@moster_graphic.zoom_y -= 0.001
end
if @time == 80
@moster_graphic.zoom_x = 1
@moster_graphic.zoom_y = 1
@time = 0
end
end
end
end
#--------------------------------------------------------------------------
# * Objeto que define la tecla para acceder al bestiario
#--------------------------------------------------------------------------
class Scene_Map
alias falcao_bestiary_update update
def update
falcao_bestiary_update
update_finput
end
def update_finput
return if $game_switches[Falcao::KeyDisable_Switch]
case Falcao::TeclaBestiary
when 'Z'; key = Input::C #C
when 'A'; key = Input::X #X
when 'S'; key = Input::Y #Y
when 'D'; key = Input::Z #Z
when 'Q'; key = Input::L #L
when 'W'; key = Input::R #R
when 'ALT'; key = Input::ALT #alt
end
if Input.trigger?(key)
$scene = Scene_Monsters.new
end
end
end
#--------------------------------------------------------------------------
# * Guardar variables de enemigos derrotados
#--------------------------------------------------------------------------
class Scene_File < Scene_Base
alias falcaosave_data write_save_data
def write_save_data(file)
falcaosave_data(file)
Marshal.dump($derrotados, file)
Marshal.dump($enemy_counter, file)
end
end
#--------------------------------------------------------------------------
# * Cargar variables de enemigos derrotados
#--------------------------------------------------------------------------
class Scene_File < Scene_Base
alias falcaoload_data read_save_data
def read_save_data(file)
falcaoload_data(file)
$derrotados = Marshal.load(file)
$enemy_counter = Marshal.load(file)
end
end
#--------------------------------------------------------------------------
# * Objeto que crea el fondo animado usando el mapa
#--------------------------------------------------------------------------
class Spriteset_Bestiary
def initialize
create_battleback
update
end
def create_battleback
@viewport1 = Viewport.new(0, 0, 544, 416)
source = $game_temp.background_bitmap
bitmap = Bitmap.new(640, 480)
bitmap.stretch_blt(bitmap.rect, source, source.rect)
bitmap.radial_blur(90, 12)
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = bitmap
@battleback_sprite.ox = 320
@battleback_sprite.oy = 240
@battleback_sprite.x = 272
@battleback_sprite.y = 176
@battleback_sprite.wave_amp = 8
@battleback_sprite.wave_length = 240
@battleback_sprite.wave_speed = 120
end
def dispose
@battleback_sprite.bitmap.dispose
@battleback_sprite.dispose
@viewport1.dispose
end
def update
@battleback_sprite.update
@viewport1.update
end
end
Demohttp://www.4shared.com/file/144760407/b8b366dd/Dinamic_Bestiary_15.htmlScreenes