じ☆ve冰风 发表于 2026-7-11 10:56:16

Map Name Window Plugin

To anyone that wants to have a window displayed behind the map name, here's a plugin that will get the job done.Basically, this plugin controls the opacity of the window behind the map name and doesn't draw the dark background behind the map name.To have a general idea of how the map name window will look like, here's the screenshot that shows the plugin in action:





Now, the plugin doesn't just display the window behind the map name as an alternative to the dark background that's normally drawn behind the map name.You can also choose to use a different window for the map name, but you will have to make sure that the image file that has the alternate window graphic for the map name window has the same format as the Window graphic file.To avoid any conflict with other plugins that depend on the map name window (like AltMenuScreen2MZ), I typed a load window skin function that's exclusive to the MapNameWindow plugin instead of typing a complete override to the loadWindowskin function.Here's the screenshot of the plugin:





By the way, you can also choose to have no window behind the map name by leaving the Window name blank.It's not impossible to create a plugin command for this plugin, but I chose to keep things simple for this plugin.Besides, this plugin is copyleft and open-source, so you don't have to give me credit for this plugin and are free to alter/enhance this plugin to your liking.The following is the code for the MapWindowName plugin:

Spoiler: MAP NAME WINDOW PLUGIN CODE                JavaScript:       
//=============================================================================// MapNameWindow.js//=============================================================================/*:* @target MZ* @plugindesc Displays the map name window.* @author N/A (open-source, copyleft)** @help MapNameWindow.js** This plugin is used to display the window for the map name.You can* change the window for the map name window.** This plugin does not provide plugin commands.** @param windowName* @type string* @default Window* @text Window* @desc Filename of the window for map name*/(() => {    //-----------------------------------------------------------------------------    // PluginManager    //      const pluginName = "MapNameWindow";    const parameters = PluginManager.parameters(pluginName);    const windowName = String(parameters['windowName'] || '');      //-----------------------------------------------------------------------------    // Window_MapName    //    // The window for displaying the map name on the map screen.      var _Window_MapName_updateFadeIn = Window_MapName.prototype.updateFadeIn;    Window_MapName.prototype.updateFadeIn = function() {      this.opacity += 16;      _Window_MapName_updateFadeIn.call(this);    };      var _Window_MapName_updateFadeOut = Window_MapName.prototype.updateFadeOut;    Window_MapName.prototype.updateFadeOut = function() {      this.opacity -= 16;      _Window_MapName_updateFadeOut.call(this);    };      Window_MapName.prototype.loadMapNameWindowskin = function() {      this.windowskin = ImageManager.loadSystem(windowName);    };      Window_MapName.prototype.refresh = function() {      this.contents.clear();      if ($gameMap.displayName()) {            const width = this.innerWidth;            this.loadMapNameWindowskin();            this.drawText($gameMap.displayName(), 0, 0, width, "center");      }    };})();


Also, I'll be attaching the MapWindowName plugin to this post. If I notice that I overlooked some mistake or error in the code, I'll update this post about the fix(es) and give a heads up about it.


本贴来自国际rpgmaker官方论坛作者:Lion Blade Soler处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/map-name-window-plugin.128144/
页: [1]
查看完整版本: Map Name Window Plugin