Drupogame
Nightmare-Chapter System 1.0 [XP] Imagen12

Si quieres formar parte del staff tienes que enviar un MP al administrador o al Co-Administrador

Unirse al foro, es rápido y fácil

Drupogame
Nightmare-Chapter System 1.0 [XP] Imagen12

Si quieres formar parte del staff tienes que enviar un MP al administrador o al Co-Administrador
Drupogame
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Conectarse

Recuperar mi contraseña

Buscar
 
 

Resultados por:
 


Rechercher Búsqueda avanzada

Últimos temas
» Reglas del foro
Nightmare-Chapter System 1.0 [XP] EmptyLun Ene 23, 2012 11:32 pm por edux

» edux returns
Nightmare-Chapter System 1.0 [XP] EmptyLun Ene 23, 2012 11:30 pm por edux

» The Elder Scrolls IV: Oblivion
Nightmare-Chapter System 1.0 [XP] EmptyVie Ene 20, 2012 11:28 pm por Aljevalsar

» Kojima promete que habrá un Metal Gear Solid de auténtico sigilo
Nightmare-Chapter System 1.0 [XP] EmptyJue Dic 22, 2011 7:33 pm por Anime_Maker

» Este fin de semana habrá nuevos modos para Modern Warfare 3
Nightmare-Chapter System 1.0 [XP] EmptyJue Dic 15, 2011 12:03 pm por Akeo

» Kojima quiso crear un Metal Gear Solid 5 ambientado en la Segunda Guerra Mundial
Nightmare-Chapter System 1.0 [XP] EmptyJue Dic 15, 2011 11:01 am por Akeo

» Darksiders II se dejará ver en los Spike VGA
Nightmare-Chapter System 1.0 [XP] EmptyMiér Dic 14, 2011 11:50 am por Akeo

» El creador de Bayonetta desmiente estar implicado en el desarrollo de Metal Gear Rising
Nightmare-Chapter System 1.0 [XP] EmptyMiér Dic 14, 2011 1:54 am por Akeo

» Los creadores de Bayonetta se encargan del desarrollo de Metal Gear Rising
Nightmare-Chapter System 1.0 [XP] EmptyMiér Dic 14, 2011 1:52 am por Akeo

» En Construccion: Mundo Abismal
Nightmare-Chapter System 1.0 [XP] EmptyLun Oct 24, 2011 4:03 am por SagahonArturo

» Visceral Games busca nuevo personal para la franquicia Dead Space
Nightmare-Chapter System 1.0 [XP] EmptyMar Oct 11, 2011 3:22 am por The_King_Jaas

» buenas
Nightmare-Chapter System 1.0 [XP] EmptyMar Oct 11, 2011 3:21 am por The_King_Jaas

» Batman: Arkham City llegará "sin ninguna limitación"
Nightmare-Chapter System 1.0 [XP] EmptySáb Oct 08, 2011 1:44 am por Akeo

» Los creadores de Bulletstorm admiten divertidos que el juego tenía demasiadas palabras malsonantes
Nightmare-Chapter System 1.0 [XP] EmptySáb Oct 08, 2011 1:41 am por Akeo

» PES 2012: El primer DLC estará disponible el 11 de octubre
Nightmare-Chapter System 1.0 [XP] EmptySáb Oct 08, 2011 1:39 am por Akeo

Los posteadores más activos del mes
No hay usuarios

Estadísticas
Tenemos 98 miembros registrados
El último usuario registrado es Lawdesifi

Nuestros miembros han publicado un total de 6208 mensajes en 777 argumentos.
Compañeros
Crear foro
Crear foro
Crear foro
Crear foro
PFC
Crear foro
Crear foro
Otakus Activos
Diviértete acá
Crear foro
Foro de anime y RM2k3/XP/VX
contador.
contador de visitas
Mayo 2024
LunMarMiérJueVieSábDom
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendario Calendario


Nightmare-Chapter System 1.0 [XP]

Ir abajo

Nightmare-Chapter System 1.0 [XP] Empty Nightmare-Chapter System 1.0 [XP]

Mensaje por The_King_Jaas Sáb Abr 02, 2011 7:06 pm

