Bem-vindo, visitante!
 Login:  Senha:
Para refletir: "Criar jogos é hobby. Criar bons jogos é arte." - Hugh Oliver

Autor Tópico: Roof System 2.5  (Lido 1399 vezes)

0 Membros e 1 Visitante estão vendo este tópico.

Hideo

  • Membro
  • *
  • Mensagens: 105
  • Reputação: 20
  • Offline
Roof System 2.5
« em: 06 de Dezembro de 2009, 14:32:04 »
Pontuação: 3

Roof System

Versão 2.5
by: Hideo
Introdução:
Esse script adiciona ao jogo, um sistema de telhados dinâmicos, como no jogo Tibia, onde existe apenas um mapa, e os telhados desaparecem ao entrar em algum lugar, sem mudar de mapa.
Agora, na versão 2.5 é possível criar eventos que estão acima do telhado.


Screens:
desnecessário ¬¬


Script:
Código: [Selecionar]
#==============================================================================#
#= = = = = = = = = = = = = = = =  Roof System  = = = = = = = = = = = = = = = = #
#----------------#=============================================================#
# por : Hideo    #
# 06/12/09       #
# v : 2.5        #
#----------------#

#==============================================================================#
#   ×Instruções×
#     - Para criar um Telhado você deve criar um mapa com o mesmo tamanho do
#       original, mas com um "[T]"(sem aspas) depois do nome.
#     - Depois disso, para fazer o telhado aparecer/desaparecer durante o jogo,
#       use o comando 'chamar script' com os seguintes valores:
#         $game_map.entrar - Faz o telhado desaparecer
#         $game_map.sair   - Faz o telhado aparecer
#     - Altere as variaveis do módulo Roof
#         RoofTXT     - Texto para colocar no nome do mapa para virar telhado
#         RoofCharTXT - Texto para colocar no nome do evento para estar acima do
#                       telhado.
#         CharTXT     - Mesmo que o anterior, mas nesse caso o evento não desa-
#                       parecerá ao entrar na casa.
#==============================================================================#
module Roof
  RoofTXT = "[T]"
  RoofCharTXT = "[T]"
  CharTXT = "[C]"
end

class Game_Map
  attr_reader :dentro
  alias map_initialize initialize
  def initialize
    map_initialize
    @dentro = false
  end
  def sair
    @dentro = false
  end
  def entrar
    @dentro = true
  end
end

class Game_Event
  attr_reader :event
  attr_accessor :erased
end

