Jump to content
Rpg²S Forum
  • 0

Bestiario personalizzato


Astro86
 Share

Question

Come sapete sto facendo un progetto chiamato Pokémon Alternate World, dopo 3 mesi di riposo per via delle vacanze, riprendo il progetto e volevo iniziare con una richiesta....

 

attualmente uso un semplice bestiario ma vorrei una cosa più personalizzata incentrata su quel gioco

 

forrei tipo un funzionamento stile Pokédex dei Pokémon che oltre a far vedere la sua immagine, mi dia una descrizione del mostro, incontrati, e tutti gli attributi degli elementi... cosa più importante, dato che il gioco e dei Pokémon e i Pokémon hanno fino a 2 Tipi, vorrei che la script mi ricavasse i primi 2 elementi di attacco del Pokémon dato che li uso come appunto tipi...

 

ad esempio, io a un Pokémon gli ho dato questi parametri

http://hostpics.altervista.org/uploads/1378888738.png

 

vorrei che nel bestiario vengono inserite tutte le informazioni che ho segnato con un punto rosso + le informazioni dette sopra

 

Purtroppo un Bestiario cosi non l'ho mai trovato e non penso che sia mai stato creato... quindi sarebbe una cosa da creare da zero o quasi...

 

è una cosa fattibile un bestiario cosi?

 

una cosa è certa, sarà uno dei Bestiari più completi che ci sia xD

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Ciao
io per adesso ho trovato 2 bestiari

1. Bisba94

 

#===============================================================================
# Titolo: B94 - Bestiario
# Versione: 1.0
# Autore: Bisba94
#-------------------------------------------------------------------------------
# Riepilogo versioni:
# - 1.0 (23/07/13) Realase iniziale
#-------------------------------------------------------------------------------
# Condizioni d'uso:
# - Siete liberi di utilizzare questo script in qualunque progetto commerciale o
# non commerciale, chiedo solo di essere citato fra i Crediti.
# - Siete liberi di pubblicare questo script su qualunque community a patto che
# vengano citati l'autore e la provenienza
# - Lo Script può essere modificato per utilizzo personale e pubblicato nella
# nuova versione a patto che vengano citati l'autore del lavoro originale e la provenienza
#-------------------------------------------------------------------------------
# Istruzioni:
# - Incollare sotto Materials prima di Main
# - Apparirà una nuova voce nel menù per accedere al Bestiario (è possibile rimuoverla)
# - Modificate le impostazioni fin dove è segnato, non modificate nulla dello
# script se non sapete cosa state facendo.
#-------------------------------------------------------------------------------
# Contatti:
# - Per qualunque informazione, segnalazione, richiesta o altro scrivete a:
# bisba1994@live.it
#===============================================================================

$imported = {} if $imported.nil? # Non modificare queste linee
$imported["B94-Bestiario"] = true # Non modificare queste linee

module Bestiario

# PARTE MODIFICABILE

MENU_COMMAND = "Bestiario" # Nome del Comando che apparirà nel menù
SWITCH_MENU_ATTIVATO = 0 # Switch per attivare il comando nel menù
# (se si imposta 0 è sempre attivo)

ESCLUSI = [1] # Lista dei mostri esclusi dal Bestiario

# Liste dei mostri appartenenti a categorie speciali
MOSTRI_SPECIALI = {:rari => [10,20,24,27],
:boss => [19,23,25,29],
:speciali => [30]
} # NON CANCELLARE

# Numero di cifre della lista di mostri divisi per categorie
CIFRE_MAX = { :comuni => 2,
:rari => 2,
:boss => 1,
:speciali => 1
} # NON CANCELLARE

# Nomi delle categorie
NOME_CATEGORIA = { :comuni => "Comuni",
:rari => "Rari",
:boss => "Boss",
:speciali => "Speciali"
} # NON CANCELLARE

SCONOSCIUTO = "?????????" # Nome visualizzato per i mostri non ancora sconfitti



# Icone degli elementi da visualizzare nel bestiario
ICONE_ELEMENTI = {3 => 96,
4 => 97,
5 => 98,
6 => 99,
7 => 100,
8 => 101,
9 => 102,
10 => 103
} # NON CANCELLARE
CONFRONTO_STAT = true # true: mostra una barra che si riempie al crescere delle statistiche

#Colore barre delle statistiche.
# 'Statistica' => id colore
# 0: PV 1: PM 2: ATT 3: DIF 4: ATTM 5: DIFM 6: AGI 7: FORT
COLORE_STATISTICHE = { 0=>0, 1=> 1, 2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 7=>7}

COLORE_RESISTENZA = 10 # Colore attribuito alle resistenze del mostro
COLORE_DEBOLEZZA = 11 # Colore attribuito alle debolezze del mostro
COLORE_NULLO = 7 # Colore attribuito agli elementi che provocano danni nulli
COLORE_CAP = 11 # Colore numero mostri sconfitti massimo
COLORE_BARRA1 = 4 # Colore iniziale barra di completamento
COLORE_BARRA2 = 12 # Colore finale barra di completamento

SWITCH_COMPLETAMENTO = 1 # Switch che quando è ON attiva la visualizzazione delle
# statistiche di completamento del Bestiario (Lista di tutti
# i mostri e percentuale di completamento). Se impostata su 0
# la visualizzazione sarà sempre attiva.

NOME_SPRITE = "" # Testo aggiuntivo per inidicare gli sprite dei nemici che
# appariranno nel bestiario.
# ES: inserendo "_B" il programma cercherà nella cartella battlers
# il file "Mostro_B" invece di "Mostro" usato dal database

MOSTRA_INCONTRI = true # true: mostra il numero di nemici sconfitti

# Limite dei nemici sconfitti visualizzati
# se è 0 il numero sarà illimitato
CAP_SCONFITTI = { :comuni => 5,
:rari => 3,
:boss => 1,
:speciali => 1
} # NON CANCELLARE

SCONFITTI = "Sconfitti" # Testo per i nemici sconfitti

EXP_NAME = "Esperienza" # Testo per il nome dei punti esperienza

TOT_INCONTRATI = "Mostri Incontrati"
TOT_SCONFITTI = "Mostri Sconfitti"
TOT_DANNI = "Danni Inflitti"

# Lista dei titolo ottenibili
# no. % col titolo
TITOLI = { 1 => [ 0, 1, "Principiante"],
2 => [ 20, 2, "Intermedio"],
3 => [ 50, 3, "Esperto"],
4 => [ 80, 4, "Maestro"],
5 => [100, 5, "IL Cacciatore"]
} # NON CANCELLARE


# FINE PARTE MODIFICABILE!!


def self.create_enemies_array
mostri = []
for i in 1...$data_enemies.length
if ESCLUSI.include?(i)
mostri = nil
else
mostri.push($data_enemies.id)
end
end
return mostri
end

end

#===============================================================================
# Window_Bestairy_Category (Nuova Classe)
#===============================================================================

class Window_Bestiary_Category < Window_HorzCommand

def initialize
super(0,0)
end #initialize

def window_width
Graphics.width
end #window_width

def update
super
@list_window.category = current_symbol if @list_window
end #update

def make_command_list
add_command(Bestiario::NOME_CATEGORIA[:comuni], :comuni)
add_command(Bestiario::NOME_CATEGORIA[:rari], :rari)
add_command(Bestiario::NOME_CATEGORIA[:boss], :boss)
add_command(Bestiario::NOME_CATEGORIA[:speciali], :speciali)
end #make_command_list

def list_window=(list_window)
@list_window = list_window
update
end #list_window=

end #Window_Bestiary_Category

#===============================================================================
# Window_Bestiary_List (Nuova Classe)
#===============================================================================

class Window_Bestiary_List < Window_Command
include Bestiario

def initialize(symbol)
@symbol = symbol
super(0,48)
end #initialize