Hola gente con acceso a internet en sus casas, escuelas, oficinas o en la sala de computadores más cercana a su casa. Este es un script de sistemas de capitulos que
evalua un total de 3 parametros (podrian ser cosas como tesoros obtenidos, misiones completadas entre otras cosas) tambien puede evaluar la cantidad de enemigos derrotados
y mostrar un rango, es la version 1.0 ya habia colocado una 0.7 que carece de algunas funciones de esta.

De manera opcional puede regresar un rango total y operar un interruptor si el porcentaje del rango esta entre dos valores que pueden definir de 0 a 100.

Para modificar el valor de un parametro se usa el llamado script
"$game_temp.parametros[x] += Y

x es igual a la id del parametro, siendo el primero 0, el segundo 1 y el tercero 2.

Pueden igualmente restarle valores cambiando el + por -, o quitandolo pueden darle
el valor que quieran.

Para usar el contador de enemigos en sistemas de batalla diferentes al xas hero o
al standart del maker y similares pueden usarlo, solo que manualmente modificando
de la misma manera que los parametros la variable "$game_temp.enemigos[1]"

Creo que por ahora les quedo a deber el scremshot

Y aqui el link de descarga:
Descargar Nightmare Chapter system V1.0
Por ultimo el script solo es el siguiente:
Código:


#____________________________________________________________________________
#        Nightmare - Chapter System V 1.0
#-------------------------------------------------------------------------------
# By: The King Jaas - Nightmare
#____________________________________________________________________________
# Foros donde se ofrece soporte del script:
# drupogame.superforo.net
# www.makerpalace.onlinegoo.com
# www.mundodeluxe.com
#____________________________________________________________________________
# Sistema de capitulos que permite mostrar una Escena que evalua unos parametros
# y regresa un rango. Tambien muestra la cantidad de enemigos derrotados durante
# el capitulo y puede retornar otro rango. Muestra un rango como eveluacion
# general de todo y en base a ese puede activar un interruptor.
#____________________________________________________________________________
# El script es compatible con el XAS Hero y el sistema de batalla por default
# del maker, otros sistemas de batalla es posible que no funcione el contador de
# enemigos.
# Para soporte o reportar un bug mandenme un MP en cualquiera de los foros que
# aparecen en la parte superior y en cuenta pueda les respondere.
#____________________________________________________________________________
#Graficos requeridos:
# N_Chapter_Layout (grafico de la estructura de la scene
# Chapter_Back (background o fondo de la scene)
# Capitulo_ + Id del capitulo (Imagen que usa la scene sobre el capitulo)
# Range_Hollow (el grfico que corresponde al rango vacio).
# Range_Full (el grafico que corresponde al rango pero lleno completamente).
#____________________________________________________________________________
#Nota: Si colocan el script de MOG - Picture Number entonces los numeros
#      apareceran usando imagenes (una de 2 frames que debe ir en la carpeta de
#      windowskins bajo el nombre de Chapter_Number).
#____________________________________________________________________________
#Progreso:
# 0.5 Script basic terminado aunque ouede presentar bugs (no fue publicada)
# 0.7 Correccion de dos bugs encontrados en la version 0.5
# 1.0 Teminacion del script y mejorado todo en general
#    Eliminada la opcion que permite disminuir la cantidad de parametros
#    porque producia errores graves.
#____________________________________________________________________________
module Nightmare_Chapter_System
  CAPITULO = Array.new
# Define la cantidad de capitulos y el nombre de cada uno.
# CAPITULO[a] = b
# a = id del capitulo a partir de 0
# b = nombre del capitulo.
  CAPITULO[0] = "El Despertar de la oscuridad"
  CAPITULO[1] = "La llave perdida"
  CAPITULO[2] = "La torre oscura"
  CAPITULO[3] = "La caverna de la desesperacion"
 
  REQUERIDO = Array.new
#Define la cantidad de cada parametro maximo por capitulo (importante para la
#evaluacion del rango).
# REQUERIDO[a] = [a, b, c, x]
# a = id del capitulo (recuerden que el primero debe ser cero)
#b, c, x = Numero maximo que se requerira de cada parametro, la cantidad de
#parametros debe ser igual a 3
  REQUERIDO[0] = [1, nil, 7]
  REQUERIDO[1] = [7, 1, 1]
  REQUERIDO[2] = [1, 3, 2]
  REQUERIDO[3] = [1, 81, 3]

