Vai al contenuto

Rilevato Ad-Blocker. Per favore disabilita il tuo adblocker quando navighi su makerando.com - Non c'è nessun annuncio invasivo.

  • Chatbox

    You don't have permission to chat.
    Load More
Ally

Gameplay Neo Light Effects

Recommended Posts

Nome Script: Neo Light Effects
Versione: 1.0
Autore/i: Khas

Informazioni:
Un ottimo script usato per creare effetti di luce nel gioco ^^
Richiede lo script Khas Script Core: http://rpgmkr.net/forum/topic/1102-khas-script-core/

Screenshots:

11ju6h4.jpg
289vv6e.jpg
2u4swlj.jpg



Istruzioni:
Inserite lo script sotto il Khas Script Core.
Inserite le immagini dentro la cartella Graphics/Particles.
Tutto il resto lo potete trovare dentro la demo ;)

Script:

#-------------------------------------------------------------------------------
# * [RMVX] Neo Light Effects
#-------------------------------------------------------------------------------
# * Este script cria efeitos usando imagens
#-------------------------------------------------------------------------------
# * By Khas ([email protected])
# * Version: 1.0
# * Released on: 13/06/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 [email protected]
# 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 [email protected] 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/Particles/"
# 2) Configure o script na parte de configuração
#
#-------------------------------------------------------------------------------
# Como usar:
#-------------------------------------------------------------------------------
# Para colocar um efeito de luz sobre um evento simplesmente coloque um
# comentario dentro dele com o nome do efeito. Efeitos pré definidos:
#
# Light
# Fire
# Torch
# Window
# Door
# Shine
# Sparkle
# Rainbow
# Blood
# Leaf
# Xenon
#
#-------------------------------------------------------------------------------
# Habilitar o script - Não altere aqui!
#-------------------------------------------------------------------------------
if $enabled_core.nil?
  p "The script 'Neo Light Effects' requires Khas Script Core 1.0 or better"
  p "Please install Khas Script Core 1.0 or better"
  exit
elsif $enabled_core < 1
  p "The script 'Neo Light Effects' requires Khas Script Core 1.0 or better"
  p "Please install Khas Script Core 1.0"
  exit
else
  Core.register("Neo Light Effects",1.0)
end

#-------------------------------------------------------------------------------
# Configuração:
#-------------------------------------------------------------------------------
module Neo_Light
  # Coloque abaixo o ID da switch que desliga os efeitos
  Neo_Light_Switch = 1
  # Declaração de efeitos, não altere aqui!
  Effects = {
#-------------------------------------------------------------------------------
# Configuração de efeitos
#-------------------------------------------------------------------------------
# * Modo Facil
# "nome do efeito" => Neo_Effect.new(1,2),
# 1 - Nome da imagem, na pasta "GraphicsParticles"
# 2 - Opacidade, use 0~255
#
# * Modo avançado
# "nome do efeito" => Neo_Effect.new(1,2,3,4,5,6,7,8,9),
# 1 - Nome da imagem, na pasta "GraphicsParticles"
# 2 - Opacidade, use 0~255
# 3 - Tom da imagem, use Tone.new(R,G,
# 4 - Blend Mode, use 1~2
# 5 - Efeito X, use 0~64 (valores baixos funcionam melhor)
# 6 - Efeito Y, use 0~64 (valores baixos funcionam melhor)
# 7 - Oscilação de Angulo, use 0~180 (valores baixos funcionam melhor)
# 8 - Oscilação de Opacidade, use 0~120 (valores baixos funcionam melhor)
# 9 - Oscilação de Hue, use 0~180 (valores baixos funcionam melhor)
#
# Veja os efeitos pre definidos para detalhes
#
# NÂO ESQUEÇA DE ADICIONAR UMA VIRGULA APOS CRIAR UM EFEITO ABAIXO!
#
#-------------------------------------------------------------------------------
# * Adicione seus efeitos aqui
#-------------------------------------------------------------------------------



#-------------------------------------------------------------------------------
# * Efeitos Custom
#-------------------------------------------------------------------------------
"Window" => Neo_Effect.new("window",100),
"Door" => Neo_Effect.new("light3",100),
"Shine" => Neo_Effect.new("light2",150,Tone.new(0,0,0),1,0,0,1,0,0),
"Sparkle" => Neo_Effect.new("sparkle",150,Tone.new(0,0,0),1,0,0,3,0,7),
"Rainbow" => Neo_Effect.new("circle",150,Tone.new(0,0,0),1,0,0,-2,0,4),
"Blood" => Neo_Effect.new("fire",180,Tone.new(255,-230,-230),1,0,0,0,0,0),
"Leaf" => Neo_Effect.new("fire",130,Tone.new(-150,255,-150),1,0,0,0,0,0),
"Xenon" => Neo_Effect.new("fire",180,Tone.new(-200,-200,255),1,0,0,0,0,0),

#-------------------------------------------------------------------------------
# * Efeitos Classicos
#-------------------------------------------------------------------------------
"Light" => Neo_Effect.new("light1",100),
"Fire" => Neo_Effect.new("fire",110,Tone.new(255,-100,-255),1,3,3,0,-20,0),
"Torch" => Neo_Effect.new("fire_big",110,Tone.new(255,-100,-255),1,1,1,0,-20,0),

#-------------------------------------------------------------------------------
# Fim da configuração
#-------------------------------------------------------------------------------
  }
  def self.bc_sprites; bitmaps = []
    Effects.keys.each { |i|
    bitmaps << Effects[i].picture_name unless bitmaps.include?(Effects[i].picture_name) }
    bitmaps.each { |i| Bitcore.add(Cache.particle(i), "neole_#{i}") }
  end; bc_sprites