def window_width
return Graphics.width / 2
end #window_width

def window_height
return Graphics.height - 48
end #window_height

def category=(symbol)
return if @symbol == symbol
@symbol = symbol
refresh
self.index = 0
end #category=

def enemy_name(index)
enemy = $data_enemies[index]
return enemy.name
end #enemy_name

def id_for_list(index)
return @enemies[index]
end #id_for_list

def select_symbol
if @symbol == :comuni
no_common = MOSTRI_SPECIALI[:rari] + MOSTRI_SPECIALI[:boss] + MOSTRI_SPECIALI[:speciali]
remove_enemies(no_common)
else
mantain_enemies
end #if
end #select_symbol

def remove_enemies(no_common)
@enemies.each_index do |i|
@enemies = nil if no_common.include?(i)
end #do
end #remove_enemies

def mantain_enemies
@enemies.each_index do |i|
@enemies = nil if !(MOSTRI_SPECIALI[@symbol].include?(i))
end #do
end #mantain_enemies

def make_command_list
@enemies = Bestiario.create_enemies_array
select_symbol
@enemies.compact!
n = 0
@enemies.each_index do |i|
@enemies = nil if !$game_party.incontrato?(@enemies) and !$game_switches[sWITCH_COMPLETAMENTO] and SWITCH_COMPLETAMENTO != 0
next if @enemies == nil
n += 1
num = zeri(n)
enabled = $game_party.sconfitto?(@enemies)
$game_party.incontrato?(@enemies) ? name = enemy_name(@enemies) : name = SCONOSCIUTO
add_command(num + ": " + name, :mostro, enabled)
end #do
@enemies.compact!
end #make_command_list

def zeri(i)
istr = i.to_s
until istr.size >= CIFRE_MAX[@symbol]
istr = "0" + istr
end #until
return istr
end #zeri

end #Window_Bestiary_List

#===============================================================================
# Window_Bestiary_Progress (Nuova Classe)
#===============================================================================

class Window_Bestiary_Progress < Window_Base
include Bestiario

def initialize
@sconfitti = 0
@tot_sconfitti = 0
@percentuale = 0
# @danni = 0
@incontrati = 0
@tot_incontrati = 0
super(window_width, 48, window_width, window_height)
totale_mostri_sconfitti
draw_completamento
draw_horz_line(0,line_height*3, window_width - 24)
draw_info_inutili(0, line_height*4)
draw_horz_line(0,line_height*9, window_width - 24)
draw_titolo(0,line_height*10)
end #initialize

def draw_completamento
change_color(system_color)
draw_text(0,0,window_width - 24, line_height, "Completamento")
change_color(normal_color)
contents.fill_rect(0,(line_height*2) + 2, window_width - 24, line_height - 4, Color.new(0,0,0,200))
contents.fill_rect(2,(line_height*2) + 4, window_width - 28, line_height - 8, Color.new(0,0,0,80))
if $game_switches[sWITCH_COMPLETAMENTO] or SWITCH_COMPLETAMENTO == 0
draw_text(0,0,window_width - 24, line_height, sprintf("%.2f%", @percentuale), 2)
bar_w = ((@percentuale / 100) * (window_width - 28)).to_i
contents.gradient_fill_rect(2, (line_height*2) + 4, bar_w, line_height - 8, text_color(COLORE_BARRA1), text_color(COLORE_BARRA2))
draw_text(0,line_height*1,window_width - 24, line_height, @sconfitti.to_s + "/" + @max.to_s, 2)
else
draw_text(0,0,window_width - 24, line_height, "??? %", 2)
draw_text(0,line_height*1,window_width - 24, line_height, @sconfitti.to_s + "/" + @incontrati.to_s, 2)
end #if
end #draw_completamento

def draw_info_inutili(x, y)
change_color(system_color)
draw_text(x,y,window_width - 24, line_height, TOT_INCONTRATI)
draw_text(x,y + (line_height)*2,window_width - 24, line_height, TOT_SCONFITTI)
# draw_text(x,y + (line_height)*4,window_width - 24, line_height, TOT_DANNI)
change_color(normal_color)
draw_text(x,y + line_height,window_width - 24, line_height, @tot_incontrati,2)
draw_text(x,y + (line_height)*3,window_width - 24, line_height, @tot_sconfitti,2)
# draw_text(x,y + (line_height)*5,window_width - 24, line_height, @danni,2)
end #draw_info_inutili

def draw_titolo(x,y)
change_color(system_color)
draw_text(x,y,window_width - 24, line_height, "Titolo:")
TITOLI.each_key do |i|
next if @percentuale < TITOLI[0]
change_color(text_color(TITOLI[1]))
@tit = TITOLI[2]
end
draw_text(x,y + (line_height*1.5),window_width - 24, line_height, @tit, 1)
end #draw_titolo

def totale_mostri_sconfitti
mostri = Bestiario.create_enemies_array
mostri.compact!
@max = mostri.size
mostri.each do |i|
@sconfitti += 1 if $game_party.sconfitto?(i)
@incontrati += 1 if $game_party.incontrato?(i)
@tot_sconfitti += $game_party.conta_sconfitti(i) if $game_party.sconfitto?(i)
@tot_incontrati += $game_party.conta_incontrati(i) if $game_party.incontrato?(i)
end #do
@percentuale = (@sconfitti.to_f * 100) / @max
end #totale_mostri_sconfitti

def draw_horz_line(x, y, length)
line_y = y + line_height / 2 - 1
contents.fill_rect(x, line_y, length, 2, line_color)
end #draw_horz_line

def line_color
color = text_color(0)
color.alpha = 80
return color
end #line_color

def window_width
Graphics.width / 2
end #window_width

def window_height
Graphics.height - 48
end #window_height

end #Window_Bestiary_Progress

#===============================================================================
# Window_Monster_Page (Nuova Classe)
#===============================================================================

class Window_Monster_Page < Window_Selectable
include Bestiario

def initialize(id, symbol)
super(window_x,window_y, window_width, window_height)
create_enemy_array
@id = id
@symbol = symbol
draw_block1(0,0)
draw_horz_line(0, line_height, line_width)
draw_horz_line(0, line_height * 9.5, window_width - 24)
draw_block2(0, line_height)
end #initialize

def create_enemy_array
@enemies = []
for i in 0...$data_enemies.length
@enemies.push($data_enemies)
end #for
end #create_enemy_array

def draw_block1(x, y)
draw_name(x, y)
draw_stat(x, y + (line_height*1.5))
draw_sprite(x + line_width + 12, y)
end #draw_block1

def draw_block2(x, y)
draw_elements(x, y*10)
draw_loot(x, y*11)
end #draw_block2

def draw_name(x, y)
contents.fill_rect(x, y, line_width, line_height, Color.new(0,0,0,60))
change_color(normal_color)
draw_text(x, y, line_width, line_height, @enemies[@id].name)
end #draw_name

def draw_stat(x,y)
for i in 0..7
draw_param(x, y + (line_height*i), i)
end #for
end #draw_stat

def draw_param(x, y, param_id)
contents.fill_rect(x, y, line_width, line_height - 4, Color.new(0,0,0,60))
if CONFRONTO_STAT
contents.fill_rect(x, y + line_height - 6, line_width, 2, Color.new(0,0,0,180)) if param_id > 1
media = calcola_media
percentage = (@enemies[@id].params[param_id] * (line_width*0.67)) / media
percentage = line_width if percentage > line_width
contents.fill_rect(x, y + line_height - 6, percentage, 2, text_color(param_id + 2)) if param_id > 1
contents.fill_rect(x, y + line_height - 6, line_width, 2, text_color(param_id + 2)) if param_id <= 1
end #if
change_color(system_color)
draw_text(x, y, line_width, line_height, Vocab::param(param_id))
change_color(normal_color)
draw_text(x, y, line_width, line_height, @enemies[@id].params[param_id], 2)
end #draw_param