#Usar contador de enemigos

  CONTADOR_ENEMIGOS = true
  ENEMIGOS = Array.new
 
#Cantidad de enemigos que se deben derrotar por capitulo
# ENEMIGOS[a] = b
#a = Id del capitulo al que corresponde
#b = numero de enemigos que debe derrotar
  ENEMIGOS[0] = 4
  ENEMIGOS[1] = nil
  ENEMIGOS[2] = 0
  ENEMIGOS[3] = 99
#Texto que se muestra en la ventana de ayuda
  TEXTO_AYUDA = "Presione C o X para salir"
#Al salir de la scena ir a la scena de guardar
  END_SAVE = true
#usar transicion
  TRANSICION = true
#tiempo que dura la transicion
  TRANSICION_TIME = 40
#grafico de transicion (debe ir en la carpeta de transicion
  TRANSICION_GRAPHIC = "004-Blind04"
 
#Sitema que permite operar un interruptor dependiendo del cumplimiento de los
#valores de los parametros, esto evelua que si el rango esta entre 2 porcentajes
#entonces activa el interruptor.
# CAP_PORINT = [porcentaje_maximo, porcentaje_minimo, interruptor_que_opera]
  CAP_PORINT = Array.new
  CAP_PORINT[0] = [100, 75, 2]
 # CAP_PORINT[1] = [100, 60, 3]
  CAP_PORINT[2] = [50, 0, 4]
  CAP_PORINT[3] = [0, 0, 0]
 
  TOTAL_RANGE = true
end
#____________________________________________________________________________
class Game_Temp
    attr_accessor :capitulos
    attr_accessor :parametros
    attr_accessor :enemigos
    alias chapter_system_ini initialize
    def initialize
      @capitulos = 0
      @parametros = [0, 0, 0]
      @enemigos = [0, 0]
      chapter_system_ini
  end
end
if !$xrxs_xas
class Sprite_Battler < RPG::Sprite
  def collapse
    super
    if @battler.is_a?(Game_Enemy)
      $game_temp.enemigos[0] += 1
    end
  end
end
end
if $xrxs_xas
class Scene_Map
  include Nightmare_Chapter_System
  alias chapter_update update
  def update
    $game_temp.enemigos[0] = $game_variables[XAS_BA::DEFEAT_NUMBER_ID]
    chapter_update
    end
  end
