Region Map Names

GreyWolfVino

Villager
Member
Joined
Apr 12, 2018
Messages
28
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hey fellow game makers, so I come across this issue. I recently expanded all my small maps into a bigger more detailed map but I still want every individual map/region to have a map name when the player enters that region/area. How would I go about doing so? Thank you so much in advance.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,035
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
You want the map name to pop up, and be different, as the player moves from one location on a map to another?

If the transition space between the areas is small, you could add events to trigger the name to display, but if more than a few tiles you're probably better off going with a plugin that will let you use regions to identify the areas.

Then you will need to change $dataMap.displayName to whatever you want to pop up, followed by a call to open the map name window.

Or get a custom plugin written to do all that for you, though you'll still need to define the area boundaries and names.
 

GreyWolfVino

Villager
Member
Joined
Apr 12, 2018
Messages
28
Reaction score
1
First Language
English
Primarily Uses
RMMV
You want the map name to pop up, and be different, as the player moves from one location on a map to another?

If the transition space between the areas is small, you could add events to trigger the name to display, but if more than a few tiles you're probably better off going with a plugin that will let you use regions to identify the areas.

Then you will need to change $dataMap.displayName to whatever you want to pop up, followed by a call to open the map name window.

Or get a custom plugin written to do all that for you, though you'll still need to define the area boundaries and names.
Thank you so much, Shaz! You literally solved my problem! I cannot thank you enough!!
 

GreyWolfVino

Villager
Member
Joined
Apr 12, 2018
Messages
28
Reaction score
1
First Language
English
Primarily Uses
RMMV
Actually I haven't gotten it to work. I pretty awful at writing lines of script
 

superkoopa

Veteran
Veteran
Joined
May 21, 2020
Messages
31
Reaction score
73
First Language
English
Primarily Uses
RMVX
@GreyWolfVino I guess you could place an event (with the trigger set to player touch) and then show text. If you want it a bit fancy you could always use pictures.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,035
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
The neatest way to do it without a plugin is to allocate a region id to each "area" and draw an outline around that area with that region. Actually, you just need to draw it where the player can cross from one region to another.

So if you have a map that divides down the middle, and the left side is region 1 and the right side is region 2, use region 1 to draw along the edge of region 1, and use region 2 to draw along the edge of region 2. So where the two meet, you'll have the two regions drawn side by side.

Now create a parallel process event and tuck it away in the corner of your map. Add these commands (use whatever variables you have available, but make sure you name them):
Code:
Wait 5 frames
Control Variables: Player Region = Script: $gamePlayer.regionId()
If Variable [Player Region] # 0
  If Variable [Player Region] # Variable [Saved Region]
    If Variable [Player Region] = 1
      Script: $dataMap.displayName = "Region 1"
      Jump to Label: UpdateRegion
    End
    If Variable [Player Region] = 2
      Script: $dataMap.displayName = "Region 2"
      Jump to Label: UpdateRegion
    End
  End
End
Jump to Label: SkipRegionUpdate
Label: UpdateRegion
Script: SceneManager._scene._mapNameWindow.open();
Control Variables: Saved Region = Player Region
Label: SkipRegionUpdate
You will have one of these blocks:
Code:
    If Variable [Player Region] = 1
      Script: $dataMap.displayName = "Region 1"
      Jump to Label: UpdateRegion
    End
for each region.

Finally if you start on this map, create a new parallel process event that sets the [Saved Region] variable to whatever region number the player will start in. If you transfer to this map from other maps, have the transfer event set the [Saved Region] to whatever region it's transferring you to.

Here's how this works ...

every 5 frames, the event will check if the player is on a region. If they are, it checks if it's the same region they were on previously (this is so you only get the message once, when you enter the region). If it's not the same, it will do a series of tests to see what region the player is in, and set the "map" name accordingly. Once it's found a valid region and set the map name, it skips the rest of the tests, shows the message, then saves the region so it can keep track of where you currently are.

You can still use regions for other things, and if the player goes onto one of those tiles, this event will drop through all the tests without finding a valid region, then will skip the steps to show the name and save the region.


The only issue with the above is when you transfer to the map from another map, it will show the map name, not the region name. I'm not sure how to change that without actually creating a plugin.
 
Last edited:

GreyWolfVino

Villager
Member
Joined
Apr 12, 2018
Messages
28
Reaction score
1
First Language
English
Primarily Uses
RMMV
No this is perfect. This should run fine because what I was trying to do is assign regions to a map, such as Region 1, 2, etc.. and it would announce the region once the player lands on the tile, kinda like certain routes in Pokémon how they are continuously to certain extent and when the player does transfer to a new map, I can reuse Region 1, 2, etc as different regions in that specific map and what you are explained to me appears to do just that. I will test it later and let you know how it went but thanks so much. I really appreciate it
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,035
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
If you reuse the same region number on the same map, you will get the same name popping up for each one. Is this what you want?
 

GreyWolfVino

Villager
Member
Joined
Apr 12, 2018
Messages
28
Reaction score
1
First Language
English
Primarily Uses
RMMV
The same region number will be used on a different map, different from the first map. Example: Big Map 1 is Maps 1-4 combined, but I want to give the appearance as they are four individual maps by making them regions. Big Map 2 is Maps 5-8 but I use the same region numbers so easier to track. Is that what you meant right?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,035
Reaction score
13,672
First Language
English
Primarily Uses
RMMV
Ah, yes, that will work. I thought you meant using the same region id for different areas on the same map, which wouldn't work. But what you do on one map has no bearing on what you do on another - you can absolutely use the same region ids and have them show different names.
 

GreyWolfVino

Villager
Member
Joined
Apr 12, 2018
Messages
28
Reaction score
1
First Language
English
Primarily Uses
RMMV
Hey Shaz,
So I tried the code that you sent me and maybe I am missing something but every time the player crosses over to the next region, it re-displays the map name, not the region name. I also haven't created the Saved Region parallel event yet. Do you think it has something to do with that or the fact I am using Olivia Map Name Display Plugin
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People1.png & SF_People1.png added!!!!

Adventurer:
"Why your body looks like a bird?"

Stranger:
"Because I'm harpy"

Adventurer:
"Clap along if you feel like a room without a roof"

*Both dancing to Pharrell Williams song*
Stream will be live shortly with a make-up session of the Interactive Text Adventure! Feel free to drop by!
Pootscooter wrote on Pharonix's profile.
Hey @Pharonix, just wondering what you're up to lately and if you've had an opportunity to check out the LTBS thread in the past few days...(a couple of us could really use your expertise). Hope you are well and Happy Thanksgiving!

Forum statistics

Threads
105,506
Messages
1,014,263
Members
137,173
Latest member
zoetsoi
Top