Sign in to follow this  
Followers 0
Goldknight

Control de Encuentros Enemigos y View Range Module

9 posts in this topic

Hola a todos!, bueno, pues eso, he estado buscando incansablemente hasta que hayé este script, se llama Encounter Control (este script fué posteado mucho, mucho antes por Midi Master, pero voy a dar una explicación más detallada y específica de su uso).

Este script lo que hace es dar la opción de poder establecer áreas de batalla en forma rectangular o circular

Un ejemplo de lo que hace este script es que creas áreas en las que en una de ellas haya tales encuentros de enemigos, y cuando pasas a otra, otros muy diferentes, y así sucesivamente, este script es ideal para los mapamundis.

Necesita el View Range Module de Near Fantástica y el SDK, pero después de postear esos scripts postearé otros dos, son los mismos pero sin la dependencia del SDK:

Aquí estan los scripts:

Éste es el View Range Module (Debe ir arriba del Script de Encounter Control y debajo del SDK):
CODE
#==============================================================================
# ** View Range Module
#==============================================================================
# Near Fantastica
# Version 4
# 29.11.05
#==============================================================================

#--------------------------------------------------------------------------
# * SDK Log Script
#--------------------------------------------------------------------------
SDK.log("View Range", "Near Fantastica", 4, "29.11.05")

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.state("View Range") == true
module VR
  #----------------------------------------------------------------------------
  def VR.in_range?(element, object, range)
    x = (element.x - object.x) * (element.x - object.x)
    y = (element.y - object.y) * (element.y - object.y)
    r = x + y
    if r <= (range * range)
      return true
    else
      return false
    end
  end
  #----------------------------------------------------------------------------
  def VR.range(element, object)
    x = (element.x - object.x) * (element.x - object.x)
    y = (element.y - object.y) * (element.y - object.y)
    r = x + y
    r = Math.sqrt(r)
    return r.to_i
  end
end

#& nbsp;#==========================================================================
#====
class Interpreter
  #----------------------------------------------------------------------------
  def event
    return $game_map.events[@event_id]
  end
end
end


Y éste es el script de Encounter Control (ponerlo arrba de main y abajo del SDK y el View range Module):

CODE
#==============================================================================
# ** Encounter Control
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1.01
# 2006-10-23
#------------------------------------------------------------------------------
# * Version History :
#
#   Version 1 ---------------------------------------------------- (2006-08-12)
#    Version 1.01 ------------------------------------------------ (2006-10-23)
#     - Bug Fix : Fixed Erase Event
#------------------------------------------------------------------------------
# * Requirements :
#
#   Near Fantastica's View Range Module
#------------------------------------------------------------------------------
# * Description :
#
#   This script was designed to give you more control of Random Encounters
#   Encounter Control allows you give terrain tags, circular regions and
#   rectangular regions groups of enemies, instead of just map encounters.
#   Additionally, it allows you to view in the debugger the regions on the map
#------------------------------------------------------------------------------
# * Instructions :
#
#   Place The Script Below the SDK and Above Main.
#
#   Setting Up Terrain Groups (Game_Map::Terrain_Tag_Groups)
#   TTG = { map_id => { terrain_tag => [troop_id, ...], ... }, ... }
#   (Use 0 for map_id as a default for all maps, unless specified)
#
#   Setting Up Encounter Regions
#   Adds a Comment Line with this format:
#   Comment : Enc Ctrl <type>(<params>)[group_id, ...]
#
#   <type> = Circ (Circluar Region) or Rect (Rectangular Region)
#   Circular <params> = center_x, center_y, radius
#   Rectangular <params> = upper_left_x, upper_left_y, rect_width, rect_height
#------------------------------------------------------------------------------
# * Credits :
#
#   Thanks to Near Fantastica For His View Range Module
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Encounter Control', 'SephirothSpawn', 1.01, '2006-10-23')

#------------------------------------------------------------------------------
# * View Range Test
#------------------------------------------------------------------------------
unless SDK.state('View Range')
 # Print Error
 p 'View Range Module Not Found. Encounter Control Disabled.'
 # Disable Encounter Control
 SDK.disable('Encounter Control')
end

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Encounter Control')

#==============================================================================
# ** View Range Module Extension
#==============================================================================