def calcola_media
media = 0
for i in 2..7
media += @enemies[@id].params
end #for
media = media / 6
return media
end #calcola_media

def draw_sprite(x,y)
contents.fill_rect(x, y, line_width, line_height * 9.5, Color.new(0,0,0,60))
view_x = x + window_x + 12
view_y = y + window_y + 12
viewport = Viewport.new(view_x,view_y,line_width, line_height * 9.5)
viewport.z = 150
@battler = Sprite.new(viewport)
@battler.bitmap = Cache.battler(@enemies[@id].battler_name + NOME_SPRITE, @enemies[@id].battler_hue)
@battler.ox = @battler.width/ 2
@battler.x = line_width / 2
@battler.oy = @battler.height / 2
@battler.y = (line_height * 9.5) / 2
(@battler.zoom_x -= 0.05 and @battler.zoom_y -= 0.05) until (@battler.width*@battler.zoom_x) <= line_width and (@battler.height*@battler.zoom_y) <= line_height * 9.5
draw_incontri(x) if MOSTRA_INCONTRI
end #draw_sprite

def close
@battler.dispose
super
end #close

def draw_incontri(x)
change_color(system_color)
draw_text(window_width - 24 - line_width, line_height*8.5, line_width, line_height, SCONFITTI)
if calcola_sconfitti >= CAP_SCONFITTI[@symbol] and CAP_SCONFITTI[@symbol] != 0
change_color(text_color(COLORE_CAP))
draw_text(window_width - 24 - line_width, line_height*8.5, line_width, line_height, CAP_SCONFITTI[@symbol], 2)
else
change_color(normal_color)
draw_text(window_width - 24 - line_width, line_height*8.5, line_width, line_height, calcola_sconfitti.to_s + "/" + calcola_incontrati.to_s, 2)
end #if
end #draw_incontri

def calcola_sconfitti
return $game_party.conta_sconfitti(@id)
end #calcola_sconfitti

def calcola_incontrati
return $game_party.conta_incontrati(@id)
end #calcola_incontrati

def draw_elements(x,y)
width = (window_width - 24) / ICONE_ELEMENTI.length
ICONE_ELEMENTI.each_key do |i|
current_x = 1 + x + (width * (i-3))
contents.fill_rect(current_x, y, width - 2, line_height - 2, Color.new(0,0,0,60))
draw_icon(ICONE_ELEMENTI, current_x, y)
value = element_rate(i)
change_color(normal_color)
change_color(text_color(COLORE_RESISTENZA)) if value < 1.0
change_color(text_color(COLORE_NULLO)) if value == 0.0
change_color(text_color(COLORE_DEBOLEZZA)) if value > 1.0
draw_text(current_x, y, width, line_height, sprintf("%d%", value*100), 2)
end #do
end #draw_elements

def draw_loot(x,y)
width = (window_width - 24) / max_loot
contents.fill_rect(x + 1, y, width - 2, line_height - 2, Color.new(0,0,0,60))
change_color(system_color)
draw_text(x + 1, y, width - 2, line_height - 2, EXP_NAME + ":")
change_color(normal_color)
draw_text(x + 1, y, width - 2, line_height - 2, @enemies[@id].exp, 2)
contents.fill_rect(x + 1 + width, y, width - 2, line_height - 2, Color.new(0,0,0,60))
change_color(system_color)
draw_text(x + 1 + width, y, width - 2, line_height - 2, Vocab.currency_unit + ":")
change_color(normal_color)
draw_text(x + 1 + width, y, width - 2, line_height - 2, @enemies[@id].gold, 2)
end #draw_loot

def max_loot
return 2
end #max_loot

def element_rate(i)
element = 1.0
@enemies[@id].features.each do |f|
if f.code == 11
element = f.value if f.data_id == i
end #if
end #do
return element
end #element_rate

def draw_horz_line(x, y, length)
line_y = y + line_height / 4 - 1
contents.fill_rect(x, line_y, length, 2, line_color)
end #draw_horz_line

def line_color
color = text_color(0)
color.alpha = 80
return color
end #line_color

def line_width
(window_width - 36) / 2
end #line_width

def window_width
Graphics.width - 32
end #window_width

def window_height
return 24 + (line_height * 12)
end #window_height

def window_y
(Graphics.height - window_height) / 2
end #window_y

def window_x
(Graphics.width - window_width) / 2
end #window_x

end #Window_Monster_Page

#===============================================================================
# Scene_Bestiary (Nuova Classe)
#===============================================================================

class Scene_Bestiary < Scene_Base

def initialize
super
@category = :comuni
@id = 0
create_bestiary_list
create_bestiary_progress
create_bestiary_category
end #initialize

def create_bestiary_list
@list_window = Window_Bestiary_List.new(@category)
@list_window.activate
@list_window.set_handler(:mostro, method(:disegna_mostro))
@list_window.set_handler(:cancel, method(:return_scene))
end #create_bestiary_list

def create_bestiary_category
@category_window = Window_Bestiary_Category.new
@category_window.activate
@category_window.list_window = @list_window
end #create_bestiary_category

def disegna_mostro
@category = @category_window.current_symbol
@id = @list_window.index
@category_window.deactivate
@list_window.deactivate
index = @list_window.id_for_list(@id)
crea_pagina_mostro(index)
end #disegna_mostro

def crea_pagina_mostro(index)
@monster_window = Window_Monster_Page.new(index, @category)
@monster_window.back_opacity = 255
@monster_window.activate
@monster_window.set_handler(:ok, method(:return_list))
@monster_window.set_handler(:cancel, method(:return_list))
end #crea_pagina_mostro

def return_list
@monster_window.close
@category_window.activate
@list_window.activate
end #return_list

def create_bestiary_progress
@progress_window = Window_Bestiary_Progress.new
end #create_bestiary_progress

end #Scene_Bestiary

#===============================================================================
# Game_Party
#-------------------------------------------------------------------------------
# alias: initialize
# new method: sconfitto?
# new method: conta_sconfitti
# new method: mostro_sconfitto
#===============================================================================

class Game_Party < Game_Unit

alias initialize_bestiario initialize
def initialize
@sconfitto = []
@contatore_kill = []
@incontrato = []
@contatore_incontri = []
@kill_totali = 0
@incontri_totali = 0
initialize_bestiario
end #initialize

def sconfitto?(i)
return true if @sconfitto == true
return false
end #sconfitto?

def incontrato?(i)
return true if @incontrato == true
return false
end #incontrato?

def conta_sconfitti(i)
contatore = @contatore_kill
contatore = 0 if contatore.nil?
return contatore
end #conta_sconfitti

def conta_incontrati(i)
contatore = @contatore_incontri
contatore = 0 if contatore.nil?
return contatore
end #conta_incontrati

def mostro_sconfitto(i)
@contatore_kill = 0 if @contatore_kill.nil?
@contatore_kill += 1
@kill_totali += 1
@sconfitto = true
end #mostro_sconfitto

def mostro_incontrato(i)
@contatore_incontri = 0 if @contatore_incontri.nil?
@contatore_incontri += 1
@incontri_totali += 1
@incontrato = true
end #mostro_incontrato

end #Game_Party

#===============================================================================
# BattleManager
#-------------------------------------------------------------------------------
# alias: battle_end
#===============================================================================

class << BattleManager

alias setup_bestiario setup
def setup(troop_id, can_escape = true, can_lose = false)
setup_bestiario(troop_id, can_escape, can_lose)
$game_troop.members.each {|i| $game_party.mostro_incontrato(i.enemy_id)}
end #setup

alias battle_end_bestiario battle_end
def battle_end(result)
$game_troop.dead_members.each {|i| $game_party.mostro_sconfitto(i.enemy_id)}
battle_end_bestiario(result)
end #battle_end