class Spriteset_Map
  def initialize
    create_viewports
    create_tilemap
    create_parallax
    create_characters
    create_shadow
    create_weather
    create_pictures
    create_timer
    create_roof
    update
  end
  def create_viewports
   
    @viewport1 = Viewport.new(0, 0, 544, 416)
    @viewport2 = Viewport.new(0, 0, 544, 416)
    @viewport3 = Viewport.new(0, 0, 544, 416)
    @viewport4 = Viewport.new(0, 0, 544, 416)
    @viewport5 = Viewport.new(0, 0, 544, 416)
   
    @viewport1.z = 0
    @viewport2.z = 50
    @viewport3.z = 100
    @viewport4.z = 150
    @viewport5.z = 200
   
  end

  def create_characters
    @character_sprites = []
    for i in $game_map.events.keys.sort
      if $game_map.events[i].event.name.include?(Roof::CharTXT)
        sprite = Sprite_Character.new(@viewport5, $game_map.events[i])
      elsif $game_map.events[i].event.name.include?(Roof::RoofCharTXT)
        sprite = Sprite_Character.new(@viewport4, $game_map.events[i])
      else
        sprite = Sprite_Character.new(@viewport1, $game_map.events[i])
      end
      @character_sprites.push(sprite)
    end
    for vehicle in $game_map.vehicles
      sprite = Sprite_Character.new(@viewport1, vehicle)
      @character_sprites.push(sprite)
    end
    @character_sprites.push(Sprite_Character.new(@viewport1, $game_player))
  end

  #--------------------------------------------------------------------------
  # Criação dos tiles do telhado
  #--------------------------------------------------------------------------
  def create_roof
   
    @roof_data = load_data("Data/MapInfos.rvdata")
    for i in 1..@roof_data.size + 1
      if @roof_data[i] != nil
        if @roof_data[i].name == @roof_data[$game_map.map_id].name + Roof::RoofTXT
       
          @roof = Tilemap.new(@viewport4)
          @roof.bitmaps[0] = Cache.system("TileA1")
          @roof.bitmaps[1] = Cache.system("TileA2")
          @roof.bitmaps[2] = Cache.system("TileA3")
          @roof.bitmaps[3] = Cache.system("TileA4")
          @roof.bitmaps[4] = Cache.system("TileA5")
          @roof.bitmaps[5] = Cache.system("TileB")
          @roof.bitmaps[6] = Cache.system("TileC")
          @roof.bitmaps[7] = Cache.system("TileD")
          @roof.bitmaps[8] = Cache.system("TileE")
         
          @map_d = load_data(sprintf("Data/Map%03d.rvdata", i))
          @roof.map_data = @map_d.data
        end
      end
    end
  end
 
  def dispose
    dispose_tilemap
    dispose_parallax
    dispose_characters
    dispose_shadow
    dispose_weather
    dispose_pictures
    dispose_timer
    dispose_viewports
  end
 
  def dispose_tilemap
    @tilemap.dispose
    if @roof != nil
      @roof.dispose
    end
  end
 
  def dispose_viewports
    @viewport1.dispose
    @viewport2.dispose
    @viewport3.dispose
    @viewport4.dispose
    @viewport5.dispose
  end
 
  def update
    update_tilemap
    update_roof
    update_parallax
    update_characters
    update_shadow
    update_weather
    update_pictures
    update_timer
    update_viewports
  end
  def update_roof
   if @roof != nil
    @roof.ox = $game_map.display_x / 8
    @roof.oy = $game_map.display_y / 8
    @roof.update
    end
  end
 
  def update_viewports
    @viewport1.tone = $game_map.screen.tone
    @viewport1.ox = $game_map.screen.shake
    @viewport2.color = $game_map.screen.flash_color
    @viewport3.color.set(0, 0, 0, 255 - $game_map.screen.brightness)
    @viewport1.update
    @viewport2.update
    @viewport3.update
    if $game_map.dentro == false
      @viewport4.visible = true
    else
      @viewport4.visible = false
    end
    @viewport4.update
    @viewport5.update
  end
end


Instruções:
■ Para criar um Telhado você deve criar um mapa com o mesmo tamanho do original, mas com um "[T]"(sem aspas) depois do nome.(ex.: "casa"/"casa[T]")
■ Depois disso, para fazer o telhado aparecer/desaparecer durante o jogo, use o comando 'chamar script' com os seguintes valores:
         $game_map.entrar - Faz o telhado desaparecer
         $game_map.sair   - Faz o telhado aparecer
■ Para criar um evento que está acima do telhado, se deve usar uma das siglas em seus nomes:
         [T] - O evento desaparecerá com o telhado, para usar em placas, enfeites etc
         [C] - O evento não desaparecerá com o telhado.
■ Configurando:
         Agora é possível configurar as siglas usadas para definir o telhado, sendo elas:

         Para mudar a sigla a colocar no nome do mapa que será o telhado:
Código: [Selecionar]
RoofTXT = "[T]"         Para mudar a sigla do evento que some com o telhado:
Código: [Selecionar]
RoofCharTXT = "[T]"         Para mudar a sigla do evento que não desaparece:
Código: [Selecionar]
CharTXT = "[C]"


Demo:
Download


Créditos:
  • Script - Hideo(Darklich)


Power Game

  • Membro
  • *
  • Mensagens: 104
  • Reputação: 2
  • Offline
  • Em breve - o melhor MMORPG 2D...revolução 2d...
Re: Roof System 2.5
« Resposta #1 em: 06 de Dezembro de 2009, 22:22:41 »
Pontuação: 0
Embora você ache que não é nada necessário screen shots, pelomenos coloque duas! uma fora da casa, e outra dentro! fora isso está bem explicado, parabéns.

+1 CRED.







Não importa quantos passos você deu para trás. O que importa é quantos passos você dará para frente.

Missões:

Conseguir 20 mil créditos: Não completada.

