- Joined
- Feb 14, 2021
- Messages
- 21
- Reaction score
- 5
- First Language
- English
- Primarily Uses
- RMMZ
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.Is there a reason you can't just call it Ty's House?
Hey! Thanks for the reply. I'm trying that option, but I'm not sure what I'm doing wrong.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.
$dataMap.displayName
Player House
if ($gameMap.displayName())
this.drawText($gameMap.displayName(), 0, 0, width, 'center');
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');
}
@DeadSchrodinger , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.
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);
}
};
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); } };
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!)
[dpost]@DeadSchrodinger [/dpost]
Please make a post in the VS Support thread if you want the VisuStella team to answer your questions about their plugins.
@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?
That's pretty much how plugins 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 "\".
Game_Something.prototype.doStuff = function()
{
console.log("Hello!");
};
Game_Something.prototype.doStuff = function()
{
console.log("Hello World!");
};
Thank you soooo muchWindow_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); } };