end
class Window_Chapter_Result < Window_Base
    include Nightmare_Chapter_System
    def initialize
      super(0, 0, 640, 220)
      self.contents = Bitmap.new(width - 32, height - 32)
      self.contents.font.name = "Arial"
      self.contents.font.size = 18
      self.contents.font.bold = true
      self.contents.font.italic = false
      if $game_temp.enemigos[1] > 0
      $game_temp.enemigos[1] = $game_temp.enemigos[0] - $game_temp.enemigos[1]
      else
      $game_temp.enemigos[1] = $game_temp.enemigos[0]
    end
      refresh
    end
    def range(x, y, parametro, par_index)
      vacio = RPG::Cache.windowskin("Range_hollow")
      cw = vacio.width
      ch = vacio.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x + 100, y - ch + 31, vacio, src_rect)
      full = RPG::Cache.windowskin("Range_Full")
      if REQUERIDO[$game_temp.capitulos][par_index] > 0
      cw = full.width * parametro / REQUERIDO[$game_temp.capitulos][par_index]
    else
      cw = full.width
    end
      ch = full.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x + 100, y - ch + 31, full, src_rect)
    end
    def range_enemy(x, y)
      vacio = RPG::Cache.windowskin("Range_hollow")
      cw = vacio.width
      ch = vacio.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x + 100, y - ch + 31, vacio, src_rect)
      full = RPG::Cache.windowskin("Range_full")
      if ENEMIGOS[$game_temp.capitulos] > 0
      cw = full.width  *  $game_temp.enemigos[1] / ENEMIGOS[$game_temp.capitulos]
    else
      cw = full.width
    end
      ch = full.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x + 100, y - ch + 31, full, src_rect)
    end
  def switch_on
    par = 0
    if REQUERIDO[$game_temp.capitulos]
    for i in $game_temp.parametros
      par += i
    end
    end
    req = 0
    if REQUERIDO[$game_temp.capitulos]
    for i in REQUERIDO[$game_temp.capitulos]
      req += i if i
    end
  end
    if CONTADOR_ENEMIGOS
      par += $game_temp.enemigos[1]
      req += ENEMIGOS[$game_temp.capitulos] if ENEMIGOS[$game_temp.capitulos]
    end
    porcentaje = par.to_f / req.to_f * 100
    if CAP_PORINT[$game_temp.capitulos]
    if porcentaje <= CAP_PORINT[$game_temp.capitulos][0] and
      porcentaje >= CAP_PORINT[$game_temp.capitulos][1]
      interruptor = CAP_PORINT[$game_temp.capitulos][2]
      $game_switches[interruptor] = true
      $game_map.need_refresh = true
    end
    end
  end 
  def total_range(x, y)
    par = 0
    if REQUERIDO[$game_temp.capitulos]
    for i in $game_temp.parametros
      par += i
    end
    end
    req = 0
    if REQUERIDO[$game_temp.capitulos]
    for i in REQUERIDO[$game_temp.capitulos]
      req += i if i
    end
  end
    if CONTADOR_ENEMIGOS
      par += $game_temp.enemigos[1]
      req += ENEMIGOS[$game_temp.capitulos] if ENEMIGOS[$game_temp.capitulos]
    end
  @porcentaje = par * 100 / req 
  vacio = RPG::Cache.windowskin("range_hollow")
  cw = vacio.width
  ch = vacio.height
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x, y , vacio, src_rect)
  full = RPG::Cache.windowskin("range_full")
  cw = full.width * par / req
  ch = full.height
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x, y, full, src_rect)
 end
    def no_disponible(x, y)
      no_dis = RPG::Cache.windowskin("Chapter_No")
      cw = no_dis.width
      ch = no_dis.height
      src_rect = Rect.new(0, 0, cw, ch)
      self.contents.blt(x + 100, y - ch + 25, no_dis, src_rect)
    end
    def refresh
      self.contents.clear
      for i in 0..10
        if REQUERIDO[$game_temp.capitulos]
          if $game_temp.parametros[i].to_i > REQUERIDO[$game_temp.capitulos][i].to_i
          $game_temp.parametros[i] = REQUERIDO[$game_temp.capitulos][i].to_i
        end
      number = $game_temp.parametros[i]
      if $game_temp.parametros[i] and REQUERIDO[$game_temp.capitulos][i]
      if $mog_rgssxp_picture_number
      draw_picture_number(300, y + 30 * i, number.to_i, "chapter_number",
      0, 5, 2, 0)
      draw_picture_number(340, y + 30 * i, REQUERIDO[$game_temp.capitulos][i].to_i,
      "chapter_number", 2, 5, 2, 1)
    else
      self.contents.draw_text(300, y - 4 + 29 * i, 200, 32,
      $game_temp.parametros[i].to_s, 0)
      self.contents.draw_text(345, y - 4 + 29 * i, 200, 32,
      REQUERIDO[$game_temp.capitulos][i].to_s, 0)
    end
    self.contents.draw_text(325, y - 4 + 29 * i, 32, 32, "/") if $game_temp.parametros[i]
  end
    end
  end
    if REQUERIDO[$game_temp.capitulos]
      for i in 0..10
        if REQUERIDO[$game_temp.capitulos][i]
        range(x + 350, y - 5 + 28 * i, $game_temp.parametros[i], i)
        else
        no_disponible(x + 250, y + 28 * i) if i < REQUERIDO[$game_temp.capitulos].size
      end
    end
    else
      no_disponible(x + 250, y + 22 * i)
      end
      switch_on if REQUERIDO[$game_temp.capitulos] or
      ENEMIGOS[$game_temp.capitulos] and CONTADOR_ENEMIGOS
      if CONTADOR_ENEMIGOS
      if ENEMIGOS[$game_temp.capitulos]
      if $mog_rgssxp_picture_number
      draw_picture_number(340, y + 30 * 3, $game_temp.enemigos[1].to_i,
      "chapter_number", 2, 5, 2, 0)
      else
      self.contents.draw_text(345, y - 4 + 29 * $game_temp.parametros.size, 200, 32,
      $game_temp.enemigos[1].to_s , 0)
    end
      range_enemy(x + 350, y - 5 + 28 * 3)
    else
      no_disponible(x + 250, y + 29 * 3)
    end
  end
      if TOTAL_RANGE
        pos_y = 3
        pos_y += 1 if CONTADOR_ENEMIGOS
        total_range(x + 450, y + pos_y * 29)
      end
    end
  end