end #BattleManager


class Game_ActionResult

alias initialize_bestiario initialize
def initialize(battler)
initialize_bestiario(battler)
@total_damage = 0
end

alias make_damage_bestiario make_damage
def make_damage(value, item)
make_damage_bestiario(value, item)
@total_damage += @hp_damage
end

def total_damage
return @total_damage
end

end


#===============================================================================
# Window_MenuCommand
#-------------------------------------------------------------------------------
# alias: add_original_commands
#===============================================================================

class Window_MenuCommand < Window_Command

alias add_original_commands_bestiario add_original_commands
def add_original_commands
add_original_commands_bestiario
add_command(Bestiario::MENU_COMMAND, :bestiary) if $game_switches[bestiario::SWITCH_MENU_ATTIVATO] or Bestiario::SWITCH_MENU_ATTIVATO == 0
end #add_original_commands

end #Window_MenuCommand

#===============================================================================
# Scene_Menu
#-------------------------------------------------------------------------------
# alias: create_command_window
# new method: command_bestiary
#===============================================================================

class Scene_Menu < Scene_MenuBase

alias create_command_window_bestiary create_command_window
def create_command_window
create_command_window_bestiary
@command_window.set_handler(:bestiary, method(:command_bestiary))
end #create_command_window

def command_bestiary
SceneManager.call(Scene_Bestiary)
end #command_bestiary
end #Scene_Menu

 

 

2.Moghunter

 

#==============================================================================
# +++ MOG - MONSTER BOOK (v1.4) +++
#==============================================================================
# By Moghunter
# http://www.atelier-rgss.com/
#==============================================================================
# Sistema que permite verificar os parâmetros dos inimigos derrotados,
# o que inclui o battleback e a música de batalha.
#
#==============================================================================
# Para chamar o script use o comando abaixo.
#
# SceneManager.call(Monster_Book)
#
#==============================================================================

#==============================================================================
# ? Histórico (Version History)
#==============================================================================
# v 1.4 - Correção do Crash quando não há definição de música de batalha.
# v 1.3 - Correção do Crash aleatório.
# v 1.2 - Melhoria no sistema de dispose.
# v 1.1 - Correção na atualização do battleback em imagens repetidas.
# - Correção na execução da música quando o pitch ou volume é diferente.
# - Correção no espaço entre os números de parametros.
#==============================================================================

module MOG_MONSTER_BOOK
#Ocultar inimigos especificos da lista de inimigos.
HIDE_ENEMIES_ID = [9,10]
#Ativar a música de batalha.
PLAY_MUSIC = true
#Definição da palavra Completado.
COMPLETED_WORD = "Completed"
#Ativar o Monster Book no Menu.
MENU_COMMAND = true
#Nome do comando apresentado no menu.
MENU_COMMAND_NAME = "Bestiary"
end

#==============================================================================
# ? Game_Temp
#==============================================================================
class Game_Temp
attr_accessor :bestiary_battleback1_name
attr_accessor :bestiary_battleback2_name

#--------------------------------------------------------------------------
# ? Initialize
#--------------------------------------------------------------------------
alias mog_bestiary_initialize initialize
def initialize
@bestiary_battleback1_name = ""
@bestiary_battleback1_name = ""
mog_bestiary_initialize
end
end

#==============================================================================
# ? Game_System
#==============================================================================
class Game_System

attr_accessor :bestiary_defeated
attr_accessor :bestiary_battleback
attr_accessor :bestiary_music

#--------------------------------------------------------------------------
# ? Initialize
#--------------------------------------------------------------------------
alias mog_monster_book_initialize initialize
def initialize
@bestiary_defeated = []
@bestiary_battleback = []
@bestiary_music = []
mog_monster_book_initialize
end

end

#==============================================================================
# ? Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# ? Initialize
#--------------------------------------------------------------------------
alias mog_bestiary_initialize initialize
def initialize
mog_bestiary_initialize
$game_temp.bestiary_battleback1_name = battleback1_name
$game_temp.bestiary_battleback2_name = battleback2_name
end

end

#==============================================================================
# ? Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
attr_accessor :enemy_id

#--------------------------------------------------------------------------
# ? Die
#--------------------------------------------------------------------------
alias mog_monster_book_die die
def die
mog_monster_book_die
check_monster_book
end

#--------------------------------------------------------------------------
# ? Check Monster Book
#--------------------------------------------------------------------------
def check_monster_book
if $game_system.bestiary_defeated[@enemy_id] == nil
$game_system.bestiary_defeated[@enemy_id] = 0
$game_system.bestiary_battleback[@enemy_id] = [$game_temp.bestiary_battleback1_name,$game_temp.bestiary_battleback2_name]
$game_system.bestiary_music[@enemy_id] = $game_system.battle_bgm
end
$game_system.bestiary_defeated[@enemy_id] += 1
end
end

#==============================================================================
# ? Window_Monster_Status
#==============================================================================

class Window_Monster_Status < Window_Selectable
#--------------------------------------------------------------------------
# ? Initialize
#--------------------------------------------------------------------------
def initialize(enemy)
super(0, 288, 544, 128)
self.opacity = 255
self.z = 300
refresh(enemy)
activate
end

#--------------------------------------------------------------------------
# ? Refresh
#--------------------------------------------------------------------------
def refresh(enemy)
self.contents.clear
if $game_system.bestiary_defeated[enemy.id] == nil
self.contents.draw_text(0,0 , 180, 24, "No Data",0)
else
change_color(system_color)
w_max = 50
ex = 16
self.contents.draw_text(0,0 , w_max, 24, Vocab::param(0),0)
self.contents.draw_text(0,24 * 1 , w_max, 24, Vocab::param(1),0)
self.contents.draw_text(0,24 * 2 , w_max, 24, Vocab::param(2),0)
self.contents.draw_text(0,24 * 3 , w_max, 24, Vocab::param(3),0)
self.contents.draw_text(128,24 * 0 , w_max, 24, Vocab::param(4),0)
self.contents.draw_text(128,24 * 1 , w_max, 24, Vocab::param(5),0)
self.contents.draw_text(128,24 * 2 , w_max, 24, Vocab::param(6),0)
self.contents.draw_text(128,24 * 3 , w_max, 24, Vocab::param(7),0)
self.contents.draw_text(256,24 * 0 , w_max, 24, "Exp",0)
self.contents.draw_text(384,24 * 0 , w_max, 24, Vocab::currency_unit,0)
self.contents.draw_text(256,24 * 1 , w_max, 24, "Treasure",0)
change_color(normal_color,true)
w_max2 = 64
#HP
self.contents.draw_text(32 + ex,0 , w_max2, 24, enemy.params[0],2)
#MP
self.contents.draw_text(32 + ex,24 * 1 , w_max2, 24, enemy.params[1],2)
#ATK
self.contents.draw_text(32 + ex,24 * 2 ,w_max2 , 24, enemy.params[2],2)
#Def
self.contents.draw_text(32 + ex,24 * 3 , w_max2, 24, enemy.params[3],2)
#Mag Power
self.contents.draw_text(160 + ex,24 * 0 , w_max2, 24, enemy.params[4],2)
#Mag Def
self.contents.draw_text(160 + ex,24 * 1 , w_max2, 24, enemy.params[5],2)
#Agility
self.contents.draw_text(160 + ex,24 * 2 , w_max2, 24, enemy.params[6],2)
#Luck
self.contents.draw_text(160 + ex,24 * 3 , w_max2, 24, enemy.params[7],2)
#EXP
self.contents.draw_text(280,24 * 0 , 96, 24, enemy.exp,2)
#Gold
self.contents.draw_text(400,24 * 0 , 96, 24, enemy.gold,2)
#Drop Items
tr = 0
for i in enemy.drop_items
next if i.kind == 0
tr += 1
tr_name = $data_items[i.data_id] if i.kind == 1
tr_name = $data_weapons[i.data_id] if i.kind == 2
tr_name = $data_armors [i.data_id] if i.kind == 3
draw_icon(tr_name.icon_index, 336, 24 * tr)
self.contents.draw_text(368,24 * tr , 160, 24, tr_name.name.to_s,0)
end
end
end
end