module VR
 #--------------------------------------------------------------------------
 # * In Rect Range?
 #--------------------------------------------------------------------------
 def self.in_rect_range?(rect, object)
   return object.x.between?(rect.x, rect.x + rect.width) &&
      object.y.between?(rect.y, rect.y + rect.height)
 end
end

#==============================================================================
# ** Circle
#==============================================================================

class Circle
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :x
 attr_accessor :y
 attr_accessor :radius
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(x, y, r)
   @x, @y, @radius = x, y, r
 end
end

#==============================================================================
# ** Color
#==============================================================================

class Color
 #--------------------------------------------------------------------------
 # * To Hexidecimal
 #--------------------------------------------------------------------------
 def to_hex
   n = (self.red.to_i * 100) + (self.green.to_i * 10) + self.blue.to_i
   return eval "0x#{n.to_s(16)}"
 end
end

#==============================================================================
# ** Game_Event
#==============================================================================

class Game_Event < Game_Character
 #--------------------------------------------------------------------------
 # * Circle Encounter Areas
 #--------------------------------------------------------------------------
 def seph_circle_enconter_areas
   # Starts Enc Areas
   enc_areas = {}
   # Return Enc Areas If No List
   return enc_areas if @list.nil? || @erased
   # Checks All Event Commands
   for i in [email protected]
     # Checks For Comment Line
     if @list[i].code == 108
       # If Parameters Include 'Enc Ctrl'
       if @list[i].parameters[0].upcase.include?('ENC CTRL')
         # Collect Encounter List For Area
         @list[i].parameters[0].dup.gsub(/\[(.+?)\]/, '')
         list = $1.split.collect! {|x| x.to_i}
         # Test For Circular Range
         if @list[i].parameters[0].upcase.include?('CIRC')
           @list[i].parameters[0].dup.gsub(/\((.+?)\)/, '')
           unless $1.nil?
             circ = eval "Circle.new(#{$1})"
             # Stores Enc List
             enc_areas[circ] = list
           end
         end
       end
     end
   end
   # Return Encounter List
   return enc_areas
 end
 #--------------------------------------------------------------------------
 # * Rect Encounter Areas
 #--------------------------------------------------------------------------
 def seph_rect_encounter_areas
   # Starts Enc Areas
   enc_areas = {}
   # Return Enc Areas If No List
   return enc_areas if @list.nil?
   # Checks All Event Commands
   for i in [email protected]
     # Checks For Comment Line
     if @list[i].code == 108
       # If Parameters Include 'Enc Ctrl'
       if @list[i].parameters[0].upcase.include?('ENC CTRL')
         # Collect Encounter List For Area
         @list[i].parameters[0].dup.gsub(/\[(.+?)\]/, '')
         list = $1.split.collect! {|x| x.to_i}
         # Test For Rect Boundaries
         if @list[i].parameters[0].upcase.include?('RECT')
           @list[i].parameters[0].dup.gsub(/\((.+?)\)/, '')
           unless $1.nil?
             rect = eval "Rect.new(#{$1})"
             # Stores Enc List
             enc_areas[rect] = list
           end
         end
       end
     end
   end
   # Return Encounter List
   return enc_areas
 end
end


#==============================================================================
# ** Game_Map
#==============================================================================

class Game_Map
 #--------------------------------------------------------------------------
 # * Terrain Tags
 #   ~ map_id = > {terrain_tag => [troop_id, ...] }
 # * Use 0 For Default For All Maps
 # * To Overwrite Default, Include Map ID And Define or Leave Blank Terrain
 #--------------------------------------------------------------------------
 Terrain_Tag_Groups = {
   0 => {
   }
 }
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias seph_enccntrl_gmmap_el encounter_list  
 #--------------------------------------------------------------------------
 # * Get Encounter List
 #--------------------------------------------------------------------------
 def encounter_list
   # Checks Terrain Tag Groups
   if Terrain_Tag_Groups.has_key?(@map_id)
     # Test For Player Terrain Tag
     if Terrain_Tag_Groups[@map_id].has_key?($game_player.terrain_tag)
       # Return List
       return Terrain_Tag_Groups[@map_id][$game_player.terrain_tag]
     end
   # Checks For Default
   elsif Terrain_Tag_Groups[0].has_key?($game_player.terrain_tag)
     # Return List
     return Terrain_Tag_Groups[0][$game_player.terrain_tag]
   end
   # Checks All Events
   for event in $game_map.events.values
     # Checks Circular Ranges Of Event
     circ_ranges = event.seph_circle_enconter_areas
     circ_ranges.each do |circle, list|
       # If Player In Range of Circle
       if VR.in_range?(circle, $game_player, circle.radius)
         # Return List
         return list
       end
     end
     # Checks Rect Ranges
     rect_ranges = event.seph_rect_encounter_areas
     rect_ranges.each do |rect, list|
       # If Player In Range of Rect
       if VR.in_rect_range?(rect, $game_player)
         # Return List
         return list
       end
     end
   end
   # Return Original Encounter List
   return seph_enccntrl_gmmap_el
 end
end

#==============================================================================
# ** Spriteset_Map
#==============================================================================

class Spriteset_Map
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias seph_encctrl_gmmap_init initialize
 alias seph_encctrl_gmmap_update update
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   # Original Initialization
   seph_encctrl_gmmap_init
   # Creates Flash Data Table & Flash Tile Flag
   @tilemap.flash_data = Table.new($game_map.width, $game_map.height)
   @seph_encctrl_tilesflashing = false
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Original Update
   seph_encctrl_gmmap_update
   # If Debugging
   if $DEBUG
     # If A Button Is Pressed
     if Input.trigger?(Input::A)
       # If Tiles Flashing
       if @seph_encctrl_tilesflashing
         # Unflashes All Map Tiles
         for x in 0...$game_map.width
           for y in 0...$game_map.height
             @tilemap.flash_data[x, y] = 0
           end
         end
         # Turns Flashing Flag Off
         @seph_encctrl_tilesflashing = false
       # If Tiles Not Flashing
       else
         # Sets Up Colors Array (To Prevent Matching Colors
         @flashtile_colors = []
         # Checks All Events
         for event in $game_map.events.values
           # Flashes All Circular Ranges
           event.seph_circle_enconter_areas.keys.each do |circle|
             seph_flash_circular_range(circle, circle.radius)
           end
           # Flashes All Rect Ranges
           event.seph_rect_encounter_areas.keys.each do |rect|
             seph_flash_rect_range(rect)
           end
           # Turns Flashing Flag On
           @seph_encctrl_tilesflashing = true
         end
       end
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Flash Circular Range
 #--------------------------------------------------------------------------
 def seph_flash_circular_range(object, range)
   # Gets Flash Color
   color = get_random_color while color.nil? ||
           @flashtile_colors.include?(color)
   # Flashes Tiles Within Range
   x = object.x
   for i in (x - range)..(x + range)
     sa = (x - i).abs
     x_ = i < x ? x - sa : i == x ? x : x + sa
     y_ = Integer((range ** 2 - sa ** 2) ** 0.5)
     for j in (object.y - y_)..(object.y + y_)
       @tilemap.flash_data[i, j] = color.to_hex
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Flash Rect Range
 #--------------------------------------------------------------------------
 def seph_flash_rect_range(rect)
   color = get_random_color while color.nil? ||
           @flashtile_colors.include?(color)
   for x in 0...rect.width
     for y in 0...rect.height
       @tilemap.flash_data[rect.x + x, rect.y + y] = color.to_hex
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Get Random Color
 #--------------------------------------------------------------------------
 def get_random_color
   return Color.new(rand(18) * 15, rand(18) * 15, rand(18) * 15)
 end
end

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end


Y éstos son los mismos scripts pero sin la dependencia del SDK (funcionan igual, ya lo probé):

El View Range Module:
CODE
#==============================================================================
# ** View Range Module
#==============================================================================
# Near Fantastica
# Version 4
# 29.11.05
#==============================================================================
module VR
  #----------------------------------------------------------------------------
  def VR.in_range?(element, object, range)
    x = (element.x - object.x) * (element.x - object.x)
    y = (element.y - object.y) * (element.y - object.y)
    r = x + y
    if r <= (range * range)
      return true
    else
      return false
    end
  end
  #----------------------------------------------------------------------------
  def VR.range(element, object)
    x = (element.x - object.x) * (element.x - object.x)
    y = (element.y - object.y) * (element.y - object.y)
    r = x + y
    r = Math.sqrt(r)
    return r.to_i
  end
end

#& nbsp;#==========================================================================
#====
class Interpreter
  #----------------------------------------------------------------------------
  def event
    return $game_map.events[@event_id]
  end
end


Y el Encounter Control:
CODE
#==============================================================================
# ** Encounter Control
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1.01
# 2006-10-23
#------------------------------------------------------------------------------
# * Version History :
#
#   Version 1 ---------------------------------------------------- (2006-08-12)
#    Version 1.01 ------------------------------------------------ (2006-10-23)
#     - Bug Fix : Fixed Erase Event
#------------------------------------------------------------------------------
# * Requirements :
#
#   Near Fantastica's View Range Module
#------------------------------------------------------------------------------
# * Description :
#
#   This script was designed to give you more control of Random Encounters
#   Encounter Control allows you give terrain tags, circular regions and
#   rectangular regions groups of enemies, instead of just map encounters.
#   Additionally, it allows you to view in the debugger the regions on the map
#------------------------------------------------------------------------------
# * Instructions :
#
#   Place The Script Below the SDK and Above Main.
#
#   Setting Up Terrain Groups (Game_Map::Terrain_Tag_Groups)
#   TTG = { map_id => { terrain_tag => [troop_id, ...], ... }, ... }
#   (Use 0 for map_id as a default for all maps, unless specified)
#
#   Setting Up Encounter Regions
#   Adds a Comment Line with this format:
#   Comment : Enc Ctrl <type>(<params>)[group_id, ...]
#
#   <type> = Circ (Circluar Region) or Rect (Rectangular Region)
#   Circular <params> = center_x, center_y, radius
#   Rectangular <params> = upper_left_x, upper_left_y, rect_width, rect_height
#------------------------------------------------------------------------------
# * Credits :
#
#   Thanks to Near Fantastica For His View Range Module
#==============================================================================
#==============================================================================
# ** View Range Module Extension
#==============================================================================

module VR
 #--------------------------------------------------------------------------
 # * In Rect Range?
 #--------------------------------------------------------------------------
 def self.in_rect_range?(rect, object)
   return object.x.between?(rect.x, rect.x + rect.width) &&
      object.y.between?(rect.y, rect.y + rect.height)
 end
end

#==============================================================================
# ** Circle
#==============================================================================

class Circle
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_accessor :x
 attr_accessor :y
 attr_accessor :radius
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(x, y, r)
   @x, @y, @radius = x, y, r
 end
end

#==============================================================================
# ** Color
#==============================================================================

class Color
 #--------------------------------------------------------------------------
 # * To Hexidecimal
 #--------------------------------------------------------------------------
 def to_hex
   n = (self.red.to_i * 100) + (self.green.to_i * 10) + self.blue.to_i
   return eval "0x#{n.to_s(16)}"
 end
end

#==============================================================================
# ** Game_Event
#==============================================================================

class Game_Event < Game_Character
 #--------------------------------------------------------------------------
 # * Circle Encounter Areas
 #--------------------------------------------------------------------------
 def seph_circle_enconter_areas
   # Starts Enc Areas
   enc_areas = {}
   # Return Enc Areas If No List
   return enc_areas if @list.nil? || @erased
   # Checks All Event Commands
   for i in [email protected]
     # Checks For Comment Line
     if @list[i].code == 108
       # If Parameters Include 'Enc Ctrl'
       if @list[i].parameters[0].upcase.include?('ENC CTRL')
         # Collect Encounter List For Area
         @list[i].parameters[0].dup.gsub(/\[(.+?)\]/, '')
         list = $1.split.collect! {|x| x.to_i}
         # Test For Circular Range
         if @list[i].parameters[0].upcase.include?('CIRC')
           @list[i].parameters[0].dup.gsub(/\((.+?)\)/, '')
           unless $1.nil?
             circ = eval "Circle.new(#{$1})"
             # Stores Enc List
             enc_areas[circ] = list
           end
         end
       end
     end
   end
   # Return Encounter List
   return enc_areas
 end
 #--------------------------------------------------------------------------
 # * Rect Encounter Areas
 #--------------------------------------------------------------------------
 def seph_rect_encounter_areas
   # Starts Enc Areas
   enc_areas = {}
   # Return Enc Areas If No List
   return enc_areas if @list.nil?
   # Checks All Event Commands
   for i in [email protected]
     # Checks For Comment Line
     if @list[i].code == 108
       # If Parameters Include 'Enc Ctrl'
       if @list[i].parameters[0].upcase.include?('ENC CTRL')
         # Collect Encounter List For Area
         @list[i].parameters[0].dup.gsub(/\[(.+?)\]/, '')
         list = $1.split.collect! {|x| x.to_i}
         # Test For Rect Boundaries
         if @list[i].parameters[0].upcase.include?('RECT')
           @list[i].parameters[0].dup.gsub(/\((.+?)\)/, '')
           unless $1.nil?
             rect = eval "Rect.new(#{$1})"
             # Stores Enc List
             enc_areas[rect] = list
           end
         end
       end
     end
   end
   # Return Encounter List
   return enc_areas
 end
end


#==============================================================================
# ** Game_Map
#==============================================================================

class Game_Map
 #--------------------------------------------------------------------------
 # * Terrain Tags
 #   ~ map_id = > {terrain_tag => [troop_id, ...] }
 # * Use 0 For Default For All Maps
 # * To Overwrite Default, Include Map ID And Define or Leave Blank Terrain
 #--------------------------------------------------------------------------
 Terrain_Tag_Groups = {
   0 => {
   }
 }
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias seph_enccntrl_gmmap_el encounter_list  
 #--------------------------------------------------------------------------
 # * Get Encounter List
 #--------------------------------------------------------------------------
 def encounter_list
   # Checks Terrain Tag Groups
   if Terrain_Tag_Groups.has_key?(@map_id)
     # Test For Player Terrain Tag
     if Terrain_Tag_Groups[@map_id].has_key?($game_player.terrain_tag)
       # Return List
       return Terrain_Tag_Groups[@map_id][$game_player.terrain_tag]
     end
   # Checks For Default
   elsif Terrain_Tag_Groups[0].has_key?($game_player.terrain_tag)
     # Return List
     return Terrain_Tag_Groups[0][$game_player.terrain_tag]
   end
   # Checks All Events
   for event in $game_map.events.values
     # Checks Circular Ranges Of Event
     circ_ranges = event.seph_circle_enconter_areas
     circ_ranges.each do |circle, list|
       # If Player In Range of Circle
       if VR.in_range?(circle, $game_player, circle.radius)
         # Return List
         return list
       end
     end
     # Checks Rect Ranges
     rect_ranges = event.seph_rect_encounter_areas
     rect_ranges.each do |rect, list|
       # If Player In Range of Rect
       if VR.in_rect_range?(rect, $game_player)
         # Return List
         return list
       end
     end
   end
   # Return Original Encounter List
   return seph_enccntrl_gmmap_el
 end
end

#==============================================================================
# ** Spriteset_Map
#==============================================================================

class Spriteset_Map
 #--------------------------------------------------------------------------
 # * Alias Listings
 #--------------------------------------------------------------------------
 alias seph_encctrl_gmmap_init initialize
 alias seph_encctrl_gmmap_update update
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   # Original Initialization
   seph_encctrl_gmmap_init
   # Creates Flash Data Table & Flash Tile Flag
   @tilemap.flash_data = Table.new($game_map.width, $game_map.height)
   @seph_encctrl_tilesflashing = false
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Original Update
   seph_encctrl_gmmap_update
   # If Debugging
   if $DEBUG
     # If A Button Is Pressed
     if Input.trigger?(Input::A)
       # If Tiles Flashing
       if @seph_encctrl_tilesflashing
         # Unflashes All Map Tiles
         for x in 0...$game_map.width
           for y in 0...$game_map.height
             @tilemap.flash_data[x, y] = 0
           end
         end
         # Turns Flashing Flag Off
         @seph_encctrl_tilesflashing = false
       # If Tiles Not Flashing
       else
         # Sets Up Colors Array (To Prevent Matching Colors
         @flashtile_colors = []
         # Checks All Events
         for event in $game_map.events.values
           # Flashes All Circular Ranges
           event.seph_circle_enconter_areas.keys.each do |circle|
             seph_flash_circular_range(circle, circle.radius)
           end
           # Flashes All Rect Ranges
           event.seph_rect_encounter_areas.keys.each do |rect|
             seph_flash_rect_range(rect)
           end
           # Turns Flashing Flag On
           @seph_encctrl_tilesflashing = true
         end
       end
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Flash Circular Range
 #--------------------------------------------------------------------------
 def seph_flash_circular_range(object, range)
   # Gets Flash Color
   color = get_random_color while color.nil? ||
           @flashtile_colors.include?(color)
   # Flashes Tiles Within Range
   x = object.x
   for i in (x - range)..(x + range)
     sa = (x - i).abs
     x_ = i < x ? x - sa : i == x ? x : x + sa
     y_ = Integer((range ** 2 - sa ** 2) ** 0.5)
     for j in (object.y - y_)..(object.y + y_)
       @tilemap.flash_data[i, j] = color.to_hex
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Flash Rect Range
 #--------------------------------------------------------------------------
 def seph_flash_rect_range(rect)
   color = get_random_color while color.nil? ||
           @flashtile_colors.include?(color)
   for x in 0...rect.width
     for y in 0...rect.height
       @tilemap.flash_data[rect.x + x, rect.y + y] = color.to_hex
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Get Random Color
 #--------------------------------------------------------------------------
 def get_random_color
   return Color.new(rand(18) * 15, rand(18) * 15, rand(18) * 15)
 end
