How to get map name from map_id

Hi. Using javascript, given a map_id, how do I get the corresponding map name or display name? Thanks.
Hi. Using javascript, given a map_id, how do I get the corresponding map name or display name? Thanks.
Tada! You can do that using my plugin found here:
https://forums.rpgmakerweb.com/inde...-datamanager-loadmapdata.117058/#post-1030499
Here's how:
Example (set displayName of MapId 6 to gameVariable 1):
$gameVariables.setValue(1, $gameSystem.readMapData(6).displayName);

Spoiler: Screenshot showing set to variable & display in message
1580399807378.png
Thanks!
No prob. Happy to help 🙂 Working as needed then now?
No prob. Happy to help 🙂 Working as needed then now?

I still have to try it. What about the regular name (not the display name)?
I still have to try it. What about the regular name (not the display name)?
@point_and_click_noob
Okay cool cool no rush, let me know how it goes though 🙂 Should work perfectly as need for ya 🙂

Name is actually much more simple... no plugins needed...
...it's just stored in $dataMapInfos (MapInfo Object Info: Click Here to View)

Example MapId 6:
$dataMapInfos[6].name

Also that plugin I wrote loads the maps raw data sooo anything can be found and used here:

Edit:
Edited with the correct script for "name"
The display name worked great. But for the regular name I'm getting $mapDataInfos is not defined.
woops... sorry bout that not sure how that even worked for me... I think it's actually..
(odd that it did honestly, I must have typed it wrong in the thread and correctly in the maker lol)
$dataMapInfos[6].name
woops... not sure how that even worked for me... I think it's actually..
(odd that it did honestly, I must have typed it wrong in the thread and correctly in the maker lol)
$dataMapInfos[6].name

Thanks so much! Everything works perfectly!
Thanks so much! Everything works perfectly!
Yay! No prob! 🙂 Super happy to help. ☺️👍 Glad to hear it.
I'll be around, if you need anything you know what to do 🙂
@point_and_click_noob If everything is working as you want, can I close this thread and mark it as solved?
@point_and_click_noob If everything is working as you want, can I close this thread and mark it as solved?

Yes. Thank you.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-map-name-from-map_id.117760/