#==============================================================================
# ? Window_Monster_List
#==============================================================================
class Window_Monster_List < Window_Selectable

#------------------------------------------------------------------------------
# ? Initialize
#------------------------------------------------------------------------------
def initialize(data)
super(312, 64, 232, 224)
self.opacity = 255
self.z = 301
@index = -1
@data = data
@item_max = @data.size
refresh(data)
select(0)
activate
end

#------------------------------------------------------------------------------
# ? Refresh
#------------------------------------------------------------------------------
def refresh(data)
self.contents.clear
if @item_max > 0
self.contents = Bitmap.new(width - 32, @item_max * 24)
for i in 0...@item_max
draw_item(i)
end
end
end

#------------------------------------------------------------------------------
# ? draw_item MAX
#------------------------------------------------------------------------------
def check_item_max
@data_max = 0
for i in $data_enemies
next if i == nil or MOG_MONSTER_BOOK::HIDE_ENEMIES_ID.include?(i.id)
@data_max += 1
end
end

#------------------------------------------------------------------------------
# ? draw_item
#------------------------------------------------------------------------------
def draw_item(index)
x = 0
y = index / col_max * 24
n_index = index + 1
if $game_system.bestiary_defeated[@data[index].id] == nil
monster_name = "No Data"
defeated = " ---- "
change_color(normal_color,false)
else
monster_name = @data[index].name
change_color(normal_color,true)
end
check_item_max
d = @data_max > 99 ? "%03d" : @data_max > 9 ? "%02d" : "%01d"
text = sprintf(d, n_index).to_s + " - "
self.contents.draw_text(x,y , 56, 24, text,0)
self.contents.draw_text(x + 56,y , 140, 24, monster_name,0)
end

#------------------------------------------------------------------------------
# ? Item Max
#------------------------------------------------------------------------------
def item_max
return @item_max == nil ? 0 : @item_max
end

end

#==============================================================================
# ? Window_Monster_Comp
#==============================================================================
class Window_Monster_Comp < Window_Selectable
include MOG_MONSTER_BOOK

#--------------------------------------------------------------------------
# ? Initialize
#--------------------------------------------------------------------------
def initialize
super(312,0, 232, 64)
self.opacity = 255
self.z = 300
refresh
activate
end

#--------------------------------------------------------------------------
# ? Check Completition
#--------------------------------------------------------------------------
def check_completion
data_max = 0
for i in $data_enemies
next if i == nil or MOG_MONSTER_BOOK::HIDE_ENEMIES_ID.include?(i.id)
data_max += 1
end
comp = 0
for i in 0...$game_system.bestiary_defeated.size
comp += 1 if $game_system.bestiary_defeated != nil
end
@completed = COMPLETED_WORD + " " + comp.to_s + "/" + data_max.to_s
end

#--------------------------------------------------------------------------
# ? Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
check_completion
self.contents.draw_text(0,0, 160, 24, @completed.to_s,0)
end
end

#==============================================================================
# ? Monster_Book
#==============================================================================
class Monster_Book

#--------------------------------------------------------------------------
# ? Main
#--------------------------------------------------------------------------
def main
Graphics.transition
execute_loop
execute_dispose
end

#--------------------------------------------------------------------------
# ? Execute Loop
#--------------------------------------------------------------------------
def execute_loop
loop do
Graphics.update
Input.update
update
break if SceneManager.scene != self
end
end

#--------------------------------------------------------------------------
# ? Initialize
#--------------------------------------------------------------------------
def initialize
load_data
execute_dispose
create_window_guide
create_enemy_sprite
create_battleback
@music = [nil,nil,nil]
refresh_bgm
end

#------------------------------------------------------------------------------
# ? Initialize
#------------------------------------------------------------------------------
def load_data
BattleManager.save_bgm_and_bgs
@data = []
for i in $data_enemies
next if i == nil or MOG_MONSTER_BOOK::HIDE_ENEMIES_ID.include?(i.id)
@data.push(i)
end
end

#--------------------------------------------------------------------------
# ? Execute Dispose
#--------------------------------------------------------------------------
def execute_dispose
return if @windows_guide == nil
Graphics.freeze
@windows_guide.dispose
@windows_guide = nil
@windows_status.dispose
if @enemy_sprite.bitmap != nil
@enemy_sprite.bitmap.dispose
end
@enemy_sprite.dispose
dispose_battleback
@battleback1.dispose
@battleback2.dispose
@window_comp.dispose
BattleManager.replay_bgm_and_bgs
end

#--------------------------------------------------------------------------
# ? Dispose_battleback
#--------------------------------------------------------------------------
def dispose_battleback
if @battleback1.bitmap != nil
@battleback1.bitmap.dispose
@battleback1.bitmap = nil
end
if @battleback2.bitmap != nil
@battleback2.bitmap.dispose
@battleback2.bitmap = nil
end
end

#--------------------------------------------------------------------------
# ? Create Window Guide
#--------------------------------------------------------------------------
def create_window_guide
@windows_guide = Window_Monster_List.new(@data)
@enemy = @data[@windows_guide.index]
@windows_status = Window_Monster_Status.new(@enemy)
@window_comp = Window_Monster_Comp.new
@old_index = @windows_guide.index
@org_pos = [@windows_guide.x,@windows_guide.y]
@fade_time = 60
end

#--------------------------------------------------------------------------
# ? Create Enemy Sprite
#--------------------------------------------------------------------------
def create_enemy_sprite
@enemy_sprite = Sprite.new
@enemy_sprite.z = 100
@enemy_sprite_org = @enemy_sprite.x
refresh_enemy_sprite
end

#--------------------------------------------------------------------------
# ? Create_Battleback
#--------------------------------------------------------------------------
def create_battleback
@battleback1 = Sprite.new
@battleback1.z = 1
@battleback1.opacity = 0
@battleback2 = Sprite.new
@battleback2.z = 2
@battleback2.opacity = 0
@old_battleback = [nil,nil]
refresh_batteback
end

#--------------------------------------------------------------------------
# ? Update
#--------------------------------------------------------------------------
def update
@windows_guide.update
update_command
update_animation
refresh if @old_index != @windows_guide.index
end

#--------------------------------------------------------------------------
# ? Update Animation
#--------------------------------------------------------------------------
def update_animation
update_window_fade_animation
update_battleback_animation
update_enemy_sprite_animation
end

#--------------------------------------------------------------------------
# ? Update Enemy Sprite Animation
#--------------------------------------------------------------------------
def update_enemy_sprite_animation
@enemy_sprite.opacity += 15
if @enemy_sprite.x < @enemy_sprite_org
@enemy_sprite.x += 15
if @enemy_sprite.x >= @enemy_sprite_org
@enemy_sprite.x = @enemy_sprite_org
end
end
end

#--------------------------------------------------------------------------
# ? Update Window Fade Animation
#--------------------------------------------------------------------------
def update_window_fade_animation
if @windows_guide.visible
@windows_guide.opacity += 15
@windows_guide.contents_opacity += 15
if @windows_guide.y > @org_pos[1]
@windows_guide.y -= 25
if @windows_guide.y < @org_pos[1]
@windows_guide.y = @org_pos[1]
@windows_guide.opacity += 255
@windows_guide.contents_opacity = 255
end
end
else
@windows_guide.opacity -= 15
@windows_guide.contents_opacity -= 15
if @windows_guide.y < (@windows_guide.height + 416)
@windows_guide.y += 25
@windows_guide.y = (@windows_guide.height + 416) if @windows_guide.y > (@windows_guide.height + 416)
end
end
end

