Here's a little thing I made long ago to do just that:
[rgss]class MapGraphics
def tileset(map_id = nil)
# Returns the name of the tileset of map with MAP_ID
return get_tileset(map_id).tileset_name
end
def autotiles(map_id = nil)
# Returns an array of autotile names of map with MAP_ID
return get_tileset(map_id).autotile_names
end
def fog(map_id = nil)
# Returns the name of the fog of map with MAP_ID
return get_tileset(map_id).fog_name
end
def panorama(map_id = nil)
# Returns the name of the panorama of map with MAP_ID
return get_tileset(map_id).panorama_name
end
def characters(map_id = nil)
# Returns a array of character graphics of map with MAP_ID
graphics = []
pages = (get_map(map_id).events.values.collect {|e| e.pages }).flatten
graphics = pages.collect {|page| page.graphic.character_name }
return (graphics - ['']).uniq
end
def get_tileset(map_id)
map_id = $game_map.map_id if map_id == nil
map = load_data(sprintf("Data/Map%03d.rxdata", map_id))
return $data_tilesets[map.tileset_id]
end
def get_map(map_id)
map_id = $game_map.map_id if map_id == nil
return load_data(sprintf("Data/Map%03d.rxdata", map_id))
end
end
$mapinfo= MapGraphics.new
[/rgss]
Its stored in the global variable $mapinfo.
Usage is as follows:
- $mapinfo.tileset(MAP_ID)
- $mapinfo.autotiles(MAP_ID)
- $mapinfo.fog(MAP_ID)
- $mapinfo.panorama(MAP_ID)
- $mapinfo.characters(MAP_ID)
If the MAP_ID argument is omitted, it will use the current map ID as default.
If you really want to get in-depth with it, you could add a few methods to enumerate through the event code and find picture graphics, etc.