Últimos temas
» Script de menupor maxi Jue 04 Dic 2014, 1:44 pm
» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm
» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am
» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am
» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm
» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm
» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am
» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am
» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am
» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am
» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am
» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm
» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am
» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am
» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm
¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado Ninguno
El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm
Script de Journal
5 participantes
RPG maker VX :: Scripts ::
Página 1 de 1.
Script de Journal
Hola a todos otra vez, esta vez les traigo un Script de Journal que lo que hace es mostrar una especie de "Biografia" + Datos de un lugar o un Personaje (+ info en el Script)
- Código:
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# Journal
# Autor: Maxinm
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
#
# Efecto: Este Script logra hacer una Biografia de una persona o un Lugar determinado...
#
# Instrucciones para Usar:
#
# Journal.add_character(ID) = Llamen un Script con este Comando para añadir
# info de un jugador.
#
#
# Journal.add_location(ID) = Llamen un Script con esta Este Comando para añadir
# info de un Mapa
#
#
# $scene = Scene_Journal.new = Llamen un Script con esta Este Comando para abrir
# El Journal (Biografia)
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# Desde aca se puede editar:
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
module Journal
# Poner en True para que la letra se vea más Chica.
Small_Text_Fix = true
#-------------------------------------------------------------------------------
Character_Stats = ['Nombre', 'Clase', 'Edad', 'Altura', 'Peso']
# Aca se Configuran los datos: (Si se quiere agregar más escribir debajo del when 3... esto:
# when X then ['Nombre', 'Clase', 'Edad', 'Altura', 'Peso']
# (Donde X sea el proximo Nº osea si antes del nuevo esta el when 3 escribir when 4, etc)
#
# Tambien hacer lo mismo en la parte de la Biografia
def self.character_info(id)
info = case id
when 1 then ['Ralph', 'Guerrero', '19', '1,60', '45 Kg']
when 2 then ['XXXX', 'Guerrero', '20', '1,65', '65 Kg']
when 3 then ['Maria', 'Maga', '15', '1,50', '26 Kg.']
end
return info != nil ? info : []
end
# Aca la Biografia: (Escribir el Texto)
def self.character_bio(id)
text = case id
when 1
'Un gerrero que tiene una Misión Importante'
when 2
'No se Sabe nada sobre el'
when 3
'La Amiga de Ralph'
end
return text != nil ? text : ''
end
#-------------------------------------------------------------------------------
Location_Stats = ['Nombre', '', '', '']
# Aca se configuran los lugares: (Los espacios libres completalos con lo que se desee)
def self.location_info(id)
info = case id
when 1 then ['', '', '']
when 2 then ['', '', '']
when 3 then ['', '', '']
end
return info != nil ? info : []
end
# Biografia de los Lugares
def self.location_bio(id)
text = case id
when 1
''
when 2
''
when 3
''
end
return text != nil ? text : ''
end
#-------------------------------------------------------------------------------
# Para ver Imagenes en el Journal de Personajes o Lugares ingresar en System las imagenes
# (El nombre de las Imagenes se configura aca abajo) (En este caso: Ralph)
Character_Picture = false # Poniendo en True te pedira las Imagenes de Los personajes
Location_Picture = false # Poniendo en True te pedira las Imagenes de Los lugares
# Nombre de las Imagenes de los Pesonajes en System:
def self.character_pic(id)
filename = case id
when 1 then 'Ralph'
when 2 then ''
when 3 then ''
end
return Cache.system("#{filename}")
end
# Nombre de las Imagenes de los Lugares en System:
def self.location_pic(id)
filename = case id
when 1 then ''
end
return Cache.system("#{filename}")
end
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
# Se Acabo la Configuracion
#+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
def self.add_character(id)
unless $game_system.journal_characters.include?(id)
$game_system.journal_characters.push(id)
$game_system.journal_characters.sort!
end
end
def self.add_location(id)
unless $game_system.journal_locations.include?(id)
$game_system.journal_locations.push(id)
$game_system.journal_locations.sort!
end
end
end
#===============================================================================
# ** Game_System
#===============================================================================
class Game_System
attr_accessor :journal_locations
attr_accessor :journal_characters
alias zer0_journal_init initialize
def initialize
zer0_journal_init
@journal_locations, @journal_characters = [], []
end
end
#===============================================================================
# ** Bitmap (slice_text method by Blizzard)
#===============================================================================
class Bitmap
def slice_text(text, width)
words = text.split(' ')
return words if words.size == 1
result, current_text = [], words.shift
words.each_index {|i|
if self.text_size("#{current_text} #{words[i]}").width > width
result.push(current_text)
current_text = words[i]
else
current_text = "#{current_text} #{words[i]}"
end
result.push(current_text) if i >= words.size - 1}
return result
end
end
#===============================================================================
# ** Window_Journal
#===============================================================================
class Window_Journal < Window_Base
attr_reader :type # Type 0 is character, Type 1 is location
def initialize
super(128, 0, 512, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@type = 0
refresh
end
def type=(type)
@type = type
refresh
end
def id=(id)
@id = id
refresh
end
def refresh
self.contents.clear
return if @id == nil
stats = @type == 0 ? Journal::Character_Stats : Journal::Location_Stats
info = @type == 0 ? Journal.character_info(@id) : Journal.location_info(@id)
bio = @type == 0 ? Journal.character_bio(@id) : Journal.location_bio(@id)
bio = self.contents.slice_text(bio, 472)
if (Journal::Character_Picture && @type == 0) ||
(Journal::Location_Picture && @type == 1)
bitmap = @type == 0 ? Journal.character_pic(@id) : Journal.location_pic(@id)
rect = Rect.new(0, 0, bitmap.width, bitmap.height)
x = 128 + ((352 - bitmap.width) / 2)
self.contents.blt(x, 0, bitmap, rect)
end
self.contents.font.color = system_color
y = Journal::Small_Text_Fix ? 20 : 32
stats.each_index {|i| self.contents.draw_text(0, i*(y*2), 128, y, stats[i])}
self.contents.draw_text(0, 320, 128, y, 'Biography')
self.contents.font.color = normal_color
info.each_index {|i| self.contents.draw_text(8, y+i*(y*2), 128, y, info[i])}
bio.each_index {|i| self.contents.draw_text(8, (320+y)+i*y, 480, y, bio[i])}
end
end
#===============================================================================
# ** Scene_Journal
#===============================================================================
class Scene_Journal
#-------------------------------------------------------------------------------
def main
characters, locations = [], []
$game_system.journal_characters.each {|id|
characters.push(Journal.character_info(id))}
$game_system.journal_locations.each {|id|
locations.push(Journal.location_info(id))}
characters.each_index {|i| characters[i] = characters[i][0]}
locations.each_index {|i| locations[i] = locations[i][0]}
characters.push('') if characters.empty?
locations.push('') if locations.empty?
@journal_window = Window_Journal.new
@type_window = Window_Command.new(128, ['People', 'Locations'])
@char_window = Window_Command.new(128, characters)
@locs_window = Window_Command.new(128, locations)
@char_window.y = @locs_window.y = 96
@char_window.height = @locs_window.height = 384
@char_window.active = @locs_window.active = false
@char_window.index = @locs_window.index = -1
@windows = [@journal_window, @type_window, @char_window, @locs_window]
@char_window.visible, @locs_window.visible = true, false
Graphics.transition
loop {Graphics.update; Input.update; update; break if $scene != self}
Graphics.freeze
@windows.each {|window| window.dispose}
end
#-------------------------------------------------------------------------------
def update
@windows.each {|window| window.update}
if @type_window.active
update_type_select
elsif @char_window.active
update_character_select
elsif @locs_window.active
update_location_select
end
end
#-------------------------------------------------------------------------------
def update_type_select
if Input.trigger?(Input::B)
$data_system.sounds[2].play
$scene = Scene_Map.new
return
elsif Input.trigger?(Input::UP) || Input.trigger?(Input::DOWN)
@journal_window.type = @type_window.index
if @journal_window.type == 0
@char_window.visible, @locs_window.visible = true, false
else
@char_window.visible, @locs_window.visible = false, true
end
elsif Input.trigger?(Input::C)
if (@type_window.index == 0 && $game_system.journal_characters.empty?) ||
(@type_window.index == 1 && $game_system.journal_locations.empty?)
$data_system.sounds[3].play
return
elsif @type_window.index == 0
@char_window.active, @char_window.index = true, 0
@journal_window.id = $game_system.journal_characters[0]
elsif @type_window.index == 1
@locs_window.active, @locs_window.index = true, 0
@journal_window.id = $game_system.journal_locations[0]
end
@type_window.active = false
end
end
#-------------------------------------------------------------------------------
def update_character_select
if Input.trigger?(Input::B)
$data_system.sounds[2].play
@journal_window.id, @char_window.index = nil, -1
@char_window.active, @type_window.active = false, true
elsif Input.trigger?(Input::UP) || Input.trigger?(Input::DOWN)
@journal_window.id = $game_system.journal_characters[@char_window.index]
end
end
#-------------------------------------------------------------------------------
def update_location_select
if Input.trigger?(Input::B)
$data_system.sounds[2].play
@journal_window.id, @locs_window.index = nil, -1
@locs_window.active, @type_window.active = false, true
elsif Input.trigger?(Input::UP) || Input.trigger?(Input::DOWN)
@journal_window.id = $game_system.journal_locations[@locs_window.index]
end
end
end
maxi- Moderador
-
28
908
1673
156
Extras
Sobre mí:: ¿Necesitas Una Mano en el Maker VX o VX ACE? ¡Ponte en Contacto Conmigo! :)
Re: Script de Journal
Podrias poner una imagen para que la vea, si quieres, porque no es obligatorio.
Borre- 500
-
38
1660
1362
41
Extras
Sobre mí::
Re: Script de Journal
Claro que si pongo 2:
Una Sin Face (Por defecto)
[Tienes que estar registrado y conectado para ver esa imagen]
Y con Face:
[Tienes que estar registrado y conectado para ver esa imagen]
Una Sin Face (Por defecto)
[Tienes que estar registrado y conectado para ver esa imagen]
Y con Face:
[Tienes que estar registrado y conectado para ver esa imagen]
maxi- Moderador
-
28
908
1673
156
Extras
Sobre mí:: ¿Necesitas Una Mano en el Maker VX o VX ACE? ¡Ponte en Contacto Conmigo! :)
Re: Script de Journal
Yo tambien, gracias por ponerlo +1
Esto va a servir y mucho.
Muchas gracias.
Esto va a servir y mucho.
Muchas gracias.
Borre- 500
-
38
1660
1362
41
Extras
Sobre mí::
Re: Script de Journal
Lo mejor que he visto hasta ahora muy original y util +1
26fof- 220
-
104
223
315
48
Extras
Sobre mí:: Nah
Re: Script de Journal
26Fof , ya llevas un tiempo en el foro , como para saber que no se pueden revivir temas . Cierro tema y subo tu ban.
Shadow97- Moderador
-
26
2021
4907
104
Temas similares
» Script de Minimapa T.T
» Script de Teletransportacion... (Warp)
» Script: Cambio de Clase Sencillo(CCS) V.1.0.0Mi primer script.
» Script de video 100% funcional
» Script de zoom
» Script de Teletransportacion... (Warp)
» Script: Cambio de Clase Sencillo(CCS) V.1.0.0Mi primer script.
» Script de video 100% funcional
» Script de zoom
RPG maker VX :: Scripts ::
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.