Ter 20 mil mensagens: Não completada.

Completar um game: Não completada

Criar um game que ganhe um prêmio de melhor: Não completada

Ter 10 anos de experiência maker: Não completada

Ter um game que faça muito sucesso: Não completada

Ter um game Online: Não Completada

Ter um game online com várias pessoas: Não Completada

Ser um inutil que não cumpriu nada: Missão Completada

Valentine

  • Membro
  • *
  • Mensagens: 1539
  • Reputação: 353
  • Offline
  • Como escreve aqui?
Re: Roof System 2.5
« Resposta #2 em: 06 de Dezembro de 2009, 23:01:06 »
Pontuação: 0
muito bom
concerteza + 1 crédito
continue assim, é um script muito interessante
porque fica foda, fazer um monte de mapa, faz um mapa grande ai tem que fazer, dentro e fora ;x, e ainda ter q teleport e etc...
assim ta muito melhor, tipo tibia xD
Não me envie PM's inúteis, eu não dou suporte, não irei lhe ajudar no seu projeto ou tirar qualquer dúvida sua.


Ziden

  • Membro
  • *
  • Mensagens: 76
  • Reputação: 0
  • Offline
Re: Roof System 2.5
« Resposta #3 em: 05 de Fevereiro de 2010, 03:23:46 »
Pontuação: 0
desculpe-me 'ressusitar' o topico (mesmo até achando que ele merece)... mas gostaria de saber se é possivel ter compatibilidade deste script com o script de efeitos de luz do Kylock. Estou usando e abusando deste script em meu jogo para diversas coisas, nao só para telhados porem a incompatibilidade com o sistema de luz é complicada. Atualmente nao estou usando luz, mas gostaria se possivel. Obrigado =]

[]´s Ziden

+ cred pelo criativo script
'Imaginação é mais importante que conhecimento'
Einstein

Black_Heart

  • Membro
  • *
  • Mensagens: 652
  • Reputação: 219
  • Offline
  • |►Scripter◄|
Re: Roof System 2.5
« Resposta #4 em: 05 de Fevereiro de 2010, 23:50:48 »
Pontuação: 0
desculpe-me 'ressusitar' o topico (mesmo até achando que ele merece)... mas gostaria de saber se é possivel ter compatibilidade deste script com o script de efeitos de luz do Kylock. Estou usando e abusando deste script em meu jogo para diversas coisas, nao só para telhados porem a incompatibilidade com o sistema de luz é complicada. Atualmente nao estou usando luz, mas gostaria se possivel. Obrigado =]

[]´s Ziden

+ cred pelo criativo script
Sim da pra usar sistema de luz !

Ziden

  • Membro
  • *
  • Mensagens: 76
  • Reputação: 0
  • Offline
Re: Roof System 2.5
« Resposta #5 em: 06 de Fevereiro de 2010, 17:07:28 »
Pontuação: 0
estou usando o sistema do Kylock mas as luzes nao aparecem quando o script de telhados está presente no mapa. Poderia me recomendar um sistema de luz que funcione junto ao script de telhados ?

Grato
[]´s Ziden
'Imaginação é mais importante que conhecimento'
Einstein

Lucas5000

  • Membro
  • *
  • Mensagens: 54
  • Reputação: 2
  • Offline
  • Sou um usário tentando revolucionar o mundo do RPG
Re: Roof System 2.5
« Resposta #6 em: 06 de Fevereiro de 2010, 17:52:16 »
Pontuação: 0
Gostei demais!!! :D

+1 crédito

Garfield
Classe : Forte Garfield\ Level 30: O Gato
Level 21
Upando por créditos



Upem o Cau clique ali em cima

Upem eles!

Meus parceiros


Metas 2010:

1 - ( ) Ganhar 100 créditos
2 - ( ) Fazer um jogo

Meus sistemas
Sistema de Roupa Equipada



Black_Heart

  • Membro
  • *
  • Mensagens: 652
  • Reputação: 219
  • Offline
  • |►Scripter◄|
Re: Roof System 2.5
« Resposta #7 em: 11 de Fevereiro de 2010, 14:49:04 »
Pontuação: 0
Citação
estou usando o sistema do Kylock mas as luzes nao aparecem quando o script de telhados está presente no mapa. Poderia me recomendar um sistema de luz que funcione junto ao script de telhados ?