end

class Game_Event < Game_Character
  include Neo_Light
  alias nle_ini initialize
  alias nle_stp setup
  alias nle_up update
  def initialize(map_id, event)
    @nl_effect = false
    @nl_sprite = nil
    nle_ini(map_id, event)
  end
  def setup(new_page)
    nle_stp(new_page)
    refresh_light(new_page.nil?)
  end
  def update; nle_up
    update_light unless !@nl_effect
  end
  def update_light
    @nl_sprite.visible = !$game_switches[Neo_Light_Switch]
    @nl_sprite.x = self.screen_x
    @nl_sprite.y = self.screen_y - 16
    @nl_sprite.x += (rand(Effects[@nl_effect].ax*2)-Effects[@nl_effect].ax)
    @nl_sprite.y += (rand(Effects[@nl_effect].ay*2)-Effects[@nl_effect].ay)
    @nl_sprite.opacity = Effects[@nl_effect].opacity + rand(Effects[@nl_effect].opacity_oscillation)
    @nl_sprite.angle += Effects[@nl_effect].angle
    @nl_sprite.angle -= 360 if @nl_sprite.angle >= 360
    @nl_sprite.bitmap.hue_change(Effects[@nl_effect].hue_oscillation) unless !Effects[@nl_effect].hue_oscillation
  end
  def refresh_light(dispose_light=false)
    unless @nl_effect == false
      @nl_sprite.bitmap = nil
      @nl_sprite.dispose
    end
    @nl_effect = false
    unless dispose_light
      for key in [email protected]
        next unless @list[key].code == 108
        for string in Effects.keys
          @nl_effect = string if @list[key].parameters == [string]
        end
      end
      if @nl_effect != false
        @nl_sprite = Sprite.new
        @nl_sprite.bitmap = Bitcore["neole_"+Effects[@nl_effect].picture_name]
        @nl_sprite.ox = @nl_sprite.width/2
        @nl_sprite.oy = @nl_sprite.height/2
        @nl_sprite.x = 544 + 2*@nl_sprite.width
        @nl_sprite.y = 416 + 2*@nl_sprite.height
        @nl_sprite.z = $game_player.screen_z
        @nl_sprite.blend_type = Effects[@nl_effect].blend_mode
        @nl_sprite.opacity = Effects[@nl_effect].opacity
        @nl_sprite.tone = Effects[@nl_effect].color
        update_light if $scene.is_a?(Scene_Map)
      end
    end
  end
  def dispose_nl
    unless @nl_effect == false
      @nl_sprite.bitmap = nil
      @nl_sprite.dispose
      @nl_effect = false
    end
  end
