Accessing Map Notetags

I'm trying to access notetags within Map Properties.


@Another Fen helped me with pulling notetag info out of stuff like items, weapons, armors, etc using:


$data_items[id].note[/<id🙁.*?)>/i, 1].to_i


Using that Script Call formula, I tried using this:


$data_mapinfos[$game_map.map_id].note[/<id🙁.*?)>/i, 1].to_i


However, it's not pulling the notetag out. Anyone know what I'm missing?
It's not in $data_mapinfos (and I'm surprised it's not throwing an error that note doesn't exist).  It's in $game_map.map.note but neither map nor map.note are readers or accessors of Game_Map, so you have to set that up first:

Code:
class Game_Map
  def map
    @map
  end
end



unless you're doing this within a script inside the Game_Map class - in that case you can just use @map.note
Thank you so much, Shaz!


Works beautifully!

Original thread: https://forums.rpgmakerweb.com/threads/accessing-map-notetags.60695/