Grato
[]´s Ziden

Código: [Selecionar]
==============================================================================
# ■ Light Effects VX 1.2
# 5.21.2008
#------------------------------------------------------------------------------
# Script by: Kylock (originally for RMXP by Near Fantastica)
#==============================================================================
# To make an event glow, give it a Comment: with any of the supported light
# modes.
# The SWITCH setting below will disable light effects from updating with the
# switch is on.
#==============================================================================
# ● Change Log
#------------------------------------------------------------------------------
# 1.0 - Original Release
# 1.1 - New light modes added: LIGHT2, TORCH, TORCH2
# - Changed sprite blend mode to ADD (looks slightly better)
# - Fire-based lights are now red in color
# 1.2 - New light modes added: GROUND2, LIGHT3, TORCH3
#==============================================================================
# ● Light Modes
#------------------------------------------------------------------------------
# GROUND - Medium steady white light.
# GROUND2 - Medium white light with slight flicker.
# FIRE - Large red light with a slight flicker.
# LIGHT - Small steady white light.
# LIGHT2 - X-Large steady white light.
# LIGHT3 - Small white light with slight flicker.
# TORCH - X-Large red light with a heavy flicker.
# TORCH2 - X-Large red light with a sleight flicker.
# TORCH3 - Large white light with a slight flicker.
#==============================================================================

class Spriteset_Map
alias les_spriteset_map_initalize initialize
alias les_spriteset_map_dispose dispose
alias les_spriteset_map_update update
def initialize
@light_effects = []
setup_lights
les_spriteset_map_initalize
update
end
def dispose
les_spriteset_map_dispose
for effect in @light_effects
effect.light.dispose
end
@light_effects = []
end
def update
les_spriteset_map_update
update_light_effects
end
def setup_lights
for event in $game_map.events.values
next if event.list == nil
for i in 0...event.list.size
if event.list[i].code == 108 and event.list[i].parameters == ["GROUND"]
type = "GROUND"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 2
light_effects.light.zoom_y = 2
light_effects.light.opacity = 100
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["FIRE"]
type = "FIRE"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 300 / 100.0
light_effects.light.zoom_y = 300 / 100.0
light_effects.light.opacity = 100
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT"]
type = "LIGHT"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 1
light_effects.light.zoom_y = 1
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT2"]
type = "LIGHT2"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 6
light_effects.light.zoom_y = 6
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["TORCH"]
type = "TORCH"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 6
light_effects.light.zoom_y = 6
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["TORCH2"]
type = "TORCH2"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 6
light_effects.light.zoom_y = 6
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["TORCH3"]
type = "TORCH3"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 300 / 100.0
light_effects.light.zoom_y = 300 / 100.0
light_effects.light.opacity = 100
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["LIGHT3"]
type = "LIGHT3"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 1
light_effects.light.zoom_y = 1
light_effects.light.opacity = 150
@light_effects.push(light_effects)
end
if event.list[i].code == 108 and event.list[i].parameters == ["GROUND2"]
type = "GROUND2"
light_effects = Light_Effect.new(event,type)
light_effects.light.zoom_x = 2
light_effects.light.zoom_y = 2
light_effects.light.opacity = 100
@light_effects.push(light_effects)
end
end
end
for effect in @light_effects
case effect.type
when "GROUND"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
effect.light.blend_type = 1
when "FIRE"
effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
effect.light.tone = Tone.new(255,-100,-255, 0)
effect.light.blend_type = 1
when "LIGHT"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
effect.light.blend_type = 1
when "LIGHT2"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
effect.light.blend_type = 1
when "TORCH"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
effect.light.tone = Tone.new(255,-100,-255, 0)
effect.light.blend_type = 1
when "TORCH2"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
effect.light.tone = Tone.new(255,-100,-255, 0)
effect.light.blend_type = 1
when "TORCH3"
effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
effect.light.blend_type = 1
when "LIGHT3"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
effect.light.blend_type = 1
when "GROUND2"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
effect.light.blend_type = 1
end
end
end
def update_light_effects
if $game_switches[1]
for effect in @light_effects
next if effect.type == "FIRE" || effect.type == "TORCH"
effect.light.visible = false
end
else
for effect in @light_effects
next if effect.type == "FIRE" || effect.type == "TORCH"
effect.light.visible = true
end
end
for effect in @light_effects
case effect.type
when "GROUND"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
when "FIRE"
effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
effect.light.opacity = rand(10) + 90
when "LIGHT"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
when "LIGHT2"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
when "TORCH"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20 + rand(20) - 10
effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8 + rand(20) - 10
effect.light.opacity = rand(30) + 70
when "TORCH2"
effect.light.x = (effect.event.real_x - 1200 - $game_map.display_x) / 8 - 20
effect.light.y = (effect.event.real_y - 1200 - $game_map.display_y) / 8
effect.light.opacity = rand(10) + 90
when "TORCH3"
effect.light.x = (effect.event.real_x - 600 - $game_map.display_x) / 8 + rand(6) - 3
effect.light.y = (effect.event.real_y - 600 - $game_map.display_y) / 8 + rand(6) - 3
effect.light.opacity = rand(10) + 90
when "LIGHT3"
effect.light.x = (-0.25 / 2 * $game_map.display_x) + (effect.event.x * 32) - 15
effect.light.y = (-0.25 / 2 * $game_map.display_y) + (effect.event.y * 32) - 15
effect.light.opacity = rand(10) + 90
when "GROUND2"
effect.light.x = (effect.event.real_x - 400 - $game_map.display_x) / 8
effect.light.y = (effect.event.real_y - 400 - $game_map.display_y) / 8
effect.light.opacity = rand(10) + 90
end
end
end
end