end

class Game_Map
  alias nle_setup setup
  def setup(map_id)
    dispose_neolight
    nle_setup(map_id)
  end
  def dispose_neolight
    return if @events.nil?
    @events.keys.each { |id| $game_map.events[id].dispose_nl }
  end
  def force_light_refresh
    return if @events.nil?
    @events.keys.each { |id| $game_map.events[id].refresh_light }
  end
end

class Scene_Map < Scene_Base
  alias nle_terminate terminate
  alias nle_start start
  def terminate; nle_terminate
    $game_map.dispose_neolight
  end
  def start; nle_start
    $game_map.force_light_refresh
  end
end
Demo:
http://www.mediafire.com/?zmcz2n2jjwy

Condividi questo messaggio


Link di questo messaggio
Condividi su altri siti

Crea un account o accedi per lasciare un commento

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

Crea un account

Iscriviti per un nuovo account nella nostra comunità. È facile!

Registra un nuovo account

Accedi

Sei già registrato? Accedi qui.

Accedi Ora

  • Contenuti simili

    • Da Ally
      Nome Script: Napoleon's Minimap V1.06a
      Versione: 1.06a
      Autore/i: Napoleon
       
      Informazioni:
      Mini-Map script molto bello e personalizzabile con varie opzioni =)
       
      Screenshots:
       
       
      Istruzioni:
      Istruzioni e script all'interno della demo.
       
      Demo:
      https://www.dropbox.com/s/jm92rbqb5eadryr/Napoleons%20Master%20Demo.zip
    • Da Ally
      Nome Script: Camminata 8 Direzioni
      Versione: N/D
      Autore/i: Raizen884
       
      Informazioni:
      Script che simula le 8 direzioni di camminata.
       
      Istruzioni:
      Inserite lo script sotto Material.
       
      Script:
       
      #=======================================================# Engine 8 direções.# Autor: Raizen884# Mude completamente o seu jogo de 4 direções, para# 8 direções. O script vai adicionar movimentos em 8# direções para o personagem e para todos os eventos# no jogo.#=======================================================class Game_Player < Game_Character def move_by_input return if !movable? || $game_map.interpreter.running? move_diagonal(4, 2) if Input.dir8 == 1 move_straight(2) if Input.dir8 == 2 move_diagonal(6, 2) if Input.dir8 == 3 move_straight(4) if Input.dir8 == 4 move_diagonal(6, 8) if Input.dir8 == 9 move_straight(6) if Input.dir8 == 6 move_diagonal(4, 8) if Input.dir8 == 7 move_straight(8) if Input.dir8 == 8 end def move_diagonal(horz, vert) @followers.move if diagonal_passable?(@x, @y, horz, vert) check_event_trigger_touch(@x+1, @y+1) if horz == 6 and vert == 2 check_event_trigger_touch(@x+1, @y-1) if horz == 6 and vert == 8 check_event_trigger_touch(@x-1, @y-1) if horz == 4 and vert == 8 check_event_trigger_touch(@x-1, @y+1) if horz == 4 and vert == 2 super endendclass Game_Character < Game_CharacterBase def move_toward_character(character) sx = distance_x_from(character.x) sy = distance_y_from(character.y) if sx.abs > sy.abs and sy == 0 move_straight(sx > 0 ? 4 : 6) move_straight(sy > 0 ? 8 : 2) if !@move_succeed && sy != 0 elsif sx.abs > sy.abs and sy > 0 if sx > 0 move_diagonal(4, 8) else move_diagonal(6, 8) end elsif sx.abs > sy.abs and sy < 0 if sx > 0 move_diagonal(4, 2) else move_diagonal(6, 2) end end if sx.abs <= sy.abs and sx == 0 move_straight(sy > 0 ? 8 : 2) move_straight(sx > 0 ? 4 : 6) if !@move_succeed && sx != 0 elsif sx.abs <= sy.abs and sx > 0 if sy > 0 move_diagonal(4, 8) else move_diagonal(4, 2) end elsif sx.abs <= sy.abs and sx < 0 if sy > 0 move_diagonal(6, 8) else move_diagonal(6, 2) end endend def move_random case rand(2) when 0 move_straight(2 + rand(4) * 2, false) when 1 move_diagonal(2 + rand(4) * 2, 2 + rand(4) * 2) end end def move_away_from_character(character) sx = distance_x_from(character.x) sy = distance_y_from(character.y) if sx.abs > sy.abs and sy == 0 move_straight(sx > 0 ? 6 : 4) move_straight(sy > 0 ? 2 : 8) if !@move_succeed && sy != 0 elsif sx.abs > sy.abs and sy < 0 if sx < 0 move_diagonal(4, 8) else move_diagonal(6, 8) end elsif sx.abs > sy.abs and sy > 0 if sx > 0 move_diagonal(6, 2) else move_diagonal(4, 2) end end if sx.abs <= sy.abs and sx == 0 move_straight(sy > 0 ? 2 : 8) move_straight(sx > 0 ? 6 : 4) if !@move_succeed && sx != 0 elsif sx.abs <= sy.abs and sx < 0 if sy > 0 move_diagonal(4, 2) else move_diagonal(4, 8) end elsif sx.abs <= sy.abs and sx > 0 if sy < 0 move_diagonal(6, 8) else move_diagonal(6, 2) end endendend
    • Da Ally
      Nome Script: Overlay Mapping
      Versione: del 16.04.2012
      Autore/i: Yami
       
      Informazioni:
      Questo script permette di poter utilizzare i vari livelli di parallasse per mappare all'interno del vostro progetto di RPG Maker VX Ace.
       
      Screenshots:

       
      Istruzioni:
      Create una cartella dentro "Graphics" chiamata Overlay (nome progetto/Graphic/Overlay).
      Potete creare fino a 4 tipi di immagini:
      • Ground (parte base della mappa - va SOTTO a tutto)
      • Par (parte alta della mappa - va SOPRA a tutto e copre gli eventi e il personaggio - vedi albero)
      • Light (crea effetti di luce statici)
      • Shadow (crea effetti di ombra statici)
       
      Le immagini della vostra mappa dovranno essere nominate in base alla loro funzione:
      • Il prato è un ground
      • Gli alberi e tutto quello che è sopra al livello dell'eroe è un par
      • Le luci e le ombre sono rispettivamente light e shadow
       
      Esempio:
      Io ho creato un prato con degli alberi come nell'immagine sopra.
      Tutto questo andrà inserito all'interno delle prima mappa del gioco (quindi ID:0001); di conseguenza chiamerò la mia immagine del prato cosi: Ground1_1 (il primo 1 è l'ID della mappa nel quale il prato verrà visualizzato; il secondo 1 è usato se, per esempio, nella stessa mappa volete creare più versioni: ground1_1 versione normale ground1_2 versione distruzione, per esempio); L'immagine deve essere in PNG.
      Gli alberi andranno salvati cosi: Par1_1 (i numeri seguono lo stesso principio spiegato sopra); L'immagine deve essere in PNG.
      Le luci e le ombre (se presenti) andranno salvate con lo stesso principio spiegato sopra (light1_1 e Shadow1_1); L'immagine deve essere in JPG.
       
      (se questo prato dovrà essere messo nell mappa con ID 23 le immagini saranno chiamate ground23_1, par23_1, light23_1 e shadow23_1)
       
      Spero di essere stato chiaro D:
       
      Script:
       
       
      F.A.Q:
      N/D
       
      Demo:
      N/D
       
      Incompatibilità:
      N/D
       
      Note dell'autore:
      N/D
    • Da Ally
      Nome Script: Lune Ultimate Anti-Lag
      Versione: N/D
      Autore/i: Raizen
       
      Informazioni:
      Lo script Anti-Lag ormai è un must have da inserire nei propri progetti.
      Infatti consente di migliorare le prestazioni nonostante i troppi eventi, script, etc...
       
      Istruzioni:
      Inserite lo script sotto Material e configuratelo se necessario...
       
      Script:
       
       
      #=======================================================# Lune Ultimate Anti-Lag# Author: Raizen# Compatible with: RMVXAce# Comunity: centrorpg.com# This script allows a very well balanced anti-lag, in which# considers the own PC of the player, using a smart frame-skipper# to slow lags,#========================================================#To update constantly the event, put a commentary on the first# command of the script written :update:module Anti_conf#==============================================================================# ** Configurations#------------------------------------------------------------------------------# Configure what is necessary for a better performance.#==============================================================================# Choose how the script will act.# <=====Quality============================Performance=====># 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20# Default = 10Fr = 10# Configure the FPS rate (default = 60)Fps = 60# Configure the minimum FPS rate (default = 25)Mini = 25# Quantity of frames the anti-lag will study,# the higher the time, the more precise the script,# but will take longer to load the anti-lagTime = 60end=beginFunctions on this Anti-Lag* Common event positioning bug fixed* Smart Frame Skipper* updates what is only necessary* helps to lower lags from visual system/scripts* Changes its behavior according to the players PC* Increases the RPG Maker priority over other programs=end#=================================================================##=================================================================##==================== Alias methods =============================## command_203 => Game_Interpreter# start => Scene_Map# update => Scene_Map# perform_transfer => Scene_Map#=================================================================##==================== Rewrite methods ===========================## update_events => Game_Map# update_one_event => Spriteset_Map#=================================================================##======================== New methods ===========================## need_to_update? => Game_Event# near_the_screen? => Sprite_Character# call_position_event => Scene_Map# skip_calculate => Scene_Map# update_one_event => Spriteset_Map#=================================================================##=================================================================##==============================================================================#============================ Início do Script! =============================#==============================================================================#==============================================================================# ** Scene_Map#------------------------------------------------------------------------------# Esta classe executa o processamento da tela de mapa.#==============================================================================class Scene_Map < Scene_Basealias lune_skip_start startalias lune_skip_update updatealias lune_perform perform_transfer #-------------------------------------------------------------------------- # * Inicialização do processo #-------------------------------------------------------------------------- def start Graphics.frame_rate = Anti_conf::Fps @update_skip = false @count_up = 0 lune_skip_start end #-------------------------------------------------------------------------- # * Execução da transferência #-------------------------------------------------------------------------- def perform_transfer $get_new_ids = Array.new Graphics.frame_rate = Anti_conf::Fps lune_perform @count_up = 0 @update_skip = false end #-------------------------------------------------------------------------- # * Atualização da tela #-------------------------------------------------------------------------- def update @update_skip ? lune_skip_update : skip_calculate end #-------------------------------------------------------------------------- # * Atualização de um personagem especifico #-------------------------------------------------------------------------- def call_position_event(id) @spriteset.update_one_event(id) end #-------------------------------------------------------------------------- # * Calcula o tempo necessário para rodar o update do Scene_Map #-------------------------------------------------------------------------- def skip_calculate @count_up += 1 return unless @count_up >= Anti_conf::Time auto_skip = Time.now lune_skip_update old_skip = Time.now get_skip = old_skip - auto_skip Graphics.frame_rate -= (get_skip * Graphics.frame_rate * 2 * Anti_conf::Fr - 1).to_i Graphics.frame_rate = [Graphics.frame_rate, Anti_conf::Mini].max @update_skip = true endend#==============================================================================# ** Scene_Base#------------------------------------------------------------------------------# Esta é a superclasse de todas as cenas do jogo.#==============================================================================class Scene_Basealias skipper_main main #-------------------------------------------------------------------------- # * Processamento principal #-------------------------------------------------------------------------- def main @fr_cont = 0 skipper_main end #-------------------------------------------------------------------------- # * Execução da transição #-------------------------------------------------------------------------- def perform_transition Graphics.transition(transition_speed * Graphics.frame_rate / 60) end #-------------------------------------------------------------------------- # * Atualização da tela (básico) #-------------------------------------------------------------------------- def update_basic if @fr_cont >= 60 Graphics.update @fr_cont -= 60 end @fr_cont += Graphics.frame_rate update_all_windows Input.update endend#==============================================================================# ** Aumento da prioridade do rpg maker#------------------------------------------------------------------------------Lune_high = Win32API.new("kernel32", "SetPriorityClass", "pi", "i")Lune_high.call(-1, 0x90)#==============================================================================#==============================================================================# ** Game_Event#------------------------------------------------------------------------------# Esta classe gerencia os eventos. Ela controla funções incluindo a mudança# de páginas de event por condições determinadas, e processos paralelos.# Esta classe é usada internamente pela classe Game_Map.#==============================================================================class Game_Event < Game_Character #-------------------------------------------------------------------------- # * necessário atualizar? #-------------------------------------------------------------------------- def need_to_update? ax = $game_map.adjust_x(@real_<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> - 8 ay = $game_map.adjust_y(@real_y) - 6 ax.between?(-9, 9) && ay.between?(-7, 7) || @list[0].parameters.include?(':update:') endend#==============================================================================# ** Sprite_Character#------------------------------------------------------------------------------# Este sprite é usado para mostrar personagens. Ele observa uma instância# da classe Game_Character e automaticamente muda as condições do sprite.#==============================================================================class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # * Evento próximo a tela? #-------------------------------------------------------------------------- def near_the_screen? ax = $game_map.adjust_x(@character.<img src='http://rpgmkr.net/forum/public/style_emoticons/<#EMO_DIR#>/sourirex.gif' class='bbc_emoticon' alt='X)' /> - 8 ay = $game_map.adjust_y(@character.y) - 6 ax.between?(-11, 11) && ay.between?(-8, 8) endend#==============================================================================# ** Game_Event#------------------------------------------------------------------------------# Esta classe gerencia os eventos. Ela controla funções incluindo a mudança# de páginas de event por condições determinadas, e processos paralelos.# Esta classe é usada internamente pela classe Game_Map.#==============================================================================class Game_Event < Game_Characteralias lune_ant_initialize initialize #-------------------------------------------------------------------------- # * Inicialização do objeto # event : RPG::Event #-------------------------------------------------------------------------- def initialize(*args, &block) lune_ant_initialize(*args, &block) $get_new_ids.push(@event.id) endend#==============================================================================# ** Game_Interpreter#------------------------------------------------------------------------------# Um interpretador para executar os comandos de evento. Esta classe é usada# internamente pelas classes Game_Map, Game_Troop e Game_Event.#==============================================================================class Game_Interpreteralias lune_lag_command_203 command_203 #-------------------------------------------------------------------------- # Definir posição do evento #-------------------------------------------------------------------------- def command_203 lune_lag_command_203 SceneManager.scene.call_position_event($get_new_ids.index(@event_id)) endend#==============================================================================# ** Game_Map#------------------------------------------------------------------------------# Esta classe gerencia o mapa. Inclui funções de rolagem e definição de# passagens. A instância desta classe é referenciada por $game_map.#==============================================================================class Game_Map #-------------------------------------------------------------------------- # * Atualização dos comandos dos eventos #-------------------------------------------------------------------------- def update_events @events.each_value {|event| event.update if event.need_to_update?} @common_events.each {|event| event.update} endend$get_new_ids = Array.new#==============================================================================# ** Spriteset_Map#------------------------------------------------------------------------------# Esta classe reune os sprites da tela de mapa e tilesets. Esta classe é# usada internamente pela classe Scene_Map.#==============================================================================class Spriteset_Map #-------------------------------------------------------------------------- # * Atualização dos personagens #-------------------------------------------------------------------------- def update_characters refresh_characters if @map_id != $game_map.map_id @character_sprites.each {|sprite| sprite.update if sprite.near_the_screen? } end #-------------------------------------------------------------------------- # * Atualização de algum personagem remoto #-------------------------------------------------------------------------- def update_one_event(id) @character_sprites[id].update endend
×