end


Bien, la manera de usar el script es sencilla, en el mapa donde vallan a establecer un área de encuentros, deben crear un evenco y ponen una anotación, en ella tienen que poner:

QUOTE
Enc Ctrl <type>(<params>)[group_id, ...]


Reemplacen <type> por Rect (Para un área rectangular) ó Circ (Para una región circular)

Luego, reemplacen dentro del paréntesis <params> Por éstas indicaciones (son distintas, depende del tipo, si es Rect o Circ)

Para el área de tipo rect es: Coordenadas en x para la esquina superior izquierda, Coordenadas en y para la esquina superior izquierda, Número de cuadros que tendrá de hancho, Número de cuadros que tendrá de alto

Y para el tipo Circ es: Coordenadas en x para el centro del círculo, Coordenadas en y para el centro del círculo, Número de cuadros que tendrá el radio del círculo

Después, dentro de los corchetes ( [ ] ) reemplacen group_id por la ID del grupo de enemigos que aparecerán en ésa área (también pueden ser varios, sólo dividanlos con comas, por ejemplo [3, 4, 1] de esta forma aparecerán en esa área los grupos con las IDs 3, 4 y 1)

Un ejemplo de cómo quedaría toda la anotación ya hecha sería este:

QUOTE
Enc Ctrl Rect(000, 000, 5, 5)[3, 2, 5]


Eso indica que se creará un área de batalla en forma rectangular donde la esquina superior izquierda está en las coordenadas x y y de 000, 000, tendrá 5 cuadros de hancho y 5 de alto y dentro de ésa área aparecerán los grupos de enemigos con los IDs 3, 2 y 5.

Creo que esa es la explicación básica de cómo funciona el script, hasta ahora no le he hallado bugs, así que disfrutenlo laugh.gif.

Sólamente tengo una duda: ¿Como le hago para manipular el fondo de batalla para que cambie en cada área de batalla (por ejemplo, que en una área el fondo de batalla cambie a ser el fondo de batalla de un bosque y que al pasar a otra área que cambie a ser el fondo de batalla de un desierto y así sucesivamente)?

Gracias de antemano por la respuesta a esa duda laugh.gif

Saludos laugh.gif Edited by Goldknight
0

Share this post


Link to post
Share on other sites
Fenomenal, actualizado y bien explicado.
Gran aporte. icon13.gif
0

Share this post


Link to post
Share on other sites
Es increible este script, aun k sea muy complejo es bastanet util, buen aporte Goldknight laugh.gif
0

Share this post


Link to post
Share on other sites
Pues sin duda un perfecto script gold knight ahora nuestro sueño se hara relidad icon13.gif
0

Share this post


Link to post
Share on other sites
Esta bueno,muy util para los juegos de pokemon y ese estilo. icon13.gif
0

Share this post


Link to post
Share on other sites
excelente man ya que el rmxp np tiene esta opcion de agregar areas de batalla ,yo no lo uso por que me gusta mas estilo de batalla que se vea el mounstro en el mapa y si te toca comienza la batalla icon13.gif
0

Share this post


Link to post
Share on other sites
Hola, no me marca ningun error, pero no salen las batalas, es decir, lo pongo en Proceso Paralelo, pero aun asi, paso dando vueltas por el lugar,. y no me sale nada, puedes ayudarme con esa pekeña duda?
0

Share this post


Link to post
Share on other sites
Lo que pasa es que no es necesario que estén en proceso paralelo, pon el evento en Pulsar Aceptar y va a funcionar (bueno, eso creo, yo lo tengo así y me funciona de maravilla xD.png)

Espero haberte ayudado ^^

Saludos laugh.gif
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0