#--------------------------------------------------------------------------
# ? Update Battleback Animation
#--------------------------------------------------------------------------
def update_battleback_animation
if @old_battleback == nil
@battleback1.opacity -= 10
@battleback2.opacity -= 10
else
@battleback1.opacity += 10
@battleback2.opacity += 10
end
end

#--------------------------------------------------------------------------
# ? Update Command
#--------------------------------------------------------------------------
def update_command
if Input.trigger?(Input::B) or Input.press?(Input::B)
Sound.play_cancel
SceneManager.return
elsif Input.trigger?(Input::C)
Sound.play_ok
return
if @windows_guide.visible
@windows_guide.visible = false
else
@windows_guide.visible = true
end
end
end

#--------------------------------------------------------------------------
# ? Refresh Animation
#--------------------------------------------------------------------------
def refresh
@old_index = @windows_guide.index
@enemy = @data[@windows_guide.index]
@windows_status.refresh(@enemy)
refresh_bgm
refresh_enemy_sprite
refresh_batteback
end

#--------------------------------------------------------------------------
# ? Refresh Animation
#--------------------------------------------------------------------------
def refresh_enemy_sprite
if @enemy_sprite.bitmap != nil
@enemy_sprite.bitmap.dispose
@enemy_sprite.bitmap = nil
end
if $game_system.bestiary_defeated[@enemy.id] != nil
@enemy_sprite.bitmap = Cache.battler(@enemy.battler_name, @enemy.battler_hue)
@enemy_sprite_org = (312/ 2) - (@enemy_sprite.bitmap.width / 2)
@enemy_sprite.x = -@enemy_sprite.bitmap.width
@enemy_sprite.y = 272 - @enemy_sprite.bitmap.height
@enemy_sprite.opacity = 0
end
end

#--------------------------------------------------------------------------
# ? BGM Refresh
#--------------------------------------------------------------------------
def refresh_bgm
return unless MOG_MONSTER_BOOK::PLAY_MUSIC
if $game_system.bestiary_music[@enemy.id] != nil and
(@music[0] != $game_system.bestiary_music[@enemy.id].name or
@music[1] != $game_system.bestiary_music[@enemy.id].volume or
@music[2] != $game_system.bestiary_music[@enemy.id].pitch)
m = $game_system.bestiary_music[@enemy.id]
@music = [m.name, m.volume, m.pitch]
RPG::BGM.stop
Audio.bgm_play("Audio/BGM/" + m.name, m.volume, m.pitch) rescue nil
end
end

#--------------------------------------------------------------------------
# ? Refresh Battleback
#--------------------------------------------------------------------------
def refresh_batteback
if $game_system.bestiary_battleback[@enemy.id] != nil and
(@old_battleback[0] != $game_system.bestiary_battleback[@enemy.id][0] or
@old_battleback[1] != $game_system.bestiary_battleback[@enemy.id][1])
@old_battleback = [$game_system.bestiary_battleback[@enemy.id][0], $game_system.bestiary_battleback[@enemy.id][1]]
dispose_battleback
@battleback1.opacity = 0
@battleback2.opacity = 0
if $game_system.bestiary_battleback[@enemy.id][0] != nil
@battleback1.bitmap = Cache.battleback1($game_system.bestiary_battleback[@enemy.id][0])
else
@battleback1.bitmap = Cache.battleback1("")
end
if $game_system.bestiary_battleback[@enemy.id][1] != nil
@battleback2.bitmap = Cache.battleback2($game_system.bestiary_battleback[@enemy.id][1])
else
@battleback2.bitmap = Cache.battleback2("")
end
end
end

end

if MOG_MONSTER_BOOK::MENU_COMMAND
#==============================================================================
# ? Window Menu Command
#==============================================================================
class Window_MenuCommand < Window_Command

#------------------------------------------------------------------------------
# ? Add Main Commands
#------------------------------------------------------------------------------
alias mog_bestiary_add_main_commands add_main_commands
def add_main_commands
mog_bestiary_add_main_commands
add_command(MOG_MONSTER_BOOK::MENU_COMMAND_NAME, :bestiary, main_commands_enabled)
end
end

#==============================================================================
# ? Scene Menu
#==============================================================================
class Scene_Menu < Scene_MenuBase

#------------------------------------------------------------------------------
# ? Create Command Windows
#------------------------------------------------------------------------------
alias mog_bestiary_create_command_window create_command_window
def create_command_window
mog_bestiary_create_command_window
@command_window.set_handler(:bestiary, method(:Monster_Book))
end

#------------------------------------------------------------------------------
# ? Monster Book
#------------------------------------------------------------------------------
def Monster_Book
SceneManager.call(Monster_Book)
end

end

end

$mog_rgss3_monster_book = true

 

Edited by emanuelespeed

1° Progetto http://www.rpg2s.net/forum/index.php/topic/17667-cheran-e-il-libro-magico/

Genere : Jrpg

Titolo: Cheran e il libro magico

Programma: Rpg Maker Vx Ace

Percentuale completamento: 5%

Orario di gioco attuale 1h 20m

__________________________

 

2° Progetto a presto il link al progetto...

Genere : Jrpg

Titolo: Kyros e la linfa magica

Programma: Rpg Maker Xp

Prime Immagini (Consigli & Modifiche): http://www.rpg2s.net/forum/index.php/topic/17980-immagini-battaglia-e-altro-consiglimodifiche-ecc/

Link to comment
Share on other sites

  • 0

Ok sbaglio mio, avevo dimenticato l'ultima parte....

 

comunque e buono come bestiario ma mostra solo gli Effetto Elemento non L'elementi d'attacco... cosa che mi preme di più

 

o trovato uno perfetto

http://hostpics.altervista.org/uploads/1379276492.png

http://hostpics.altervista.org/uploads/1379282711.png

 