class Light_Effect
attr_accessor :light
attr_accessor :event
attr_accessor :type
def initialize(event, type)
@light = Sprite.new
@light.bitmap = Cache.picture("le.png")
@light.visible = true
@light.z = 1000
@event = event
@type = type
end
end

Tenta esse:

Coloca essa imagem Anexada nas pictures !!

Para criar a luz crie um comentario escrito um desse:

GROUND
GROUND2
FIRE
LIGHT2
LIGHT3
TORCH
TORCH2
TORCH3

akirion

  • Membro
  • *
  • Mensagens: 138
  • Reputação: 12
  • Offline
Re: Roof System 2.5
« Resposta #8 em: 11 de Fevereiro de 2010, 21:16:27 »
Pontuação: 0
pega no xp

Ziden

  • Membro
  • *
  • Mensagens: 76
  • Reputação: 0
  • Offline
Re: Roof System 2.5
« Resposta #9 em: 12 de Fevereiro de 2010, 04:50:37 »
Pontuação: 0
Black ainda nao deu =( Eu estava usando o mesmo script só que versão 1.1, atualizei pra esta 1.2 e ainda nao funciona =/

PS: eu acho este sistema de criar outra layer de mapa incrivel, podia tentar ser feito em cima dele o mesmo script só que podendo haver mais de uma layer de mapa. Isso seria simplesmente fantastico, fazer uma casa de 4 andares sem um teleport.
« Última modificação: 12 de Fevereiro de 2010, 04:51:42 por Ziden »
'Imaginação é mais importante que conhecimento'
Einstein

Shadow™

  • Membro
  • *
  • Mensagens: 149
  • Reputação: 20
  • Offline
  • System.out.println();
Re: Roof System 2.5
« Resposta #10 em: 12 de Fevereiro de 2010, 10:12:02 »
Pontuação: 0
parece ser bem massa,  too baixando aque!

 

Tópicos Relacionados

  Assunto / Iniciado por Respostas Última mensagem
GPS System

Iniciado por FaeL no quadro Scripts para RMVX (RGSS2)

3 Respostas
2052 Visualizações
Última mensagem 30 de Agosto de 2010, 22:31:38
por rodrigofms
1 Respostas
919 Visualizações
Última mensagem 11 de Janeiro de 2009, 21:16:46
por HugoLnX
16 Respostas
1773 Visualizações
Última mensagem 30 de Março de 2013, 19:29:32
por LipeJamesPotter
5 Respostas
966 Visualizações
Última mensagem 06 de Dezembro de 2009, 14:35:00
por Hideo