Get the display name of a map that is not the currently opened/loaded map?

Quick question... is it possible to get the display name of a map that is not the currently opened/loaded map?

For example, I'd like get the display name of map# 165 and save that name to a variable, while I am on map # 003.

I found some good info on the following thread where it it shows how to get the display name of the current map that's opened, and save that to a variable. https://forums.rpgmakerweb.com/index.php?threads/storing-map-names-into-variables.56838/

However, my use case is that I need to get the display map of a map that is not currently loaded.

//Game Map Prototype

Game_Map.prototype.displayName = function() {

return $dataMap.displayName;

};

$gameVariables.setVariable(6, $dataMap.displayName);


I found $gamemap.mapId but if I get the value of that using $gamemap.mapId-165 that doesn't seem to work right, so I am obviously doing something wrong.

If it is possible to do what I am seeking to do, any help or insight would be greatly appreciated.
You would need to load the map, making sure it doesn't affect the currently-loaded map, wait for it to load, and then grab the display name.

If it's something you will want to do often with different maps, you could either load them all right at the start of the game and put the names into an array, or just hardcode the names in a plugin so you won't need to load them at all.
Thanks. Not what I was hoping for, but its a way forward. Thanks for the info. Appreciate it.
Is $dataMapInfos[id].name what you're looking for? Replace ID with the map's ID number (shown at the top-left corner of the map's properties)
That is the name you see in the editor. The display name is saved in the map data itself.
Yeah, that's the only drawback. The OP could still use it if both name and display name had the same entries though. I find myself putting the same text into both fields just so I know exactly which map I'm working with.
Is $dataMapInfos[id].name what you're looking for? Replace ID with the map's ID number (shown at the top-left corner of the map's properties)

That's EXACTLY what I am looking for. Nice! Is there some kind of reference guide with all that or did you glean it from the scripts that are included with the RMMV tool?

Thanks so much.
@ACECORP did you see the rest of the conversation? If your display name is not the same as the name you give it in the editor (in the map list), this might not be what you want. MapInfos contains the internal names, not the display names.
That's EXACTLY what I am looking for. Nice! Is there some kind of reference guide with all that or did you glean it from the scripts that are included with the RMMV tool?

Thanks so much.
I know there's a google spreadsheet floating around somewhere, but I just used the debug console's* quasi-autocomplete to see what would show up when I started typing $dataMap. Since you can also explore object properties in the debug console, expanding one of the objects in the $dataMapInfos array to see which properties it has is pretty trivial.

* Yanfly's CoreEngine has an option to show the debug console when launching the game. It's extremely useful

Anyway, as pointed out by Shaz, note that it only lists the map's "name" as opposed to the "display name" players actually see. If you want to use it to list your maps, you're going to want to make sure the name and display name are exactly the same.
@ACECORP did you see the rest of the conversation? If your display name is not the same as the name you give it in the editor (in the map list), this might not be what you want. MapInfos contains the internal names, not the display names.

Yup. My display name matches so it’s all good. Thanks for highlighting this important distinction though. I can see how it could be a problem if the names were different.
What would you change to get the display name?

Original thread: https://forums.rpgmakerweb.com/threads/get-the-display-name-of-a-map-that-is-not-the-currently-opened-loaded-map.95849/