solo che mi da solo un elemento di attacco... se si potrebbe modificare in modo che me li da 2 (a fianco c'è anche posto) sarebbe più che magnifico

 

lascio il codice

 

#==============================================================================
# VX Bestiary by VitorJ (http://vjrgss.blogspot.com/)
#------------------------------------------------------------------------------
# Adiciona um sistema de bestiario, onde tem a lista de monstro, drops
# status, xp e etc...
#------------------------------------------------------------------------------
# Uso comercial e não comercial permitido com os devidos credito.
#Comandos----------------------------------------------------------------------
# Para definir o level do monstro, na caixa de note do mesmo coloque:
#
# Onde X é o level do monstro.
# Para abrir o bestiario use o comando chamar script em um evento:
# SceneManager.call(Scene_Bestiary)
#==============================================================================
module VJBEST
Rank = []
Rank_Color = []
#
No_Name = "?????" #Nome que aparecera caso não tenha matado o monstro ainda
No_Param = "????" #Parametros que apareceram caso não tenha matado o monstro
Count = "Progresso" #Texto que ficara ao lado da % de monstros
Round = 0 #Quantas casas depois da virgula ira mostrar?
Kill_Count = "Ussici" #Texto que mostrara o numero de x que matou o monstro.
Encounter = "Trovati" #Texto que mostrara o numero de x que encontou o monstro.
Rank_N = "Ranking" #Texto de ranking do heroi
NK_Battler = "No_Kill" #Nome do battler que ira aparece caso não tenha matado o monstro.
#Nome do item: caso o monstro não drop, se ainda não tiver descoberto
No_Item = ["------","??????"]
#Cor do texto Icone que ficara no fim do nome de um monstro recem descoberto
#New_Icon = [X,cor]
#Onde x é o index do icone e a cor deve ser no formato: Color.new(r,g,b).
New_Icon = [102,Color.new(255,200,0)]
#Para editar o rank do heroi
#Rank[X] = ["Rank",cor]
#Onde X é a porcentagem de progresso e "Rank" é o rank do heroi entre aspas
#E a cor deve ser no formato: Color.new(r,g,b).
Rank[0] = ["Novizio",Color.new(170,255,255)]
Rank[25] = ["Principiante",Color.new(100,255,180)]
Rank[50] = ["Cacciatore",Color.new(100,170,200)]
Rank[75] = ["Maestro",Color.new(70,255,100)]
Rank[100] = ["Leggenda",Color.new(255,200,0)]

#Nome dos atributos
Attr_Name = ["Vita","Energia","Attaco","Difesa","Att.sp","Dif.sp","Agilità","Fortuna"]
Elements = "Stat. - Efficacia attacchi" #Texto de Elementos (fraqueza/força)
Detail = "Dettagli" #Texto de detalhes
Exp = "Exp" #Texto de experiencia
Kill_R = "% Uccisioni" #Texto de porcentagem de vezes que matou
Damage = "Tipo" #Texto onde mostrara o tipo de dano

end
class Window_Bestiary_Enemies < Window_Command
def initialize
super(0, 0)
update_placement
end
def window_width
return 216
end
def window_height
Graphics.height-104
end
def update_placement
self.x = 0
self.y = 52
end
def make_command_list
@number = []
for i in 1...$data_enemies.size
id = "00"+i.to_s if i < 9
id = "0"+i.to_s if i < 99 and i >= 10
id = i.to_s if i >= 100
@number.push(id)
enabled = $game_party.enemy_killed?(i)
text = VJBEST::No_Name
text = $data_enemies[i].name if enabled
add_command(text,:ok,enabled)
end
end
def item_rect(index)
rect = Rect.new
rect.width = item_width-38
rect.height = item_height
rect.x = index % col_max * (item_width + spacing) + 38
rect.y = index / col_max * item_height
rect
end
def item_rect_for_text(index)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
rect
end
def draw_item(index)
if $game_party.new_monster[index+1]
change_color(VJBEST::New_Icon[1])
else
change_color(normal_color, command_enabled?(index))
end
rect = item_rect_for_text(index)
rect.width += 12
draw_text(rect, command_name(index), alignment)
ix = contents.width-24
draw_icon(VJBEST::New_Icon[0], ix, rect.y) if $game_party.new_monster[index+1]
change_color(normal_color)
rect.x = 0
rect.width = 32
draw_text(rect, @number[index], 2)
end
def index=(index)
@index = index
update_cursor
$game_party.new_monster[index+1] = false if $game_party.new_monster[index+1]
end
end
class Window_Enemy_Status < Window_Base
include VJBEST
def initialize
super(216, 0, window_width,window_height)
@enemy = $data_enemies[0]
refresh
end
def window_width
return Graphics.width-216
end
def window_height
return Graphics.height-0
end
def set_enemy=(id)
return unless @enemy != $data_enemies[id]
@enemy = $data_enemies[id]
refresh
end
def refresh
contents.clear
@battler.dispose if @battler
return unless @enemy
@old_enemy = @enemy
viewport = Viewport.new
viewport.z = self.z + 1
if $game_party.enemy_killed?(@enemy.id)
battler = @enemy.battler_name
b_hue = @enemy.battler_hue
params = @enemy.params
name = @enemy.name
i_name = []
for i in 0..2
item = @enemy.drop_items[i]
item = item_object(item.kind,item.data_id)
if item.nil?
i_name.push(VJBEST::No_Item[0])
else
i_name.push(item.name)
end
end
else
params = []
8.times {|i| params[i] = VJBEST::No_Param }
name = VJBEST::No_Name
battler = VJBEST::NK_Battler
b_hue = 0
i_name = [VJBEST::No_Item[1],VJBEST::No_Item[1],VJBEST::No_Item[1]]
end
box_size = (contents.width/2)

@battler = Sprite.new(viewport)
@battler.bitmap = Cache.battler(battler, b_hue)
@battler.ox = @battler.width/2
@battler.x = self.x + contents.width - (box_size/2)
@battler.zoom_x -= 0.05 until (@battler.width*@battler.zoom_x) <= box_size
@battler.zoom_y -= 0.05 until (@battler.height*@battler.zoom_y) <= box_size-8
@battler.oy = (@battler.height*@battler.zoom_y)/2
@battler.y = (box_size/2)+12
@battler.visible = self.visible
draw_box(contents.width-(box_size+32), 0, (box_size+32), (box_size+32))
change_color(system_color)



draw_box((contents.width-box_size)-32, box_size+32, box_size+32, line_height)
draw_text((contents.width-box_size)-32, box_size+32, box_size+32, line_height, name,1)
for i in 0..7
y = 10+(line_height*i)
x = 0
param = params[i]
param_name = VJBEST::Attr_Name[i]
change_color(normal_color)
nbox_size = box_size-31
draw_box(x, y, nbox_size, line_height)
draw_text(x+2, y, nbox_size, line_height, param_name,0)
size = contents.text_size(param).width + 5
contents.fill_rect((nbox_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
change_color(system_color)
draw_text(x, y, nbox_size, line_height, param,2)
end

y = box_size+60
x = 0
param = $game_party.kill_count(@enemy.id)
param_name = VJBEST::Kill_Count
change_color(normal_color)
draw_box(x, y, box_size, line_height)
draw_text(x+2, y, box_size, line_height, param_name,0)
size = contents.text_size("000").width + 5
contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
change_color(text_color(6))
draw_text(x, y, box_size, line_height, param,2)

y = box_size+60
x = box_size-1
param = $game_party.encounter_count(@enemy.id)
param_name = VJBEST::Encounter
change_color(normal_color)
draw_box(x, y, box_size+1, line_height)
draw_text(x+2, y, box_size, line_height, param_name,0)
size = contents.text_size("000").width + 5
contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
change_color(text_color(14))
draw_text(x, y, box_size, line_height, param,2)
change_color(system_color)
for i in 0..2
y = 240+(line_height*i)
x = 0
param_name = i_name[i]
nbox_size = contents.width
draw_box(x, y, nbox_size, line_height)
draw_text(x+2, y, nbox_size, line_height, param_name,0)
end
end
def item_object(kind, data_id)
return $data_items [data_id] if kind == 1
return $data_weapons[data_id] if kind == 2
return $data_armors [data_id] if kind == 3
return nil
end
def draw_box(x,y,width,height)
height += 1
contents.fill_rect(x, y, width, height, Color.new(255,255,255,100))
contents.fill_rect(x+1, y+1, width-2, height-2, Color.new(0,0,0,100))
end
def dispose
@battler.dispose if @battler
contents.dispose unless disposed?
super
end
def visible=(vis)
super
@battler.visible = vis if @battler
end
end
class Window_Enemy_StatusC < Window_Base
include VJBEST
def initialize
super(216, 0, window_width,window_height)
@enemy = $data_enemies[1]
refresh
end
def window_width
return Graphics.width-216
end
def window_height
return Graphics.height-0
end
def set_enemy=(id)
return unless @enemy != $data_enemies[id]
@enemy = $data_enemies[id]
refresh
end
def refresh
contents.clear
return unless @enemy
change_color(system_color)
draw_box(0,0,contents.width,line_height)
draw_text(2, y, contents.width, line_height, VJBEST::Detail,1)

box_size = contents.width/2
y = line_height*1
x = 0
change_color(normal_color)
draw_box(x,y,box_size,line_height)
draw_text(x+2, y, box_size, line_height, VJBEST::Exp,0)
exp = No_Param
exp = @enemy.exp if $game_party.enemy_killed?(@enemy.id)
size = contents.text_size(exp).width + 5
contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
change_color(system_color)
draw_text(x+2, y, box_size-2, line_height, exp ,2)

y = line_height*1
x = box_size
change_color(normal_color)
draw_box(x,y,box_size,line_height)
draw_text(x+2, y, box_size, line_height, Vocab::level_a,0)
text = "??"
text = get_level(@enemy) if $game_party.enemy_killed?(@enemy.id)
size = contents.text_size(text).width + 5
contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
change_color(system_color)
draw_text(x+2, y, box_size-2, line_height, text ,2)

y = line_height*2
x = 0#box_size
change_color(normal_color)
draw_box(x,y,box_size,line_height)
draw_text(x+2, y, box_size, line_height, Vocab::currency_unit,0)
text = No_Param
text = @enemy.gold if $game_party.enemy_killed?(@enemy.id)
size = contents.text_size(text).width + 5
contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
change_color(system_color)
draw_text(x+2, y, box_size-2, line_height, text ,2)

y = line_height*2
x = box_size
change_color(normal_color)
draw_box(x,y,box_size,line_height)
draw_text(x+2, y, box_size, line_height, VJBEST::Kill_R,0)
text = "???"
text = get_kill_ratio(@enemy) + "%" if $game_party.enemy_killed?(@enemy.id)
size = contents.text_size(text).width + 5
contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
change_color(system_color)
draw_text(x+2, y, box_size-2, line_height, text ,2)


y = line_height*4 + 6
x = 0
draw_box(x,y,contents.width,line_height)
draw_text(x+2, y, contents.width, line_height, VJBEST::Elements,1)

y = line_height*5 + 6
x = 0
draw_box(x,y,box_size,line_height)
change_color(normal_color)
draw_text(x+2, y, box_size, line_height, VJBEST::Damage,0)
val = No_Param
val = get_damage(@enemy) if $game_party.enemy_killed?(@enemy.id)
size = contents.text_size(val).width + 5
contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
change_color(system_color)
draw_text(x+2, y, box_size-2, line_height, val ,2)

elements = get_element(@enemy)
y = line_height*7 + 6
for i in 1...$data_system.elements.size-1
col = (i-1) % 2
x = box_size*col
draw_box(x,y,box_size,line_height)
change_color(normal_color)
draw_text(x+2, y, box_size, line_height, $data_system.elements[i],0)
val = "???"
val = (elements[i]*100).round(0).to_s + "%" if $game_party.enemy_killed?(@enemy.id)
change_color(system_color)
size = contents.text_size(val).width + 5
contents.fill_rect((box_size+x)-size-2, y, 1, line_height, Color.new(255,255,255,100))
draw_text(x+2, y, box_size-2, line_height, val ,2)
y += line_height if col == 1
end
end
def get_damage(enemy)
dam = $data_system.elements[1]
enemy.features.each do |feat|
if feat.code == 31
dam = $data_system.elements[feat.data_id]
end
end
return dam
end
def get_element(enemy)
element = []
for i in 1...$data_system.elements.size-1
element[i] = 1.0
enemy.features.each do |feat|
if feat.code == 11
element[i] = feat.value if feat.data_id == i
end
end
end
return element
end
def get_level(enemy)
level = 1
note = enemy.note.split("\r\n")
note.each do |i|
if i =~ //
level = $1.to_i
end
end
return level
end
def get_kill_ratio(enemy)
enc = $game_party.encounter_count(enemy.id)
kic = $game_party.kill_count(enemy.id)
ratio = kic.fdiv(enc) * 100
return 0.to_s if ratio.nan? or ratio.infinite?
return ratio.round(0).to_s
end
def draw_box(x,y,width,height)
height += 1
contents.fill_rect(x, y, width, height, Color.new(255,255,255,100))
contents.fill_rect(x+1, y+1, width-2, height-2, Color.new(0,0,0,100))
end
end
class Window_Best_Count < Window_Base
def initialize
super(0, 0, window_width,window_height)
refresh
end
def window_width
return 216
end
def window_height
return 52
end
def refresh
contents.clear
draw_text(0, 0, contents.width, line_height, VJBEST::Count,0)
text = $game_party.enemy_count.to_s+"%"
draw_text(0, 0, contents.width, line_height, text,2)
end
end
class Window_Best_Rank < Window_Base
def initialize
super(0, Graphics.height-52, window_width,window_height)
refresh
end
def window_width
return Graphics.width-327
end
def window_height
return 52
end
def refresh
contents.clear
draw_text(0, 0, contents.width, line_height, VJBEST::Rank_N,0)
rank = $game_party.get_rank
change_color(rank[1])
draw_text(0, 0, contents.width, line_height, rank[0],2)
end
end
class Scene_Bestiary < Scene_MenuBase
def start
super
create_command_window
create_enemy_status
create_enemy_status_c
create_enemy_count
create_rank
end
def create_background
super
@background_sprite.tone.set(0, 0, 0, 128)
end
def create_command_window
@command_window = Window_Bestiary_Enemies.new
@command_window.set_handler(:ok, method(:change_status))
@command_window.set_handler(:cancel, method(:return_scene))
end
def create_enemy_status
@enemy_status = Window_Enemy_Status.new
end
def create_enemy_status_c
@enemy_status_c = Window_Enemy_StatusC.new
@enemy_status_c.visible = false
end
def create_enemy_count
@enemy_count = Window_Best_Count.new
end
def create_rank
@rank = Window_Best_Rank.new
end
def update
update_basic
@enemy_status.set_enemy = @command_window.index+1
@enemy_status_c.set_enemy = @command_window.index+1
end
def change_status
@enemy_status.visible = !@enemy_status.visible
@enemy_status_c.visible = !@enemy_status_c.visible
@command_window.activate
end
end
class Game_Party < Game_Unit
attr_accessor :new_monster
alias vjbest_gp_ini initialize
def initialize
@killed_enemies = []
@kill_count = []
@en_encounter = []
@new_monster = []
vjbest_gp_ini
end
def enemy_killed?(i)
return true if @killed_enemies[i] == true
return false
end
def get_rank
rank_list = VJBEST::Rank
rrank = rank_list[0]
rank_list.each do |rank|
if !rank.nil?
pr = rank_list.index(rank)
if pr <= enemy_count
rrank = rank
end
end
end
return rrank
end
def kill_count(i)
kc = @kill_count[i]
kc = 0 if kc.nil?
return kc
end
def encounter_count(i)
ee = @en_encounter[i]
ee = 0 if ee.nil?
return ee
end
def encounter_enemy(i)
@en_encounter[i] = 0 if @en_encounter[i].nil?
@en_encounter[i] += 1
end
def kill_enemy(i)
@new_monster[i] = true if @new_monster[i] != false
@kill_count[i] = 0 if @kill_count[i].nil?
@kill_count[i] += 1
@killed_enemies[i] = true
end
def enemy_count
ke = @killed_enemies.compact.size
ke = 0 if ke < 0
es = $data_enemies.size
calc = ke.fdiv(es) * 100
return calc.round(VJBEST::Round)
end
end

class << BattleManager
alias vjbest_bm_set setup
def setup(troop_id, can_escape = true, can_lose = false)
vjbest_bm_set(troop_id, can_escape, can_lose)
$game_troop.members.each {|enemy| $game_party.encounter_enemy(enemy.enemy_id)}
end
alias vjbest_bm_be battle_end
def battle_end(result)
$game_troop.dead_members.each {|enemy| $game_party.kill_enemy(enemy.enemy_id)}
vjbest_bm_be(result)
end
end

 

Link to comment
Share on other sites

  • 0

150% (nella screen non c'è) sarebbe danno superefficace

130% sarebbe danno efficacie

100% sarebbe danno normale 

70% sarebbe danno poco efficacie

0% sarebbe immune

 

cio che non imposto nei parametri sul database automaticamente me lo mette come danno normale 

 

gli ho dato debolezze/resistenze come sta nel Pokédex... solo zubat e doppio tipo e non mi va di mettere o solo Volante o solo Veleno xD

Edited by Astro86
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...