Map Name + Character Name?

Is there a way to have a character's name be associated with a map?

If my character, Ty visits a specific map, i want it to say "Ty's House", not "\N[10]'s House"

Is that possible?

1616366262708.png
Is there a reason you can't just call it Ty's House?
Is there a reason you can't just call it Ty's House?
Because the user gets to name the character at the beginning. "Ty" is just a stand-in for what the player wants it to be.
You can use \v[1]'s House as your map name, while setting your variable using this script call: $gameActors.actor(x).name()

Where x is replaced by your actor's ID. Be sure to set their new name before going into the house map or it will just display something like 0's House.
You can use \v[1]'s House as your map name, while setting your variable using this script call: $gameActors.actor(x).name()

Where x is replaced by your actor's ID. Be sure to set their new name before going into the house map or it will just display something like 0's House.
Hey! Thanks for the reply. I'm trying that option, but I'm not sure what I'm doing wrong.

1616371757569.png


I have a starting switch changing the variable to the actor name.

1616371794139.png


I tried using upper case and lower case Vs.
But the wording is still "\V[201]"

1616371881180.png
I don't have MZ, but I assumed the coding was similar. Does it support text codes by default? Or is there an equivalent to Yanfly's Message Core?

Also, the "Name" field for the map won't change in your editor. Only the "Display Name" in game. If the text code is supported that is.
This is because the "Display Name" is an "Object" (JSON File):
JavaScript:
$dataMap.displayName

Return: "Your Display Name Map".

Provisional solution:
Create a new project to test this:
Change Display Name of Map "Player" to:
Code:
Player House

Open the rpg_windows.js file in any text editor.
Search using Ctrl + F for the following term:
Code:
if ($gameMap.displayName())

Replace the line...
Code:
this.drawText($gameMap.displayName(), 0, 0, width, 'center');
...to...
Code:
if($gameMap.displayName() == "Player House"){
    this.drawText($gameActors.actor(1).name() + "'s House", 0, 0, width, 'center');
}else{
    this.drawText($gameMap.displayName(), 0, 0, width, 'center');
}

I don't have RpgMZ and I don't even intend to buy it for now, but from what I saw many things were the same as RpgMV.

So I'm sorry if it doesn't work.
I found a few people trying to do the same thing,
and a few plugins that only work for MV apparently.

Hey @VisuStella

How hard would it be to update Olivia Fallen Angel's MV plugin to MZ?

(I don't see Olivia's info listed, otherwise I would reach out to her).

Double-post notice: @DeadSchrodinger

Please make a post in the VS Support thread if you want the VisuStella team to answer your questions about their plugins.
I think people might be overthinking this a bit. Just make a new text file, rename it "MapNameEx.js" and then paste the following into it. Save it into your plugins folder, enable it like you would any other plugin, and ta-da, you now have access to the drawTextEx set of text codes for map names.

Code:
Window_MapName.prototype.refresh = function() {
    this.contents.clear();
    if ($gameMap.displayName()) {
        const width = this.innerWidth;
        this.drawBackground(0, 0, width, this.lineHeight());
        this.drawTextEx($gameMap.displayName(), 0, 0, width);
    }
};

Spoiler: Example before/after
1616408186395.png

You can credit me if you want but it's not necessary. This was just changing 1 line of code and I already knew exactly where to look. 30 seconds of work tops. 😉 (Making that sample image took more time, actually!)
I think people might be overthinking this a bit. Just make a new text file, rename it "MapNameEx.js" and then paste the following into it. Save it into your plugins folder, enable it like you would any other plugin, and ta-da, you now have access to the drawTextEx set of text codes for map names.

Code:
Window_MapName.prototype.refresh = function() {
    this.contents.clear();
    if ($gameMap.displayName()) {
        const width = this.innerWidth;
        this.drawBackground(0, 0, width, this.lineHeight());
        this.drawTextEx($gameMap.displayName(), 0, 0, width);
    }
};

Spoiler: Example before/after

You can credit me if you want but it's not necessary. This was just changing 1 line of code and I already knew exactly where to look. 30 seconds of work tops. 😉 (Making that sample image took more time, actually!)

OMG that worked!!!!

Thank you so much! And I am totally crediting you for that marvelous little bit of coce!
Double-post notice: @DeadSchrodinger

Please make a post in the VS Support thread if you want the VisuStella team to answer your questions about their plugins.


I couldn't figure out how to delete my previous comment.
@Aesica: I didn't even think I could do it in a separate file, using it as a plugin. I just don't understand how you accepted the elements using "\".

@DeadSchrodinger: Did my idea not work?
@Aesica: I didn't even think I could do it in a separate file, using it as a plugin. I just don't understand how you accepted the elements using "\".

@DeadSchrodinger: Did my idea not work?

Hi @Dev_With_Coffee,

I actually didn't try your idea. It seemed sketchy to this coding noob to be changing the rpg_windows file.
@Aesica: I didn't even think I could do it in a separate file, using it as a plugin. I just don't understand how you accepted the elements using "\".
That's pretty much how plugins work. 🙂

If the base files (rpg_*.js or rmmz_*.js) have this function:
Code:
Game_Something.prototype.doStuff = function()
{
   console.log("Hello!");
};

And you make a plugin with

Code:
Game_Something.prototype.doStuff = function()
{
   console.log("Hello World!");
};

The plugin version is executed after the rpg/rmmz files, causing it to overwrite the base function. So when you run the doStuff function, it'll say "Hello!" without any plugins or if the plugin is disabled, or "Hellow World" if the plugin is installed and enabled.

Generally you always want to make changes to the core files through plugins instead of directly in the core files themselves, because if you ever go to update your project with newer, updated versions of rpgmaker's core files (with bugfixes or other optimizations) your changes to any edited core files will be lost.

Edit: As for accepting text codes, Window_Base has two functions for writing text: drawText() which is a simple command to write basic text, and drawTextEx() which is the one that renders text codes, icons, etc. Both have their uses, but in the case of map names, I'm honestly not sure why they went with drawText over drawTextEx.
It worked on Rpg Maker MV.
@Aesica thanks!
Window_MapName.prototype.refresh = function() { this.contents.clear(); if ($gameMap.displayName()) { const width = this.innerWidth; this.drawBackground(0, 0, width, this.lineHeight()); this.drawTextEx($gameMap.displayName(), 0, 0, width); } };
Thank you soooo much

Original thread: https://forums.rpgmakerweb.com/threads/map-name-character-name.134630/