Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=============================================================================
- //LudoDisplayName.js
- //=============================================================================
- /*:
- * @plugindesc Allows you to change the display name of a map via script events.
- * @author Alessio De Santis
- *
- *
- * @help
- * Use
- * $ndname[MapID-1].displayName = "new map display name"
- * in an event script command to change the display name of a map.
- * Use
- * $ndname[MapID-1].displayName = ""
- * to show default display Text.
- *
- * Change MapID with the Id of the map that you want to change the display name of.
- */
- //-----------------------------------------------------------------------------
- $ndname = [];
- Scene_Title.prototype.create = function() {
- Scene_Base.prototype.create.call(this);
- this.createBackground();
- this.createForeground();
- this.createWindowLayer();
- this.createCommandWindow();
- this.initnd();
- };
- Scene_Title.prototype.initnd = function() {
- for(i of $dataMapInfos){
- if(i && $ndname.length <= $dataMapInfos.length){
- $ndname.push({
- id : i.id,
- displayName : ""
- })
- }
- }
- }
- Game_Map.prototype.displayName = function() {
- if($dataMap.displayName && $ndname[$gameMap._mapId-1].displayName != "")
- return $ndname[$gameMap._mapId-1].displayName
- return $dataMap.displayName;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement