Although there are a lot of scripts that could tell you what area that your character is in (dricc's AreaPlus, BulletXT's Do_Something_In_Area; MA has an area script as well), I don't think any return what monsters are in that area without a little editing. I just so happened to have my Local Area scriplets laying around, so I tossed something together for you. I'll leave the building of the tracking window to you. I've commented in several places to show where things should go.
class Game_Map
attr_accessor :local_areas
#--------------------------------------------------------------------------
# * Initialize [ Alias ]
#--------------------------------------------------------------------------
alias ex_local_areas_gm_initialize initialize unless $@
def initialize
ex_local_areas_gm_initialize
@local_areas = []
end
#--------------------------------------------------------------------------
# * Setup [ Alias ]
# map_id : map ID
#--------------------------------------------------------------------------
alias ex_local_areas_gm_setup setup unless $@
def setup(*args)
ex_local_areas_gm_setup(*args)
load_local_areas
end
#--------------------------------------------------------------------------
# * Frame Update [ Alias ]
#--------------------------------------------------------------------------
alias ex_gm_update update unless $@
def update
ex_gm_update
# We'll narrow down where the request is coming from first before we
# do any further code.
#
# Maybe even do an 'if' statement to encapsulate the 'case' statement
# as well. Have the 'Tracking' skill set a variable and check against
# that before it proceeds. That would keep the game from checking
# @map_id endlessly without real need.
case @map_id
# When a request comes from the Map with an ID of 1 ...
# (Right click on the map underneath the main project folder, then click
# on 'Map Properties'. Look at the title bar and it will say what ID the
# map has.)
when 1
# When the player is within a certain area and is not moving ...
if $game_player.within_local_area?("AreaName") and
$game_player.moving? == false
# 'Tracking' Window Pop-Up here.
# Remember that this area gets updated around 60 times each second,
# so have another 'if' statement to check if the 'Tracking' window is
# already open before the script tries to open another one.
#
# Array of Troop names can be returned by using the following :
#
# $game_map.get_area_encounters("AreaName")
end
end
end
#--------------------------------------------------------------------------
# * Load Local Areas [ New ]
#--------------------------------------------------------------------------
def load_local_areas
@local_areas.clear
for area in $data_areas.values
@local_areas.push(area) if @map_id == area.map_id
end
end
#--------------------------------------------------------------------------
# * Get Local Area [ New ]
# area_name - Name of Area
# param - [0] Returns an <Area> object.
# - [1] Returns the Area ID number.
#--------------------------------------------------------------------------
def get_local_area(area_name, param)
for area in @local_areas
if area.name == area_name
case param
when 0
return area
when 1
return @local_areas.index(area)
end
end
end
return false
end
#--------------------------------------------------------------------------
# * Get Area Encounters [ New ]
# area_name - Name of Area
#--------------------------------------------------------------------------
def get_area_encounters(area_name)
area_data = get_local_area(area_name, 1)
area_encounters = @local_areas[area_data].encounter_list
troop_names = []
for troop in area_encounters
troop_names.push($data_troops[troop].name)
end
return troop_names
end
end
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Within Local Area? [ New ]
# area_name - Name of Area
#--------------------------------------------------------------------------
def within_local_area?(area_name)
area_data = $game_map.get_local_area(area_name, 0)
return false unless area_data
return in_area?(area_data)
end
end