Invité Invité
| Sujet: [VX] Un autre écran titre. ^^ Lun 19 Sep 2011 - 22:04 | |
| Auteur: Khas IntroductionBon, je sais qu'il y a les tonnes des script de Titre personnalisé, mais aucun d'eux n'a la chute de particules! Alors j'ai décidé de vous faire ce beau script et traînée aujourd'hui. Et comme le goût de faire de quelque chose avec beaucoup de possibilités, j'ai aussi mis le support pour des images infinies, où ils peuvent être statiques, faisant tourner ou vous vous déplacez. Il y a des options infinies, être créatif. Description- Des images infinies (statique, faisant tourner etc...) - Plusieurs options de configuration - la Transition avec l'image (facultatif) - Possibilité de mettre une voie automatique (facultatif) En plein écran - l'utilisation de Renvoi de Fenêtre - la Configuration détaillée pour chaque image Configuration 1 - il y a deux script, il faut les ranger dans cet ordre -KSC v1.1 -Khas Neo Title 2 - créer un dossier dans graphisme du nom de "Title" 3 - Configurer le script 1er script KSC v1.1 - Code:
-
#------------------------------------------------------------------------------- # * [RMVX] Khas Script Core #------------------------------------------------------------------------------- # * This script will activate and enhance compatibility of all Khas' Scripts # * Este script irá ativar a compatibilidade entre todos os scripts Khas #------------------------------------------------------------------------------- # * By Khas (dark_khas@hotmail.com) # * Version: 1.1 # * Released on: 08/06/2010 # #------------------------------------------------------------------------------- # Terms of Use: #------------------------------------------------------------------------------- # * ENGLISH # All Khas' Scripts are licensed under a Creative Commons license # All Khas' Scripts are for non-commercial projects, if you need # them for a commercial game, please send a email to dark_khas@hotmail.com # All Khas' Scripts are for personal use, you can edit them and use in your # own project, but you can't post any modified version without my permission # # * PORTUGUES # Todos os scripts Khas estão sob licença Creative Commons # Todos os scripts Khas são para projetos não comerciais, se você precisar em # seu projeto comercial, envie um email para dark_khas@hotmail.com com o pedido # Todos os scripts Khas são para uso pessoal, você pode usar e editar para uso # no seu projeto, porém você não pode postar nenhuma versão modificada sem # a minha permissão # #------------------------------------------------------------------------------- # Installation: #------------------------------------------------------------------------------- # * ENGLISH # 1) This script should be placed after "Materials" and before any Khas' Scripts # 2) Setup this script in Setup Part below. # # *PORTUGUES # 1)Este script tem que ser colocado depois dos "Scripts Adicionais" e antes # de qualquer script Khas # 2) Configure o script na parte de configuração # #------------------------------------------------------------------------------- # Released Khas' Scripts: #------------------------------------------------------------------------------- # 13/06/2010 - Neo Light Effects 1.0 # 16/06/2010 - Neo Light Reinforce 1.0 # 04/07/2010 - Neo Light Effects 1.3 # 04/07/2010 - Khas Neo Title 1.0 # #------------------------------------------------------------------------------- # Setup Part #------------------------------------------------------------------------------- module Core # Khas scripts language | Lingua dos scripts Khas # 0 - English | 0 - Ingles # 1 - Portuguese | 1 - Portugues Language = 0 #------------------------------------------------------------------------------- # End of Setup Part #-------------------------------------------------------------------------------
@scripts = {} def self.version return 1.1 end def self.register(script,version) @scripts[script] = version end def self.enabled?(script,version=1) en = @scripts.has_key?(script) ? true : false; return en unless en return (en and @scripts[script] >= version) end def self.load_matrix; $pixel_matrix = {} for x in 0..543 $pixel_matrix[x] = {} end for x in 0..543 for y in 0..415 $pixel_matrix[x][y] = (57.3*Math.atan2(272-x,208-y)).to_i end end end def self.require(script,from,version = 1.0) unless @scripts.has_key(script) if Language == 1 p "O script #{from} precisa do script #{script}" p "Por favor, instale o #{script} #{version}" else p "The script #{from} requires #{script}" p "Please install the #{script} #{version}" end exit else unless @scripts[script] >= version if Language == 1 p "#{script} #{version} é antigo" p "Por favor, instale o #{script} #{version}" else p "#{script} #{version} is obsolete" p "Please install the #{script} #{version}" end exit end end end def self.enter_fs $showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ' ' $showm.call(18,0,0,0) $showm.call(13,0,0,0) $showm.call(13,0,2,0) $showm.call(18,0,2,0) end end
$enabled_core = Core.version
module Cache def self.particle(filename) load_bitmap("Graphics/Particles/", filename) end def self.title(filename) load_bitmap("Graphics/Title/", filename) end end
module Bitcore @cached_bitmaps = {} def self.add(bitmap,key) if @cached_bitmaps.has_key?(key) p "Bitcore error!"; p "Cached bitmap: #{key}" else @cached_bitmaps[key] = bitmap end end def self::[](key) return @cached_bitmaps[key] end def self.delete(key) unless @cached_bitmaps.has_key?(key) p "Bitcore error!"; p "Uncached bitmap: #{key}" else @cached_bitmaps[key].dispose @cached_bitmaps.delete(key) end end def self.reset @cached_bitmaps.keys.each { |i| @cached_bitmaps[i].dispose } @cached_bitmaps.clear end def self.cached_bitmaps return @cached_bitmaps.keys end def self.cached_value return @cached_bitmaps.size end end
class Neo_Effect attr_accessor :picture_name attr_accessor :opacity attr_accessor :color attr_accessor :blend_mode attr_accessor :angle attr_accessor :opacity_oscillation attr_accessor :ax attr_accessor :ay attr_accessor :hue_oscillation def initialize(picture, opacity, color=Tone.new(0,0,0), blend_mode=1, ax=0, ay=0, angle=0, op_os=0, hue=0) @picture_name = picture @opacity = opacity @color = color @blend_mode = blend_mode @angle = angle @opacity_oscillation = op_os @ax = ax @ay = ay @hue_oscillation = (hue == 0 ? false : hue) end end
class Title_Effect attr_accessor :picture_name attr_accessor :opacity attr_accessor :position attr_accessor :blend_mode attr_accessor :angle attr_accessor :ax attr_accessor :ay attr_accessor :z def initialize(picture, z=1, op=255, pos=[0,0,0], blend=1, angle=0, ax=0, ay=0) @picture_name = picture @opacity = op @position = pos @blend_mode = blend @angle = angle @ax = ax @ay = ay @z = z end def plane? return (@ax != 0 || @ay != 0) end def rot? return (@angle != 0) end end
class Game_Temp attr_accessor :spriteset alias spr_it initialize def initialize; spr_it @spriteset = nil end end 2éme script Khas Neo Title - Code:
-
#------------------------------------------------------------------------------- # * [RMVX] Khas Neo Title #------------------------------------------------------------------------------- # * Este script cria um Titulo personalizado com particulas. #------------------------------------------------------------------------------- # * By Khas (dark_khas@hotmail.com) # * Version: 1.0 # * Released on: 04/07/2010 # #------------------------------------------------------------------------------- # Termos de uso: #------------------------------------------------------------------------------- # * ENGLISH # All Khas' Scripts are licensed under a Creative Commons license # All Khas' Scripts are for non-commercial projects, if you need # them for a commercial game, please send a email to dark_khas@hotmail.com # All Khas' Scripts are for personal use, you can edit them and use in your # own project, but you can't post any modified version without my permission # # * PORTUGUES # Todos os scripts Khas estão sob licença Creative Commons # Todos os scripts Khas são para projetos não comerciais, se você precisar em # seu projeto comercial, envie um email para dark_khas@hotmail.com com o pedido # Todos os scripts Khas são para uso pessoal, você pode usar e editar para uso # no seu projeto, porém você não pode postar nenhuma versão modificada sem # a minha permissão # #------------------------------------------------------------------------------- # Instalação: #------------------------------------------------------------------------------- # 1) Este script tem que ser colocado depois do "Khas Script Core" # 2) Coloque as imagens utilizadas pelo script na pasta "Graphics/Title/" # 2) Configure o script na parte de configuração # #------------------------------------------------------------------------------- # Habilitar o script - Não altere aqui! #------------------------------------------------------------------------------- if $enabled_core.nil? p "The script 'Neo Title' requires Khas Script Core 1.1 or better" p "Please install Khas Script Core 1.1 or better" exit elsif $enabled_core < 1.1 p "The script 'Neo Title' requires Khas Script Core 1.1 or better" p "Please install Khas Script Core 1.1" exit else Core.register("Neo Title",1.0) end #------------------------------------------------------------------------------- # Configuração: #------------------------------------------------------------------------------- module Neo_Title # Fullscreen automatico Fullscreen = false # Transição ao iniciar Transition = true # Particulas caindo Particle = true # Mudança de opacidade ao iniciar Opacity_Burn = 1 # Nome da fonte Font_Name = "Georgia" # Tamanho da fonte Font_Size = 32 # Cor normal da fonte Font_Normal_Color = Color.new(180,180,180) # Cor desativada da fonte Font_Active_Color = Color.new(255,255,255) # Fonte em negrito Font_Bold = false # Fonte em italico Font_Italic = false # Forca da particula (gravidade) Particle_Force = 1 # Rotação da particula Particle_Angle = 2 # Modo blend da particula Particle_Blend = 1 # Intensidade da particula (a cada X frames) Particle_Intensity = 10 # Declaração de Imagens, não altere aqui! Sprites = [ #------------------------------------------------------------------------------- # Configuração de Imagens #------------------------------------------------------------------------------- # Insira o codigo abaixo para uma nova imagem, veja pre definidos para detalhes. # Title_Effect.new(1, 2, 3, 4, 5, 6, 7, 8) # 1 - Nome da imagem (na pasta Graphics/Title) # 2 - Coordenada z da imagem # 3 - Opacidade da imagem # 4 - Posição da imagem, use [x,y,modo], modo = 0 (Esquerda-acima) ou 1(centro) # 5 - Modo blend, use 0,1 ou 2 # 6 - Rotação # 7 - Movimento X # 8 - Movimento Y # # NÂO ESQUEÇA DE ADICIONAR UMA VIRGULA APOS CRIAR UMA IMAGEM ABAIXO! # #------------------------------------------------------------------------------- # * Adicione suas imagens aqui #-------------------------------------------------------------------------------
Title_Effect.new("title",999,255,[64,0,0]), Title_Effect.new("fog",800,20,[0,0,0],1,0,-1,0), Title_Effect.new("light",1200,150,[40,40,1],1,0.2,0,0), Title_Effect.new("back",500,255,[0,0,0],0,0,1,0),
#------------------------------------------------------------------------------- # Fim da configuração #------------------------------------------------------------------------------- ] end
Core.enter_fs if Neo_Title::Fullscreen
class Scene_Title < Scene_Base include Neo_Title def start super load_database create_game_objects check_continue initialize_particle create_graphics create_cmds play_title_music @index = (@continue_enabled ? 1 : 0) @starting = true update_cmd_color end def terminate super snapshot_for_background dispose_graphics end def create_cmds @cmd = [] @strings = [Vocab::new_game, Vocab::continue, Vocab::shutdown] for k in 0..2 @cmd[k] = Sprite.new @cmd[k].bitmap = Bitmap.new(544,64) @cmd[k].opacity = 0 @cmd[k].ox = 272 @cmd[k].oy = 32 @cmd[k].z = 9999 @cmd[k].x = 272 @cmd[k].y = 272 + k*40 @cmd[k].bitmap.font.name = Font_Name @cmd[k].bitmap.font.size = Font_Size @cmd[k].bitmap.font.italic = Font_Italic @cmd[k].bitmap.font.bold = Font_Bold end end def update_particles if @particle_recover == 0 @particle_recover = Particle_Intensity temp_particle = Sprite.new temp_particle.bitmap = Bitcore["TP"] temp_particle.z = 9999 temp_particle.blend_type = Particle_Blend temp_particle.ox = temp_particle.width/2 temp_particle.oy = temp_particle.height/2 temp_particle.x = rand(544+2*temp_particle.width)-temp_particle.width temp_particle.y = -temp_particle.height @particles << temp_particle else @particle_recover -= 1 end for i in 0..(@particles.size-1) next if @particles[i].nil? @particles[i].y += Particle_Force @particles[i].angle += Particle_Angle next if @particles[i].y <= 416 + @particles[i].height @particles[i].bitmap = nil @particles[i].dispose @particles[i] = nil @particles.delete_at(i) end end def create_graphics if Sprites.size == 0 and $TEST p (Core::Language == 1 ? "Não existem imagens definidas!" : "You didn't set any picture for title!") end @sprites = [] for k in 0..(Sprites.size-1) @sprites[k] = (Sprites[k].plane? ? Plane.new : Sprite.new) @sprites[k].bitmap = Cache.title(Sprites[k].picture_name) @sprites[k].z = Sprites[k].z @sprites[k].opacity = Sprites[k].opacity @sprites[k].blend_type = Sprites[k].blend_mode if not Sprites[k].plane? @sprites[k].x = Sprites[k].position[0] @sprites[k].y = Sprites[k].position[1] @sprites[k].ox = Sprites[k].position[2]*(@sprites[k].width/2) @sprites[k].oy = Sprites[k].position[2]*(@sprites[k].height/2) end end end def update_sprites for k in 0..(Sprites.size-1) next if (!Sprites[k].plane? and !Sprites[k].rot?) if Sprites[k].plane? @sprites[k].ox += Sprites[k].ax @sprites[k].oy += Sprites[k].ay else @sprites[k].angle += Sprites[k].angle @sprites[k].angle -= 360 if @sprites[k].angle >= 360 end end end def dispose_graphics @cmd.each { |sprite| sprite.bitmap.dispose; sprite.dispose} @sprites.each { |sprite| sprite.bitmap.dispose; sprite.dispose} @sprites = nil; @cmd = nil if Particle @particles.each { |p| p.bitmap = nil; p.dispose} Bitcore.delete("TP") end end def update_cmd_color @cmd[0].bitmap.font.color = (@index == 0 ? Font_Active_Color : Font_Normal_Color) @cmd[1].bitmap.font.color = (@index == 1 ? Font_Active_Color : Font_Normal_Color) @cmd[2].bitmap.font.color = (@index == 2 ? Font_Active_Color : Font_Normal_Color) for key in 0..2 @cmd[key].bitmap.clear; @cmd[key].bitmap.draw_text(0, 0, 544, 64, @strings[key] ,1) end end def update super update_sprites update_particles if Particle update_input start_update if @starting end def update_input if Input.trigger?(Input::DOWN) @index += (@index == 2 ? -2 : 1) update_cmd_color; Sound.play_cursor end if Input.trigger?(Input::UP) @index -= (@index == 0 ? -2 : 1) update_cmd_color; Sound.play_cursor end if Input.trigger?(Input::C) case @index when 0; command_new_game when 1; command_continue when 2; command_shutdown end end end def start_update @cmd.each { |k| k.opacity += Opacity_Burn } @starting = (@cmd[2].opacity < 255) end def initialize_particle return if not Particle Bitcore.add(Cache.title("particle"),"TP") @particles = [] @particle_recover = Particle_Intensity end def perform_transition Transition ? Graphics.transition(80, "Graphics/Title/transition", 80) : Graphics.transition(20) end def close_command_window; end def post_start; super; end def pre_terminate; super; end end |
|
Magicalichigo Ancienne staffeuse
Messages postés : 4252 Date d'inscription : 02/08/2011 Jauge LPC :
| Sujet: Re: [VX] Un autre écran titre. ^^ Mar 20 Sep 2011 - 20:50 | |
| Autrement dit, rien ne vaut l'event xD
Je connais les 2 et ils sont sympas, pratique pour les gens qui aiment pas les events ^^ |
|
Magicalichigo Ancienne staffeuse
Messages postés : 4252 Date d'inscription : 02/08/2011 Jauge LPC :
| Sujet: Re: [VX] Un autre écran titre. ^^ Mer 21 Sep 2011 - 18:54 | |
| Chut Garruk xD
Non mais je ne nie pas la puissance des events, qui est bien plus accessible pour moi, même si ces temps ci j'ai du mal avec le système que je veux faire, je sais pas par où commencer --"
Mais c'est pas le sujet excusez moi x)
|
|