class Window_Chapter_IMG < Window_Base
  include Nightmare_Chapter_System
  def initialize
    super(0, 0, 640, 280)
    self.contents= Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Georgia"
    self.contents.font.size = 18
    self.contents.font.bold = true
    self.contents.font.italic = false
    refresh
  end
  def refresh
    self.contents.clear
    if $game_temp.capitulos > CAPITULO.size - 1
      $game_temp.capitulos = CAPITULO.size - 1
    end
    self.contents.draw_text(x + 120, y, 400, 32, CAPITULO[$game_temp.capitulos], 0)
    id_capitulo = $game_temp.capitulos
    bitmap = RPG::Cache.windowskin("capitulo_" + id_capitulo.to_s )
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x, y + 40, bitmap, src_rect)
  end
end
class Scene_Save 
  alias nightmare_write_chapter write_save_data
  def write_save_data(file)
    nightmare_write_chapter(file)
    Marshal.dump($game_temp.capitulos, file)
    Marshal.dump($game_temp.enemigos, file)
    Marshal.dump($game_temp.parametros, file)
  end
end
class Scene_Load
  alias nightmare_read_chapter read_save_data
  def read_save_data(file)
    nightmare_read_chapter(file)
    $game_temp.capitulos    = Marshal.load(file)
    $game_temp.enemigos  = Marshal.load(file)
    $game_temp.parametros = Marshal.load(file)
    end
end
class Scene_Chapter
  include Nightmare_Chapter_System
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def main
    @window_img = Window_Chapter_IMG.new
    @window_count = Window_Chapter_Result.new
    @window_count.y = 260
    @window_img.windowskin = nil
    @window_count.windowskin = nil
    @back = Plane.new
    @back.bitmap = RPG::Cache.windowskin("Chapter_Back")
    @layout = Sprite.new
    @layout.bitmap = RPG::Cache.windowskin("N_Chapter_Layout")
    @window_help = Window_Help.new
    @window_help.windowskin = nil
    @window_help.y = 430
    if TRANSICION
  Graphics.transition(TRANSICION_TIME, "Graphics/Transitions/" + TRANSICION_GRAPHIC)
 else
  Graphics.transition
 end
 loop do
  @back.ox -=1
  Graphics.update
  Input.update
  update
  break if $scene != self
 end
  Graphics.freeze
  @window_img.dispose
  @window_count.dispose
  @layout.dispose
  @back.dispose
  @window_help.dispose
 end
 def update
  @window_help.set_text(TEXTO_AYUDA, 1)
  if Input.trigger?(Input::B) or Input.trigger?(Input::C)
    $game_system.se_play($data_system.decision_se)
    $game_temp.capitulos += 1
    $game_temp.enemigos[0] = $game_temp.enemigos[1] if !$xrxs_xas
    $game_temp.enemigos[1] = $game_variables[XAS_BA::DEFEAT_NUMBER_ID] if $xrxs_xas
    for i in $game_temp.parametros
      indice = $game_temp.parametros.index i
      $game_temp.parametros[indice] = 0
    end
    if END_SAVE
      $scene = Scene_Save.new
    else
      $scene = Scene_Map.new
    end
  end
 end
end

Espero les haya gustado y si no hagan esto :muro:
The_King_Jaas
The_King_Jaas
Co-Administrador
Co-Administrador

Mensajes : 1737
Fecha de inscripción : 02/02/2011

Volver arriba Ir abajo

Volver arriba

- Temas similares

 
Permisos de este foro:
No puedes responder a temas en este foro.